Research map / Large language models / Agents, code and math
Evaluating In-Context Learning of Libraries for Code Generation
Arkil Patel, Siva Reddy, Dzmitry Bahdanau, Pradeep Dasigi
Mila · ServiceNow Research · Allen Institute for AI
Read the paperPlace an idea next to itCheck your own paper ↗
13measured effects
2improved
5no clear effect
6hurt
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 |
|---|---|---|---|
| Alias Isabelle keywords with random strings (demonstrations) (ablation) | GPT-4 · miniF2F algebra Isabelle | proof correctness (%): 39.3 -> 31.4 | Hurt |
| Alias Isabelle keywords with random strings (demonstrations) (ablation) | GPT-3.5-Turbo · miniF2F algebra Isabelle | proof correctness (%): 30.0 -> 9.29 | Hurt |
| Alias Isabelle keywords with random strings (description) (ablation) | GPT-3.5-Turbo · miniF2F algebra Isabelle | proof correctness (%): 7.86 -> 0.00 | Hurt |
| Alias Isabelle keywords with random strings (description) (ablation) | GPT-4 · miniF2F algebra Isabelle | proof correctness (%): 15.0 -> 7.86 | Hurt |
| Alias Isabelle keywords with synonyms instead of random strings (ablation) | GPT models · miniF2F algebra Isabelle | proof correctness | No clear effect |
| Constrain model to use functions defined in-context (ablation) | GPT-4 and GPT-3.5-Turbo · NL2Python (CodeContests/APPS) | execution accuracy | Hurt |
| Change in-context supervision format (demonstrations, description, implementation) (ablation) | GPT-4 and GPT-3.5-Turbo · constrained NL2Python | execution accuracy | No clear effect |
| Use GPT-4 instead of GPT-3.5 for constrained generation | constrained NL2Python · function usage % (all, demonstrations) | function usage: 20.25 -> 89.92 | Improved |
| Use descriptions or implementations instead of demonstrations (ablation) | GPT-4 · VisProg tasks | task performance | No clear effect |
| Use descriptions or implementations instead of demonstrations (ablation) | models other than GPT-4 · VisProg tasks | task performance | Hurt |
| Alias VisProg function names with synonyms or random strings (ablation) | GPT-4 · VisProg | task performance | No clear effect |
| Add unpaired VisProg programs to descriptions or implementations (ablation) | GPT-3.5, Llama-2, CodeLlama, StarCoder · GQA | accuracy | Improved |
Open problems in code generation benchmarks
Do code benchmarks and methods hold beyond Python, small test sets and leaked data?
- Tested on Python or a few languages, so other languages are untested. · 25 papers state it
- Benchmarks are small, with a few dozen to a few hundred problems. · 14 papers state it
- Iterative or multi-step methods cost more tokens, latency and compute. · 12 papers state it
Closest papers by meaning
- A Study of LLMs' Preferences for Libraries and Programming Languages (ACL 2026 · similarity 0.90)
- Revisiting Chain-of-Thought in Code Generation: Do Language Models Need to Learn Reasoning before Coding? (ICML 2025 · similarity 0.88)
- BigCodeBench: Benchmarking Code Generation with Diverse Function Calls and Complex Instructions (ICLR 2025 · similarity 0.88)
- ConvCodeWorld: Benchmarking Conversational Code Generation in Reproducible Feedback Environments (ICLR 2025 · similarity 0.87)
- What Makes Large Language Models Reason in (Multi-Turn) Code Generation? (ICLR 2025 · similarity 0.87)
- EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuning (ICML 2025 · similarity 0.87)
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.