TL;DR
Chain-of-thought (CoT) prompting usually faces a dilemma: zero-shot triggers (like "Let’s think step by step") generalize broadly but underperform, while few-shot exemplars perform well but require knowing the exact task in advance. Meta-CoT bridges this gap by automatically classifying incoming mixed-task questions by <Category, Form> (e.g., <Arithmetic, short-answer>) and fetching diverse, automatically generated demonstrations tailored to that scenario. This plug-and-play approach achieves state-of-the-art results on benchmarks like SVAMP (93.7% with GPT-4) without any task-specific manual labeling.
What Problem Does This Paper Address?
In real-world applications, large language models (LLMs) rarely receive clean, single-task question streams. Instead, they encounter arbitrary mixtures of math problems, commonsense queries, and logic puzzles.
Existing CoT prompting fails to handle this mixed setting cleanly:
- General Zero-Shot-CoT is task-agnostic but prone to reasoning hallucinations, leaving substantial performance on the table.
- Specific Few-Shot-CoT achieves high accuracy by prepending carefully chosen, human-annotated examples—but it assumes you already know the specific task (e.g., "this is a GSM8K question") and have pre-selected demonstrations ready.
When task labels are unknown, manually matching inputs to datasets is impossible. The authors investigate how LLMs can autonomously identify problem scenarios and construct effective in-context demonstrations on the fly.
Methods
Meta-CoT operates in three sequential phases without fine-tuning:
[Input Question]
│
▼
(1) Scenario Identification --> Predicts <Category, Form> using question text only
│
▼
(2) Demonstration Selection --> Clusters pool data via Sentence-BERT + samples diverse Auto-CoT exemplars
│
▼
(3) Answer Derivation --> Prompts LLM with fetched demonstrations; feeds result back into pool
- Scenario Identification: Rather than classifying abstract task names, Meta-CoT categorizes questions into coarse-grained
<Category, Form>pairs (e.g., Arithmetic vs. Commonsense vs. Symbolic; Short-Answer vs. Multiple-Choice vs. Yes/No). It uses a lightweight, balanced few-shot prompt showing one example of each scenario. - Demonstration Selection: Once the scenario is identified, Meta-CoT retrieves candidate questions from that scenario's pool, embeds them with Sentence-BERT, and runs $k$-means clustering. It picks the most central question per cluster, runs Zero-Shot-CoT, applies heuristic filters (e.g., question length $\le 60$ tokens, reasoning steps $\le 5$), and compiles a diverse set of $k$ exemplars.
- Answer Derivation & Pool Feedback: The LLM executes the final reasoning step using the dynamically retrieved demonstrations. The resulting input-rationale-answer triple is fed back into the corresponding pool partition to enrich future retrievals.
Datasets
The authors evaluate on 15 benchmark datasets:
- 10 In-Distribution Datasets (used to build the initial candidate pool):
- Arithmetic: MultiArith, GSM8K, AddSub, AQUA-RAT, SingleEq, SVAMP
- Commonsense: CSQA, StrategyQA
- Symbolic: Last Letter Concatenation, Coin Flip
- 5 Out-of-Distribution (OOD) Datasets (unseen during prompt construction):
- ASDiv (Math), Creak (Commonsense), Sports Understanding, CSQA2.0, and ARC-challenge.
No new datasets were created; all are established reasoning benchmarks.
Key Insights and Ideas
- LLMs struggle with task names, but excel at structural categories: Prompting GPT-3.5 to identify a benchmark's exact dataset name yielded only 42% accuracy. However, categorizing by
<Category, Form>hit 99% accuracy. Task names are too abstract, whereas answer format and reasoning domain provide strong, recognizable signals. - Rationales distract scenario classifiers: Concatenating intermediate CoT reasoning into the scenario classifier dropped identification accuracy from 99% down to 90.3%. Feeding only the raw question $[Q]$ produces the cleanest classification.
- Demonstration diversity beats similarity: Comparing $k$-means diverse sampling against cosine-similarity retrieval and random sampling showed that diverse cluster centers yield superior reasoning accuracy across all tested categories.
- Autonomous routing equals gold labels: Providing the model with human-annotated "gold" scenario labels improved performance by only 0.4% over Meta-CoT's autonomous predictions (70.6% vs. 70.2% average across evaluated datasets), proving that automated routing introduces virtually no error propagation.
Key Results
- In-Distribution Performance:
- Meta-CoT (GPT-3.5-Turbo) reached 81.4% average accuracy, surpassing Auto-CoT (80.9%), standard Few-Shot-CoT (80.3%), and Zero-Shot-CoT (78.8%).
- With GPT-4, Meta-CoT reached 89.0% average accuracy, establishing a new state-of-the-art on SVAMP (93.7%) without external program interpreters, and scoring 89.92% on GSM8K without including any GSM8K questions in its context.
- Out-of-Distribution Robustness:
- On the 5 OOD datasets, Meta-CoT achieved 77.2% average accuracy with very low variance ($\pm 0.4$), consistently outperforming or matching the best fixed-scenario baselines across disparate formats.
Limitations and Future Work
- Coarse Taxonomy Dependency: Meta-CoT relies on a predefined 2D schema (
Category$\times$Form). Highly specialized domains (e.g., legal reasoning, code generation, medical QA) may require expanding this taxonomy beyond the three categories tested. - Initial Data Pool Requirement: While fully automated at inference, Meta-CoT still assumes access to an unannotated pool of mixed questions from which to draw and filter Zero-Shot-CoT exemplars.
- Two-Stage Latency: Generating an initial scenario classification call prior to the reasoning call adds an extra inference step (and API token cost) compared to single-pass Zero-Shot-CoT.
Summary updated