Source-linked AI summary
Dr-DCI: Scaling Direct Corpus Interaction via Dynamic Workspace Expansion
Yi Lu, Zhuofeng Li, Ping Nie, Haoxiang Zhang, Yuyu Zhang, Kai Zou, Wenhu Chen, Jimmy Lin, Dongfu Jiang, Yu Zhang
TL;DR
Agentic search systems trade scalable corpus discovery for limited evidence interaction, while direct corpus interaction becomes fragile at large scale. DR-DCI addresses this by expanding a bounded workspace with retrieval and applying DCI locally, remaining effective across corpus scales and benchmarks while reducing resource use.
Problem
Retriever-mediated search limits agents’ ability to reorganize evidence, apply arbitrary cross-document constraints, and verify hypotheses, while full-corpus DCI becomes slow and timeout-prone as collections grow.
Method
DR-DCI makes retrieval an agent-callable workspace-expansion action, then applies terminal-style DCI operations within the evolving bounded workspace.
Results
Across BrowseComp-Plus, corpus-scaling, and Wiki-18 QA settings, DR-DCI remains effective at scale; on BrowseComp-Plus it reaches 71.2% accuracy, up to 8.3 points above raw DCI and static variants.
Takeaways & Limitations
Workspace expansion preserves flexible local evidence interaction while avoiding repeated corpus-scale terminal searches, with ranked previews and inter-document DCI identified as important interface choices.
Takeaways & Limitations
Extending the workspace-expansion approach to web-scale agentic search remains future work.
Abstract
from arXiv · showhide
Agentic search over large corpora relies on retriever-mediated interfaces (e.g., BM25 or ColBERT) for scalable candidate discovery. While effective at ranking relevant documents, these interfaces expose evidence only as ranked results or bounded document views, limiting agents' ability to reorganize material and verify constraints across documents. Direct Corpus Interaction (DCI) addresses this limitation by exposing shell-executable corpus operations for flexible search, filtering, comparison, and verification. However, full-corpus terminal commands become slow and unstable as the corpus grows, degrading performance and efficiency. We introduce DR-DCI, a retriever-steered DCI framework that treats retrieval as an agent-callable action for expanding a local workspace. Rather than operating directly over the full corpus, the agent dynamically pulls relevant documents into an evolving workspace and conducts DCI operations within it. This design combines retriever-level recall with DCI-style precision: retrieval keeps exploration scalable, while DCI preserves the local operations needed for effective evidence resolution. Experiments show that DR-DCI is both effective and efficient across scales. On Browsecomp-Plus, DR-DCI reaches 71.2\% accuracy, improving over raw DCI and ablated variants by up to 8.3 points while reducing tool usage, wall time, and estimated cost. With workspace-preserving context reset, accuracy further improves to 73.3\%. In corpus-scaling experiments, DR-DCI remains effective from 100K to 10M documents, whereas raw DCI becomes unstable and BM25 performs substantially worse. DR-DCI also scales to a 20M-scale file-per-document Wiki-18 QA setting, achieving an average score of 63.0 across six benchmarks and outperforming retrieval-based and trained search-agent baselines. Ablation analysis further shows that ranked previews and inter-document DCI are key to performance.
1 Introduction
DR-DCI scales Direct Corpus Interaction by making retrieval an agent-callable workspace-expansion action, combining corpus-level candidate discovery with precise local evidence operations. Across BrowseComp-Plus, corpus-scaling, and Wiki-18 QA settings, it improves effectiveness and efficiency while preserving flexible cross-document verification.
- Method: DR-DCI separates corpus-level exploration from local evidence interaction, avoiding full-corpus scans while retaining DCI’s precision-oriented operations.The interface supports searching, filtering, comparing, and verifying evidence across documents already in the workspace.
- Method: DR-DCI exposes retrieval as a pull action that materializes ranked candidate documents into an evolving workspace for subsequent DCI investigation.The agent supplies a query and retrieval budget, then uses terminal-style commands within the materialized workspace.
- Results: 71.2% accuracy on BrowseComp-Plus improves over raw DCI and static workspace variants by up to 8.3 points while lowering tool usage, wall time, and estimated cost.Workspace-preserving context reset raises performance further to 73.3%.
2 Related Work
Related work spans scalable sparse and dense retrieval, multi-step and long-horizon search agents, and terminal-based Direct Corpus Interaction (DCI). DCI extends agentic search beyond ranked retrieval results by enabling flexible local corpus operations for constraint expression, document comparison, and evidence verification.
- Sparse and dense retrieval: Sparse and dense retrievers provide scalable candidate discovery by scoring large corpora and returning ranked top-k documents or passages.BM25 supports exact entities, rare terms, and discriminative phrases, while dense retrievers represent another retrieval approach.
- Agentic search: Agentic search systems extend one-shot retrieval by interleaving model reasoning with search, browsing, and document reading across multiple tool calls.Representative systems include ReAct, WebGPT, IRCoT, FLARE, and Self-RAG.
- Long-horizon search agents: Long-horizon search agents sustain many tool calls, intermediate hypotheses, and evidence updates for challenging tasks.Recent work studies trajectory synthesis, optimization, training, and local environment simulation for deep-research search agents.
- Terminal-use agents and DCI: Terminal-use agents expose executable environments that let models search files, inspect outputs, manipulate paths, and compose flexible tool calls beyond fixed retrieval APIs.This environment supports broader computational interaction than retriever-only interfaces.
- Terminal-use agents and DCI: DCI applies terminal interaction to agentic search, enabling exact lexical constraints, bridge-entity following, document comparison, and evidence-span verification through local corpus operations.Its commands include rg, grep, find, read, and cat rather than restricting agents to retriever-produced results or bounded document readers.
3 Method
DR-DCI lets an agent dynamically expand a query-specific workspace from a hidden corpus, combining corpus-level retrieval with workspace-level DCI for evidence search and verification. The method also separates retrieval state from reasoning context, enabling selective workspace-preserving resets when trajectories become unreliable.
- Workspace and actions: DR-DCI maintains a query-specific workspace W_t ⊆ C that the agent can expand during inference instead of using a fixed top-k context.The agent chooses among workspace expansion, terminal-style DCI investigation, and finalization actions.
- Workspace expansion: The pull(query, topK) action retrieves ranked candidates, removes documents already in W_t, materializes new documents, and returns additions, a ranked preview, and workspace statistics.Workspace updates follow W_t+1 = W_t ∪ ΔW_t with ΔW_t ∩ W_t = ∅; retrieval calls can be interleaved with local DCI operations.
- DCI operations: Ranked previews guide inspection, while inter-document DCI searches across materialized documents and intra-document DCI supports close inspection and span-level verification.These capabilities provide complementary evidence access for navigation, cross-document constraint checking, and selected-document verification.
- Context reset: Workspace-preserving context reset recomputes the answer from the existing workspace when the reasoning history is unreliable, rather than discarding already materialized evidence.In BrowseComp-Plus, reset is triggered only for trajectories with confidence score ≤70 that explicitly indicate abstention or missing evidence.
- Interface implementation: A terminal-aware corpus interface bounds local operations by using deduplicated root-flat workspaces, shell-safe filenames, hard links, and bounded search/read observations with continuation hints.These choices target failures from brittle paths, duplicated files, collapsed OCR lines, and context-flooding outputs.
4 Experiments
Across controlled benchmarks and scaling tests, DR-DCI improves search effectiveness and operational efficiency by dynamically materializing bounded workspaces for local DCI operations. Results on BrowseComp-Plus, Wiki-18 QA, corpus scaling, and ablations show the importance of ranked previews, inter-document DCI, retrieval choice, and workspace organization.
- Main comparison: 71.20% accuracy on 830-query BrowseComp-Plus improves over Raw-DCI by 8.30 points while reducing average tool calls, wall time, and estimated cost.Workspace-preserving context reset further improves accuracy to 73.3%.
- Corpus scaling: 80/100 to 70/100 accuracy as the corpus grows 100× from 100K to 10M documents, while workspaces remain roughly 1K–1.4K documents, tool errors stay low, and total cost remains around $4–$5.Raw-DCI becomes operationally unstable at larger scales, whereas BM25 avoids filesystem failures but remains substantially below DR-DCI because it exposes only top-ranked snippets.
- Wiki-18 QA: 63.0 average score across NQ, TriviaQA, Bamboogle, HotpotQA, 2Wiki, and MuSiQue in the 20M-scale Wiki-18 QA setting.Baselines differ in model size, training recipe, and environment assumptions, so they are treated as reference points rather than fully controlled comparisons.
- Ranked previews: 82/100 with ranked previews, outperforming hidden and shuffled previews that expose less useful ranking information.Ranked previews show the top-ranked newly materialized documents, while hidden previews show only workspace statistics and shuffled previews use an intentionally incorrect deterministic order.
- Inter-document DCI: 82/100 to 40/100 when inter-document DCI is blocked despite retaining the ranked top-20 preview, with the agent compensating by pulling many more documents.Ranked guidance and inter-document DCI therefore play complementary roles in workspace investigation.
- Interface and workspace ablations: BM25 remains effective under the Dynamic Pull interface, while dense retrieval performs best in this setup; root-flat workspaces yield the best final accuracy despite lower raw gold/qrel workspace recall than rank-aware organization.The ablations identify retrieval steering, ranked feedback, cross-document search, and reliable workspace materialization as complementary components.
5 Conclusion
DR-DCI scales Direct Corpus Interaction through agent-callable workspace expansion, coupling retrieval-driven candidate discovery with local DCI operations. This preserves flexible evidence interaction while avoiding corpus-scale terminal search and improves efficiency over Raw-DCI and static-workspace ablations.
- Framework: DR-DCI uses agent-callable workspace expansion to combine retrieval-driven candidate discovery with local DCI operations.The framework is designed for large-corpus agentic search.
- Framework: DR-DCI preserves flexible evidence interaction while avoiding corpus-scale terminal search.
- Results: DR-DCI improves over Raw-DCI and static-workspace ablations while reducing tool calls, wall time, and estimated API cost.
6 Future Work
The paper identifies future work in training smaller open agents for efficient Dynamic Pull and developing ranking-oriented DR-DCI variants with candidate-level scoring.
- 6 Future Work: Future work will train smaller open agents to use Dynamic Pull efficiently, reducing cost and latency while enabling reproducible study of retrieval budgets, pull timing, and workspace-search policies.
- 6 Future Work: Future work will develop ranking-oriented DR-DCI variants using candidate-level scoring with listwise or pairwise objectives.
A Appendix · A.1 Additional Experimental Details
The Wiki-18 experiment uses a stricter file-per-document interface with 20M individual short documents rather than one line-oriented JSONL file. This design stresses file-level materialization, path handling, workspace search, and document-level isolation.
- A.1 Additional Experimental Details: Wiki-18 represents the corpus as 20M individual short documents.This is a stricter file-per-document corpus interface.
- A.1 Additional Experimental Details: The interface avoids exposing millions of passages as one line-oriented JSONL file.Instead, documents are stored individually.
- A.1 Additional Experimental Details: The file-per-document setting stresses file-level materialization.The corpus representation is intended to test how documents are materialized at file level.
- A.1 Additional Experimental Details: The experiment stresses path handling across the 20M-document corpus.Path handling is one of the interface properties tested by this setting.
- A.1 Additional Experimental Details: The setting stresses workspace search over individually represented documents.Workspace search is tested under the file-per-document organization.
- A.1 Additional Experimental Details: The interface stresses document-level isolation.Each short document is represented separately, testing isolation at document level.
A.2 Dynamic Pull Behavior on Wiki-18
On Wiki-18, Dynamic Pull achieves a 63.0% average score while adapting retrieval effort to task difficulty. Single-hop or entity-centric questions typically require fewer than two pull calls and workspaces of roughly 570–650 documents, whereas more compositional questions prompt more pulls and larger workspaces.
- Performance and behavior: 63.0% average score is reported for Dynamic Pull on Wiki-18 QA under a 300–600 document budget per pull call.This matches the main Wiki-18 QA result.
- Task-adaptive retrieval: On single-hop or entity-centric datasets such as NQ and TriviaQA, the agent typically uses fewer than two pull calls.These tasks generally need limited retrieval expansion.
- Task-adaptive retrieval: For NQ and TriviaQA, the agent constructs a workspace of roughly 570–650 documents.Workspace size is measured under the stated 300–600 document budget per pull call.
- Task-adaptive retrieval: As questions become more compositional, the agent issues more pull calls and constructs larger workspaces.This behavioral trend is summarized for Dynamic Pull on Wiki-18 QA.
A.3 Additional Relevance Ranking Results
DR-DCI achieves competitive NDCG@10 relevance-ranking performance across BRIGHT and BEIR-style benchmarks, especially on SciFact and ArguAna, but does not surpass the DCI-agent reference on average. The results indicate that ranking-specific optimization remains important, motivating ranking-oriented DR-DCI variants as future work.
- Relevance-ranking evaluation: DR-DCI achieves competitive NDCG@10 performance against sparse, dense, and learned relevance-ranking baselines across BRIGHT and BEIR-style benchmarks.The evaluation uses Table 8’s NDCG@10 metric, with Avg. averaging across all splits and ΔAvg. measured relative to ReasonRank-32B.
- Relevance-ranking results: DR-DCI performs particularly strongly on SciFact and ArguAna.
- Limitations and future work: DR-DCI does not outperform the DCI-agent reference on average, indicating that ranking-specific optimization remains important.The paper leaves ranking-oriented DR-DCI variants to future work.
A.4 Context-Reset Trigger Analysis
Workspace-preserving context reset is a conservative recovery mechanism triggered only for low-confidence trajectories that explicitly abstain or report insufficient evidence. On BrowseComp-Plus, it recovers failed cases by reusing the existing workspace while refreshing reasoning context, improving accuracy at modest additional cost.
- Trigger rule: The reset trigger selects trajectories with final confidence ≤70 and explicit abstention, insufficient-evidence, or answer-indeterminacy behavior.Low confidence alone is insufficient because some low-confidence trajectories are correct.
- Trigger analysis: 49 triggered cases had 0/49 correct answers before reset while retaining substantial workspace coverage.This indicates that some failures reflect ineffective reasoning over available evidence rather than retrieval failure alone.
- Recovery results: 17 correct answers were recovered, raising BrowseComp-Plus accuracy from 591/830 to 608/830, or from 71.20% to 73.25%, at an additional cost of $4.44.The reset reuses the materialized workspace while refreshing the reasoning context.
- Trigger selectivity: The 127 low-confidence non-abstention cases contained 27 correct answers, and indiscriminate reset could introduce correct-to-wrong regressions.These findings support requiring both low confidence and explicit abstention or evidence-missing behavior.
A.5 Tool-Call Behavior Analysis … A.11.3 Failure Case: Workspace Recall Succeeds but Evidence Disambiguation Fails
Across the appendix, DR-DCI shifts corpus discovery from repeated full-corpus terminal searches to retrieval-driven workspace expansion followed by local DCI, while exposing ranked previews and continuation mechanisms for evidence inspection. The traces show that workspace recall can support successful targeted verification but does not guarantee correct disambiguation among similar candidates.
- A.5 Tool-Call Behavior Analysis: 64.26% of DR-DCI tool calls are bash calls versus 89.69% for Raw-DCI and 90.31% for Single Pull, while local reads rise to 23.29%.DR-DCI changes where corpus discovery occurs rather than eliminating local search.
- A.5 Tool-Call Behavior Analysis: 71.76% of Raw-DCI bash calls are search-withlimit commands, whereas DR-DCI uses rg primarily within a bounded materialized workspace.Across settings, rg remains dominant: 90.83% of DR-DCI, 95.70% of Single Pull/filter-top500, and 89.36% of Raw-DCI bash calls.
- A.5 Tool-Call Behavior Analysis: 1,754s is the average Raw-DCI tool time per question, with p50/p90/p95/p99 single-tool durations of 12.4s/97.0s/167.2s/310.2s and a 24,418s maximum.The archived Raw-DCI logs contain 789 valid per-question logs, so proportions are emphasized over absolute counts.
- A.6 Controlled Corpus-Scaling Details: Raw-DCI becomes increasingly unstable as corpus size grows, while DR-DCI bounds corpus-level access through pull and keeps DCI operations inside a materialized workspace; BM25 exposes only top-5 snippets.The controlled scaling setting uses the same BCP-100 questions and gold evidence while adding randomly sampled FineWeb distractors.
- A.6 Controlled Corpus-Scaling Details; A.7 Dynamic Pull Tool Response Design: Higher pull counts generally indicate harder questions or unresolved evidence constraints rather than a causal benefit from retrieving more documents.The pull response reports newly materialized documents, duplicates, total visible workspace size, and a compact ranked preview.
- A.8 Engineering Details: Hard-link materialization, a root-flat deduplicated workspace, normalized shell-safe filenames, and selective reflow make retrieved documents concrete and searchable for local DCI.When output exceeds the context budget, the system returns local evidence snippets with executable continuation instructions for line- or character-level inspection.
- A.9 Interface Ablation Details: Rank-aware folders achieve higher workspace-level recall but make terminal navigation more brittle, increasing tool calls and turns while lowering final accuracy; the root-flat design exposes rank through feedback.The controlled variants isolate retrieval timing, workspace construction, ranking feedback, and available DCI operations.