Home / Blog / From Files to Cited Answers in One API Call
Tech News

From Files to Cited Answers in One API Call

Google's Agent Retrieval, in Public Preview, made 18 Alphabet investor PDFs page-cited and searchable in about 9 minutes through managed ingestion.

In short

Developers searching PDFs, Office files, videos · 18 PDFs cited in about 9 minutes · Public Preview, REST v1beta · Import from Cloud Storage, call SearchDocuments

By Dillip Chowdary • Nov 28, 2026 • Source: Google Developers Blog

From Files to Cited Answers in One API Call
Image: Google Developers Blog

At a glance

Who it is for
Developers searching PDFs, Office files, videos
The number
18 PDFs cited in about 9 minutes
Available
Public Preview, REST v1beta
What to do
Import from Cloud Storage, call SearchDocuments
Ship date
Nov. 24, 2026
Chunk size
100 to 500 tokens (default)

On November 24, 2026, Google added managed ingestion and SearchDocuments to Agent Retrieval, formerly Vector Search 2.0 and now in Public Preview, and Google Developers Blog's report says 18 Alphabet investor PDFs went from a public Cloud Storage bucket to searchable, page-cited results in about 9 minutes.

Software Engineer Yingxin Jiang and Staff Developer Advocate Kaz Sato wrote the guide for developers who search PDFs, Office files, and videos without writing an ingestion pipeline. Readers create a data store, import files from Cloud Storage, and search with filters, reranking, and audio-aware video search.

01Ingestion work and cited results

Before an agent can answer about PDFs, code must parse every file, split it into chunks, embed each chunk, write them to a vector database, and learn that schema to query it. Video transcodes files, cuts clips, embeds frames, and tracks which second of which video each clip came from. Most of that code has nothing to do with the application and is maintained separately for documents and videos.

Managed ingestion builds the pipeline inside the service. A data store pointed at Cloud Storage is parsed, segmented, and embedded with Gemini Embedding 2. SearchDocuments searches that store in one API call and returns passages with page numbers or timestamps, with no parsing, chunking, transcription, or embedding code in the application.

Callers import PDF, DOCX, PPTX, XLSX, and TXT, or MP4, MOV, WebM, MKV, and other video formats, straight from Cloud Storage. Parsing, segmentation, embedding, and the vector Collection and its schema are handled for them. Every result carries the source file URI and a page range or a start and end time for the citation.

02Backing Collection and data stores

Agent Retrieval Collections already provide semantic, text, and hybrid search over data objects the application creates. A query has to know how those objects are stored. A data store does that work, and the backing Collection remains a regular Agent Retrieval Collection that can be queried directly when full control is needed.

Documents use document_type UNSTRUCTURED, and videos use document_type VIDEO, each store pointed at Cloud Storage. SearchDocuments takes the store and a text query. Hybrid search, semantic plus full-text, runs on its own for documents, with no Collection name, vector field, task type, or output fields passed in.

WorkCustom pipelineData store
DocumentsParse, chunk, embed, learn the schemaUNSTRUCTURED store on Cloud Storage
VideosTranscode, clip, embed, track secondsVIDEO store windows and embeds
SearchCollection, vector field, task, outputsOne SearchDocuments call

03Page and chunk segmentation

A data store holds the files and the configuration that controls how they are parsed and segmented. The data store and SearchDocuments APIs are currently served over REST at v1beta, using an AuthorizedSession from google.auth.default. The scope is https://www.googleapis.com/auth/cloud-platform, and the parent is https://vectorsearch.googleapis.com/v1beta/projects/PROJECT_ID/locations/us-east4.

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

The create call sets data_store_id to investor-reports and document_type to UNSTRUCTURED. processing_config sets page_segmentation_config, one segment per page so results carry page numbers, and digital_parsing_config for parsing. document_metadata_schema is an object with string doc_type and integer year, which a search can filter on and return.

Chunk segmentation, the default, splits text into 100 to 500 tokens and uses layout parsing, which detects tables and headings. Page segmentation keeps one segment per page. For PDFs, both modes record startPage and endPage, a range when the segment is a chunk and a single page when it is a page.

ModeSplitPages
Chunk (default)100 to 500 tokens, plus layout parsingstartPage to endPage span
PageOne segment per pageSingle page, startPage and endPage

04Manifest import and cited hits

