DEV Community

Devanshu Biswas
Devanshu Biswas

Posted on

Chain-of-Draft: keep the reasoning, drop the narration, and cut ~80% of your reasoning tokens

Chain-of-Thought reliably lifts reasoning accuracy by making a model write its intermediate steps down instead of leaping to an answer. But look at a CoT trace closely and you'll notice something: on a simple arithmetic problem the model emits a paragraph where the actual work is one subtraction. Chain-of-Draft (Xu et al., 2025, Zoom) is the fix — same step-by-step reasoning, but each step is capped to a terse draft of a few words. The paper reports roughly 80% fewer reasoning tokens at accuracy close to CoT on arithmetic, commonsense and symbolic benchmarks.

The insight: most CoT tokens are narration, not signal

Split a CoT trace in two. The answer-bearing tokens are the intermediate numbers and the one key transformation. The connective tokens are the prose that explains the work to a human reader ("To find how many he gave away, we subtract the remaining from the starting amount, so..."). The answer-bearing tokens are a tiny fraction; the rest is narration the model wrote for you, not for itself.

The reason CoT beats direct-answering isn't the eloquence — it's that writing the intermediate state gives the model something concrete to condition its next token on. That mechanism survives compression. 20 - 12 = 8 pins the same state as a sentence explaining the subtraction.

CoT  ->  narrated, one full sentence per step:
  "To find how many he gave away, we subtract the
   remaining lollipops from the starting amount, so..."

CoD  ->  minimal draft, a few words per step:
  "start 20"
  "left 12"
  "20 - 12 = 8"
  "#### 8"
Enter fullscreen mode Exit fullscreen mode

The technique is one system prompt

The whole behaviour lives in a single instruction (the paper's exact wording). It does two jobs: cap the draft length so the model stops narrating, and require a delimiter before the final answer so you can parse it cleanly.

const COD_SYSTEM =
  "Think step by step, but only keep a minimum draft for " +
  "each thinking step, with 5 words at most. Return the " +
  "answer at the end of the response after a separator ####.";
Enter fullscreen mode Exit fullscreen mode

It's a drop-in swap for a CoT call — same SDK, same shape, only the system string changes. Because the output is smaller, both cost and latency drop with no pipeline change. Output tokens are what you pay for and what drives generation time, so an 80% token cut is roughly an 80% cut in each.

Parse the answer, then prove the savings

The #### separator is why CoD stays machine-usable despite the terse trace — split on it and take what follows. This is the same extraction you'd use for CoT, so shrinking the reasoning changes nothing downstream.

function extractAnswer(text) {
  const i = text.lastIndexOf("####");
  return (i >= 0 ? text.slice(i + 4) : text).trim();   // "8"
}
Enter fullscreen mode Exit fullscreen mode

Don't assume the win — measure it. Run the same questions through both prompts, count output tokens with the real tokenizer, and compare. The paper sees CoD land near ~8% of CoT's reasoning tokens on GSM8K at comparable accuracy.

A copy-paste template that hardens the format

Zero-shot CoD can dip when a step is squeezed below the signal it must carry, or on very small models that can't hold state implicitly. Two cheap fixes: one-shot the terse format so it sticks, and route genuinely hard problems back to full CoT.

You are a careful reasoner. Think step by step, but only keep a
MINIMUM DRAFT for each thinking step — 5 words at most per step.
Do not write full sentences or explanations; use fragments,
numbers, and equations only. One draft step per line.
After the final step, output a line with the separator #### followed
by the final answer only (no units, no extra words).

Example —
Q: A shirt costs $40 after a 20% discount. Original price?
A: 0.8*x = 40
   x = 40 / 0.8
   x = 50
   #### 50
Enter fullscreen mode Exit fullscreen mode

Because each CoD sample is 5–10x cheaper than a CoT sample, you can even draw more of them and majority-vote for self-consistency — often n CoD draws cost less than a single CoT draw. CoD is a reasoning-format technique: it slots in wherever CoT does, and it's distinct from context management (which shrinks the input history) because CoD shrinks the model's output reasoning.

Watch a verbose CoT trace and a compact CoD trace reach the same answer side by side, with a live token meter, here: https://dev48v.infy.uk/prompt/day53-chain-of-draft.html

Top comments (0)