---
title: Draft Chain-of-Thought (Draft CoT)
url: https://www.emergentmind.com/topics/draft-chain-of-thought-draft-cot
type: topic
---

# Draft Chain-of-Thought (Draft CoT)

Chain-of-Draft (CoD) is a prompting paradigm for large language models (LLMs) that enforces highly concise intermediate reasoning, typically constraining each reasoning step to a maximum of five words. This is in contrast to standard Chain-of-Thought (CoT) prompting, which encourages verbose, explicit stepwise rationales. CoD was originally motivated by observations of human problem-solving, where individuals draft minimal notes that capture semantic essentials rather than producing full narrative explanations. Within software engineering, CoD—sometimes termed “Draft CoT”—has been systematically evaluated as a means of reducing token usage, computational latency, and monetary cost while maintaining solution quality on complex code-generation tasks. Empirical evidence demonstrates that while CoD confers substantial efficiency advantages compared to CoT, the token savings are less extreme in software domains due to information density and context constraints [2506.10987].

## 1. Algorithmic Definition and Workflow of Chain-of-Draft

Chain-of-Draft is instantiated as a prompt-based protocol: the LLM receives a system prompt specifying the CoD rule (e.g., “Each step ≤ 5 words. Cover complete reasoning.”), is provided with few-shot demonstrations of concise reasoning (one per code task), and is then asked, for an input natural-language specification $T$, to emit a sequence of draft steps $S_1,\dots,S_n$ (each $\leq 5$ words) followed by a proposed code patch (solution $P$) [2506.10987]. The standard workflow is:

1. System prompt specifies the draft constraint and goal of complete logical coverage.
2. Few-shot examples illustrate compact stepwise drafts and final solutions.
3. Task prompt requests draft steps and the solution.
4. LLM responds with a list of draft notes and the final code output.
5. Post-processing returns the draft chain and generated patch.

This foundational structure is adapted into specialized CoD “variants” that further organize or label the minimalistic reasoning steps.

## 2. CoD Variants and Structuring: Prompting Styles for Code Tasks

To systematically investigate the effects of structure versus brevity, five CoD prompting variants were developed for software engineering tasks [2506.10987]:

- **Baseline CoD:** Flat, unstructured list (typically 5 steps, each $\leq5$ words).
- **Structured CoD:** Labeled fields (e.g., Problem understanding, File location, Problem diagnosis, Modification strategy; each $\leq5$ words).
- **Hierarchical CoD:** Three abstraction levels—strategy, tactics, operation—with $\leq 5$ words per list item, mapping coarse-to-fine granularity.
- **Iterative CoD:** Two-phase drafts: initial reasoning, then assessment and refinement.
- **Code-Specific CoD:** Fields mirroring code-specific axes (Dependencies, Interfaces, Implementation, Testing).

Each variant is constructed so that the overall token usage is minimized while retaining the information structure critical to code quality and maintainability. This taxonomy enables nuanced trade-offs between raw efficiency and completeness of solution decomposition.

## 3. Evaluation Metrics: Efficiency and Quality Formulas

Precision and practicality of CoD are quantified through formal metrics [2506.10987]:

- **Token usage ratio (\%)**: $ \text{TokenRatio} = \frac{\text{Tokens}_{\text{variant}}}{\text{Tokens}_{\text{CoT}}} \times 100\% $
- **Token savings (\%)**: $ \text{TokenSavings} = 100\% - \text{TokenRatio} $
- **Latency ratio (\%)**: $ \text{LatencyRatio} = \frac{\text{Latency}_{\text{variant}}}{\text{Latency}_{\text{CoT}}} \times 100\% $
- **Quality assessment** encompasses sub-metrics for
  - Correctness: $3 \times$ Problem Resolution + $4 \times$ Functionality Completeness + $3 \times$ Edge Case Handling
  - Compatibility: $4 \times$ Integration + $3 \times$ Non-Disruption + $3 \times$ Standards Compliance
  - Maintainability: $3 \times$ Readability + $4 \times$ Comments + $3 \times$ Style Compliance

The composite overall quality score on a $[0,10]$ scale weights correctness, compatibility, security, performance, test coverage, and maintainability.

## 4. Empirical Performance: SWE-bench Benchmark Analysis

On the 300-task subset of the SWE-bench benchmark, all CoD variants provided significant token cost reductions compared to CoT while maintaining high functional quality [2506.10987]:

| CoD Variant        | Token Usage (% CoT) | Quality Retention (% CoT) |
|--------------------|--------------------|---------------------------|
| Baseline           | 55.4               | 94.3                      |
| Structured         | 76.4               | >90                       |
| Hierarchical       | 64.6               | >90                       |
| Iterative          | 67.1               | ~99                       |
| Code-Specific      | 61.0               | >90                       |

- **Mean latency reduction** for Baseline CoD was $\sim39\%$ (from 17.57s down to 10.69s).
- **API costs dropped proportionally to token usage.**
- **Overall code quality** (Baseline CoD: $\approx8.2$, CoT: $\approx8.7$) was preserved at >90% retention, indicating minimal loss in correctness, compatibility, and maintainability even under stringent brevity constraints.

## 5. Factors Underlying the Efficiency Gap: Software vs Mathematical Domains

While arithmetic and symbolic reasoning tasks (as in the original CoD work) achieved token ratios as low as 7.6%, software engineering tasks consistently required considerably more tokens for equivalent performance (token ratios $\approx55\%$ for Baseline CoD) [2506.10987]. This is attributed to:

- **Information Density:** Precise references (API, file paths, syntax) are less compressible.
- **Contextual Complexity:** Many tasks span files or architectural layers, requiring disambiguation.
- **Edge-Case Proliferation:** More explicit handling of test cases and error modalities.
- **Precision Requirements:** The cost of omitted detail is higher, as small language errors impair code execution.

These domain-specific constraints set a lower “brevity floor” for code reasoning compared to symbol manipulation or arithmetic domains.

## 6. Practical Recommendations and Workflow Integration

Practical guidance for deploying CoD in software engineering pipelines is derived from these findings [2506.10987]:

- **Baseline CoD** is optimal for routine, well-understood tasks with the best efficiency-quality trade-off (∼45% token savings, ~94% quality).
- **Structured or Hierarchical CoD** variants offer clearer logic at modest efficiency costs and are preferred for multi-layered or high-risk tasks.
- **Iterative CoD** is effective for workflows needing solution refinement or edge-case capture (e.g., security, performance optimization).
- **Direct prompt-based (Standard) generation** is suited to high-volume, low-risk batch processing but with some quality loss.
- **Hybrid strategies**—combining Draft CoD for high-level diagnosis and more verbose micro-CoT for critical implementation—are proposed for flexible adaptation to problem complexity.

Selecting the prompting style based on complexity and project requirements enables substantial reductions in computational cost and latency while minimizing impact on delivered patch quality.

## 7. Broader Impact and Future Directions

The CoD paradigm instantiates a general efficiency-quality trade-off controlled through prompt design. While task-dependent brevity limits preclude the extreme compression possible in mathematical reasoning, substantial savings are attainable for real-world code tasks. Future work may investigate adaptive per-step word budgets, automated selection among CoD variants, and integration with automated code review or test-case generation for further reductions in redundant reasoning while maintaining stringent correctness guarantees. The domain-specificity of the brevity floor suggests additional research is warranted on evaluating and extending CoD to further software engineering subdomains and heterogeneous codebases [2506.10987].

Source: https://www.emergentmind.com/topics/draft-chain-of-thought-draft-cot