How to Use the CLEAR Framework to Get Better Results from ChatGPT
Five concepts to help you improve your "prompt engineering" skills.
Reader Jörgen Rindstedt from Absentia Data wrote in with an article recommendation based on my recent posts about ChatGPT:
The CLEAR path: A framework for enhancing information literacy through prompt engineering
Unfortunately, it seems the article has moved behind a paywall since Jörgen first emailed me the link yesterday. I had the chance to read the article in its entirety, so I will attempt to summarize its key points below. Alas, I remember certain parts better than others.
The five components of the framework are included in the article's free-to-view Abstract, so I know those are correct.
As for the explanations themselves...¯\_(ツ)_/¯ Let's just say that they were inspired by the article. If I've faithfully reproduced the explanations, please know that they are not my original ideas. And if I've butchered and misrepresented them, then that's on me. Enjoy!
Prompt Engineering
Before getting into the framework, we need some context.
"Prompt engineering is the process of constructing queries or inputs (i.e. prompts) for AI language models so as to elicit the most precise, coherent, and pertinent responses. In essence, it is the art of fine-tuning the questions or commands provided to AI models in order to optimize their performance and guarantee that they produce the desired results."
The CLEAR Framework
Here are the five components of the CLEAR framework:
- Concise
- Logical
- Explicit
- Adaptive
- Reflective
Concise
Be clear and direct when communicating with AI.
Be specific, not vague. Use declarative sentences when providing context. Use imperative sentences when asking AI to do something for you.
Avoid extraneous words. If a word is not clarifying your intent, then it is a potential source of confusion for the AI.
BAD: "Could you write something about a topic related to science?"
GOOD: "Write an essay on the ethical implications of genetic engineering in humans."
Logical
Organize your prompts into clear, easy-to-follow steps. While AI language models will work conversationally, you get better results if you ditch the prose in favor of providing clear instructions. Your wife may not appreciate you treating every problem as an opportunity to show off your logic skills, but ChatGPT will reward you with better, more relevant output if you structure your prompts logically.
BAD: "Please create a 5-minute speech about the importance of renewable energy, and also include some statistics on carbon emissions."
GOOD: "First, write a 5-minute speech about the importance of renewable energy. Then, include at least two statistics about carbon emissions to support your argument."
Explicit
As with programming, explicit is better than implicit.
Don't assume that ChatGPT knows what you are asking for. Imagine that you are having a conversation with the world's most knowledgeable two-year-old. Do not leave anything up to interpretation.
By including specific details and instructions, you can guide AI language models towards generating more accurate and relevant content.
Another helpful practice is to provide sample outputs in your prompts. This can give the AI model a better understanding of what you want, which can lead to better outputs.
BAD: "Can you provide me with information about dogs?"
GOOD: "Generate a list of ten interesting facts about Golden Retrievers."
Adaptive
Don't settle for the first response you get from ChatGPT.
One of the big advantages of large language models over traditional search engines is that they have "memory." You don't need to rewrite your entire prompt if you didn't get the response you were looking for. Instead, tell ChatGPT where it went wrong and give it instructions on how to do better.
This iterative process ultimately leads to the AI generating better outputs.
Reflective
Take a moment to reflect at the end of each conversation you have with ChatGPT.
- Was the initial response good or bad?
- What about the initial prompt led to that outcome?
- What followup questions resulted in the best improvements?
- What could you do to make future interactions more efficient?
Remember, prompt engineering is a brand new skill. Outside of AI researchers, no one even needed this skill–or knew it existed!–until about six months ago. Like any new skill, the best way to get better at it is with small improvements that compound over time.
Thanks for the tip, Jörgen! You've made my Top 3 List of Swedes, behind my grandmother and SQL Server MVP Ola Hallengren (to whom I awkwardly–and without context–introduced myself at the recent Microsoft MVP Summit in Redmond).
Acknowledgements
- Portions of this article's body generated with the help of ChatGPT
Image by Daniel Roberts from Pixabay