Research map / Large language models / Agents, code and math
LLM Program Optimization via Retrieval Augmented Search
Sagnik Anupam, Alexander Shypula, Osbert Bastani
University of Pennsylvania
Read the paperPlace an idea next to itCheck your own paper ↗
12measured effects
10improved
2hurt
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| add contextual retrieval plus beam search (RAS) over dynamic retrieval | Qwen3-Coder · PIE (C++) test | mean best speedup: 4.23 -> 8.70 | Improved |
| add contextual retrieval plus beam search (RAS) over dynamic retrieval | GPT-4o · PIE (C++) test | mean best speedup: 4.43 -> 8.03 | Improved |
| add contextual retrieval (LLM description) on top of search (ablation) | RAS, Qwen3-Coder · PIE (C++) test | mean best speedup: 4.93 -> 8.70 | Improved |
| add search over code-retrieval dynamic retrieval (ablation) | Dynamic Retrieval, GPT-4o · PIE (C++) test | mean best speedup: 4.43 -> 5.84 | Improved |
| add RAS-style retrieval and search over instruct-only | GPT-4o · PIE (C++) test | mean best speedup: 2.31 -> 8.03 | Improved |
| use AEGIS atomic-edit dataset instead of full RAS training pairs | GPT-4o · PIE (C++) test | mean best speedup: 8.03 -> 6.08 | Hurt |
| add AEGIS atomic edits | GPT-4o · PIE (C++) edit size | mean edit distance: 17% smaller edit size than RAS; 30% smaller for first edit | Improved |
| add contextual retrieval to AEGIS (ablation) | AEGIS, Qwen3-Coder · PIE (C++) test | mean best speedup: 2.76 -> 5.37 | Improved |
| apply RAS (2 iterations) | Qwen2.5-7B-Instruct · Mercury (Python) test | Beyond@1: 77.58 -> 87.85 | Improved |
| add contextual retrieval (replace code retrieval) (ablation) | RAS, Qwen2.5-7B-Instruct · Mercury (Python) test | Beyond@1: 69.26 -> 87.85 | Improved |
| use No Contextual search instead of Instruct Only | Qwen2.5-7B-Instruct · Mercury (Python) test | Beyond@1: 77.58 -> 69.26 | Hurt |
| use expert programmer system role instead of instruction prompting (ablation) | GPT-4o Instruct Only · PIE (C++) test | mean best speedup: 2.16 -> 2.31 | Improved |
Open problems in execution-based code verification
Can execution-based code verification be trusted beyond Python, small benchmarks and the tests it relies on?
- Evaluated on Python or one other language only. · 17 papers state it
- Only a few models were tested, and larger ones were left out. · 16 papers state it
- Passing the tests does not show the code is correct. · 15 papers state it
Closest papers by meaning
- CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsets (ICLR 2024 · similarity 0.87)
- ConceptSearch: Towards Efficient Program Search Using LLMs for Abstraction and Reasoning Corpus (ARC) (AAAI 2025 · similarity 0.87)
- InverseCoder: Self-improving Instruction-Tuned Code LLMs with Inverse-Instruct (AAAI 2025 · similarity 0.86)
- CPRet: A Dataset, Benchmark, and Model for Retrieval in Competitive Programming (NeurIPS 2025 · similarity 0.86)
- REASONING COMPILER: LLM-Guided Optimizations for Efficient Model Serving (NeurIPS 2025 · similarity 0.86)
- Code Repair with LLMs gives an Exploration-Exploitation Tradeoff (NeurIPS 2024 · similarity 0.86)
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.