A New Role for Relevance: Guiding Corpus Interaction in Agentic Search
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 should retrieval systems handle complex multi-step reasoning?- Does grep-style corpus search outperform dense retrieval on entity-heavy questions?
- What execution cost does computing relevance scores add to grep traversal?
- Does retrieval iteration improve accuracy only after strong first-stage ranking?
- Can retrieval behavior be compressed into a small parametric decoder?
- Why does query routing matter for retrieval-augmented systems?
- Can relevance judgments based on query resemblance miss essential factual connections?
- Does retrieval quality depend more on access structure or write gating?
- What would instruction-following retrieval enable that query-only systems cannot?
- Does tail distribution collapse in training predict retrieval failure patterns?
- Does selective history retrieval outperform full context inclusion in agent reasoning?
- What language skills matter most for entity extraction from retrieval context?
- Why do dense embeddings semantically conflate distinct entities in retrieval?
- When should interpretable search programs replace ranked dense retrieval?
- What paraphrase and conceptual matching tasks favor dense over exact-match retrieval?
- Why do encoder models process document corpora more efficiently than decoder models?
- Can semantic search find paraphrased and renamed tasks without human review?
- How do embedding-based retrievers hit mathematical limits?
- How well does semantic similarity preserve survey response nuance?