Back to Papers & Articles

Beyond Semantic Similarity: Rethinking Retrieval for Agentic Search via Direct Corpus Interaction

Zhuofeng Li, Haoxiang Zhang, Cong Wei, Pan Lu, Ping Nie, Yi Lu, Yuyang Bai, Shangbin Feng, Hangxiao Zhu, Ming Zhong, Yuyu Zhang, Jianwen Xie, Yejin Choi, James Zou, Jiawei Han, Wenhu Chen, Jimmy Lin, Dongfu Jiang, Yu Zhang

1. Problem / Context

Most RAG and agent systems treat retrieval as a narrow API: send a query, get top-k chunks, answer from those chunks. That works for many QA tasks, but it is limiting for stronger agents because agents often need to inspect, compare, filter, verify, and iteratively search across a corpus.

2. Problem Statement

The paper asks whether agents should interact with knowledge corpora through a richer interface than traditional retrieval. Instead of depending only on dense vectors, sparse retrieval, or rerankers, can an agent directly inspect the corpus using tools like search commands, file reads, and scripts?

3. Solution

The proposed idea is Direct Corpus Interaction. The agent gets access to low-level corpus tools such as grep, shell commands, file inspection, and lightweight scripting. Rather than receiving only top-k retrieved passages, the agent can actively explore the corpus, issue multiple searches, refine hypotheses, and gather evidence.

4. Challenges

The main challenge is that raw corpus access increases the agent's action space. The agent has to know what to search for, how to narrow results, how to avoid wasting steps, and how to synthesize evidence. It also requires better tool-use behavior, because the model is no longer passively consuming retrieved chunks.

5. Practical Applications

This maps directly to production agent systems that need richer memory/search access: coding agents searching repos, support agents searching logs/docs/tickets, enterprise agents working across Slack/Notion/Jira/Drive, and research agents scanning papers. The practical lesson is that agent memory should expose multiple access patterns: vector search, keyword search, metadata filters, graph traversal, file reads, and sometimes executable analysis.

Why this matters for agentic design

The important design principle is: retrieval should be a tool layer, not just a function call. A good agent needs to query memory in many ways, just like a software engineer does not only use semantic search; they use grep, file trees, logs, SQL, dashboards, and scripts.

Food for thought

As APIs become consumed by agents instead of mostly humans, traffic patterns may shift from bounded UI-driven interactions to high-fanout, recursive, machine-speed workflows. This could materially change scaling assumptions around API gateways, rate limits, caching, database hot partitions, write amplification, and read-heavy scan patterns. The core primitives remain the same, but systems may need more agent-aware APIs, quotas, batching, async execution, and data architecture optimized for machine consumption.