Reinforcement Learning-Guided Chain-of-Draft for Token-Efficient Code Generation
Not on the map. Why?
Abstract (arXiv)
LLMs demonstrate surface-level fluency in code generation but struggle with structured reasoning tasks requiring correctness and semantic alignment. While Chain-of-Thought (CoT) prompting enhances reasoning through intermediate steps, it suffers from verbosity and inefficiency. Chain-of-Draft (CoD) prompting offers more concise reasoning, but the stochastic nature of LLMs produces varying solution quality, making optimal selection challenging. We propose multicod, a reinforcement learning framework that learns to select the most promising candidate from CoD-generated solutions. Our approach uses strategy-guided prompting to encourage diverse reasoning styles and models solution selection as a contextual bandit problem. The framework optimizes interpretable features including code complexity, reasoning structure, and strategic metadata through a reward function balancing correctness, efficiency, and clarity. Experiments on MBPP, BigCodeBench, SWE-bench Verified, and Defects4J show multicod~outperforms and in some cases, on par with standard prompting, CoT, and CoD baselines while achieving cost and token efficiency from the user's perspective through a multi-candidate design that charges only for the selected output, reducing user billing by over 50% and improving LLM response quality, making multicod~more sustainable and scalable for real-world deployment. Our code is available: https://anonymous.4open.science/r/MultiCoD.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 39 of its 47 references that are in the map. First posted on arXiv 26 Sep 2025.
Builds on
39 of 47 references.
References · 39
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2023GPT-4 Technical Reportcited by 18,396
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,211
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,653
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
- 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 1,006
27 more
- 2023Graph of Thoughts: Solving Elaborate Problems with Large Language Modelscited by 886
- 2022PAL: Program-aided Language Modelscited by 652
- 2024Better & Faster Large Language Models via Multi-token Predictioncited by 360
- 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 358
- 2025Chain of Draft: Thinking Faster by Writing Lesscited by 297
- 2023LEVER: Learning to Verify Language-to-Code Generation with Executioncited by 239
- 2023ART: Automatic multi-step reasoning and tool-use for large language modelscited by 197
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 140
- 2023Structured Chain-of-Thought Prompting for Code Generationcited by 138
- 2023Self-planning Code Generation with Large Language Modelscited by 124
- 2023RLTF: Reinforcement Learning from Unit Test Feedbackcited by 114
- 2023Execution-based Code Generation using Deep Reinforcement Learningcited by 99
- 2022Coder Reviewer Reranking for Code Generationcited by 84
- 2024StepCoder: Improve Code Generation with Reinforcement Learning from Compiler Feedbackcited by 77
- 2023CodeChain: Towards Modular Code Generation Through Chain of Self-revisions with Representative Sub-modulescited by 58
- 2025Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMscited by 47
- 2022Fault-Aware Neural Code Rankerscited by 33
- 2025Uncertainty-Guided Chain-of-Thought for Code Generation with LLMscited by 32
- 2023CodeCoT: Tackling Code Syntax Errors in CoT Reasoning for Code Generationcited by 29
- 2024Steering Large Language Models between Code Execution and Textual Reasoningcited by 24
- 2024ThinkRepair: Self-Directed Automated Program Repaircited by 23
- 2025Process-Supervised Reinforcement Learning for Code Generationcited by 22
- 2024FALCON: Feedback-driven Adaptive Long/short-term memory reinforced Coding Optimization systemcited by 8
- 2024Sifting through the Chaff: On Utilizing Execution Feedback for Ranking the Generated Code Candidatescited by 6
- 2024Token-Efficient Leverage Learning in Large Language Modelscited by 2
- 2025CRPE: Expanding The Reasoning Capability of Large Language Model for Code Generationcited by 2
- 2025Unlocking Full Efficiency of Token Filtering in Large Language Model Trainingcited by 1
Built on by
Citing papers per year: 2025: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025Chain of Draft for Software Engineering: Challenges in Applying Concise Reasoning to Code Tasks
- 2025Understanding Chain-of-Thought Effectiveness in Code Generation: An Empirical and Information-Theoretic Analysis
- 2025Scaling Code-Assisted Chain-of-Thoughts and Instructions for Model Reasoning
- 2025Intention Chain-of-Thought Prompting with Dynamic Routing for Code Generation
- 2024What Makes Large Language Models Reason in (Multi-Turn) Code Generation?
- 2026Domain-Adaptable Reinforcement Learning for Code Generation with Dense Rewards
- 2025Chain-of-Code Collapse: Reasoning Failures in LLMs via Adversarial Prompting in Code Generation
- 2026Prompting Policies for Multi-step Reasoning and Tool-Use in Black-box LLMs with Iterative Distillation of Experience