Skip to main content

Auto-CoT (Automatic Chain of Thought)

Auto-CoT is a method for generating chain-of-thought demonstrations automatically rather than hand-writing them. The pipeline embeds a pool of candidate questions, clusters them by similarity, selects one representative question per cluster, and prompts the model with "Let's think step by step" to produce a reasoning trace for each representative. The resulting question-reasoning pairs become few-shot demonstrations. It addresses the practical gap where few-shot chain-of-thought prompting needs curated examples but the target domain has too many distinct question types for hand-curation to scale. Diversity in the chosen representatives matters more than raw quality of each trace — a diverse set of imperfect demonstrations typically beats a homogeneous set of polished ones.

Example

A math-tutoring product has 5,000 unique student questions. The team embeds all of them, runs k-means with k equal to 8, picks one question per cluster, and asks the model to generate a step-by-step solution for each. The eight (question, reasoning) pairs become the few-shot prefix used at inference time — no hand-written examples required, yet the prefix covers algebra, geometry, word problems, and probability because the clustering surfaces each type.

Put this into practice

Build polished, copy-ready prompts in under 60 seconds with SurePrompts.

Try SurePrompts