An import points at a URI pattern such as gs://my-bucket/reports/*.pdf, or at a JSONL manifest that sets document IDs and metadata. One row names projects/PROJECT_ID/locations/us-east4/dataStores/investor-reports/documents/2023-q4-earnings-release, with gcsUri gs://my-bucket/reports/2023q4-earnings-release.pdf, doc_type earnings_release, and year 2023. importDocuments sets gcs_source.input_uris to gs://my-bucket/manifests/docs.jsonl, source_format to SOURCE_FORMAT_DOCUMENT_JSON, and error_gcs_prefix to gs://my-bucket/import-errors/run-1/.

  1. Create the data store investor-reports, UNSTRUCTURED, page segmentation, digital parsing, doc_type and year.
  2. Import the files URI pattern or JSONL as SOURCE_FORMAT_DOCUMENT_JSON, with error_gcs_prefix.
  3. Search with one call text_query and top_k, then read pageRange or video offsets.

The import is a long-running operation. A later import of the same files updates documents instead of duplicating them, and unchanged file content is skipped. The sample posts to documents:search with text_query "How much did Google Cloud revenue grow?" and top_k 5.

Each result is a segment, not a whole file, and one document can supply several page ranges. The sample names documents/2022-annual-report and file 2022_alphabet_annual_report.pdf, with snippet "Google Cloud revenues increased $7.1 billion from 2021 to 2022", startPage 68 and endPage 68. Semantic and full-text hits on the backing Collection are fused, so paraphrases and exact terms match.

05Filters, reranking, and video

A filter keeps segments that match, using the same paths returned on each hit. document_ids limits search to chosen files, and output_fields.metadata returns document metadata with the hits. With a page-1 filter, the query on what the CEO said about AI returned CEO quotes from the headline page of five different earnings releases.

With ranking_spec.reranking_spec.enabled true, SearchDocuments retrieves more candidates than top_k and reorders them with the Ranking API using semantic-ranker-fast@latest, the same model as VertexRanker. Plain hybrid search on Alphabet headcount put two balance-sheet pages that do not mention employees in the top five. Reranking put headcount on every top hit, including "Alphabet had 190,234 employees" and the quarterly supplemental "Number of employees" row.

Video uses document_type VIDEO, then the same import and SearchDocuments call. The service transcodes each file, splits it into fixed windows, and embeds each window. With segment_duration 20s and audio_mode ENABLED, five Google sample videos of about 19 minutes matched visuals and speech in 0.3 to 0.5 seconds per query, and one hit spans startOffset 60s to endOffset 80s.

Note: With audio embedding on, a query matches the moment a speaker mentions a topic even when the picture shows something else, and no transcript or captions are required. The APIs are in Public Preview and are served over REST at v1beta.

Frequently asked questions

What did Google add to Agent Retrieval?

Managed ingestion and SearchDocuments, in Public Preview on Agent Retrieval, formerly Vector Search 2.0. Ingestion parses, segments, and embeds Cloud Storage files with Gemini Embedding 2. SearchDocuments takes one text query and returns passages with page numbers or timestamps.

Which files can a data store import?

PDF, DOCX, PPTX, XLSX, and TXT for documents, and MP4, MOV, WebM, MKV, plus other video formats. Import them from Cloud Storage with a URI pattern such as gs://my-bucket/reports/.pdf or a JSONL manifest that sets document IDs and metadata.

How long did the Alphabet PDF test take?

Eighteen Alphabet investor PDFs went from a public Cloud Storage bucket to searchable, page-cited results in about 9 minutes. The guide's tests used no parsing, chunking, transcription, or embedding code.

Does Agent Retrieval video search need a transcript?

No. With audio_mode ENABLED, a query can match speech even when the picture shows something else, and captions are not required. Five Google sample videos, about 19 minutes, returned in 0.3 to 0.5 seconds per query, using 20-second windows, including a hit from 60s to 80s.

What changes when reranking is enabled?

SearchDocuments retrieves more candidates than top_k and reorders them with semantic-ranker-fast@latest through the Ranking API, the same model as VertexRanker. On an Alphabet headcount question, plain hybrid search returned two balance-sheet pages in the top five, while reranking returned "Alphabet had 190,234 employees" and the quarterly "Number of employees" row.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam · Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings — fit scores, job-specific resume optimization and email alerts.

Find matching jobs →

Free Tools

Browse all tools →