# RAG is Dead? Introducing Agentic File Exploration

Source: https://www.youtube.com/watch?v=xG3eS_zHR3k
Recap page: https://rapidrecap.app/video/xG3eS_zHR3k
Generated: 2026-02-09T14:05:10.781+00:00

---
## Quick Overview

The Agentic File Search system outperforms standard RAG by using a three-phase exploration strategy (Parallel Scan, Deep Dive, Backtracking) that dynamically navigates cross-references across multiple documents, avoiding context loss inherent in fixed-chunking methods.

**Key Points:**
- Standard RAG pipeline fails on complex queries because chunking loses global document context, cross-document references, and document dependencies (0:16).
- The Agentic File Search employs a three-phase strategy: Parallel Scan, Deep Dive, and Backtracking, to dynamically navigate documents (2:21).
- Phase 1 (Parallel Document Scan) previews all documents in a folder concurrently using 1500-char previews to identify relevant documents (2:28).
- Phase 2 (Deep Dive) fully reads relevant documents, allowing the agent to discover and follow cross-references (e.g., 'See Exhibit B') found within the text (3:08).
- Phase 3 (Backtracking) allows the agent to go back and read previously skipped files if a cross-reference points to them, ensuring complete context retrieval (3:36).
- The system supports 6 tools, including `scan_folder`, `parse_file`, `preview_file`, `read`, `grep`, and `glob`, orchestrated by a LlamaIndex workflow managing agent history and state (3:53).
- This method successfully answers complex queries requiring information spread across multiple files, such as calculating the total purchase price or identifying acquisition risks (8:39, 8:48).

![Screenshot at 1:21: Diagram illustrating the problem where RAG retrieval fails after chunking because the link between 'Master Agreement.pdf' and 'Exhibit B - Adjustments.pdf' is lost, resulting in a 'Dead End!' when trying to follow the cross-reference.](https://ss.rapidrecap.app/screens/xG3eS_zHR3k/00-01-21.jpg)

**Context:** This video explains a novel approach to document retrieval and question-answering called Agentic File Search, designed to overcome the limitations of traditional Retrieval-Augmented Generation (RAG) systems when dealing with large sets of interconnected legal or financial documents. The core issue with RAG is that breaking documents into small, fixed-size chunks destroys relational context, making it impossible to follow explicit cross-document references like 'See Exhibit B for adjustments' (0:16, 1:24). The proposed system uses a dynamic, three-phase agent-driven workflow to intelligently navigate the file system and build a complete answer by reasoning about what to read next.

## Detailed Analysis

The video introduces Agentic File Search as an AI-powered document search agent that overcomes the limitations of standard RAG systems, which suffer from context loss due to fixed chunking (0:05). The standard RAG process splits documents into small chunks (200-500 tokens), embeds them, and relies solely on semantic similarity for retrieval, which causes cross-document references to become invisible (0:16, 1:25). The Agentic File Search uses a three-phase strategy: Parallel Scan, Deep Dive, and Backtracking (2:22). Phase 1 involves a Parallel Document Scan where the AI Agent previews 1500-char snippets from all documents concurrently (4 threads) to quickly identify relevant files (2:28). Phase 2, Deep Dive, involves fully reading the most relevant files identified in Phase 1. During this deep read, the agent can discover explicit cross-references (e.g., 'See Exhibit B') (3:08). If a cross-reference is found to a document that was skipped in Phase 1 (because its initial snippet wasn't immediately relevant), the agent initiates a backtrack (3:17). Phase 3, Backtracking, uses the backtrack instruction to read the previously skipped document, ensuring all necessary relational context is gathered to form the final answer (3:36). The system is powered by Gemini 3 Flash, utilizes 6 distinct tools (scan_folder, parse_file, preview_file, read, grep, glob), and processes all files locally, supporting various formats like PDF, DOCX, and XLSX (3:53, 4:04). The effectiveness is demonstrated on a complex acquisition query, which required accessing information across 14 steps/documents and yielded a comprehensive answer, unlike simple RAG which would fail on cross-document dependencies (8:39).

### RAG Limitations

- Chunks lose context by destroying relationships between sections
- Cross-references are invisible to embeddings ('See Exhibit B' means nothing)
- Semantic similarity misses logical connections (0:05)

### Agentic File Search Strategy

- Three phases used: 1. Parallel Scan (Broad overview)
- 2. Deep Dive (Full read of relevant docs)
- 3. Backtracking (Follow cross-references to previously skipped docs) (2:22)

### Agent Tool System

- 6 tools available to Gemini 3 Flash Agent: scan_folder (parallel preview)
- parse_file (full document read via Docling)
- preview_file (quick preview)
- read (TXT files)
- grep (regex search)
- glob (find files by path patterns) (3:53)

### Tool Usage by Phase

- Phase 1 uses scan_folder (broad overview)
- Phase 2 uses parse_file (full read of relevant docs)
- Phase 3 uses preview/parse/backtrack to missed references (4:06)

### System Architecture Layers

- User Interface (Web UI/CLI) -> Server Layer (FastAPI/CLI Entry) -> Orchestration Layer (LlamaIndex Workflow, Agent, Pydantic Models, Token Tracking) -> Tool Layer (LLM + 6 tools) -> Document Processing Layer (Docling for parsing to Markdown, local filesystem cache) (4:41)

### Demonstration Query 1 (Simple)

- 'What is the total purchase price for the StartupXYZ acquisition?' resolved by reading one document ('01_acquisition_agreement.pdf') in 1 step (8:15)

### Demonstration Query 2 (Complex)

- 'What are the key risks identified in this acquisition and what mitigation measures were put in place?' required 14 steps to cross-reference multiple documents like '04_risk_assessment.pdf' and '09_customer_consents.pdf' to synthesize the final answer (8:48)

![Screenshot at 0:01: Diagram illustrating the standard RAG pipeline, showing the ingestion phase \(chunking, embedding\) and query time phase \(embedding query, similarity search, LLM generation\), alongside boxes highlighting what is lost during chunking: Global Document Context, Cross-Doc References, and Document Dependencies.](https://ss.rapidrecap.app/screens/xG3eS_zHR3k/00-00-01.jpg)
![Screenshot at 1:21: Diagram visually contrasting the Original Documents, the state After Chunking \(where links are broken\), and the RAG Retrieval process which hits a 'Dead End!' because cross-references are lost after chunking.](https://ss.rapidrecap.app/screens/xG3eS_zHR3k/00-01-21.jpg)
![Screenshot at 3:53: Diagram detailing the Agent Tool System, showing Gemini 3 Flash AI Agent having access to 6 tools: scan\_folder, parse\_file, preview\_file, read, grep, and glob, and outlining which tools are used in each of the three operational phases.](https://ss.rapidrecap.app/screens/xG3eS_zHR3k/00-03-53.jpg)
![Screenshot at 4:41: End-to-End System Architecture diagram showing the layered structure: User Interface Layer \(Web UI/WebSocket/CLI\), Server Layer \(FastAPI/CLI Entry\), Orchestration Layer \(LlamaIndex Workflow, Agent\), Tool Layer \(6 tools + LLM\), and Document Processing Layer \(Docling parser, local cache\) \(4:41\)](https://ss.rapidrecap.app/screens/xG3eS_zHR3k/00-04-41.jpg)
![Screenshot at 8:39: The result screen after executing a complex query, showing the execution log \(left\) detailing the 14 steps/files parsed, and the final response \(right\) summarizing completed items and pending items for the acquisition closing query.](https://ss.rapidrecap.app/screens/xG3eS_zHR3k/00-08-39.jpg)
