Skip to content

Small Agents with Semantic Search: Efficient Multilingual Code Localization

Oct 2026 · 1 citation · 31 references
Computer Science

TL;DR

The results suggest that compact, tool-specialized localization agents can provide an efficient interface between natural-language requests and large codebases, and show that semantic search improves file localization, with gains in accuracy, cross-language transfer, and inference efficiency.

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.

View source

Similar papers

Preprint Oct 2026

Learning to Program Retrievals: Composing Search Primitives via Reinforcement Learning

Retrieval-augmented language models increasingly use multi-step search to solve knowledge-intensive tasks, yet existing systems typically expose retrieval through fixed pipelines or collections of atomic tools. We introduce Retrieval Program Learning (RPL), a programmable search framework that allows a policy to compos...

Kyuyoung Kim, Zilin Xiao, Zhi-Yuan Wang et al. · 0 citations

From Codebase to Culprit (C2C): Reducing the Search Space for Bugs with Semantic Retrieval and Hierarchical Reinforcement Learning

We introduce C2C (From Codebase to Culprit), a framework for precise bug localization that progressively reduces the debugging search space across multiple levels of granularity: files, functions, and lines of code. To mirror developer's natural top-down debugging workflows, C2C integrates semantic retrieval and Hierar...

Ankur Garg, Corey Yang-Smith, Rishav Rishav et al. · 0 citations
Preprint Oct 2026

OpenSaC: A Python Library for Search as Code in Deep Research Agents

Deep research agents investigate complex questions through iterative search, source examination, and evidence synthesis. A conventional workflow alternates reasoning with individual search and reading actions. Search as Code introduces a new paradigm: agents write programs that compose search, source reading, reranking...

Qi Liu, Jia-Xin Mao, Fengbin Zhu et al. · 0 citations
#artificial intelligence Preprint Oct 2026

Context as Infrastructure: Knowledge Compilation for Retrieval in Agentic Systems with Harnesses

RAGFlow is described, which turns the loop into five disciplined stations and keeps the context entering the model the smallest sufficient set; together they form an agent-native database: a store that hands the agent compiled, governed context instead of a ranked list of passages.

Zhi-Chang Yu, Bai-Ning Cao, Sbaaoui Idriss et al. · 0 citations
#artificial intelligence Preprint Nov 2026

CORE: Coarse-to-Fine Search with Context Management for Deep Research

Deep research agents answer complex questions through repeated search. They rely on a harness that runs their tool calls and returns evidence to their context. This creates a trade-off: Search works best over long passages, which give enough context for reliable semantic matching. But the returned evidence should be sh...

Hoang Tran Vuong, Ngoc Quan Pham, Hung Bui et al. · 0 citations

Related blog posts

MIT News · Artificial Intelligence Nov 23, 2026

Many languages, one common neural code

Analyzing speakers of 21 languages, an MIT study using multilingual AI finds the human brain may represent meaning in much the same way.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.