arXiv:2605.29307cs.CLcs.AI2026-05被引 7

让AI直接用命令在文本库中搜答案,比传统检索更准更快。

GrepSeek: Training Search Agents for Direct Corpus Interaction

论文配图:GrepSeek: Training Search Agents for Direct Corpus Interaction
图 1 · 摘自论文原文
  • AI直接执行命令在文本库中搜索,跳过关键词匹配。
  • 在7个问答数据集上,准确率超越现有方法,最优达81.3% F1。
  • 适合需要精准、快速访问大规模文本的智能系统研发者。

大型语言模型搜索代理在多轮推理与信息检索中展现强大潜力。现有系统依赖检索器,通过关键词或自然语言查询返回文档列表。本文提出GrepSeek,一种优化的直接文本库交互(DCI)搜索代理,训练小型代理直接从大文本库中查找、筛选并组合证据。为解决在大规模文本库上直接使用强化学习的不稳定性,设计两阶段训练:首先用答对感知的导师和盲选规划器生成带验证、因果关联的搜索轨迹;其次用组相对策略优化(GRPO)精炼策略,使代理通过与文本库的直接交互提升任务导向能力。为实现可扩展性,引入语义保持的分片并行执行引擎,使基于命令的检索加速达7.6倍,且结果与串行执行完全一致。在7个开放域问答基准测试中,GrepSeek在整体令牌级F1和精确匹配上均达到最高性能。分析表明,纯词法匹配在表面形式变化大的查询中表现受限,证实DCI是现实世界中可互补现有检索范式的实用高效方法。

原文摘要 · Abstract (English)

Large Language Model (LLM) search agents have shown strong promise for knowledge-intensive language tasks through multiple rounds of reasoning and information retrieval. Most existing systems access information using a retriever that takes a keyword or natural language query and returns a ranked list of documents using an index of pre-computed document representations. In this work, we explore a complementary perspective in which the search agent treats the corpus itself as the search environment and finds evidence by issuing executable shell commands. We introduce GrepSeek, an optimized direct corpus interaction (DCI) search agent that trains a compact search agent to find, filter, and compose evidence from large text corpora. To address the instability of learning behavior directly with reinforcement learning on large corpora, we propose a two-stage training pipeline. First, we construct a cold-start dataset using an answer-aware Tutor and answer-blind Planner to generate verified, causally grounded search trajectories. Second, we refine the initialized policy with Group Relative Policy Optimization (GRPO), allowing the agent to improve its task-oriented search behavior through direct interaction with the corpus. To make DCI practical at scale, we further use a semantics-preserving sharded-parallel execution engine that accelerates shell-based retrieval by up to $7.6\times$ while preserving byte-exact equivalence with sequential execution of the shell command. Experiments across seven open-domain question answering benchmarks show that GrepSeek achieves the strongest overall token-level $F_1$ and Exact Match. Our analysis also highlights the limitations of purely lexical interaction on queries with substantial surface-form variation, suggesting DCI as a practical and competitive method for search agents that can complement existing retrieval paradigms in the real world.

搜索代理直接交互文本检索强化学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。