Skip to content

Module 2.1: Logical Decomposition β€” Chain-of-Thought (CoT) vs. Chain of Draft (CoD) ​

Curriculum Alignment: [docs/plan/02_phase2_engineering_of_reasoning.md](file:///Users/huychau/Documents/working/training/ai/docs/plan/02_phase2_engineering_of_reasoning.md)
Topic Scope: Step-by-Step Reasoning, Transformer Autoregressive Planning, Token Bloat vs. Chain of Draft, Latency Economics
Level: Senior Architect / Advanced AI Engineering


1. Architectural Mental Model: Why LLMs Need Working Memory ​

In traditional computing, an algorithm uses RAM to store intermediate variables before returning a result. In standard zero-shot prompting, however, we ask an LLM:

Input: Complex Problem⟢Output: Final Answer

Because an autoregressive transformer computes each output token using a fixed number of matrix multiplications per layer, it has a fixed compute budget per token. If you ask an LLM to solve a 5-step logic puzzle directly, it must compute all 5 steps inside the feed-forward layers of the single final token. This causes catastrophic reasoning failure.

Chain-of-Thought (CoT) as External Compute Scaffolding ​

By forcing the model to generate intermediate tokens:

Input⟢Intermediate Step 1⟢Intermediate Step 2⟢Final Answer

Each emitted token is appended to the context window and passed into the Key-Value (KV) cache. The model literally uses its output stream as an external working memory register, providing additional compute passes over the problem.


2. The Token Bloat Problem & Chain of Draft (CoD) ​

While standard Chain-of-Thought ("Let's think step by step") dramatically improves reasoning accuracy, it introduces severe architectural drawbacks in production:

  1. High Token Costs: Verbose explanations ("First, we need to carefully examine...") consume 500--1,500 reasoning tokens per request.
  2. High Latency: In autoregressive generation, latency scales linearly with output token count:Total Latency=TTFT+(NtokensΓ—ITL)Generating 800 tokens of verbose reasoning at 30Β ms/token adds 24Β seconds of pure latency.

The Chain of Draft (CoD) Solution ​

Chain of Draft is a standard technique developed in 2025/2026 to achieve the accuracy of CoT while slashing token volume by 60% to 80%.

Instead of verbose conversational explanations, CoD forces the model to emit a dense, sketch-like scratchpad containing only minimal mathematical steps, symbols, or single-word variables before outputting the final answer.

text
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ STANDARD CHAIN-OF-THOUGHT (CoT)                        β”‚
β”‚ Tokens: ~240 | Latency: ~7.2s                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ "First, let's look at the orders table. We need to sum β”‚
β”‚ all transactions for user 492. Next, we check the      β”‚
β”‚ discounts table to see if any promo codes apply. We    β”‚
β”‚ notice promo SUMMER20 is active, which gives 20% off.  β”‚
β”‚ 100 minus 20% is 80. Therefore, the final total is $80"β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          VS
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ CHAIN OF DRAFT (CoD)                                   β”‚
β”‚ Tokens: ~42 | Latency: ~1.2s                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ "Draft:                                                β”‚
β”‚ - u492 orders: $100                                    β”‚
β”‚ - promo SUMMER20: -20%                                 β”‚
β”‚ - 100 * 0.8 = 80                                       β”‚
β”‚ Final: $80"                                            β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

3. Implementation Pattern: Prompting for Chain of Draft ​

python
"""
Chain of Draft (CoD) vs Chain of Thought (CoT) Prompt Templates
"""

COT_PROMPT_TEMPLATE = """You are a senior software architect.
Solve the following microservices capacity planning problem.
Think through the solution carefully step by step, explaining your complete reasoning before giving the final numbers.

Problem: {problem}
"""

COD_PROMPT_TEMPLATE = """You are a senior software architect.
Solve the following microservices capacity planning problem.

<reasoning_constraint>
Use Chain of Draft:
- Produce a minimalist draft of calculations using abbreviations and symbols only.
- Limit the draft to strictly under 5 bullet points and under 40 words total.
- Output the final result under [FINAL_SPEC].
</reasoning_constraint>

Problem: {problem}
"""

4. Curated Reading & Canonical References ​

ResourceCanonical Reference & LinkSpecific Focus Areas
Primary Curriculum BookAI Agents and Applications (Google Drive)Chapter 2, Section 2.5 ("Reasoning in Detail"): Cognitive architecture foundations and step-by-step decomposition.
Foundational CoT PaperChain-of-Thought Prompting Elicits Reasoning (Wei et al., 2022)Emergent reasoning abilities, token computation allocation, and multi-step inference.
Chain of Draft PaperChain of Draft: Thinking Fast with Less Tokens (arXiv:2502.18600)Token reduction trade-offs (β‰₯50% latency savings) while matching CoT accuracy.
Advanced GuidesPatronus AI: Advanced Prompt EngineeringStructural reasoning prompting, constraint enforcement, and drift reduction.
DAIR.AI GuidePrompt Engineering Guide β€” Chain-of-ThoughtZero-shot CoT ("Let's think step by step") vs Few-shot CoT demonstrations.

5. Senior Exercises ​

Exercise 2.1: The Efficiency Benchmark Drill ​

  • Goal: Prepare your methodology for the required Efficiency Report.
  • Task: Select a multi-step capacity planning problem (e.g. calculating RPS, database connection pool exhaustion, and network throughput under failover).
  • Protocol:
    1. Formulate 10 distinct variations.
    2. Test CoT vs. CoD.
    3. Track prompt_tokens, completion_tokens, and answer correctness.
    4. Verify if CoD achieves β‰₯50% token savings without degrading calculation accuracy.

Master AI Architecture Training Program