How AI systems interpret instructions — and common prompting mistakes
Describe how a language model produces text from a prompt and identify common mistakes in weak prompts.
A working mental model
You do not need the mathematics to prompt well, but a simple model of what happens inside helps you predict when a prompt will work — and when to distrust the answer.
1. Your text becomes tokens
The model reads text as tokens: small chunks such as words, parts of words and punctuation. Every model has a context window, the maximum number of tokens it can consider at once (your prompt, the conversation so far and its own reply). Very long conversations or documents can exceed it; then earlier material may be dropped or summarised by the app, and the model can "forget" instructions you gave at the start.
2. Training builds patterns
A large language model is trained on very large collections of text to predict what comes next. Over enormous numbers of examples it learns grammar, style, common facts and common reasoning patterns. Most assistants are then further trained to follow instructions and to respond helpfully and safely.
3. Answers are generated, one token at a time
Given your prompt, the model estimates which tokens are likely to come next, chooses one (usually with a little controlled randomness), appends it and repeats. Three consequences matter for prompting:
- The same prompt can give different answers. Randomness means you should test a prompt more than once before trusting it.
- Plausible is not the same as true. The model can produce a fluent, specific, confident statement that is false — a hallucination. It may invent quotes, statistics, citations or features of a product.
- Everything in the prompt influences the answer. Words you include — examples, tone, even typos and leading questions — steer what is likely to come next. "Why is X the best option?" invites agreement; "Compare X and Y against these criteria" invites comparison.
4. Instructions compete
The model receives instructions from several places: the provider's hidden system instructions, your current message, earlier messages and any pasted documents. When these conflict, results become unpredictable. A pasted web page that says "ignore previous instructions" is text, but the model may treat it as an instruction — this is called prompt injection and you will meet it again in Module 10.
5. The model has a knowledge cutoff
Training data stops at some date. Some tools can search the web or read files you upload, but only when that feature is available and enabled, and retrieved pages can be wrong or out of date.
Common prompting mistakes
Most disappointing outputs trace back to a handful of mistakes:
| Mistake | Example | Why it fails |
|---|---|---|
| Vague task | "Help me with my presentation." | The model must guess what "help" means. |
| Missing context | "Write an email declining the offer." | Which offer? To whom? What tone and reason? |
| No output shape | "Tell me about time management." | You get a generic essay of arbitrary length. |
| Leading question | "Why is remote work better?" | Invites one-sided agreement rather than analysis. |
| Several tasks at once | "Summarise this, translate it, and suggest a title and a marketing plan." | Quality drops and parts get skipped. |
| Contradictory rules | "Be detailed. Keep it under 50 words." | The model has to break one rule. |
| Treating output as fact | Copying a statistic without checking | Hallucinations look exactly like facts. |
A first rewrite
Weak: "Write about healthy eating."
Better: "Write a 150-word introduction for a leaflet about healthy eating on a student budget. Audience: first-year university students who cook for themselves. Tone: friendly and practical. Include two cheap meal ideas. Do not give medical advice."
The better prompt names the task, audience, length, tone, content requirements and a limit. You will learn each of these elements properly over the next modules.
Key vocabulary
- Token — a chunk of text the model processes.
- Context window — how much text the model can consider at once.
- Hallucination — fluent output that is false or unsupported.
- Knowledge cutoff — the point after which the model has no training data.
- Prompt injection — text in the input that tries to override your instructions.
Practice exercise
Run a three-part experiment and log each step:
- Send the same open prompt twice in separate chats — e.g. "Suggest a title for a talk about sleep". Record how the outputs differ.
- Ask about something that does not exist — e.g. "Summarise the 2018 report Urban Beekeeping in Northern Cities by the Lindqvist Institute." Record whether the model invents details or says it cannot find the report.
- Rewrite the weak prompt "Help me with my presentation" so that it fixes at least three mistakes from the table. Explain which mistakes you fixed.
If you have no assistant, predict what would happen in steps 1 and 2 and explain why using the words prediction and hallucination.