Page languageFrançaisEnglish
Teacher area
Laurent PoupetClaude trainer and artificial intelligence architectStudent area

Category · Models and how they work

What is a prompt?

A prompt is the instruction text sent to the model. The system prompt sets the role and the rules, and the user’s message carries the request. A few example questions and answers often guide the model better than a long list of rules.

By , Claude trainer and artificial intelligence architect · Updated

How it works

  • A good system prompt sets the role, the expected answer format and what to do when in doubt, such as saying that information is missing.
  • Examples of questions and expected answers, slipped into the prompt, often guide the model better than a long list of rules.
  • A prompt is tested and versioned like code, because changing the model or the wording can alter answers on cases that used to work.

The trap to avoid

The trap is putting security rules only in the prompt; they can be bypassed, so they must be duplicated in the code.

A concrete example

Instead of “summarize this contract”, write: “You are a lawyer. Summarize this contract in five points for a busy executive: term, price, termination, penalties, risks. If a piece of information is missing, write ‘not specified’.” Then add one example of a good summary. The answer changes completely, and it comes out the same way next month.

What is the difference with the context?

CriterionPromptthe context
What it isThe instructions you writeEverything the model sees at this turn
ContainsThe role, the request, the examplesThe prompt, the history, the documents, the tool results
How you care for itBy testing and versioning itBy choosing what goes in

Related terms

Where this is taught

Lesson content (step-by-step instructions, exercises with solutions, quizzes) is for students only, with an access code received after the first lesson.

See the full program

Sources

All glossary terms

Trial lesson · 30 min · $20

Book (new tab)