What is an LLM context?
What is it?
A context is a set of instructions and examples given to the AI model before the user's question. It steers the answer without retraining anything: this is in-context learning.
When to use it
- Get answers in a precise format (JSON, table, brand tone).
- Teach the model a task with a few examples (few-shot).
- Give the model up-to-date or company-specific knowledge.
Page fields
| Type | Few-shot (examples), system instruction, knowledge or persona. |
|---|---|
| System instruction | The model's role and rules. |
| Examples | Input / expected output pairs; 2 to 10 are often enough. |
| Knowledge | Reference text the model must use. |
| Target model | General, or a family and specific model it was tuned for. |
How to use it
“Use” tab: copy the JSON and inject the messages before the user's question. A Python example with the Anthropic API is provided.