Jan 12, 2024

Prompting - Good Prompt, Bad Prompt

Introduction.

When using large language models like ChatGPT, the prompts you write can have a big impact on the quality of the response. A good prompt clearly defines the task or question for the model, provides relevant context, and sets expectations. A bad prompt can confuse the model, lead to harmful responses, or fail to produce useful output. Here are some tips on writing good vs bad prompts:

The Good Prompt

  • Is specific in defining the task or question
  • Provides background context to focus the model
  • Gives examples of the desired tone and content
  • States clearly if something should be avoided in the response
  • Sets length expectations (e.g. "Write a 300 word blog post")

For example:

"You are an art history professor. Write a 250-word introduction for a textbook chapter aimed at high school students on Pablo Picasso. Focus on his early artistic career pre-1907. Use simple language a 16-year-old could understand. Do not include anything inappropriate."

The Bad Prompt

  • Is overly broad or vague in its request
  • Lacks necessary context for the model
  • Fails to set limitations and guidelines
  • Does not define success criteria
  • Leaves room for harmful, biased or nonsensical content

For example:

"Write like Picasso"

This prompt completely lacks the specifics needed to produce something coherent. The model doesn't know if I want a biography, an analysis of paintings, a simulation of his artistic style, or something else entirely. Without clear limitations, the risk of unusable or problematic content dramatically rises.

Conclusion

In conclusion, invest time in carefully constructing your prompts. Define the purpose and intended outcome, provide helpful background information, set limitations, and make success criteria as transparent as possible. This allows the language model to shine while reducing the chances of issues arising. Treat your prompt as seriously as you would any other piece of writing - the better crafted it is, the better the final result will be.