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 Laurent Poupet, 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?
| Criterion | Prompt | the context |
|---|---|---|
| What it is | The instructions you write | Everything the model sees at this turn |
| Contains | The role, the request, the examples | The prompt, the history, the documents, the tool results |
| How you care for it | By testing and versioning it | By choosing what goes in |
Related terms
- Prompt cachingModels and how they work
- Prompt injectionSecurity and compliance
- Structured outputModels and how they work
Where this is taught
Track 1 · Discovering Claude day to day
Writing effective prompts (prompt engineering)lesson 2 · 1 hourTrack 0 · Preamble: Claude on your computer
Discover Computer Control (Computer Use) and Its Safeguardslesson 5 · 1 hour
Lesson content (step-by-step instructions, exercises with solutions, quizzes) is for students only, with an access code received after the first lesson.