AI engineering glossary · Prompt context engineering
What is contrastive chain-of-thought?
Contrastive chain-of-thought: A prompting method that shows the model both a correct reasoning example and an incorrect one, labelled as such, so it learns what mistakes to avoid. It aims to improve step-by-step accuracy over showing only good examples.
Contrastive chain-of-thought: an example
One example correctly computes 15% of 240 as 36, another wrongly gives 15, marked 'wrong: forgot to multiply by 0.15'.
Related terms
More Prompt context engineering terms
- Conversation buffer memory
- Conversation history
- Delimiters
- Developer message
- Directional stimulus prompting
- DSPy
- Dynamic few-shot selection
- Few-shot chain-of-thought
Where you learn it
Contrastive 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.