paper-with-me

홈 › Papers

Intention Chain-of-Thought Prompting with Dynamic Routing for Code Generation

2025-12-16 · Shen Li, Li Huang, Shaoxiong Zhan, Weifeng Sun, Tao Yin, Zhongxin Liu, Meng Yan arxiv

Large language models (LLMs) exhibit strong generative capabilities and have shown great potential in code generation. Existing chain-of-thought (CoT) prompting methods enhance model reasoning by eliciting intermediate steps, but suffer from two major limitations: First, their uniform application tends to induce overthinking on simple tasks. Second, they lack intention abstraction in code generation, such as explicitly modeling core algorithmic design and efficiency, leading models to focus on surface-level structures while neglecting the global problem objective. Inspired by the cognitive economy principle of engaging structured reasoning only when necessary to conserve cognitive resources, we propose RoutingGen, a novel difficulty-aware routing framework that dynamically adapts prompting strategies for code generation. For simple tasks, it adopts few-shot prompting; for more complex ones, it invokes a structured reasoning strategy, termed Intention Chain-of-Thought (ICoT), which we introduce to guide the model in capturing task intention, such as the core algorithmic logic and its time complexity. Experiments across three models and six standard code generation benchmarks show that RoutingGen achieves state-of-the-art performance in most settings, while reducing total token usage by 46.37% on average across settings. Furthermore, ICoT outperforms six existing prompting baselines on challenging benchmarks.

📄 PDF Abstract BibTeX arXiv:2512.14048

Code (0)

등록된 구현이 없습니다.

Tasks

Code Generation

Similar Papers 제목 키워드 기반

Sketch-of-Thought: Efficient LLM Reasoning with Adaptive Cognitive-Inspired Sketching

2025-03-07 · Simon A. Aytes, Jinheon Baek, Sung Ju Hwang

Recent advances in large language models (LLMs) have enabled strong reasoning capabilities through Chain-of-Thought (CoT) prompting, which elicits step-by-step problem solving, but often at the cost of excessive verbosit…

Harnessing Chain-of-Thought Metadata for Task Routing and Adversarial Prompt Detection

2025-03-27 · Ryan Marinelli, Josef Pichlmeier, Tamas Bisztray

In this work, we propose a metric called Number of Thoughts (NofT) to determine the difficulty of tasks pre-prompting and support Large Language Models (LLMs) in production contexts. By setting thresholds based on the nu…

Chain-of-Thought Prompting Elicits Reasoning in Large Language Models

2022-01-28 · Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma 외

We explore how generating a chain of thought -- a series of intermediate reasoning steps -- significantly improves the ability of large language models to perform complex reasoning. In particular, we show how such reason…

Common Sense ReasoningGSM8KLanguage ModelingLanguage Modelling+2

RouteGoT: Node-Adaptive Routing for Cost-Efficient Graph of Thoughts Reasoning

2026-03-06 · Yuhang Liu, Ruijie Wang, Yunlong Chu, Bing Hao 외 arxiv

Large Language Models (LLMs) excel at multi-step reasoning, yet increasing the structural complexity of inference does not consistently improve system-level returns. Methods such as Tree of Thoughts (ToT), Graph of Thoug…

Navigating Hallucinations for Reasoning of Unintentional Activities

2024-02-29 · Shresth Grover, Vibhav Vineet, Yogesh S Rawat

In this work we present a novel task of understanding unintentional human activities in videos. We formalize this problem as a reasoning task under zero-shot scenario, where given a video of an unintentional activity we …

HallucinationNavigate