I created this yesterday for a similar line of thought in using ChatGPT to teach Prolog programming and wanted to see if ChatGPT responded as needed. The result was promising.
(Click triangle to expand)
Prompt
Grade this one sentence statement on a scale of 1 to 10 with 10 being best. Explain grade and how to make it better.
Prolog is a logic programming language that uses syntactic unification and the primary means of evaulation.
Completion
I would give this sentence a grade of 6 out of 10. Here’s why:
- The sentence contains a typographical error: “evaulation” should be “evaluation.”
- The phrase “the primary means of evaulation” is ambiguous and could be clarified.
- The sentence lacks a clear subject, making it difficult to understand who or what is using syntactic unification.
To improve the sentence, I would suggest the following changes:
- Correct the typo by changing “evaulation” to “evaluation.”
- Clarify the phrase “the primary means of evaluation” by specifying what is being evaluated.
- Add a clear subject to the sentence.
Here’s a revised version of the sentence:
“Prolog is a logic programming language that uses syntactic unification as the primary means of evaluating queries and solving logical problems.”
This revised sentence corrects the typo, clarifies the purpose of syntactic unification, and adds a clear subject (“Prolog”). As a result, the sentence is easier to understand and conveys its intended meaning more effectively.
Prompt
Grade this one sentence statement on a scale of 1 to 10 with 10 being best. Explain grade and how to make it better.
“Prolog is a logic programming language that uses syntactic unification as the primary means of evaluating queries and solving logical problems.”
Completion
I would give this sentence a grade of 9 out of 10. Here’s why:
- The sentence is clear and concise, effectively conveying the key characteristics of Prolog as a logic programming language.
- It accurately describes the use of syntactic unification as the primary means of evaluating queries and solving logical problems in Prolog.
- The sentence is grammatically correct and free of typographical errors.
The only minor improvement I would suggest is to clarify that syntactic unification is used in the process of inference, which is central to Prolog’s operation. This clarification provides additional context for readers who may not be familiar with the concept of syntactic unification.
Here’s a revised version of the sentence:
“Prolog is a logic programming language that uses syntactic unification as the primary means of inference in evaluating queries and solving logical problems.”
This revised sentence retains the clarity and conciseness of the original while providing additional context about the role of syntactic unification in Prolog’s inference process. With this improvement, I would give the revised sentence a grade of 10 out of 10.
Prompt
Grade this one sentence statement on a scale of 1 to 10 with 10 being best. Explain grade and how to make it better.
“Prolog is a logic programming language that uses syntactic unification as the primary means of inference in evaluating queries and solving logical problems.”
Completion
I would give this sentence a grade of 10 out of 10. Here’s why:
- The sentence is clear, concise, and informative, effectively conveying the key characteristics of Prolog as a logic programming language.
- It accurately describes the use of syntactic unification as the primary means of inference in evaluating queries and solving logical problems in Prolog.
- The sentence is grammatically correct and free of typographical errors.
- It provides context about the role of syntactic unification in Prolog’s inference process, which is helpful for readers who may not be familiar with the concept.
Overall, the sentence is well-constructed and effectively communicates important information about Prolog. It is precise in its language and provides a good introduction to the subject matter. As such, I believe it deserves a grade of 10 out of 10.
Since the sentence is already well-written and informative, there are no significant improvements that I would suggest. However, it’s worth noting that the sentence is a standalone statement, and additional context or examples may be needed for readers who are not familiar with logic programming or Prolog. This additional information could be provided in subsequent sentences or paragraphs, depending on the context in which the sentence is used.
Funny side note: When I create prompts it often seems like the quality of the response, not the response itself, is like possible answers you get from a Magic 8 ball.
Also I find that when it comes to getting an LLM to do evaluations such as math or executing an algorithm that too often the result will be an hallucination. Instead the tatic I am currently choosing to pursue is to use ChatGPT plugins to do the evaluation and pass that back, this is a work in progress and yes I do have access to ChatGPT plugins but only just a few days ago.
Since Discourse will not let me post more than 2 replies in a row have to combine the following in this post.
As @AlexDeM notes, punctuation matters to an LLM.
Having created many parsers over the years, not to be confused with compilers which make use of parsers, one has to naturally think in terms of Abstract Syntax Trees and syntactic sugar. Many AST will use punctuation as operators (,
,.
,;
, -
… ) and these operators tend to be higher up in the tree. Many programmers do not think of the ,
at the end of a line in many programming languages as a binary operator but it is, without getting into details it often denotes the sequential execution of a statement. A period is even often higher and denotes the end of function. In a similar manner when creating prompts pay very close attention to the punctuation. As I noted to @AlexDeM before (ref) I have seen a period be interpreted as separating two commands when the intent of the second sentence was to add clarity to first. By changing the period to a comma the prompt worked as expected. @AlexDeM is the only one who I have seen to quickly embrace this knowledge and pass it along.
@AlexDeM Really liked your prompt here.
@james.earthman Notice that in that prompt numbers were used because there are 6 instructions but if instead they were not instructions to be executed sequentially then seriously consider using bullets *
instead when creating list of clarification (constraint) statements.
One other item of note when creating prompts: Learning the preferred words.
While it may seem that my rules for creating prompts are nit-picky, keep this quote in mind as at times it overrules some of the rules.
“How well we communicate is determined not by how well we say things but how well we are understood.”
— Andy Grove