AI engineering glossary · Prompt context engineering
What is few-shot chain-of-thought?
Few-shot chain-of-thought: A prompt containing several examples in which each answer includes its reasoning steps, so the model imitates that reasoning style on a new question. It usually beats bare examples on multi-step problems because the reasoning pattern is demonstrated.
Few-shot chain-of-thought: an example
Two sample questions each show 'Step 1... Step 2... Answer: 42' before the third real question is posed.
Related terms
More Prompt context engineering terms
- Few-shot prompting
- Frequency penalty
- Function calling
- GBNF grammar
- Generated knowledge prompting
- Grammar-constrained decoding
- Grounding
- In-context learning
Where you learn it
Few-shot chain-of-thought is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.