Home page/📚Documentation/✏ General tips for writing prompts

✏ General tips for writing prompts

General tips for writing prompts

  1. Start with a simple prompt: If you don't have a lot of experience with prompts, choose to start with a simple script so you can get the hang of it. Be patient, as the bot will not always follow your instructions exactly. This doesn't mean the AI is "broken", it usually means you need to tweak your script. Don't limit yourself to just one example script, experiment with different approaches until you find the one that best fits what you want.
  1. Be clear and specific: When writing a prompt, make sure the instruction is clear and as direct as possible.
  1. Contextualize: Provide enough context for the model to understand what you want.
  1. Use examples: Including examples in the prompt helps the bot understand exactly what you want. But be careful with the size of your examples to not make the prompt too big.
  1. Prompt length: Shorter, clearer prompts tend to work better. In principle you can ask the AI to keep any number of things “in its head” while constructing a response but in practice it seems it can end up getting confused.
  1. Structure of a prompt: A well-structured prompt usually starts with a clear and concise statement of what you want the model to do. For example, if you want GPT-4 to write a summary of a piece of text, start with a sentence like "Summarize the following text:". Then provide the required text or context. If you find it helpful, you can include examples of desired outputs to guide the model. For example: "Summarize the following text as if you were writing a tweet of up to 280 characters."
Remember that practice makes perfect, so experiment and learn from your experiences to improve your skills in creating effective prompts.