Research map / Large language models / Reasoning and chain of thought
Intention Chain-of-Thought Prompting with Dynamic Routing for Code Generation
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes RoutingGen, a difficulty-aware router that sends simple coding problems to few-shot prompting and complex ones to Intention Chain-of-Thought (ICoT), cutting token usage while matching or beating CoT baselines across three LLMs and six code benchmarks.
Problem
Uniform application of chain-of-thought prompting to code generation induces overthinking on simple tasks and lacks explicit modeling of task intention (algorithmic logic and efficiency), while costing many tokens.
Approach
A classifier (Qwen3-8B) routes each problem as Simple or Complex; Simple uses few-shot prompting, Complex uses ICoT, a two-stage process generating a Specification and an Idea (core algorithm and time complexity) before greedy code generation.
Key results
- RoutingGen with DeepSeek-Coder-6.7B-Instruct reaches 72.30% Pass@1 on MBPP-sanitized vs 67.70% for SCoT, with a 59.22% token reduction over SCoT.
- Averaged across settings, RoutingGen reduces total token usage by 46.37% relative to the baseline.
- ICoT with DeepSeek-V3-671B reaches 67.20% on McEval, a 102.41% relative gain over zero-shot.
Surprising findings
- Structured CoT prompts underperform simple few-shot prompting on MBPP-sanitized and MBPP-ET.
- Self-CoT with DeepSeek-Coder-6.7B drops 22.99% below zero-shot on MBPP-ET.
Limitations
- Routing decisions depend on a difficulty classifier whose labels disagree with GPT-4o on 8-23% of tasks.
- Reported baseline numbers differ from official model reports due to standardized prompts.
- Main results sample 20 candidates per problem (5 for DeepSeek-V3), and gains on some benchmarks are small or negative for ICoT.
Experimental setup
Datasets: HumanEval MBPP-sanitized HumanEval-ET MBPP-ET OpenEval McEval
Benchmarks: HumanEval HumanEval-ET MBPP-sanitized MBPP-ET OpenEval McEval HumanEval-X (C++) LiveCodeBench
Metrics: Pass@1 total token usage
Baselines: zero-shot few-shot Self-CoT ZS-CoT Self-planning SCoT
Builds on: chain-of-thought prompting self-consistency self-planning SCoT Auto-CoT
Closest papers by meaning
- Enhancing Chain of Thought Prompting in Large Language Models via Reasoning Patterns (AAAI 2025 · similarity 0.90)
- SCOUT: Teaching Pre-trained Language Models to Enhance Reasoning via Flow Chain-of-Thought (NeurIPS 2025 · similarity 0.89)
- What Makes Large Language Models Reason in (Multi-Turn) Code Generation? (ICLR 2025 · similarity 0.89)
- Revisiting Chain-of-Thought in Code Generation: Do Language Models Need to Learn Reasoning before Coding? (ICML 2025 · similarity 0.89)
- Scaling Code-Assisted Chain-of-Thoughts and Instructions for Model Reasoning (NeurIPS 2025 · similarity 0.88)
- Chain of Thoughtlessness? An Analysis of CoT in Planning (NeurIPS 2024 · similarity 0.88)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
