Back to blog

Search Agents Now Dive Straight Into Raw Text

Based on research by Alireza Salemi, Chang Zeng, Atharva Nijasure, Jui-Hui Chung, Razieh Rahimi

Imagine a search agent that doesn't just skim the surface of indexed documents but dives straight into the raw text to find answers. This is the core promise of GrepSeek, a new approach that treats the entire corpus as a live environment rather than a static database. By issuing executable shell commands directly, the system navigates vast amounts of data with a precision that traditional keyword retrieval often misses.

Most current search agents rely on pre-computed indexes, returning ranked lists of documents based on simple queries. GrepSeek flips this model. It trains a compact agent to interact directly with the text, using commands to find, filter, and compose evidence. To make this feasible, researchers developed a two-stage training process. First, they created a dataset of verified search paths using a specialized tutor and planner. Then, they refined the agent’s behavior using Group Relative Policy Optimization, allowing it to learn from direct interaction with the corpus without the instability that often plagues such methods.

The results are striking. GrepSeek achieved the strongest performance across seven open-domain question-answering benchmarks, particularly in token-level F1 and Exact Match. Crucially, the system includes a parallel execution engine that speeds up shell-based retrieval by up to 7.6 times without sacrificing byte-exact equivalence. This efficiency makes direct corpus interaction practical for real-world use, offering a significant advantage over purely lexical methods that struggle with queries containing substantial surface-form variations.

The takeaway is clear: direct corpus interaction is not just a theoretical curiosity but a competitive, practical method for search agents. By bypassing the limitations of traditional indexing and interacting directly with the source text, GrepSeek demonstrates that agents can find more accurate answers by treating the corpus as a dynamic environment to be explored, not just a list to be ranked.

Source: arXiv:2605.29307

This post was generated by staik AI based on the academic publication above.