Grep or Embeddings? Agentic Search Over Company Documents —…
George He, head of engineering at LlamaIndex, explains when AI agents need pre-indexed search (embeddings, hybrid retrieval) versus plain file traversal (grep, listing, reading) when working over company documents. Topics include why grep works well on codebases but breaks on large, messy, multimodal, permissioned document collections; a tool harness of hybrid search as a compass plus listing, metadata filtering, grep, and reading complex documents; parsing PDFs, tables, and schematics with LlamaParse and the open-source LiteParse; production concerns around multi-tenancy, permissions, and data freshness; the ingest-parse-index pipeline; and a demo building a cash-flow table from 135 Alphabet financial filings grounded in source files.
# Video Identity Observations
## Source Overview
- **Title:** *"Grep or Embeddings? Agentic Search Over Company Documents — George He, LlamaIndex"*
- **Format:** Conference-style technical talk with live demo, closing with a QR code call-to-action.
## Creator Self-Description (Explicit Claims)
### Speaker & Company Identity
- The speaker introduces himself with role and company context:
> "My name is George. I'm the head of engineering here at Llama Index. We are a series A startup."
- Claimed scope of the company:
> "We focus quite a bit on document parsing, orchestration and knowledge management."
### Products Referenced
- **LlamaParse** — "We have a product called Llama parse."
- **LightParse** — "We've also open sourced a tool called light parse which handles structural content extraction."
- Use of **turbopuffer** as the vector store in the described architecture.
## Intended Audience (Observable Presentation)
- **Enterprise/technical builders.** The talk repeatedly frames problems around enterprise customers:
> "How we've helped enterprise customers scale up search... and generally manage context using agentic orchestration and just general infrastructure tooling."
- **AI engineers and architects.** Assumes familiarity with RAG, vector databases, BM25, MCP servers, sub-agents, re-ranking, and Claude Code internals without defining basics.
- **Production decision-makers.** Emphasis on operational concerns — multi-tenancy, permissions, freshness, storage trade-offs, token cost:
> "When you have actual customers that care about using it and scaling it out... multi-tenancy... permissioning metadata... freshness."
## Claimed Scope of the Content
- **Core question posed:** "When and why specifically do agents need vector context... or just context period."
- **Position taken:** Hybrid retrieval plus agent tooling (grep, list, read, metadata filtering, screenshots) beats choosing one approach:
> "Search helps you find information and the harness gives you the results that you can trust."
- **Decision framework offered:** scale of data determines approach — "100 to a thousand files" favor local search; "thousands or millions" favor pre-indexing.
- **Demonstrated example:** Live demo over "135 files... derived from Alphabet's financial reports," mixing HTM and PDF files with metadata filtering and agent chat.
## Claim vs. Demonstration Distinction
- **Claims:** Enterprise customer success stories, product recommendations (LlamaParse, turbopuffer), benchmark assertions ("when you put in a fusion... you get better results") — creator assertions, not shown in transcript evidence.
- **Demonstrated:** The live agent workflow — hybrid retrieval, grep with offsets, screenshot review, and a cash-flow table answer "pulled in from multiple files as part of its thinking process."
# Delivery Observation — George He, "Grep or Embeddings? Agentic Search Over Company Documents"
## Overall Delivery Profile
- **Format:** Technical conference talk with slides, demo, and Q&A-style framing ("the question that I like to pose to everyone").
- **Pace:** Fast, dense, with frequent verbal fillers and self-corrections typical of live delivery ("um", "uh", "kind of", "right?").
## Recurring Phrases & Verbal Tics
- **"Right?" as a check-in tag** — used constantly to punctuate claims and invite agreement:
> "it's not organized like code, right?"
> "You have to think about how much effort has been put into curating the code that you write, right?"
- **"Kind of" as a hedge/softener** — extremely frequent, appears dozens of times:
> "we like to think about the synchronization process as three steps" is preceded by "kind of" framing throughout, e.g. "kind of local file search", "kind of what the right approach is".
- **"Burn tokens" / "burning the tokens"** — a signature cost-framing phrase, repeated across the talk:
> "You don't want to burn those tokens."
> "you don't want to burn those uh you know binary encoded tokens every single time"
- **Compass metaphor** — a stable throughline for the retrieval step:
> "What's the compass direction we're going to go?"
> "It's a rough compass on the direction you should be going"
- **"Needle in the haystack"** — invoked for precision search: "You want to have some needle in the haststack sense of roughly where you're looking for".
- **"All right. So…"** as a section-transition marker, appearing at nearly every slide boundary ([71], [135], [646], [999], [1067]).
## Teaching Habits
- **Question-first framing:** introduces each section with a rhetorical question before answering:
> "when and why specifically do agents need vector context"
> "So, how do you keep a system in sync?"
- **Contrast-driven explanation:** repeatedly sets up a dichotomy then argues for a hybrid:
> "GP or what I like to call kind of local file search and file execution or embeddings or pre-indexing pre-retrieval."
- **Anchoring abstractions in concrete cases:** uses Claude Code/Anthropic as a sustained worked example before generalizing to enterprise data ([135]–[235]).
- **Enumerated structure:** explicitly numbered lists ("the five tools that we'll talk through today", "three steps" of synchronization) to scaffold the talk.
- **Practitioner caveat-giving:** pauses to list production concerns before demoing:
> "there are just a few caveats to think about… multi-tenency… permissioning metadata… freshness"
- **Demo narration with honest friction:** verbalizes waiting and troubleshooting live:
> "Give it a few seconds." / "Still thinking there." / "Run this again."
- **Previews and time management:** "a live demo at the end if we do have time", "I'm going to skip through this uh for the sake of time."
## Vocabulary & Register
- Heavy use of practitioner jargon and product names: "harness", "context engineering", "MCP servers", "BM25", "turbopuffer", "LlamaParse", "re-ranking", "multi-tenency".
- Colloquial shorthand mixed with technical terms: "old school GP", "dig into the meat of the details", "yank that permission metadata".
- Second-person engagement: "Do you want to shove those tokens through the model's ingestion pipeline?"
## Communication Patterns
- **Takeaway statements flagged explicitly:** "the major takeaway here is…", "the idea here and the takeaway is that, you know, search helps you find information and the harness gives you the results that you can trust."
- **Self-correction mid-sentence** rather than restarts: "to much gives you much better results", "if your datas are complex, your data is complex".
- **Closing with a call to action:** "feel free to, uh, visit the QR code here. Thank you."
## Uncertainty Notes
- The compass metaphor and "burn tokens" phrasing show strong within-video repetition; whether these are long-standing signatures of the speaker cannot be determined from a single talk.
- Humor or audience-interaction beyond rhetorical "right?" tags is not observed; the transcript contains no audience response cues.
# Observation Record: Grep or Embeddings? Agentic Search Over Company Documents — George He, LlamaIndex
## Speaker Identification
- **George He** — identified in transcript as "head of engineering here at Llama Index," described as a Series A startup focused on document parsing, orchestration, and knowledge management. All substantive claims in the transcript are his; the only other voice is an unintelligible closing transition.
## Framing Question
> "When and why specifically do agents need vector context... or just context period."
**Position (George He):** Models have improved at orchestration and instruction following, including local file system traversal and working with skills/MCPs, but local search and local context problems persist. Managing large corpuses and complex documents is "easiest... to manage it locally."
## The Grep vs. Embeddings Debate
### Anthropic / Claude Code's approach (as characterized by the speaker)
- Claude Code uses local file system traversal — prep, read, glob — because code is easy to manage locally: concise, text-based, semi-structured, with natural breadcrumbs (imports, tests) and hierarchy.
- Cites a tweet by "Boris" (identified as the Claude Code creator): Claude Code experimented with a vector database and rejected it, reportedly **not just for performance but for practical scaling and maintenance reasons** — keeping a pre-indexed vectorized index in sync as code updates is difficult.
- Paraphrased solution attributes: "no pre-indexing, no RAG, no vector search" — with the speaker's caveat this works **only because of characteristics of code** (small repos, already on disk, already curated).
### Why that approach fails for enterprise data (speaker's argument)
- Company datasets contain images, PDFs, PowerPoints; "there's not really a folder to grep."
- Data lakes lack code's curation level; scale is different; security/access control matters more; formats are non-standardized (complex PDFs, schematics, manufacturing diagrams).
- Conclusion drawn: the right approach "really comes down to the scale of the data" and the curation effort one is willing to invest.
### Scale thresholds (tentative guidance)
- **~100–1,000 files:** local file search alone may suffice; the agent can iterate in context without excessive token burn.
- **Thousands to millions of files:** not feasible; need "at least... a rough compass" toward the needle in the haystack.
## Costs and Model Memory Trends
- Context windows have grown (100k → 200k → 1M tokens, per the speaker's recollection), but pushing tokens or binary data through model ingestion is "extremely expensive."
- **Sub-agent limitation:** sub-agents need full context and their environments are "rather tokenheavy and latencyheavy" — so they don't fully solve memory bloat, motivating pre-indexing.
## Proposed Architecture: A Harness of Five Tools
> "We don't really want our system or any system that can scale out to be manually deciding should I use a hybrid RAG approach or should I just individually search through files."
The harness gives the agent both local-style tools (grep, cat, filename/metadata filtering) and semantic search, aiming for "the best of both worlds":
1. **Retrieval (the "compass"):** recommends **hybrid search** for enterprise — keyword/BM25 plus semantic/vector, fused and weighted, then **re-ranked** (e.g., top 100 via LLM). Notes benchmarks show raw keyword or vector alone hits a baseline; fusion performs better.
2. **Listing files** in a shared, distributed file system.
3. **Traversal by metadata** to find similar files not returned in the initial search.
4. **Grep with offset/length reads** — demonstrated: a grep plus offset (e.g., 500 chars in, 1,000 chars read) lets agents interact with "what is effectively a remote file storage" without downloading data.
5. **Pre-rendered screenshots** for multimodal documents — documents "are not really built for pure machine consumption," so a screenshot index supports grounded RAG.
### Parsing recommendations (with vendor tie-in)
- Pre-parse complex documents rather than re-reading binary tokens each time. Promotes **LlamaParse** and open-source **LightParse** for structural extraction (tables, charts, spatial layout) into markdown or agent-readable formats.
- Flags evaluation dimensions for OCR pipelines (Textract, Tesseract): faithfulness to tables and layout — errors there cascade into downstream LLM failures on spatial reasoning.
## Production Caveats
- **Multi-tenancy and permissions:** pulling permission metadata from Google Drive/SharePoint without reindexing or grinding to a halt.
- **Freshness:** acknowledges this is why "Anthropic, a lot of other companies have kind of given up on trying to pre-index data" — freshness is hard with complex data and metadata.
### Synchronization pipeline (three steps, as stated)
1. Ingestion → 2. Parsing (to markdown/text or multimodal representation) → 3. Re-chunking and export to pre-indexed state.
### Storage
- Recommends **layered storage**: persist to disk with a "shielded memory layer" for efficient retrieval, citing experience "at the multi-tenant level to... tens of millions of documents."
- Demo used **turbopuffer**; permissioning metadata is pushed into the vector storage layer at ingestion.
## Demo (as narrated)
- Pre-indexed corpus of **135 files** derived from Alphabet's financial reports (HTM + PDF with metadata).
- Hybrid retrieval with adjustable keyword/semantic balance; chunks returned with corresponding **page screenshots**.
- Chat example ("cash flow from 2021 to 2025... as a table") was streaming during the talk; the speaker showed pre-computed results pulled from multiple files.
## Concluding Claim
> "Search helps you find information and the harness gives you the results that you can trust."
Grounding answers in specific files via traversal is presented as the source of confidence in agent-based retrieval.
## Tensions Preserved
- The speaker both **credits** Anthropic's no-RAG approach as working "really well" and **limits** it strictly to code's characteristics, while also citing freshness as why Anthropic abandoned pre-indexing — the hybrid recommendation is framed as context-dependent (scale + curation), not a universal winner.
- Scale thresholds ("may be appropriate") are offered as tentative guidance, not settled rules.
# Speaker & Provenance Record — "Grep or Embeddings? Agentic Search Over Company Documents — George He, LlamaIndex"
## Speakers & Roles
| Speaker | Role (explicit in transcript) | Evidence |
|---|---|---|
| **George He** | Presenter; self-identified as **"head of engineering here at Llama Index"** | Opening: "my name is George. I'm the head of engineering here at Llama Index" |
| — | Company context: LlamaIndex described as a **"series A startup"** focused on document parsing, orchestration, knowledge management | Speaker's own statement |
- No guests, narrators, or other named speakers appear. A second speaker marker (`>> [music]`) appears only at the close and is not a substantive speaker.
- Single-speaker conference-style talk with a **live product demo**.
## Affiliation & Promotional Flags
- ⚠️ **Promotional content flagged**: The talk promotes LlamaIndex products:
- **LlamaParse** — commercial parsing product ("We have a product called Llama parse")
- **Lightparse** — described as an open-source tool from LlamaIndex
- Closing **QR code call-to-action** ("feel free to visit the QR code here")
- Speaker's statements about LlamaIndex's approach and product capabilities are **first-party vendor claims**, not independent evaluations.
## Third-Party Claims & Referenced Sources
Claims attributed to external parties as stated in the transcript:
- **Anthropic / Claude Code**: Speaker claims Anthropic uses local file system traversal (grep/read, glob management) rather than pre-indexing.
- **Boris (identified by speaker as "claude code creator")**: Speaker references a tweet claiming Claude Code experimented with a vector database and rejected it for scaling/maintenance reasons. ⚠️ *Tweet not quoted verbatim; only paraphrased by speaker.*
- **Benchmark references**: Speaker references "various benchmarking data sets" for hybrid search vs. keyword/vector-only — **no specific benchmark named**.
- **OCR tools mentioned**: Textract, Tesseract (as comparison points).
- **Vector store mentioned**: turbopuffer (used in demo).
- **Demo data**: 135 files derived from **Alphabet's financial reports** (HTML + PDF, with metadata).
## Content Scope (factual inventory)
- Topic: agentic document search — grep/file traversal vs. embeddings/pre-indexing; hybrid retrieval; multi-tenancy, permissioning, freshness; parsing pipeline (ingestion → parsing → chunking/indexing); screenshot index for multimodal documents.
- Demo: agent chat query retrieving cash flow data (2021–2025) from pre-indexed Alphabet reports.
## Availability & Access Limits
- **Not available in source material**:
- The tweet by Boris (paraphrase only)
- The benchmark data sets referenced
- QR code destination/link details
- Any curated metadata beyond title
- **Comment availability**: No information present in the transcript or supplied metadata.
- Timestamps: none supplied.
We're going to get going. Nice to meet you everyone. Uh my name is George. Uh today uh we'll be going over a talk on search document search and uh how we get better results here at Llama Index. Um
my name is George. I'm the head of engineering here at Llama Index. We are a series A startup. We focus quite a bit on document parsing, orchestration and uh knowledge management. Um today the topic of the talk will center around how we've helped enterprise customers scale up search GP and generally manage context using aentic orchestration and just general infrastructure tooling. Uh the plan today is going to be going through a discussion or a debate around uh how to best orchestrate and perform document search uh how to get the best results and we'll iterate through their uh technical challenges that we've seen all the way to a live demo at the end if we do have time. All right. So to get started um the question that I like to pose to everyone is when and why specifically do agents need vector context in some discussions
or just context period. Um and the major takeaway here is over the last few years models have gotten much better at orchestration and instruction following.
They're able to traverse local file systems. They're able to work with skills MCPS in order to retrieve information in ways that are better than before. But you still have your local search and your local context problems, right? Um in order to manage large corpuses, in order to manage complex documents, easiest way is still to manage it locally. Um and so there are kind of two evolving approaches to orchestration uh between GP or what I like to call kind of local file search and file execution or embeddings or pre-indexing pre- retrieval. Um we'll kind of talk through what the different approaches offer and when you might prefer one over the other or when it's appropriate to do a hybrid of both. Uh to get started in understanding where this problem kind of popped up in industry u when cloud code launched uh you know there was a lot of discussion around the internal mechanics of how
cloud code works. It's actually a really interesting problem to think about how you're going to traverse and manage your local file system if you're going to go through coding right as a solution or a
problem. Um, and Anthropic's taken the approach of using your local file system prep read using glob management basically to manage your local file system and it's perfect for your local execution needs because code is easy to manage locally. It's concise and it's already in text format. But you'll also notice that um this tweet by Boris uh cloud code creator kind of highlights that uh cloud code experimented with a vector database didn't end up choosing it and the reasons aren't just for performance reasons but because of practical scaling and maintenance reasons. It's hard to keep a pre-indexed vectorized index in sync especially as code keeps on updating. And so specifically the solution that cloud code took which was no pre-indexing, no rag, no vector search, uh works really well but only because of a few characteristics of code. Um they did not care about pre-indexing
information because the code in your repo is usually small. It's usually semistructured. Usually your code leaves breadcrumbs for what else is being imported, what else is being tested. Um
and it leaves a natural hierarchy for how an agent might move about your file system. Um and the largest part there is code is already on disk and local uh especially if your agent has context. So why complicate it with a pre pre- retrieval system? And the reality is when you switch over to larger company data sets uh where you
have images, you have PDFs, you have powerpoints mixed in uh it's harder because there's not really a folder to grip. Uh you can't really grip the folders across a company data set because it's not organized like code,
right? You have to think about how much effort has been put into curating the code that you write, right? It must be syntactically sound. It must have proper references. And then you see your company database or you know whatever is in your data lake. Um and you realize it's really hard to keep things in sync, right? The scale is at a completely different level. Uh you care quite a bit more about security. Uh who can access what information. Uh the format is not standardized. you might have really complex PDFs, schematics, manufacturing diagrams mixed in and the scale just makes it so that you can't run this locally anymore. So, how do how do you keep a system in sync? Right? The industry has gone through many different solutions. Um, you can use MCP server, you can try to manage this using Anthropics CloudMD. So, you in addition to having just this blob of a data source available somewhere, you keep track and let your agent know, hey, you can traverse the data this way, right? So MCP skills, claude, claude, uh agent files, instruction files, these are all options for keeping track of some type of hierarchy. But the major takeaway here is actually it really comes down to the scale of the data that you have and how much curation effort you're going to
put in in order to maintain that retrieval system or that data management system. That makes sense, right? People are talking about context engineering, about harness, you know, making a harness, but at the end of the day, it's
all about keeping the right primitives in place. Um but in order to do that you have to understand what's the scale that you're dealing with right so if you have 100 to you know 100 or you know 100 to a thousand files uh it may be appropriate to just keep down to local file search because your agent can manage this in context. It won't burn too many tokens just iterating through files or managing the literal file names as it traverses. Um but as you scale out right to thousands or millions of files that's not possible. You don't want to burn those tokens. uh you don't want to read the files every single time. You want to have some needle in the haststack sense of roughly where you're looking for at least if it's not the needle in the haststack. It's a rough compass on the direction you should be going, right? Um and so we'll talk a bit about kind of what the right approach is uh between hybrid based search, semantic based search as well as uh your old school file traversal here. Uh the other reason for why you might care about this is obviously as each
model increases in its memory capabilities, right? We got 1 million token context length now. Uh before it used to be 200k, before that 100k and even smaller before that. Um the
important thing to think about here is actually as the model capabilities increase what you're willing to pay as you're going through this process, right? Do you want to shove those tokens through the model's ingestion pipeline? Do you want to uh send binary data over to your model for it to try to render in maybe its own engine and then extract data out of uh for your search? um it just becomes extremely expensive, right? In order to use your model context for ingestion and search. Um and you know there have been solutions around how you can use sub agents right have one larger
agent issue subcomands so that a smaller agent can deal with the memory context the memory bloat and just give a response back. Um but the issue there is because each sub aent needs full context
because sub aents uh even though they might use cheaper or simpler models uh if you've noticed in cloud code sometimes your you know main session may issue commands to weaker model uh sub sessions in order to execute the jobs. um the environments are actually rather tokenheavy and latencyheavy, right? So in order to speed up your process and make sure that you're not burning tokens unnecessarily reprocessing documents each time, uh you may actually think about building out a pre-indexing system. Um and so we'll kind of talk about that here. Um in kind of building out a harness and letting it agent choose what's going on, right? So uh specifically we don't really want our system or any system that can scale out to be manually deciding uh should I use a hybrid rag approach or should I just individually search through files and the cleanest way that we found that in this era of engineering is uh managing that with a harness. So give your agent the tools needed to either search
through specific files using your old school GP, your old school cat, file name filtering or metadata filtering in addition to semantic filtering. Um, and that way you can get kind of the best of
both worlds going through traversal. uh so you can get the rough direction of which files you want to search and use semantic search to down scope your files and then using your agent's built-in file traversal capabilities to dig into the meat of the details so that you can actually ground your answers instead of hallucinating them. So the five tools that we'll talk
through today um in enabling kind of document search or uh complex document search uh as you might see in like insurance, finance, healthcare industries, right? Where you just have a
ton of unatategorized or semilablled data is what are the tools that we're going to use? Right? So the question first is where am I even going to look? What's the compass direction we're going to go? Um and then you have three tools that are going to be there and you know you have a lot more of these in your local file system to figure out what actually is in this subset or this subcorpus of documents that we've identified with our compass direction. Right? So listing files, traversing files by metadata, uh gpping specific files to see if there are multiple keywords available that make a specific document more desirable. These are all things that you could run in a pre-indexing pipeline or a live pipeline. Um, and the last one is kind of, you know, what does the document actually say? And specifically for multimmodal documents, you need a way to pre-render the documents. And this is one kind of unique approach uh to multi-page or long schematics, which is in your pre-indexing process, one of the most important parts is to chunk or break your document down into digestible portions, right? But that applies to not just the textual side, but also the rendering side. uh because one of the hardest parts of free form document rendering is you actually have to rasterize or render the document into a human compatible view. Uh these use cases are usually where you have an actual person that would have done this uh instead of AI, right? So these schematics, these PDFs, these PowerPoints, they're not really built for pure machine consumption. Um so giving the agent a pre-built screenshot index to search through is also very useful as you're performing rag. All right. So, we'll take a look at some of the details of the tool itself. Um, so in terms of retrieval itself, right, which is the compass direction. There are tons of approaches you can take
here. There's graph rag, there's traditional rag, there's kind of your old school keyword- based BM25 search. Um, we we usually recommend a hybrid for enterprise use cases. And that's just mostly because uh keyword-based search
has its place for developers. Keyword based search also has its place for AI agents that are looking for specific pre-indexed words in a corpus, right? Um at the same time, semantic meaning and similarity is really important. Uh combining the two through a hybrid based search usually gives to much gives you much better results. Um you can see in various benchmarking data sets that you know just raw keyword or vector will get you to a baseline. But when you put in a fusion, you know, you combine and weight uh keyword as well as vector search, you get better results uh because you aren't blinded by, you know, specifics of your search uh method. And re-ranking the final results, you know, you might take the top 100, re-rank them using an LLM or some other deeper process uh ultimately gets you much better retrieval results. U but that's just one part of the pipeline, right? That's the document search. Uh we care about results. Um and so tools two through four we'll talk through and kind of show later which is um once you have the compass
direction of what are the what is the general group of files that might matter right what's the metadata that might associate most closely with your query uh because your agent at the start might not know all the metadata or the extracted content of your system um it
can then traverse through the file hierarchy uh search for similar files inside of your corpus that weren't even returned in that initial search in order to expand out and then further narrow down its results. Um, so giving your agent the primitives of listing out the files GP and read that you have locally is really important in a shared and distributed file system, especially if it's one that you don't want to download onto your agents context every single time, which can get expensive. And um, diving a bit deeper into the content itself, right? Um this is where
uh complex documents like you know stuff with charts, stuff that's scanned in, stuff that has uh you know schematics for example kind of breaks apart for your traditional document indexing and
chunking workflow because it is not a human read line of text right it's a separate representation. Um and so thinking about how you do your pre-indexing flow and parsing flow uh so that you don't have to reread the documents every single time using your agent is also important. you don't want to burn those uh you know binary encoded tokens every single time you want to read a new document. So we usually recommend pre-indexing uh or pre-parssing your documents using uh structured parsing flow. Um we have a product called Llama parse. We've also open sourced a tool called light parse which handles structural content
extraction. So this is like if you have tables, charts or segmented uh information, you want to encode that as either markdown or just something that your agent really can understand the spatial reasoning of. uh because when
you have multimmodal data uh spatial reasoning is important. Last one there is of course uh in your pre-parssing flow you usually want to generate those screenshots as you actually render the page right. So whatever you're doing for pre-parssing you probably also want to store and persist screenshots as they're being generated from document rendering. Uh it's not always clear if something is text or is you know got metadata associated with it. You probably want to combine the two together. Um and so parsing is an important part but it's not the only part of a pipeline. Uh we usually you know advocate for people to think about how you can distribute parsing um and think about scaling out to improve your parsing pipeline right um there are some metrics that I would advocate for people
to think about you know if they're relevant to your pipeline and uh kind of how you can optimize or uh improve your pipeline for each of those dimensions. So if you dump your data into a
traditional OCR pipeline like Textract uh or you use a OCR engine like Tesseract um does it actually capture the tables the table representation? How faithful is it to act the actual content layout? Right? Because if you get those wrong your LLM on its semantic reading side later down the line is going to pay for it. Uh it might be fine at the start but if your LM doesn't understand the location and spatial reasoning it falls apart um at some point. All right, so before we get to the demo, uh there are just a few caveats to think about with building out an actual production pipeline, right? Which is when you have actual customers that care about using it and scaling it out. There are a few things that will always be brought up. Um there's like multi-tenency, you know, can one person
see another person's data? How does permissioning metadata get pulled in? Right? if I'm using Google Drive or if I'm using SharePoint, how do I pull in and yank that permission metadata without causing the whole system to
grind to a halt or without reindexing and repparssing the pipelines each time? Um, and that's related to the last one which is freshness, right? This is kind of why Anthropic, a lot of other companies have kind of given up on trying to pre-index data uh because data freshness is really hard to achieve if your datas are complex, your data is complex, and you also have metadata that needs to be up to date. All right. So, uh in order to break it down more easily, um we like to think about the synchronization process as three steps, right? One is pure ingestion. You know, can we get all your documents into a synchronized system? Uh
the second step is going to be parsing, which is how do we actually convert your document to a standardized format. Uh for our use cases today, we'll talk through converting all documents into a markdown or a text format. But there are
also other formats you can use if you only care about multimodal representations. Um and last stage is obviously uh rebungging that data and then exporting it into a pre-index state um in order to make it available for all of the tools and steps that we talked about before. All right. So uh I'm going to skip through this uh for the sake of time. Um, one major thing that we want to highlight here is, you know, storing your data is actually quite important. Um, in order to distribute your data
out, you usually want some type of layered storage system. Um, a lot of vector storage, uh, services store everything on memory. Um, usually you're playing with some trade-off of do I want
it on disk and then loaded into a faster memory store or do I want everything just in the memory store. Um, for us, you know, we've dealt with this problem at the multi-tenant level to, you know, millions, tens of millions of documents. Our recommendation here is to try to persist your data onto disk and then have a shielded memory layer in order to retrieve the data more efficiently. Uh for our use cases today, we'll be looking at turbopuffer. Um and turbopuffer as well as most vector stores will also handle uh permissioning, right? So what's the metadata that you have? How do you pull the data in? Uh is actually quite an important part of your system success because when you have too many documents, you need to filter by metadata. Um, so we push that into the vector storage layer. You know, as the data is being ingested, let's just make sure we tag that into the vector stores.
All right. So, uh, we're going to jump through a demo. Um, and for the demo today, the the process to think about is, you know, how is the agent going to use the subcomponents in order to
actually give you a response that's grounded that actually can traverse multiple documents and actually gets you gets you a result that you're pretty happy with. Um, all right. So, we'll go through there here. Uh, let's see. All right. So, in this demo, um, we will have a pre-index set of documents um that is available from a data source that we've defined ahead of time. This is going to be 135 files uh that are derived from Alphabet's financial reports, right? So, we have all these uh htm files, they're mixed in with raw PDF files and if you actually look at them, uh we've pulled in the metadata for where this information can be found. So if you have file metadata available along with uh you know later on you can tag this with uh the year that it came from or the specific company it came from that gives your agents the capabilities to filter down uh the data. Um and what we'll see here is uh in your hybrid retrieval flow right uh you'll have the option of if you want to be more keyword based or more semantic based in your retrieval flow. Um let's just do a even balance for now and we're going to search for uh just any cash flow statements and we'll talk through kind of the tools that your agent would want to use along this process. Right? So um what you've seen here on the right is the set of chunks that are returned from our query as well as page screenshots that correspond to uh what is essentially uh the page that it came from. Right? So these two together gives your agents the capability to uh filter down to a specific chunk and request context around that specific chunk in a much cleaner way than before. Um you then might want to think about how you would GP for a specific uh piece of text in the file, right? So what happens if you have a reax pattern that you're looking for uh you know now you're looking specifically for cash flow um and you can find that easily. uh in order to
find that in a specific file, all you need to do is issue a GP command and then read from that specific command kind of what that offset is and then uh kind of what the max length is that you
want. So, uh this is a different file. So, I'll just give an example. You know, if we offset 500 characters and pull in the next thousand, we'll end up with this text being available, right? So, with these two tools, this suite of tools together, your agent doesn't really need the files on a local file state anymore. um you can interact with what is effectively a remote file storage without needing to spin up or download all the data that would need to be streamed to your system. Um and that uh gives the agent a much more capable uh set of capabilities without actually downloading all the information and burning the tokens. So we will uh go to
a chat example and I'm going to pull it up here. So uh give me the cash flow from as a table from 2021 to 2025
income as a table. All right. So give me a second here. Run this again. Give it a few seconds. Uh, while that's running, I'm going to show you guys the end results. Uh, let's go to the chat. So, this is going to be in the chat flow timeline. Um, let's see. Still thinking there. So, as the as an agent is running over the over the process of, you know, retrieving your answers from the corpus, it's going to look through uh your corpus by issuing search commands, right? And as it's issuing the search commands, you want your agent to be able to review the screenshots, review the context, and then determine what is actually relevant for its search in a much more holistic way, right? So you get to think through the process, you get to read specific files, you get to search through files again and rescope your queries. And in the end, that gives you a much cleaner result, right? So uh in this agent response uh you can see the cash flow summary uh by you know and you can see that it's been pulled in from multiple files as part of its thinking process. So when we do go into the traversal flow um you can usually find and ground your answers in uh in a specific file and that gives you much more confidence that your agents found the right component or the right chunk. Um, you know, that's what we're looking for at the end of the day for agent-based retrieval. All right, so we're going to jump back here. We'll take a look at uh that session once it finishes streaming. Uh, but you know, the idea here and the takeaway is that, you know, search helps you find information and the harness gives you the results that you can trust. So, okay, if you're interested,
um, feel free to, uh, visit the QR code here. Thank you. \>\> \[music\]
