Like a super-intelligent yet innocent and quirky child, ChatGPT needs to be engaged in rules-based ways to elicit workable answers from…
After almost a year of exposure to various versions of ChatGPT, we must all have our stories of how the chatbot has answered our questions in ways that mirror our assumptions that the large language model is a real human.
Unfortunately, the axiom “rubbish in, rubbish out” still applies when we are trying to turn oversimplified queries into useful morsels of knowledge and research.
The typical solution is to learn from our mistakes when querying ChatGPT. So, instead of asking a generic question such as “Tell me about global warming”, be specific and ask: “What are the most credible causes claimed to cause global warming, and how has the world has been addressing these causes.”
Prompting basics
In addition to being more specific in your queries, people have learned that we are no longer dealing with a simpleton such as a chatbot from 2018. Confining your questions to the previously-customary one paragraph or sentence is usually unproductive, and will lead to the necessity of asking more follow-up questions, restricting the bot’s generic responses, and even correcting any runaway assumptions arising from mistakes in our queries.
So, here is gist of the beginners’ best practices when entering chat queries:
- Include as much background information and context in the query to limit what ChatGPT will refer to in its output. You need not cram everything into a query of a single paragraph.
- Use overarching constraints and guidelines right at the start to put ChatGPT into a certain response mood that matches what you specify. For example, you can use a table of rules and conditions right at the beginning of the query that the response must comply with — such as a range of permissible weather conditions when asking the chatbot to suggest outings for your hobby group.
- If your command of effective communication, your query may contain ambiguities and other unintended signals that ChatGPT sometimes over-reads as intentional. Do not be deterred: advance to the next query to correct any misunderstood parts of the previous question.
- Use some of the more well-known ways of asking questions to prompt ChatGPT, including Zero Shot, Few Shot, Chain of Thought (CoT), Self Consistency, General Knowledge, and ReAct (Reason & then Act) prompting:
〉 Zero-Shot prompting: This approach allows you to query ChatGPT without providing any specific context. Instead, you simply pose your question or request, and ChatGPT will generate a response based on its general knowledge. For example: Prompt: “What is the capital of Iceland?” Response: “The capital of Iceland is Reykjavik.” Note that this method is useful for specific situations, and at other times the output can be inaccurate or not as expected, requiring further model tuning or more prompt text to correct. (42%)
〉 Few-Shot prompting: This method prompting involves providing a minimal amount of context to guide ChatGPT’s response. You can frame your prompt with a few examples or descriptions to steer the conversation in the desired direction.
〉 Chain-of-Thought (CoT) prompting: This way of prompting encourages a continuous flow of ideas by building upon the AI’s previous responses. Start with an initial prompt, and then continue the conversation by referencing earlier exchanges. This method fosters a more coherent and contextually relevant dialogue. For example: Prompt 1: “What are the benefits of exercise?” Response 1: ChatGPT lists several benefits. Prompt 2: “Can you elaborate on how exercise improves mental health?” Response 2: ChatGPT provides detailed information based on the previous prompt.
〉 Self Consistency prompting: This approach involves prompting ChatGPT with its previous responses to encourage consistency and coherence in its answers. By referring back to its own statements, ChatGPT can maintain logical consistency throughout the conversation. For instance: Prompt: “You mentioned earlier that the Earth revolves around the Sun. Can you explain why this is the case?” Response: ChatGPT provides an explanation consistent with its previous statement.
〉 General Knowledge prompting: This approach involves prompting ChatGPT with its previous responses to encourage consistency and coherence in its answers. By referring back to its own statements, ChatGPT can maintain logical consistency throughout the conversation. For instance: Prompt: “You mentioned earlier that the Earth revolves around the Sun. Can you explain why this is the case?” Response: ChatGPT provides an explanation consistent with its previous statement.
〉 ReAct prompting: This type of prompting involves reacting to ChatGPT’s responses with follow-up questions or comments to guide the conversation dynamically. By engaging with ChatGPT’s answers, you can steer the dialog towards specific topics of interest or explore new avenues. For example: “What do you think are the implications of climate change?” Response: Chatbot discusses various implications. Follow-up: “How can individuals contribute to mitigating climate change?” Response: ChatGPT offers actionable steps for individuals to combat climate change.
By incorporating these advanced prompting techniques into your interactions with ChatGPT, you can enhance the accuracy, coherence, and depth of your conversations
The various techniques and suggestions summarized here will also apply to prompting other kinds of generative AI text-input-based bots as well.
Once you are armed with the right foundational skills to get the best out of ChatGPT, the next step will be to sign up for courses in “prompt engineering” to expand your repertoire of generative AI skills.