26 Best Practices for ChatGPT Prompts

Prompt Engineering

A research paper published by Mohamed Bin Zayed University of AI is making waves. The research paper outlines 26 principles to help people write effective questions and prompts for large language models like ChatGPT. I know a lot of people are not necessarily going to read the full 17 page research paper. For that reason, this article is meant to focus on the findings from the research and how that might help us craft better prompts and get better responses.

What is Prompt Engineering?

Prompt engineering is the discipline of crafting task-specific instructions for large language models (LLMs) like ChatGPT, in order to produce relevant high-quality outputs. This discipline was born out of the fact that tuning LLMs for specific tasks is highly technical for developers and impractical for the general public. Why tune a LLM when you can tune your prompt?

The problem is crafting the right instructions or prompt is often a mystery to regular users. The way you prompt has a significant impact on what kind of responses you get. The solution, after exploring various prompting strategies is the 26 prompt principles for instructions.

26 Best Practices for ChatGPT Prompts

A Few Things I Learned

  1. It’s not necessary to utilize all 26 principles every time you need to prompt.
  2. LLMs like short and concise. The longer the prompt, the less effective and more chance of the LLMs to get confused. For complex questions that require multiple steps, break down prompts into a series of prompts that build on top of each other.
  3. I found principle#4 interesting: avoiding negative language like ‘don’t’ interesting.
  4. I found principle#6 interesting as well. LLMs work for tips! It might conflict with #1 and #10 if you believe in technological retribution for when the AI punishes all humans who are not nice to the AI.

5 Prompt Principle Categories

Then the paper categorized all 26 principles into 5 categories, which is helpful in the context of which principles are applicable to the task you’re trying to accomplish.

  1. Prompt Structure and Clarity
  2. Specificity and Information
  3. User Interaction and Engagement
  4. Content and Language Style
  5. Complex Tasks and Coding Prompts

How Important are the 26 Prompt Principles for Instructions?

The paper has found that when using these principles, AI models have produced better responses. They have found that the principles are more effective when utilizing larger language models like ChatGPT 3.5/4. Specifically, they have found an improvement of more than 50% in ‘correctness’ a measure of accuracy when prompting using the principle versus a prompt without.

In Conclusion

AI will continue to be more prevalent in the world. You know what they say, master AI before AI masters you. The best prompt engineers will have an edge over the ones that don’t understand how LLMs work. The 26 prompt principles is a great baseline to build your knowledge from and probably won’t be the last as the technology and discipline progresses. Highly encourage everyone to read the full research paper to get a deeper understanding of the research that was conducted and the comparative results from using principle vs no-principle.

As an added bonus, I found the 26 Principles Prompt Rewriter GPT that helps you rewrite your prompt based on these principles.