EMNLP papers
Search EMNLP papers by title, author, or track. Open a paper’s abstract to read more.
Explore the EMNLP analysisSearch results
341–360 of 369
- EMNLP · Co-located · MRL
VaaniCLIP: Cross-Lingual Speech-Text Retrieval for Indic Languages
Vamsi Adari
Abstract
Cross-lingual speech-text retrieval for Indic languages (retrieving English text using vernacular voice queries) remains an open problem despite recent progress in multilingual speech and text representation learning. We introduce VaaniCLIP and establish a systematic benchmark on BhasaAnuvaad across Telugu, Tamil, and Hindi, demonstrating that lightweight task-specific contrastive alignment achieves strong performance where established baselines fail. Cascade pipelines (Whisper ASR → NLLB translation → LaBSE retrieval) collapse on low-resource Indic languages: Telugu cascade retrieval reaches only 3.1% R@1, roughly 18× below VaaniCLIP, and SeamlessM4T v2 (2.3B parameters) achieves near-random performance zero-shot. By contrast, VaaniCLIP aligns frozen Whisper and LaBSE encoders with partial Whisper fine-tuning (15M trainable parameters, against a 2.3B-parameter generalist model used zero-shot) and achieves R@1 of 86.4 on Hindi, 55.5 on Telugu, and 54.8 on Tamil at a normalized retrieval pool of N = 2,869, capturing 76–89% of the LaBSE text-text upper bound. A frozen Whisper-medium encoder with only 787K trainable parameters reaches 95–99% of per-language partial fine-tuning performance, confirming encoder representation quality as the primary bottleneck. We further show that the joint model transfers zero-shot to Kannada (an unseen Dravidian language), achieving R@1 of 25.1 (~700× above random) with no Kannada training data, providing evidence that VaaniCLIP learns generalizable Dravidian audio-text alignment.
Abstract source - EMNLP · Co-located · NLLP
LegalPincite: Multi-level Legal Information Retrieval Dataset
Theresia Veronika Rampisela, Henrik Palmer Olsen, Giovanni Colavizza
Abstract
A common task in legal Information Retrieval (IR) is to find relevant legal sources from case-law collections. While legal practice often requires pinpoint citations (pincites) to specific case paragraphs, most existing public legal IR datasets lack paragraph-level citation annotations. Yet, publicly available datasets with such information contain data leakage in the query text and exclude paragraphs that are neither citing nor cited from the corpora, creating an unrealistic and oversimplified retrieval setting, potentially leading to inflated performance. To address these limitations, we contribute a large-scale legal IR dataset constructed from Court of Justice of the European Union (CJEU) judgments. The dataset contains: (i) masked case/paragraph queries, with removed citation information; (ii) a corpus that includes all paragraphs; and (iii) case- and paragraph-level ground truth citations, with partial human expert validation. Our dataset supports both the development and rigorous evaluation of legal IR methods, at multiple query-document levels (case-to-case, paragraph-to-case, and paragraph-to-paragraph retrieval). Link to dataset and code: https://huggingface.co/datasets/theresiavr/legalpincite
Abstract source - EMNLP · Co-located · NLLP
The EUR-Lex Retrieval Dataset: A Section-Aware and Human-Annotated Dataset for Long-Form Similar Case Retrieval
Christof Koolen
Abstract
This paper introduces the EUR-Lex Retrieval Dataset (EUR-LexRD): an evaluation benchmark for long-form similar case retrieval based on the case law handed down by the Court of Justice of the European Union (CJEU). The EUR-LexRD contains 20,697 English CJEU judgments published between 1954 and 2025. All cases are enriched with metadata and a case summary and have been segmented into six sections (e.g., legal context, facts, and reasoning). Each judgment also details outgoing citations to other European Case Law Identifiers.The evaluation set features 100 query cases and a seeded candidate pool created with seven different retrieval strategies. The resulting benchmark consists of 12,365 query-candidate pairs, which were human-annotated by nine legal experts on a four-tiered relevance scale in order to establish a high-quality gold standard. The dataset’s features, namely the long document length and section segmentation, present new hurdles for retrieval and reranker models.The EUR-LexRD is intended as a resource to advance the field of legal information retrieval by (i) making it possible to compare lexical, dense, hybrid and long-document retrieval strategies and (ii) supporting the fine-tuning of existing encoder or reranker models. The EUR-LexRD is released under a CC BY 4.0 license.
Abstract source - EMNLP · Co-located · NLLP
An Empirical Study of Evidence Retrieval for Retrieval Augmented Generation over the Thai Royal Gazette
Pantai Suyasri, Pawitsapak Akarajaradwong, Chompakorn Chaksangchaichot
Abstract
Retrieval-augmented generation depends on both the retrieval method and the units over which retrieval operates. Yet retrieval-unit choices remain underexplored for Thai legal documents, where language and document structure challenge common chunking assumptions. We introduce a 2,000-question Thai Royal Gazette dataset with single-hop and multi-hop tasks. The dataset annotates gold evidence as document character spans, which permits unit-independent evaluation. We compare 19 configurations across chunk sizes, boundary strategies, contextual chunks, atomic facts, whole documents, and retrieval methods. We evaluate them with span recall and precision, an Evidence-Fit judge, and pairwise judgments of answers generated from retrieved evidence. Contextual 200-word chunks with hybrid retrieval provide the strongest practical balance of evidence coverage, answer quality, and query cost. Across configurations, downstream scores correlate strongly with span recall, while span precision shows little association. These results favor retrieval designs that first recover complete evidence, then control cost and localization.
Abstract source - EMNLP · Co-located · NLLP
Cross-Lingual Legal QA for Vietnamese Labour Law: Retrieval, Translation, and Verifier-Guided Correction
Nguyen Minh Chi, Mo El-Haj, Nguyen Ha Thanh, Dawn Knight, Paul Rayson
Abstract
Cross-lingual legal question answering must retrieve statutes across languages while preventing unsupported legal claims. We introduce a bilingual evaluation suite of 231 Vietnamese–English question–answer pairs from Vietnamese labour law. Of these, 75 questions are additionally annotated for five challenging legal reasoning phenomena. We evaluate a verifier-guided pipeline that decomposes answers into claims, checks citation reachability and entailment, and corrects citation failures and contradictions. We also introduce six automatic diagnostics of faithfulness to retrieved evidence, covering citations, modality, exceptions, procedures, conclusions, and evidential support. Experiments show that learned-sparse retrieval performs poorly for English-to-Vietnamese retrieval (R@5 = 0.032), whereas dense retrieval reaches 0.358 and slightly outperforms hybrid retrieval. Translation placement has no statistically detectable effect on these automatic diagnostics in our controlled comparison and supporting sensitivity analyses. Verifier-guided correction improves citation preservation by 0.022–0.034 at the system level but produces no reliable gains on the remaining dimensions. Human evaluation further highlights weaknesses that are not fully captured by automatic diagnostics, particularly in procedural completeness and the coverage of legally required conditions and steps.
Abstract source - EMNLP · Co-located · NLLP
CANLEGALRAGBENCH: Evaluating Retrieval-Augmented Generation on Canadian Case Law
Ethan Zhao, Maksym Taranukhin, Wei Cui, Moira Aikenhead, Vered Shwartz
Abstract
RAG-based legal assistants have been growing in popularity, but LLM hallucinations remain a key issue and potentially undermines justice. While benchmarks have been developed to evaluate progress, many rely on synthetic queries rather than realistic legal scenarios. Moreover, Canadian law remains underrepresented in existing evaluations. To address this gap, we introduce CanLegalRAGBench, a Canadian legal QA benchmark based on realistic queries and expert-annotated answers grounded in case law. Our evaluation shows that retrieval performance is sensitive to design choices and that open-source embedding models are competitive with closed source models. However, it also reveals the limitation of automatic evaluations that penalize systems for retrieving alternative relevant documents. We also find that generated answers often diverge from gold responses, either with hallucinations or by producing overly detailed or irrelevant content, with 8-29% of claims not being supported by the retrieved documents. We hope this benchmark will help drive continued progress in addressing limitations of legal RAG systems. Code: https://github.com/NLP-UBC/CanLegalRAGBench
Abstract source - EMNLP · Co-located · NLLP
Retrieval for Legal AI: Complementarity and Cross-Collection Interference in Brazilian Legal Collections
Flavio Soriano, Guilherme Henrique Gomes Evangelista, Celso França, Gisele L. Pappa, Wagner Meira Jr., Marcos André Gonçalves
Abstract
Modern Legal AI systems rely on retrieval to ground answers in heterogeneous sources, including precedents, normative acts, legislative proposals, and explanatory materials. We study retrieval across five Brazilian legal collections, evaluated separately and in a pooled global index, using lexical, dense, fusion, and generative reranking architectures. The union of BM25 and dense top-10 results covers 55.4–60.3% of judged positives, 2.7–3.4 percentage points more than the better individual retriever, demonstrating substantial lexical–semantic complementarity. Reciprocal Rank Fusion (RRF) exploits part of this complementarity, but a per-query selector oracle consistently outperforms it, indicating that the preferred retrieval signal varies across queries. Pooling the collections reduces NDCG@10 by 18.5–25.9% under the original source-local judgments, showing substantial degradation when the relevant source is not known in advance; exact duplicates account for only a small fraction of this measured loss. RRF remains the strongest fixed first-stage architecture, yet we find no evidence that its gains are preserved after generative reranking at the dataset-macro level, indicating that stronger first-stage retrieval does not necessarily translate into better final rankings. These findings characterize heterogeneous legal retrieval as a multi-stage problem of source selection, signal selection, and evidence promotion.
Abstract source - EMNLP · Co-located · NLLP
GreekBarRetrieval: A Benchmark for Greek Statutory Retrieval
Ernest Beta, Odysseas S. Chlapanis, Dimitris Galanis, Ion Androutsopoulos
Abstract
Statutory retrieval is necessary for citation-grounded legal question answering, but remains underexplored for Greek. We introduce GreekBarRetrieval, a public retrieval benchmark derived from, and complementing GreekBarBench, which did not include retrieval. The new benchmark comprises 283 bar-exam questions, each accompanied by the facts of the case it refers to, and 6,308 candidate statutory articles to retrieve from. Questions and facts are stated in everyday language, but need to be mapped to the formal terminology of statutes and their abstract legal concepts. A further complication is that not all of the case facts are relevant to each question of a case. Experimenting with three BM25 variants and nine dense retrievers, we find that vanilla dense retrieval far outperforms vanilla sparse retrieval in Recall@100. However, LLM-based query reformulation helps BM25 close that gap, while also improving dense retrieval. With a ten-round ReAct-like LLM reformulation loop that we introduce, BM25 improves further in Recall@100 and obtains the best nDCG and MAP scores of all tested retrievers. Query reformulation also outperforms pseudo-relevance feedback, sparse-dense fusion, and English translation.
Abstract source - EMNLP · Co-located · NLLP
Deka Retrieval: Component-Level Criteria for Mining Legal Case Pairs in Thai Supreme Court Decisions
Pasin Buakhaw, Pawitsapak Akarajaradwong, Chompakorn Chaksangchaichot
Abstract
Legal case retrieval (LCR) defines relevance beyond text similarity, judgments may describe near-identical events yet be decided under different charges. Existing synthesis pipelines mine training pairs from text similarity and shared charges, which separates positives from negatives but leaves the difficulty of each pair implicit. We present Deka Retrieval, an LCR benchmark on Thai Supreme Court decisions with an LLM relevance cases mining pipeline for a civil-law jurisdiction. We decompose each judgment into case components (Charge, Fact, Reasoning, Decision) and split easy/hard level on exist binary signals and introduce an anomaly variant a conflict judgment that shares the anchor’s charge and facts but reaching a different reasoning and decision. Retriever performance follows query length: Fact > Lawyer expert > Lay people. Fine-tuning gains most on the weakest type, lifting Lay R@10 by 2.6x (7.6 -> 19.5) versus 1.5x on Lawyer and 1.3x on Fact. Training on the shortest query also transfers to the longer ones, but not the reverse. Adding anomaly cases as positives raises the chance of retrieving them at test time and degrades performance relative to training without them. Our dataset and models are available at https://hf.co/collections/VISAI-AI/deka-retrieval.
Abstract source - EMNLP · Co-located · NLLP
NELSR: A Nepali Legal Benchmark for Case-to-Statute Retrieval
Anjan Parajuli, Darshan Kunwar
Abstract
Legal professionals spend considerable time identifying statutes relevant to legal cases by navigating lengthy and hierarchically structured legal documents. While automated statute retrieval has advanced for high-resource languages to resolve the problem, the Nepali legal domain still lacks a standardized benchmark for realistic case-to-statute retrieval and systematic evaluation. To address this gap, we introduce NELSR (Nepali Legal Statute Retrieval Benchmark), comprising 5,731 case-derived queries extracted from Supreme Court judgments and a corpus of 302 federal statutes. NELSR is constructed using a citation-aware query construction approach that establishes reliable query–statute relevance pairs and legal structure-aware segmentation to preserve the semantic and hierarchical organization of statutory units. We establish retrieval baselines by evaluating sparse, dense, and hybrid retrieval methods and investigate the contributions of lexical and semantic retrieval signals through ablation studies. Experimental results show that hybrid retrieval achieves the best performance, with a Recall@100 of 0.66, nDCG@10 of 0.34, and MRR@10 of 0.32.
Abstract source - EMNLP · Co-located · NLLP
UCVE: Graph Structured Retrieval for Compliance Validation
Emily Chen, Michelle Menachery, Rahul Nenavath, Himanshu Kumar, Amirfarrokh Iranitalab
Abstract
Structured compliance validation requires determining whether every obligation in a predefined requirement space is satisfied, violated, or unaddressed by a given document. This can be described as a coverage problem that existing retrieval and classification systems, by treating requirements as independent, are not designed to solve. We introduce UCVE, a domain-agnostic framework that represents compliance requirement spaces as a CRG and performs retrieval via spectral reranking over its reinforcement learning-weighted Laplacian. Edges between requirement nodes are learned via reinforcement learning with a traversal reward grounded in violation detection, reshaping the graph’s community structure such that low-pass spectral filtering distinguishes relevant from irrelevant obligation clusters. Evaluating across three compliance domains, UCVE averages 4.3% matched-K recall lift over flat cosine retrieval and consistently outperforms strong retrieval and graph-based baselines.
Abstract source - EMNLP · Co-located · NLP4PI
A Safety-Engineered Consumer Mental-Health Assistant: A Deployment Case Report on Retrieval-First Grounding, Release Gates, and the Non-Clinical Boundary
Robert Sneiderman
Abstract
A public mental-health content platform serves a retrieval-first AI assistant (here called the assistant) to anonymous visitors who arrive carrying personal distress. The assistant is a consumer information tool, not a clinical or diagnostic system, and the deployment risk is specific: a fluent unsupported sentence reaches a vulnerable reader under the platform’s authority. This report describes the safety and reliability architecture that constrains that risk in production: an input safety classifier, retrieval-first tool use that answers only from a corpus of roughly 800 reviewed articles, sentence-level source-support checks applied before release, a partial-answer recovery step that returns the cited portion instead of refusing outright, and a clarifying question when retrieval is ambiguous. On a fixed 107-probe credentialed evaluation the strict unsupported-claim rate moved from 6.5% to 0.9% (1 of 107) across three hardening iterations while the refusal rate fell from 51.4% to 21.5%, the inverse of the usual safety-versus-coverage trade. Anonymous, account-free access is the positive-impact target of this deployment, and the measurement above treats safety and access as one goal rather than opposing ones. We report the governance choices that bound the deployment (the non-clinical boundary and how it is communicated, anonymous access, retrieval-restricted answering) and the honest limits: this is a consumer tool with no clinical-efficacy study, and 0.9% is one held-out measurement, not a guarantee on open traffic. The contribution is a documented deployment pattern for releasing a health-adjacent LLM to the public with the unsupported-claim rate held against a fixed gate, not a claim of clinical benefit.
Abstract source - EMNLP · Co-located · ORACLE
Retrieval-Augmented Generation for Symbolic Folk-Art Interpretation: Comparing Dense and Graph-Based Retrieval Using Korean Minhwa
Minjun Song, Sumin Kim, Junsung Kim, Yebeen Lee, Heung-No Lee
Abstract
Existing artwork-oriented retrieval-augmented generation (RAG) systems typically support visual understanding through contextual information such as artist metadata and historical background. Symbolic folk-art interpretation instead requires connecting visible motifs to culturally situated meanings. We study semiotic retrieval for this task in Korean minhwa, comparing dense semantic and graph-structured retrieval. We introduce SemioticRAG, which organizes symbolic knowledge through Barthesian Form, Concept, JointConcept, and Myth structures. Blind human evaluation shows that DenseRAG performs best overall, with SemioticRAG ranking second. Qualitative analysis indicates that SemioticRAG produces more explicit pathway-based symbolic compositions, while depending on Form-level grounding and graph construction quality. Overall, explicit semiotic structure changes how culturally grounded meanings are composed rather than uniformly improving interpretive quality.
Abstract source - EMNLP · Co-located · ORACLE
Investigating the Role of Reasoning-Language Alignment in Monolingual Retrieval-Augmented Generation
Oliver Hauck, Mario Sanz-Guerrero, Katharina von der Wense
Abstract
Reasoning traces improve large language models (LLMs), but current models are trained to reason mostly in English. It has been shown that forcing a model to reason in another language degrades accuracy, even when the reasoning language matches the language of the prompt – but only for a setting where the model reasons over a short prompt. Here, we ask whether the same holds for retrieval-augmented generation (RAG), where the model must read and integrate a large amount of retrieved evidence in the target language. To study this, we build a fully monolingual German RAG question-answering testbed over the fictional world of the tabletop role-playing game The Dark Eye, a domain that is richly documented in German but too niche for the model to answer from memory, so that it has to rely on retrieval. Varying the forced reasoning language of an agentic RAG system on this testbed, we find that aligning the reasoning language with the language of the query and the retrieved documents helps. Forced German reasoning outperforms forced French, although the model benchmarks higher in French, so the benefit comes from alignment and not from language proficiency. The advantage grows when the retrieved context is richer and structure-aware. However, forced German only reaches the level of the model’s native, unconstrained English reasoning without surpassing it, showing that native multilingual reasoning is needed. We publicly release the testbed and QA benchmark.
Abstract source - EMNLP · Co-located · ORACLE
Knowledge-Graph Based Augmentation versus Retrieval Augmented Generation for Cultural-Related Question Answering
Pablo Poulenard, Yannis Karmim, Valentin Barrière
Abstract
Large language models (LLMs) suffer from a long-tail deficit: culturally specific facts, particularly those concerning underrepresented regions such as Latin America, appear too rarely in pretraining corpora to be reliably memorized. Retrieval-Augmented Generation (RAG) addresses this by grounding generation in external text, but structured alternatives such as Knowledge Graphs (KGs) offer tighter control over what enters the context, along with potential gains in explainability and updatability. We benchmark Graph-RAG against standard RAG on LatamQA, a culturally grounded multiplechoice dataset spanning eight thematic categories. The graphs are built end-to-end from Wikipedia articles with KGGen, a recent opendomain extractor, without manual curation in our main setting. G-Retriever is competitive with RAG and reduces the error of the base LLM by 72% with a standard KG and 78% with a benchmark-aware variant, the gap to RAG narrowing further as the graph is oriented toward task-relevant content. The trained projection transfers zero-shot to Portuguese without target-language fine-tuning, indicating multilingual reach. Our code is available here.
Abstract source - EMNLP · Co-located · REALM
Retrieval is Enough: A Memory-Augmented Agent for Algorithm Selection
Zhang Weizhou, Lixing Lyu
Abstract
Selecting the best algorithm for each optimization instance is difficult because algorithm performance can vary substantially across instance structures and parameter settings. Existing learned selectors often encode historical experience in fixed model parameters, making new performance records costly to incorporate. We introduce a memory augmented agent for instance wise algorithm selection based on retrieval augmented generation. Given a new instance, the agent retrieves structurally similar historical cases, each containing the complete performance profile of all candidate options rather than only the winning label. It then reasons over the retrieved objective gaps and rankings before invoking an algorithm and configuration. New verified records can be added directly to the external memory without retraining the selector. We evaluate the proposed approach on 10{,}898 geographically grounded hub location instances, using 8{,}718 instances for retrieval and 2{,}180 for testing across five algorithm and configuration options. The proposed method achieves 68.35% selection accuracy and a 0.549% objective gap relative to the virtual best solver, outperforming the single best solver and retrieval only label voting baselines. These results demonstrate the value of combining retrieval with reasoning over complete solver performance records.
Abstract source - EMNLP · Co-located · REALM
V-RAM: A Visual Retrieval-Augmented Multi-Agent Reasoning Framework for Medical Dialogue Diagnosis
Shukraditya Bose, Soumen Sinha, Ananya R Bhat, Rahul Roy
Abstract
Large Vision-Language Models (LVLMs) are increasingly explored for multimodal medical diagnosis, their ability to conduct accurate consultation remains challenging because of unstable visual reasoning and limited tracking of patient information across dialogue turns. To address this problem we present V-RAM (Visual Retrieval-Augmented Multi-Agent Reasoning Framework), a training-free framework for improving LVLM-based multimodal medical dialogue diagnosis. V-RAM improves medical dialogue diagnosis by adding visual retrieval, structured memory, and multi-agent reasoning around a pretrained LVLM. It retrieves similar medical images as diagnostic cues and tracks patient evidence across dialogue turns. The framework operates at inference time, it requires no supervised fine-tuning and can be used with different LVLM backbones. Experiments on benchmark show that V-RAM outperforms existing baselines and the current LVLMs by 7.3% on an average with 86% lesser number of turns that are used for medical dialogue diagnosis.
Abstract source - EMNLP · Co-located · REALM
When Failures Propagate: Causal Failure Attribution in Agentic Retrieval-Augmented Generation
Lauren Pothuru
Abstract
Agentic retrieval-augmented generation (RAG) interleaves retrieval, reasoning, and answer generation across multiple hops. A retrieval error at hop 1 can surface only as a wrong answer at hop 3, while later retrieval can also repair the trajectory. This paper introduces AgenticRAG-FP, an interventional benchmark for causal failure attribution in agentic RAG. The benchmark injects a certified fault at a specified hop, re-executes the downstream trajectory, and evaluates diagnosers against the known intervention site. Its central question is whether a post-hoc trace still identifies the injected hop after the suffix changes. In the dense Claude Haiku 4.5 structural sweep on three-hop MuSiQue questions, coverage-based diagnosis is 0.91 at hop 1 and 0.00 at hops 2 and 3 (n=43, 36, 21 failed trajectories), but it predicts hop 1 in 96% of failures, an earliest-hop rule; at hops 2 and 3, an LLM judge and frozen-hop repair localize only 0.25 to 0.48 of failures. In larger content-corruption runs, depth-2 exact-hop accuracy is 0.00 for coverage, 0.49 for an LLM judge, 0.59 for frozen-hop repair, and 0.14 for suffix regeneration (n=51); the judge and frozen-hop repair do not significantly differ (exact McNemar p=0.33).
Abstract source - EMNLP · Co-located · REALM
What Agent Benchmarks Don’t Tell You: Recoverability and Credit Assignment in Agentic Retrieval Evaluation
Sai Krishna Rallabandi, Parag Pravin Dakle, Preethi Raghavan
Abstract
Agent quality on long-horizon tasks is usually reported as a single number: the aggregate gain of a tool-using agent over a non-agentic baseline on a benchmark. We argue that this number is not a property of the agent. It is jointly determined by a property of the benchmark and by which sub-component of the agent happens to be load-bearing, and reporting it alone makes agent quality look benchmark-dependent and irreproducible. We propose a four-stage evaluation protocol that separates the two. Stage 1 characterizes the benchmark before any outcome is observed, using an LLM-free diagnostic we call recoverability: whether evidence missed on the first retrieval is still reachable from what the system has already seen, and if so whether it is reachable by reformulation or only by structural navigation. Stage 2 assigns credit with an ablation ladder — one-shot RAG, a choice-free fixed-iterative loop, and a full agent — that localizes any measured gain to iteration or to open-ended agency. Stages 3 and 4 add the validity checks and cost accounting that change verdicts in practice. Applying the protocol to about 6,000 logged agent episodes over eight corpora and three reader families, we find that the headline agent gain ranges from −0.21 to +0.30 (each corpus in its native metric) purely as a function of the recoverability regime, and that on reformulation-recoverable corpora the choice-free loop recovers 65–96% of the gain normally credited to agency under the two stronger readers (and most of it under the open reader). Agency earns its cost only on the longest-horizon, navigation-recoverable corpus, where iteration saturates by round 2 and leaves a residual (+0.15 under the open reader at full N) that no round budget closes under any reader.
Abstract source - EMNLP · Co-located · REALM
CodeGrep: An RL-Trained Retrieval Agent for LLM Coding Agents
Wuya Chen, Yihao Yang, Yang Cao, Yue Lin
Abstract
Modern LLM coding agents—Claude Code, OpenHands—share a common inefficiency: they spend most of their token budget finding the file to patch, not patching it. On SWE-Bench Verified, a 30B OpenHands agent averages 23 rounds and 631K tokens per resolved issue, dominated by grep, glob, and view_file calls. No open, systematically-studied agent-style code retriever exists at scale to shorten this phase. We introduce CodeGrep, a 14B retrieval agent trained end-to-end with GRPO to issue multi-turn parallel grep/glob/read tool calls and return candidate files to a frozen downstream coding agent.On all 500 SWE-Bench Verified instances, CodeGrep preserves the downstream resolve rate (25.8% → 27.0%, +1.2pp) while delivering a much larger efficiency gain (−15% rounds, −19% tokens on resolved instances). Across three retrievers, downstream utility follows a precision threshold: BM25 (precision 0.375) degrades the agent, Jina (0.445) is neutral, and only CodeGrep (0.677) crosses the threshold at which retrieval begins to buy efficiency. To enable this study, we mine supervision from 67K open-source agent trajectories (CATM) and build a Git-worktree environment for multi-turn agent RL. In our setting, applying the efficiency signal at the advantage layer, rather than the reward layer, holds KL drift to one-third and translates cleanly into downstream efficiency. We will release the model, training pipeline, RL environment, and evaluation harnesses.
Abstract source