AccueilGlossaire › Chain-of-Thought (CoT) Prompting

Chain-of-Thought (CoT) Prompting

AI/ML

Technique demandant au LLM de raisonner étape par étape avant de répondre.

Chain-of-Thought (CoT) Prompting est une technique de prompt engineering (Wei et al., Google 2022) qui demande explicitement au LLM de raisonner étape par étape avant de fournir la réponse finale. Dramatically améliore les performances sur tâches de raisonnement complexe (math, logique, multi-step problems).

Deux variantes :
(1) **Zero-shot CoT** (Kojima et al. 2022) — simplement ajouter "Let's think step by step" ou "Réfléchissons étape par étape" à la fin du prompt. Trivial à implémenter, gain significatif.
(2) **Few-shot CoT** — fournir exemples montrant le reasoning explicite avant la réponse, puis demander LLM de faire pareil sur nouveau problème.

Exemple math problem :
Sans CoT : "Roger has 5 tennis balls. He buys 2 more cans of tennis balls. Each can has 3 tennis balls. How many tennis balls does he have now?" → "11" (incorrect, devrait être 11 = 5 + 2*3 — bon en fait! mais facilement raté).

Avec CoT : "... Let's think step by step." → "Roger started with 5 balls. He bought 2 cans, each with 3 balls, so that's 2 × 3 = 6 new balls. Total: 5 + 6 = 11 balls." → "11" (correct, vérifiable).

Variantes avancées :
(1) **Self-Consistency** (Wang et al. 2022) — generate N reasoning chains diverses (high temperature), majority vote on final answers — improves accuracy ~10-20% on math.
(2) **Tree-of-Thoughts (ToT)** (Yao 2023) — explore reasoning as tree, backtrack from dead ends, search algorithms.
(3) **Graph-of-Thoughts** — generalize to graph structure.
(4) **Least-to-Most prompting** — decompose problem in sub-problems, solve sequentially.
(5) **Plan-and-Solve** — explicit plan before solving.
(6) **Self-Reflection / Self-Critique** — LLM reviews own answer.
(7) **ReAct** (Reasoning + Acting) — interleave reasoning with tool calls.

Modern reasoning models : (1) **OpenAI o1, o1-preview, o3** (2024-2025) — internal CoT during inference, hidden from user but billing reflects "reasoning tokens". State-of-art math (AIME), coding (Codeforces), science (PhD-level GPQA) benchmarks. ; (2) **DeepSeek R1** open weights reasoning model 2025. ; (3) Claude has reasoning capability variants. "Test-time compute scaling" — laisser model think longer = better performance.

Coût : CoT increases tokens generated significantly (5-20x). Trade-off accuracy vs cost/latency. Use CoT for hard reasoning tasks, skip pour simple lookup. Compétences AI-102, AIF-C01.

Certifications qui couvrent ce concept
AI-102 AIF-C01 PMLE
Termes liés
Prompt Engineering Few-Shot Learning (In-Context Learning) Zero-Shot Learning Agentic AI (AI Agents)

Préparez vos certifications IT gratuitement

200+ certifications, 400 000+ questions, examens blancs chronométrés.

Voir le catalogue →
← Retour au glossaire