AI

Google Adds Managed Ingestion and SearchDocuments to Agent Retrieval

Google's Agent Retrieval service now includes managed ingestion and SearchDocuments, eliminating custom code pipelines for indexing PDFs, videos, and office documents.

3 min readSource: Google Developers Blog

Curated by Kandala Guruprasad. Drafted with AI and checked against the source.

Google Adds Managed Ingestion and SearchDocuments to Agent Retrieval

TL;DR

  • Managed ingestion builds indexing pipelines automatically, parsing and embedding files from Cloud Storage with no custom code required
  • SearchDocuments returns results with exact citations, including page numbers for documents and timestamps for videos
  • 18 Alphabet investor PDFs became searchable with page citations in about 9 minutes; 19 minutes of video became searchable in 0.3 to 0.5 seconds per query
  • Audio-aware video search matches spoken content without transcripts, and hybrid retrieval combines semantic and full-text search results
Status
Public Preview
Supported file types
PDF, DOCX, PPTX, XLSX, TXT, MP4

What Agent Retrieval Now Offers

Google has added two features to Agent Retrieval: managed ingestion and SearchDocuments, both now in public preview. Previously, developers building agents that answer questions about files had to write custom pipelines: parse documents, segment them into chunks, embed each chunk, and store everything in a vector database. For video, the work multiplied: transcode files, extract clips, embed frames, and track which moment each clip came from. Managed ingestion eliminates this burden by handling parsing, segmentation, and embedding automatically with Gemini Embedding 2. SearchDocuments then queries the resulting data store with a single API call and returns matching passages with their exact source locations.

What Changed: Capabilities and Performance

Managed ingestion accepts PDFs, DOCX, PPTX, XLSX, and TXT files, as well as video formats including MP4, MOV, WebM, and MKV, all imported directly from Cloud Storage. SearchDocuments returns results with citations: page ranges for documents and start and end times for videos. In testing, 18 Alphabet investor PDFs went from a public Cloud Storage bucket to searchable, page-cited results in about 9 minutes. Video searches performed faster: 19 minutes of video content became searchable by both visuals and spoken audio in 0.3 to 0.5 seconds per query.

Two segmentation modes are available for documents. Chunk segmentation (the default) splits text into 100 to 500 token chunks and detects tables and headings via layout parsing. Page segmentation produces one segment per page, with both modes recording page numbers so results can cite specific pages or be filtered by page range.

SearchDocuments supports hybrid retrieval, combining semantic search with full-text search and fusing the results. Reranking can be enabled to retrieve more candidates than requested and reorder them using the Ranking API's semantic-ranker-fast model, improving relevance for complex queries. Developers can narrow results using filters, search within specific document IDs, and return metadata with each result.

python
response = session.post(
    f"{PARENT}/dataStores/investor-reports/documents:search",
    json={
        "text_query": {"text": "How much did Google Cloud revenue grow?"},
        "top_k": 5,
    },
).json()

Video Search With Audio Awareness

For video, the service transcodes each file, splits it into fixed windows, and embeds each window. By default, only visual frames are embedded, so queries match what appears on screen. Enabling audio embedding analyzes the first audio track alongside frames, allowing queries to match the moment a speaker mentions a topic even when the picture shows something unrelated. No transcripts or captions are required. In tests, five sample videos totaling 19 minutes were searched with descriptions and voice queries, with results returned in 0.3 to 0.5 seconds.

How to Use: Workflow Overview

Creating a data store requires specifying the document type (UNSTRUCTURED for files or VIDEO for video), segmentation strategy, and optional metadata schema. Developers can then import files using URI patterns like gs://my-bucket/reports/*.pdf or by providing a JSONL manifest with document IDs and metadata. The import runs as a long-running operation, with re-imported files updating existing documents instead of creating duplicates. After import, SearchDocuments needs only the data store and a text query to return results with full citations and metadata.

python
session.post(
    f"{PARENT}/dataStores/investor-reports:importDocuments",
    json={
        "gcs_source": {
            "input_uris": ["gs://my-bucket/manifests/docs.jsonl"],
            "source_format": "SOURCE_FORMAT_DOCUMENT_JSON",
        },
        "import_output_config": {"error_gcs_prefix": "gs://my-bucket/import-errors/run-1/"},
    },
)

Production Considerations and Limitations

Video imports transcode and embed every segment, taking 20 to 45 minutes for the sample videos across two data stores. Developers should run one import at a time per data store, though different data stores can import in parallel. For video, segment duration should be chosen based on query needs: short windows (10 to 20 seconds) provide precise timestamps, while longer windows (up to 80 seconds) provide more context for thematic queries. During public preview, managed ingestion incurs no separate charge, though the backing Collection is billed under standard Agent Retrieval pricing. Reranking is supported for document data stores but not for video. Deletion requires using force=true and backing_collection_deleted=true flags to remove both the data store and its backing Collection; deletion runs in the background and took about 20 minutes in testing.

Source

Google Developers Bloghttps://developers.googleblog.com/from-files-to-cited-answers-in-one-api-call-managed-ingestion-and-searchdocuments-in-agent-retrieval/

AI-assisted, verified against the source. This post was drafted with AI from the primary source linked above and checked automatically against it. For anything you depend on, read the original.

  • #agentretrieval
  • #gemini
  • #vectorsearch
  • #documentsearch
  • #api

More in AI