mlsanityData to 14 Oct 2026

CHORUS: Zero-shot Hierarchical Retrieval and Orchestration for Generating Linear Programming Code

arXiv 2505.01485 ↗First posted 2 May 2025cs.AI cs.CLcited by 3

Not on the map. Why?

Abstract (arXiv)

Linear Programming (LP) problems aim to find the optimal solution to an objective under constraints. These problems typically require domain knowledge, mathematical skills, and programming ability, presenting significant challenges for non-experts. This study explores the efficiency of Large Language Models (LLMs) in generating solver-specific LP code. We propose CHORUS, a retrieval-augmented generation (RAG) framework for synthesizing Gurobi-based LP code from natural language problem statements. CHORUS incorporates a hierarchical tree-like chunking strategy for theoretical contents and generates additional metadata based on code examples from documentation to facilitate self-contained, semantically coherent retrieval. Two-stage retrieval approach of CHORUS followed by cross-encoder reranking further ensures contextual relevance. Finally, expertly crafted prompt and structured parser with reasoning steps improve code generation performance significantly. Experiments on the NL4Opt-Code benchmark show that CHORUS improves the performance of open-source LLMs such as Llama3.1 (8B), Llama3.3 (70B), Phi4 (14B), Deepseek-r1 (32B), and Qwen2.5-coder (32B) by a significant margin compared to baseline and conventional RAG. It also allows these open-source LLMs to outperform or match the performance of much stronger baselines-GPT3.5 and GPT4 while requiring far fewer computational resources. Ablation studies further demonstrate the importance of expert prompting, hierarchical chunking, and structured reasoning.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 17 of its 22 references that are in the map. First posted on arXiv 2 May 2025.

Builds on

17 of 22 references.

References · 17

  1. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  2. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
  3. 2023Large Language Models as Optimizerscited by 864
  4. 2020How Much Knowledge Can You Pack Into the Parameters of a Language Model?cited by 719
  5. 2022Precise Zero-Shot Dense Retrieval without Relevance Labelscited by 517
  6. 2022Large Language Models Struggle to Learn Long-Tail Knowledgecited by 458
  7. 2022Memory-Based Model Editing at Scalecited by 447
  8. 2023A Comprehensive Capability Analysis of GPT-3 and GPT-3.5 Series Modelscited by 246
  9. 2024RankRAG: Unifying Context Ranking with Retrieval-Augmented Generation in LLMscited by 202
  10. 2023NL4Opt Competition: Formulating Optimization Problems Based on Their Natural Language Descriptionscited by 135
  11. 2023Retrieval meets Long Context Large Language Modelscited by 115
  12. 2024Let Me Speak Freely? A Study on the Impact of Format Restrictions on Performance of Large Language Modelscited by 96
5 more
  1. 2023OptiMUS: Optimization Modeling Using MIP Solvers and large language modelscited by 39
  2. 2023Holy Grail 2.0: From Natural Language to Constraint Modelscited by 26
  3. 2024Solving General Natural-Language-Description Optimization Problems with Large Language Modelscited by 22
  4. 2024LM4OPT: Unveiling the Potential of Large Language Models in Formulating Mathematical Optimization Problemscited by 18
  5. 2024A Thorough Comparison of Cross-Encoders and LLMs for Reranking SPLADEcited by 18

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
  2. 2026Context-Augmented Code Generation Using Programming Knowledge Graphs
  3. 2024Context-Augmented Code Generation Using Programming Knowledge Graphs
  4. 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?
  5. 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities
  6. 2025cAST: Enhancing Code Retrieval-Augmented Generation with Structural Chunking via Abstract Syntax Tree
  7. 2024PERC: Plan-As-Query Example Retrieval for Underrepresented Code Generation
  8. 2024CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generation