WhoBuilt

Building the Document Context Layer for AI Agents

Sep 23, 2026· 21 min· 79K views·Watch on YouTube

Speaker

Jerry Liu, co-founder and CEO of LlamaIndex, explains how a document context layer can help AI agents work with organizational documents at AI Engineer World Fair.

RAG moves into the agent stack

Liu contrasts early RAG, which used fixed chunking, embeddings, and top-k retrieval, with modern agents that can choose search terms and retry queries. As agent harnesses improve, context management shifts toward connecting the right tools, tasks, and data to the agent.

A platform for document context

Liu describes documents as containers for organizational knowledge, alongside sources such as web search, MCP servers, and data warehouses. He outlines three platform layers: parsing documents into usable context, managing and storing them for agents and people, and building repeatable workflows for tasks such as invoice processing, KYC, and claims.

Parsing documents for agents

PDFs store text as positioned glyphs, so reading order, tables, and page structure can be difficult for agents to interpret. Liu favors combining file-aware parsing with vision models, balancing cost and accuracy. He describes ParseBench, a benchmark with 2,000 human-verified pages that measures tables, charts, faithfulness, and semantic formatting.

Match parsing to the job

Liu says regulated financial and insurance workflows may justify higher processing costs to approach 99% accuracy, while large-scale indexing can prioritize low-cost processing. For fast agent workflows, he presents LightParse as a quick first pass, with slower vision-based parsing available when a page needs deeper analysis.

Extract structured data and search documents

LlamaParse can extract structured information from invoices, receipts, claims, and other documents, with source citations and confidence scores to support review before data enters downstream systems. Liu also describes document search tools including BM25, grep, vector search, reading, and scrolling.

Takeaways

  • Let agents refine search queries and retry retrieval instead of relying only on fixed top-k results.
  • Choose document parsing based on the task's accuracy, cost, and latency needs.
  • Use a fast parser for broad scanning and a vision-based tool for pages that need closer inspection.
  • Include source citations and confidence scores when extracting data for downstream systems.

Mentioned in this talk

Search inside this talk

What was claimed 9

Show all 9 facts

Related talks