Skip to content
Conference

Toward Reliable LLM Code Generation: Adaptive Routing Framework for Ambiguous Requirements

Jul 2026 · Annual International Computer Software and Applications Conference · pp. 1953-1958 · 0 citations · 15 references

Abstract

Natural-language requirements for program synthesis are often incomplete or ambiguous, yet large language models are commonly expected to generate code in a single pass. Prior clarification-based methods address this issue by asking follow-up questions when sampled candidate programs disagree, but fixed clarify-on-disagreement policies can overuse clarification and can also overtrust weak behavioral agreement. We present an adaptive routing framework for LLM-based program synthesis that treats clarification as an inference-time control decision. The framework augments a ClarifyGPT-style pipeline with execution-driven confidence estimation, semanticdifference analysis, and bounded candidate expansion, allowing the system to choose among direct generation, additional evidence gathering, and clarification. We evaluate the framework on MBPP, HumanEval, and extended-test variants using GPT-4.1 mini, Claude Haiku 4.5, and GPT-5.4 mini. Adaptive routing improves pass@1 accuracy by up to 7.60 percentage points over single-pass baselines. Compared with fixed-policy clarification, it preserves accuracy while reducing token usage by up to 57.2% for GPT-4.1 mini, and reallocates computation toward harder cases for Claude Haiku 4.5. These results suggest that clarification is most useful when triggered selectively based on execution evidence and semantic disagreement, even when ambiguity is observed indirectly through candidate behavior rather than through explicitly annotated ambiguous requirements.

View source

Similar papers

Preprint Aug 2026

Route-Align-Verify for Functional Correctness in Code Generation

The results indicate that functional correctness in code generation can be meaningfully improved without modifying the backbone architecture, by jointly optimizing how tasks are prompted, how the model is adapted, and how final outputs are selected.

Erxue Zhou, Jing Meng, Aofan Liu · 0 citations
Review Aug 2026

Refine After Generation: Toward Correct and Concise Patches in LLM-based Program Repair

This paper identifies patch verbosity as a major yet overlooked concern in LLM-based APR and proposes RECAP, a lightweight, plug-and-play adapter that attaches to existing repair frameworks after generation that achieves a substantially better size-correctness tradeoff.

Wenqiang Luo, J. Keung, Xiaoyu Shi et al. · 0 citations
Preprint Jul 2026

From Failing to Passing: Evolving Natural Language Prompt Optimization Rules for LLM Code Generation

This work introduces a search-based approach that identifies and evolves a set of natural language transformation rules with strong downstream effects on coding performance, and proposes DUALFIX, a staged repair pipeline that combines the evolved transformation rules with execution-feedback repair, addressing both specification-level and implementation-level failures.

Amal Akli, Melissa Akli, Cedric Richter et al. · 0 citations
Preprint Jul 2026

SCOPE: Leveraging Subgoal Critiques for Code Generation

SCOPE is presented, a prover-initialized subgoal critic for code generation that adapts a Lean-oriented prover model to produce three parseable feedback fields for downstream code generation: subgoals, gap analysis, and a robustness checklist.

Yueke Zhang, Yifan Zhang, Zihan Fang et al. · 0 citations
Preprint Jul 2026

PerfAgent: Profiler-Guided Iterative Refinement for Repository-Level Code Optimization

PerfAgent is presented, a profiler-guided, verifier-in-the-loop workflow that gives an off-the-shelf coding agent the feedback needed to find real hotspots, improve beyond the first passing patch, and use profiler evidence rather than timing alone to decide what to optimize next.

Ryan Deng, Yuanzhe Liu, Bastian Lipka et al. · 2 citations
Preprint Jul 2026

IFHierBench: Hierarchical Instruction Following for Large Language Models

IFHierBench is introduced, a hierarchical instruction-following benchmark of 600 prompts stratified across four constraint-tree depths and 35 distinct constraints, each prompt paired with a deterministic checker that verifies satisfaction at every scope.

Yuetian Mao, Chunyang Chen · 0 citations