Can relevance guide grep search beyond just selecting documents?
Most retrieval systems use relevance only to pick top-k documents for the model. Could relevance instead shape how an agent explores the corpus—ordering traversal, setting entry points, and filtering matches—to find evidence faster?
The paper defines relevance as "a query-dependent estimate of whether a document or excerpt contains useful evidence" and argues that agentic search has used it in only one place: retrieval agents rank the corpus and expose a top-k set of documents or snippets to the language model. The introduction says this interface "conflates document relevance with evidence utility," and the abstract adds that document relevance alone "cannot localize, compose, or verify the evidence required by complex questions." The conclusion states the reframing directly: relevance "should guide corpus interaction, not merely select its inputs."
The starting point is Direct Corpus Interaction (DCI), where the agent explores with grep-style commands. DCI gives fine-grained, compositional operations, but its relevance-agnostic search "can expose useful clues late and delay convergence." The Relevance-Aware RipGrep Search Agent (RARG) keeps the grep interface and adds relevance back as "an execution prior" at coarse-to-fine resolutions. Document-level scores order the ripgrep traversal so promising documents are scanned first. Query-relevant paragraphs initialize entry points. Match-level reranking decides which excerpts stay visible "under a limited observation budget," surfacing informative excerpts "that document-level ranking may otherwise obscure." The introduction frames relevance as "a useful but imperfect prior" that indicates where evidence may be found, not whether it is sufficient, correctly localized or combined with other clues. That is why it is used to prioritize exploration and not to decide what counts as evidence.
Against the nearest notes, this is the counterweight to Can direct corpus search beat embedding-based retrieval?. That note presents DCI as an alternative to dense retrieval; this paper accepts DCI's fine-grained interaction and argues that dropping relevance entirely costs time-to-evidence. Read together, the choice is less retriever versus grep than where the relevance signal enters the loop. It also sits beside Can document count be learned instead of fixed in RAG?: both find the fixed top-k interface inadequate, but DynamicRAG repairs the selection step, while RARG moves relevance out of selection and into the ordering of interaction. The match-level reranking echoes Can verification separate structural near-misses from topical matches? in a loose way, since both keep a coarse relevance score and add a finer-grained stage after it.
The excerpt is thin on evidence. It reports that RARG "advances the accuracy–efficiency frontier" over retrieval-only agents, unrestricted DCI and retrieval-constructed interaction spaces, with higher accuracy, "substantially fewer tool calls" and graceful degradation as the corpus grows, across QA, corpus scaling and reasoning-intensive retrieval. It names no benchmarks, gives no numbers, identifies no retriever or reranker, and says nothing about the cost of computing relevance scores or which of the three mechanisms (traversal order, entry points, match reranking) carries the gain. What it supports at this strength is a design claim: a relevance score can be reused as a prior over where and what to read next, and the reported comparisons point in that direction.
Inquiring lines that read this note 2
This note is a source for these research framings, grouped by the broader line of inquiry each explores. Scan the bold lines of inquiry; follow any specific question forward.
How should retrieval systems handle complex multi-step reasoning?Related concepts in this collection 4
This note in its neighbourhood — explore the map, then jump to a related concept in the list below.
Click a node to walk · click center to open · click Open in graph to see this note in the full knowledge graph
-
Can direct corpus search beat embedding-based retrieval?
Explore whether agents that issue shell commands over raw text can outperform dense retrieval systems, especially when queries demand exact entity matching and symbolic precision across multiple reasoning steps.
contrasts with: same grep-style interaction, but here relevance is restored as a prior instead of dropped
-
Can document count be learned instead of fixed in RAG?
Standard RAG systems use a fixed number of documents regardless of query complexity. Can an RL agent learn to dynamically select both how many documents and their order based on what helps the generator produce correct answers?
parallels: both reject fixed top-k selection, one by learning document count, the other by steering interaction order
-
Can verification separate structural near-misses from topical matches?
Should retrieval pipelines use a separate verification stage to detect structural errors that dense retrievers miss? This explores whether splitting retrieval and verification solves the compositional sensitivity problem.
parallels: a coarse relevance score followed by a finer-grained stage over candidates
-
Does lexical search outperform agentic navigation as corpus size grows?
As document collections scale, does a simple indexed search like BM25 become more reliable than an intelligent agent that explores the corpus sequentially? This matters because it shapes how to architect production RAG systems.
Evidence for: BM25 overtakes a file-system agent near 10M corpus tokens because a global index finds relevant documents that sequential exploration misses
Related papers in this collection 8
Papers most semantically related to this note, ranked by cosine similarity in the embedding space.
- A New Role for Relevance: Guiding Corpus Interaction in Agentic Search
- GrepSeek: Training Search Agents for Direct Corpus Interaction
- FollowIR: Evaluating and Teaching Information Retrieval Models to Follow Instructions
- Generator-Retriever-Generator: A Novel Approach to Open-domain Question Answering
- Don't "Overthink" Passage Reranking: Is Reasoning Truly Necessary?
- On the Theoretical Limitations of Embedding-Based Retrieval
- BM25 Wins at Scale: A Scaling Study of Retrieval-Augmented Generation Paradigms
- Cumulated Gain-Based Evaluation of IR Techniques
Original note title
relevance should guide corpus interaction, not merely select its inputs — an execution prior for grep traversal order and match reranking