Small Agents with Semantic Search: Efficient Multilingual Code Localization
cs.CL
Submitted: 2026-10-04
Updated: 2026-10-04
Code: https://github.com/PrimeIntellect-ai/prime-rl
License: http://creativecommons.org/licenses/by/4.0/
The gist: Locating relevant files from natural-language requests is a core subtask for agents operating over code repositories.
Abstract
Locating relevant files from natural-language requests is a core subtask for agents operating over code repositories. We investigate whether this task can be delegated to compact, specialized models to enable on-device search while reducing the token usage, latency, and inference cost of larger agents. We show that semantic search improves file localization, with gains in accuracy, cross-language transfer, and inference efficiency. To study this setting, we introduce a training framework for file-localization agents built around ColGREP, a local semantic search tool based on late-interaction retrieval models. Our recipe combines weighted supervised fine-tuning on teacher trajectories, assigning turn-level credit based on retrieval outcomes, with reinforcement learning on localization quality. We train three model families with fewer than two billion parameters to formulate search queries, inspect retrieved content, and identify relevant files. On localization tasks derived from SWE-bench Lite and Multi-SWE-bench Flash, ColGREP-equipped agents substantially improve over their base models and outperform corresponding GREP-based agents. In addition to improving localization accuracy, ColGREP reduces mean end-to-end trajectory latency by 44.1% on CPU while using 29.1% fewer tokens, and enables better generalization to programming languages unseen during fine-tuning. These results suggest that compact, tool-specialized localization agents can provide an efficient interface between natural-language requests and large codebases.
Sources
- LFM2 Technical Report
- SWE-rebench: An Automated Pipeline for Task Collection and Decontaminated Evaluation of Software Engineering Agents
- CodeGrep: An RL-Trained Retrieval Agent for LLM Coding Agents
- Rethinking Agentic Search with Pi-Serini: Is Lexical Retrieval Sufficient?
- Understanding R1-Zero-Like Training: A Critical Perspective
- Decoupled Weight Decay Regularization
- Tool-integrated Reinforcement Learning for Repo Deep Search
- MiniCPM4: Ultra-Efficient LLMs on End Devices
- Supervised Fine Tuning on Curated Data is Reinforcement Learning (and can be improved)
- SweRank+: Multilingual, Multi-Turn Code Ranking for Software Issue Localization
- DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
- CodeScout: An Effective Recipe for Reinforcement Learning of Code Search Agents
- Qwen3 Technical Report
- Think Before You Retrieve: Learning Test-Time Adaptive Search with Small Language Models
- Agentless: Demystifying LLM-based Software Engineering Agents
- OrcaLoca: An LLM Agent Framework for Software Issue Localization
Related papers
- Exploring Solution Divergence and Its Effect on Large Language Model Problem Solving
- Ishigaki-IDS-Bench: A Benchmark for Generating Information Delivery Specification from BIM Information Requirements
- Subliminal Steering: Stronger Encoding of Hidden Signals
- MedStruct-S: A Benchmark for Key Discovery, Key-Conditioned QA and Semi-Structured Extraction from OCR Clinical Reports
- The End of Transformers? On Challenging Attention and the Rise of Sub-Quadratic Architectures
- Untangling the Mechanisms of Misleading Context in Medical Question Answering