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.

Level: intermediateTopic: Prompt context engineering

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

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.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.