Prompt

Reviewed : How we review entriesLast updated

In brief

A prompt is the text (instructions, context, examples) given to an AI model to get a response; how it is worded strongly affects the quality of the result.

Sources[1][2][3]

Definition

A prompt is all the text given to a language model: the question, the instructions, the context and any examples. Designing effective prompts is called prompt engineering.

Common techniques

  • Clear, precise instructions: goal, target audience, expected output format, length constraints.
  • Context: provide the necessary information rather than assuming the model knows it.
  • Examples (few-shot): show one or more examples of what you expect. The GPT-3 paper highlighted how effective this approach is.
  • Step-by-step reasoning (chain-of-thought): asking the model to spell out its reasoning can improve its results on some logic or calculation problems, as Wei et al. showed. So-called "reasoning" models already do this internally: OpenAI advises against asking them to "think step by step".
  • Role and format: specify the expected stance and the structure of the answer (list, table, JSON…).

Limits

A good prompt does not guarantee a correct answer: the model can hallucinate. Results vary between models and from one run to the next, so test and iterate.

Prompt generator

Fill in the fields: the generator assembles a structured prompt following the best practices in this entry. The more detail you give, the better the answer.

Start from a template

Best practices to add
Prompt qualityNeeds work · 1/6
  • Clear goal
  • Context given
  • Audience defined
  • Format chosen
  • Example given
  • Safeguards

Describe at least your request to generate the prompt.

The prompt stays in your browser. Paste it into the assistant of your choice (ChatGPT, Claude, Le Chat…), then refine the answer through conversation.

Sources

  1. Brown et al., “Language Models are Few-Shot Learners” (2020)
  2. Wei et al., “Chain-of-Thought Prompting Elicits Reasoning in Large Language Models” (2022)
  3. OpenAI, “Reasoning best practices” (documentation)