<p>Large Language Models have transformed automated code generation across general programming domains. In the specialized field of operations research, however, translating natural language problem descriptions into executable optimization solver code remains difficult due to strict syntactic requirements. Existing methods relying on static retrieval or one-shot generation frequently fail to align human intent with rigid solver APIs, resulting in hallucinated constraints and execution errors. To address this, we introduce CHORUS++, an agentic framework that replaces fragile one-shot generation with a loop of hierarchical retrieval, multi-layer validation, and iterative self-correction. Our results show that this approach allows open-source models, such as Llama-3.3 (70B), to achieve an accuracy of 78.89% on the NL4Opt-Code benchmark. This performance substantially exceeds the zero-shot capability of proprietary frontier models (GPT-4-Turbo: 63.67%) and permits even smaller 14B-parameter models, e.g., Phi-4, to surpass closed-source baselines. Additionally, our hashing-based versioning system accelerates knowledge base updates by up to 1.43<InlineEquation ID="IEq1"> <EquationSource Format="TEX">\(\times \)</EquationSource> <EquationSource Format="MATHML"><math> <mo>×</mo> </math></EquationSource> </InlineEquation> despite extensive documentation changes. By closing the feedback loop between generation and execution, CHORUS++ provides a scalable, privacy-preserving method for utilizing advanced optimization technologies without reliance on costly proprietary models.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

CHORUS++: An agentic RAG framework with iterative refinement for linear programming code generation

  • Tasnim Ahmed,
  • Salimur Choudhury

摘要

Large Language Models have transformed automated code generation across general programming domains. In the specialized field of operations research, however, translating natural language problem descriptions into executable optimization solver code remains difficult due to strict syntactic requirements. Existing methods relying on static retrieval or one-shot generation frequently fail to align human intent with rigid solver APIs, resulting in hallucinated constraints and execution errors. To address this, we introduce CHORUS++, an agentic framework that replaces fragile one-shot generation with a loop of hierarchical retrieval, multi-layer validation, and iterative self-correction. Our results show that this approach allows open-source models, such as Llama-3.3 (70B), to achieve an accuracy of 78.89% on the NL4Opt-Code benchmark. This performance substantially exceeds the zero-shot capability of proprietary frontier models (GPT-4-Turbo: 63.67%) and permits even smaller 14B-parameter models, e.g., Phi-4, to surpass closed-source baselines. Additionally, our hashing-based versioning system accelerates knowledge base updates by up to 1.43 \(\times \) × despite extensive documentation changes. By closing the feedback loop between generation and execution, CHORUS++ provides a scalable, privacy-preserving method for utilizing advanced optimization technologies without reliance on costly proprietary models.