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.

Level: advancedTopic: Prompt context engineering

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

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.

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.