PARAS MADAN
All writing

Latest in AI

Google Agent Retrieval SearchDocuments: A PDF Citation Checklist

Compare page and chunk segmentation on known PDF answers before swapping out a custom ingestion and retrieval pipeline.

Google's November 24 technical walkthrough describes public preview managed ingestion and SearchDocuments in Agent Retrieval, previously Vector Search 2.0. The service can take files from Cloud Storage and return a matching excerpt with a page range. It can remove some pipeline code, but it doesn't make a citation correct just by attaching coordinates.

Start with a case where a wrong page is easy to spot. A return policy with separate rules for unopened and opened packages can have both phrases on nearby pages, and a useful search system must tell them apart.

Pick segmentation based on the citations people need

Create an unstructured data store for PDFs and compare page segmentation with the default chunk segmentation. With page segmentation, each page is a segment. With chunk segmentation, a result may span more than one page. Both can carry page numbers for paginated files, according to the search documentation.

Page-sized segments can make it easier for reviewers to jump to an exact location. Smaller chunks can separate unrelated paragraphs sharing a large page. Neither automatically handles a scanned table, a footnote off the expected page, or a rule split across a page break. Put those cases in the pilot instead of deciding from the average PDF.

Wait for ingest before judging search

Upload a controlled set of PDFs to Cloud Storage. Capture which source file and page support each question before sending the import. Google documents asynchronous ingestion; check the import operation and its reported errors before calling missing results a relevance flaw. Use different fixed data stores for the two configurations so retrieving from one doesn't silently change the comparison.

Add a stable document ID and revision metadata if you need to distinguish two editions. Google's manifest flow can assign these during import. Filtering by a known edition or restricting the query to named document IDs can help diagnose an error, but pass only files the caller is authorized to see. An optional filter is not a substitute for enforcing permissions.

Score retrieved evidence before generated answers

Use SearchDocuments with a text query; document retrieval combines vector similarity with full-text matching. Check whether the returned snippet actually supports the answer and whether the URI and page range match your labeled source. Also try exact policy terms, paraphrases, and a question whose answer isn't actually in the files. Several top hits may be different segments of one PDF.

If you use the results in a generator, measure wrong or unsupported answers separately. A correct page in the retrieval list can still end up as the wrong citation in the final reply. Don't let a polished reply hide a bad source or a page number carried from another document.

Compare with your existing pipeline

Use the same questions to check both systems for correct supporting excerpts, exact citation quality, ingestion lag and query time. Enable optional reranking only after establishing a baseline; watch whether it rescues evidence or adds latency without helping. Video uses a separate store and returns time offsets rather than page numbers, so run a separate test if you need it.

I would replace the homemade pipeline only when the managed one retrieves evidence your reviewers can verify on your documents, including the scans and revision conflicts that made you build the old workflow in the first place.

I help AI teams turn technical changes into guides their customers can use. Book a 30-minute call.