Chain of Draft for Software Engineering: Challenges in Applying Concise Reasoning to Code Tasks
Shaoyi Yang

TL;DR
This paper extends the Chain of Draft method to software engineering, significantly reducing token usage and costs while maintaining high code quality, thus improving efficiency in LLM-based development workflows.
Contribution
It introduces and evaluates multiple CoD variants tailored for code tasks, demonstrating substantial efficiency gains with minimal quality loss compared to Chain of Thought.
Findings
CoD variants use 55.4% of CoT tokens on average
Achieve approximately 45% reduction in processing time and costs
Maintain over 90% of CoT's code quality metrics
Abstract
Large language models (LLMs) have become vital tools for software development, but they often require verbose intermediate reasoning for complex code tasks, leading to high latency and costs. This research extends the Chain of Draft (CoD) method to software engineering, designing and evaluating multiple CoD variants tailored for code tasks. Through comprehensive experiments on all 300 samples from the SWE-bench benchmark, we found that all CoD variants used significantly fewer tokens than Chain of Thought (CoT), with Baseline CoD being most efficient at 55.4% of CoT's tokens. While this represents substantial efficiency gains - translating to approximately 45% reduction in processing time and API costs - it differs from the extreme 7.6% reported in the original CoD paper for mathematical reasoning. This difference stems from the inherent complexity and context-dependency of software…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Software Engineering Research · Advanced Software Engineering Methodologies
