Research map / Large language models / Retrieval and knowledge
SpecAgent: A Speculative Retrieval and Forecasting Agent for Code Completion
George Ma, Anurag Koul, Qi Chen, Yawen Wu, Sachit Kuhar, Yu Yu, Aritra Sengupta, Varun Kumar, Murali Krishna Ramanathan
University of California, Berkeley · Amazon
Read the paperPlace an idea next to itCheck your own paper ↗
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 speculative prediction blocks (Forecaster) to retrieval blocks (ablation) | SpecAgent · REPOCOD, pass@1 | pass@1 (%): Qwen3-8B 20.92 -> 27.86; Qwen3-30B-A3B 23.27 -> 27.96 | Improved |
| add retrieval blocks to prediction blocks (ablation) | SpecAgent · REPOCOD, pass@1 | pass@1 (%): Qwen3-8B 22.35 -> 27.86; Qwen3-30B-A3B 23.67 -> 27.96 | Improved |
| use SpecAgent context instead of no cross-file context | Qwen3-8B · REPOCOD, pass@1 | pass@1 (%): 16.22 -> 27.86 | Improved |
| use SpecAgent context instead of BM25 | Qwen3-30B-A3B · REPOCOD, pass@1 | pass@1 (%): 18.88 -> 27.96 | Improved |
| add BM25 blocks to SpecAgent contexts (ablation) | SpecAgent (Qwen3-8B) · REPOCOD, pass@1 | pass@1 (%): 27.86 -> 25.10 | Hurt |
| add UniXcoder dense blocks to SpecAgent contexts (ablation) | SpecAgent (Qwen3-8B) · REPOCOD, pass@1 | pass@1 (%): 27.86 -> 25.31 | Hurt |
| add dense (UniXcoder) retrieval to SpecAgent with Qwen3-Coder as agent (ablation) | SpecAgent (Qwen3-Coder agent) · REPOCOD, pass@1 | pass@1 (%): 20.20 -> 20.97 | Improved |
| use 3 prediction blocks instead of 0 (ablation) | SpecAgent (Qwen3-8B) · REPOCOD, pass@1 | pass@1 (%): 20.92 -> 27.86 | Improved |
| increase prediction blocks from 3 to 12 (ablation) | SpecAgent (Qwen3-8B) · REPOCOD, pass@1 | pass@1 (%): 27.86 -> 22.35 | Hurt |
| run SpecAgent at inference time with leakage instead of indexing time (ablation) | SpecAgent (Qwen3-30B-A3B) · REPOCOD, pass@1 | pass@1 (%): 27.96 -> 34.29 | Improved |
| use dense retrieval (CodeSage v2 large) instead of no context | Qwen3-8B · REPOCOD, pass@1 | pass@1 (%): 16.22 -> 15.41 | Hurt |
| use SpecAgent instead of dense CodeSage retrieval | Qwen3-30B-A3B · REPOCOD, inference latency | latency (s): 14.84 -> 5.89 | Improved |
Open problems in retrieval-augmented reasoning
How can retrieval-augmented reasoning cut its extra LLM calls, storage and dependence on retrieval and LLM-built structures?
- Multi-step retrieval needs extra LLM calls and slows inference. · 22 papers state it
- Tested on English, or English and one other language, only. · 15 papers state it
- Graphs, trees and memories built by LLMs or parsers pass on their errors. · 12 papers state it
Closest papers by meaning
- NL2Repo-Bench: Towards Long-Horizon Repository Generation Evaluation of Coding Agents (ICML 2026 · similarity 0.88)
- SpecHop: Continuous Speculation for Accelerating Multi-Hop Retrieval Agents (NeurIPS 2026 · similarity 0.88)
- Repoformer: Selective Retrieval for Repository-Level Code Completion (ICML 2024 · similarity 0.87)
- Build-and-Find: An Effort-Aware Protocol for Evaluating Agent-Managed Codebases (NeurIPS 2026 · similarity 0.87)
- RepoMirage: Probing Repository Context Reasoning in Code Agents with Perturbations (NeurIPS 2026 · similarity 0.87)
- GitTaskBench: A Benchmark for Code Agents Solving Real-World Tasks Through Code Repository Leveraging (AAAI 2026 · 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.