26 Principles For Crafting Effective Prompts 💭
I recently read a paper that outlined 26 guiding principles to improve how we ask questions and give prompts to large language models like ChatGPT. The authors did a thorough analysis on to understand how LLMs better grasp the key points of what's being asked, leading to better answers. A lot of the principles we're already utilizing, but I found it all pretty interesting. Thought I'd share it with you guys to take a look too! Thoughts? 1. No need to be polite with LLM so there is no need to add phrases like “please”, “if you don’t mind”, “thank you”, “I would like to”, etc., and get straight to the point. 2. Integrate the intended audience in the prompt, e.g., the audience is an expert in the field. 3. Break down complex tasks into a sequence of simpler prompts in an interactive conversation. 4. Employ affirmative directives such as ‘do,’ while steering clear of negative language like ‘don’t’. 5. When you need clarity or a deeper understanding of a topic, idea, or any piece of information, utilize the following prompts: - Explain [insert specific topic] in simple terms. - Explain to me like I’m 11 years old. - Explain to me as if I’m a beginner in [field]. - Write the [essay/text/paragraph] using simple English like you’re explaining something to a 5-year-old. 6. Add “I’m going to tip $xxx for a better solution!” 7. Implement example-driven prompting (Use few-shot prompting). 8. When formatting your prompt, start with ‘###Instruction###’, followed by either ‘###Example###’ or ‘###Question###’ if relevant. Subsequently, present your content. Use one or more line breaks to separate instructions, examples, questions, context, and input data. 9. Incorporate the following phrases: “Your task is” and “You MUST”. 10. Incorporate the following phrases: “You will be penalized”. 11. Use the phrase ”Answer a question given in a natural, human-like manner” in your prompts. 12. Use leading words like writing “think step by step”. 13. Add to your prompt the following phrase “Ensure that your answer is unbiased and does not rely on stereotypes”.