A New Role for Relevance: Guiding Corpus Interaction in Agentic Search

Paper · arXiv 2607.24223 · Published July 27, 2026
Retrieval-Augmented Generation (RAG)

Relevance is a query-dependent estimate of whether a document or excerpt contains useful evidence. Existing retrieval agents use relevance to select top-k content, but document relevance alone cannot localize, compose, or verify the evidence required by complex questions. Direct Corpus Interaction (DCI) enables such fine-grained operations through grep-style exploration, but its relevance-agnostic search can expose useful clues late and delay convergence. Recent advances use relevance to narrow the corpus into a working space for interaction. Once interaction begins, however, relevance still does not directly guide which documents grep searches first or distinguish informative excerpts from a broad set of matches to let LLMs see them first. We introduce the Relevance-Aware RipGrep Search Agent (RARG), which turns relevance into an execution prior for corpus interaction. RARG provides coarse-to-fine relevance guidance: it orders documents for sequential ripgrep traversal to expose globally relevant clues earlier, initializes promising entry points with query-relevant paragraphs, and reranks grep matches to surface informative excerpts that document-level ranking may otherwise obscure.

Introduction. Relevance has long served as the organizing principle of information retrieval. In this paper, we use relevance to mean a query-dependent estimate of how likely a document, passage, or matched excerpt is to contain evidence useful for the current information need. Modern dense retrievers, which are widely deployed in RAG [7, 11, 14, 23], instantiate this estimate with embedding similarity [10, 27, 32], while sparse retrievers use lexical matching signals [21]. In either case, relevance is a useful but imperfect prior: it indicates where evidence may be found, not whether the evidence is sufficient, correctly localized, or properly combined with other clues. Retrieval agents conventionally use this prior to rank the corpus and expose a top-k set of documents or snippets to the language model [9, 12, 13, 24, 28, 33]. This interface is scalable, but it conflates document relevance with evidence utility.

Discussion / Conclusion. We revisited the role of relevance in agentic search and argued that it should guide corpus interaction, not merely select its inputs. Building on this view, we introduced RARG, which turns retrieval scores into an execution prior for grep exploration at two resolutions: document-level relevance orders rg traversal so promising documents are scanned first, while match-level reranking controls which local excerpts remain visible under a limited observation budget. Between them, entry-point initialization gives the agent a precise place to begin. This coarse-to-fine design preserves DCI’s fine-grained, compositional interaction while restoring the relevance guidance that unrestricted grep lacks. Across challenging QA, corpus scaling, and reasoning-intensive retrieval, RARG advances the accuracy– efficiency frontier over retrieval-only agents, unrestricted DCI, and retrieval-constructed interaction spaces, reaching higher accuracy with substantially fewer tool calls and degrading gracefully as the corpus grows.

Lines of inquiry this paper opens 24

Research framings built by reading the notes related to this paper — the questions it feeds into.

How do training priors constrain what context information can override? When should retrieval-augmented systems decide to fetch new information? How should agents balance memory condensation to optimize context efficiency? Why do semantic similarity and task relevance diverge in vector embeddings? How should retrieval systems optimize for multi-step reasoning during inference? Why does finetuning cause catastrophic forgetting of model capabilities? How do knowledge graphs enable efficient multi-hop reasoning over alternatives? How does example difficulty affect learning efficiency in language models?