Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
핵심: 모델 구조나 학습을 바꾸지 않고, few-shot 예시의 답변에 중간 추론 과정을 넣어 큰 LLM의 multi-step reasoning을 끌어낸다.
Metadata
- Paper
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Authors
- Jason Wei et al.
- Venue
- NeurIPS 2022
- Category
- LLM foundations · Prompting and reasoning basics
- Keywords
- Chain-of-Thought, few-shot prompting, reasoning, scratchpad, scaling
Compressed note
정답만 보여주지 말고 풀이 과정을 보여줘라
Standard prompting은 Question → Answer 예시를 준다. CoT prompting은 Question → Intermediate reasoning steps → Answer 예시를 주고, 모델이 test question에서도 답 전에 reasoning token을 생성하게 만든다.
새로운 reasoning head가 아니다
CoT는 Transformer 구조, LM head, loss를 바꾸지 않는다. 바뀌는 것은 출력 포맷이다. 모델이 최종 답변 전에 자연어/수식 형태의 중간 토큰을 생성하도록 prompt로 유도한다.
텍스트 기반 scratchpad
LLM은 autoregressive model이라 앞에서 생성한 중간 계산 토큰을 다음 예측의 context로 다시 사용한다. 그래서 CoT는 사람이 종이에 중간 계산을 적는 것과 비슷한 역할을 한다.
Why this technique appeared
큰 LM은 단순 QA, 번역, 분류에서는 few-shot prompting만으로 강했지만, 산술 word problem, 상식 추론, 날짜 계산, symbolic manipulation처럼 여러 단계를 거쳐야 하는 task에서는 바로 답을 내다가 자주 실패했다.
Fine-tuning으로 rationale을 학습시키는 방법도 있었지만, 고품질 rationale 데이터와 task별 학습이 필요했다. CoT는 이 문제를 학습 없이 prompt 예시의 형식만 바꾸는 방식으로 우회했다.
Core technique
Standard few-shot:
Q: ...
A: The answer is 11.
Chain-of-Thought few-shot:
Q: ...
A: Roger starts with 5 balls.
2 cans × 3 balls = 6 balls.
5 + 6 = 11.
The answer is 11.
- Prompt-side change: few-shot answer에 reasoning trace를 포함한다.
- Inference-time effect: 모델이 답을 내기 전에 중간 추론 토큰을 생성한다.
- Key order: 답을 먼저 쓰고 설명을 붙이는 것보다, reasoning을 먼저 쓰는 순서가 중요하다.
Important findings
- Length alone is not enough: 의미 없는 긴 토큰을 추가하는 것만으로는 CoT만큼 좋아지지 않는다.
- Reasoning-before-answer matters: 답을 먼저 쓰고 뒤에 설명하는 방식은 효과가 약하다.
- Natural language helps: equation-only보다 자연어 CoT가 GSM8K 같은 문제에서 더 유리할 수 있다.
- Scale matters: 작은 모델보다 충분히 큰 모델에서 CoT 효과가 강하게 나타난다.
- Faithfulness caveat: 생성된 reasoning trace가 모델 내부 계산을 그대로 설명한다고 보장할 수는 없다.
Connection to agents
CoT는 이후 agent 연구의 기본 인터페이스가 된다. CoT가 Thought → Thought → Answer라면, ReAct는 여기에 외부 행동과 관찰을 넣어 Thought → Action → Observation → Thought로 확장한다.
따라서 CoT는 단순 prompt engineering 논문이면서 동시에, LLM에게 test-time reasoning trace를 생성하게 만드는 출발점이다.