The full answer
You change a model's behaviour without retraining by changing what it sees on each request: a system prompt that sets its role and rules, examples of the output you want, retrieved knowledge it should use, tools it can call and constraints on the output format. Together these can make a general model act like a specialised one.
1. System prompts A system message sets the model's role, audience, tone, scope and boundaries for the whole conversation: "You are a SQL reviewer for a team using PostgreSQL. Point out correctness and performance problems first, style last. Don't rewrite the whole query unless asked."
2. Few-shot examples Examples of inputs with ideal outputs teach format, tone and judgement that are hard to describe. They are the closest thing to training without training: the model picks up the pattern in context.
3. Retrieval-augmented generation For knowledge the model lacks, such as internal documents, current policies or a customer's data, retrieve the relevant passages and include them. The model then answers from your sources, and updating its knowledge means updating a document, not retraining.
4. Tools Functions the model can call (search, database queries, calculators, APIs) extend what it can do and give it current, exact data.
5. Structured outputs A JSON schema enforced by the API makes the output machine-readable every time.
6. Prompt chaining and routing Different prompts for different kinds of request, chosen by a classifier step, behave like several specialised models.
7. Generation settings Where the model allows it, temperature and similar settings make answers more consistent or more varied.
8. Memory Saved user preferences or summaries of past interactions, added to the prompt, personalise behaviour across sessions.
What prompting can't do well
- Teach a consistent, subtle style across thousands of outputs when it is hard to describe or show in a few examples.
- Make a small, cheap model match a large one on a narrow, high-volume task.
- Shorten very long prompts that are repeated on every request. In those cases, fine-tuning may be worth its cost, ideally after prompting and retrieval have been tried and measured.
Comparison
| Need | Without retraining | With fine-tuning |
|---|---|---|
| New or changing facts | Retrieval | Poor fit |
| Format and structure | Examples, structured outputs | Possible but rarely needed |
| Tone and role | System prompt, examples | For very consistent style at scale |
| Actions | Tools | Not applicable |
| Speed of change | Minutes | Hours to days, plus evaluation |
Last updated 16 October 2026