One-shot prompting asks an LLM to perform a task from exactly one clear instruction or example. It is useful when additional examples would consume context space or increase token costs, but the single example must be chosen carefully. section 7.1.1 section 7.1.2
Use one-shot prompting with these trade-offs in mind:
- Treat the example as a strong signal: the first example often delivers most of the benefit gained from additional few-shot examples. section 7.1.2
- Avoid unbalanced demonstrations. A single positive sentiment example can bias classifications toward positive outputs, especially for unfamiliar tasks. section 7.1.2
- Prefer it when context limits or per-token pricing make several long examples impractical. section 7.1.1
A single reasoning demonstration
A prompt can show one solved word problem, then ask the model to solve a similar problem: “Answer this question. Think it through step by step: How could it be possible?” The demonstration establishes the expected task and response pattern, while the model supplies the next answer using its broader pretrained language knowledge. section 7.1.2
Figure 7.2 One-shot prompting example
Use the one-shot prompting figure to inspect how a single demonstration is structured before the target request. section 7.1.2


