Chain-of-Thought Prompting

Summary (confidence: high)

  • CoT adiciona etapas intermediárias de raciocínio ao prompt (Wei et al., 2022).
  • Permite resolver tarefas complexas de aritmética, senso comum e raciocínio simbólico.
  • Zero-shot CoT: basta adicionar “Vamos pensar passo a passo” ao prompt (Kojima et al., 2022).
  • CoT é uma habilidade emergente que surge apenas em modelos suficientemente grandes.

Definição (confidence: high)

Técnica que solicita ao modelo que gere uma sequência de passos de raciocínio antes de chegar à resposta final. Pode ser combinada com few-shot (exemplos com raciocínio explícito) ou usada em modo zero-shot com o gatilho “Vamos pensar passo a passo”.

Zero-Shot CoT (confidence: high)

Adicionar a frase “Vamos pensar passo a passo” ao final do prompt melhora drasticamente a precisão em problemas de raciocínio, sem necessidade de exemplos.

prompt-engineering-techniques | few-shot-prompting | self-consistency

Why CoT Works + Variant Family (confidence: medium) (synthesis)

A rationale from the captured HF survey: CoT works not because of the words but because breaking reasoning into intermediate steps allocates more computation (more forward passes through transformer layers), creates opportunities for self-correction, and primes parameters associated with logical operations. The survey groups the main variants:

  • Zero-shot CoT — append “Let’s think step by step”; effective because the phrase appears adjacent to reasoning examples in pretraining data.
  • Self-consistency CoT — sample multiple reasoning paths (temperature > 0), then take the majority | the most-consistent answer; marginalizes over reasoning paths.
  • Tree-of-Thoughts (ToT) — structure reasoning as a search: generate several steps, evaluate each, backtrack/explore alternatives, select the optimal path.

Implications

CoT’s value is better understood as “spending more compute on reasoning” than as a purely linguistic trick — which is why the variant family (self-consistency, tree-of-thoughts) optimizes how that compute is spent: majority voting for robustness, tree search for exploration of alternatives.

Relationships

  • “is-sibling-of” chain-of-thought-pattern — same reasoning-before-answer technique; this page covers the general prompting-guide technique, the sibling covers its observed tool-implementation variants (implicit/explicit/hidden)

Sources

  • raw/prompts/articles/promptingguide-pt-techniques-cot.md
  • raw/external/huggingface-co-advanced-prompt-engineering-bc976d6b.md