Process documents with Gemini layout parser

The Document AI layout parser is an advanced text parsing and document understanding service that converts unstructured content from complex files into highly structured, precise and machine-readable information. It combines Google's specialized Object Character Recognition (OCR) models with the generative AI capabilities of Gemini. It understands the complete document structure, identifying elements like tables, figures, lists, and headers while preserving the contextual relationships between them, such as which paragraphs belong to which heading.

It's designed to solve a critical problem for Search and Retrieval Augmented Generation (RAG): standard OCR flattens documents, destroying the very context and structure that adds valuable meaning, like headings, tables, and lists.

Primary use cases

  • Document OCR: It can parse text and layout elements like heading, header, footer, table structure and figures from PDF documents.
  • High-Fidelity Search & RAG: Its primary use is to prepare documents for Search and RAG pipelines. By creating context-aware chunks, it dramatically improves retrieval quality and the accuracy of generated answers.
  • Structured Data Ingestion: It can parse complex documents (like 10-K filings or reports) and index structured content (like parsed tables or image descriptions) into databases, as demonstrated with BigQuery.

How it Works

Gemini layout parser processes documents in a multi-stage pipeline designed to preserve semantic meaning:

  • Parse and Structure: The document is ingested. All elements are identified and organized into a tree format. This DocumentLayout proto field preserves the document's inherent hierarchy.
  • Annotate and Verbalize: Preview Gemini's generative capabilities are used to verbalize complex visual elements. Figures, charts, and tables are annotated with rich, textual descriptions.
  • Chunk and Augment: The parsed document and its annotations are used to create semantically coherent chunks. These chunks are augmented with contextual information, such as their ancestral headings, to ensure that the chunk's meaning is preserved even when retrieved in isolation.

Processor versions

The following models are available for layout parser. To change model versions, see Manage processor versions.

To make a quota increase request (QIR) for the default processor quota, follow the steps in Manage your quota.

Model version Description Release channel Release date
pretrained-layout-parser-v1.0-2024-06-03 General availability version for document layout analysis. This is the default pre-trained processor version. Stable June 3, 2024
pretrained-layout-parser-v1.5-2025-08-25 Preview version powered by Gemini 2.5 Flash LLM for better layout analysis on PDF files. Recommended for those who want to experiment with new versions. Release Candidate August 25, 2025
pretrained-layout-parser-v1.5-pro-2025-08-25 Preview version powered by Gemini 2.5 Pro LLM for better layout analysis on PDF files. v1.5-pro has higher latency than v1.5. Release Candidate August 25, 2025
pretrained-layout-parser-v1.6-pro-2025-12-01 Preview version powered by Gemini 3.0 Pro LLM. Release Candidate December 1, 2025
pretrained-layout-parser-v1.6-2026-01-13 Preview version powered by Gemini 3.0 Flash LLM. Release Candidate January 13, 2026

Key capabilities

Going forward in this documentation, Gemini layout parser refers to Gemini based pretrained layout parser processor versions, such as pretrained-layout-parser-v1.5-2025-08-25 and pretrained-layout-parser-v1.5-pro-2025-08-25. Gemini layout parser supports the following key capabilities.

Advanced table parsing

Tables in financial reports or technical manuals are a common failure point for RAG. Gemini layout parser excels at extracting data from complex tables with merged cells and intricate headers.

Example: In this Alphabet 10-K filing, a competitor's parser fails to correctly align headers and cells, misinterpreting the financial data. Gemini layout parser accurately parses the entire table structure, preserving the data's integrity.

layout-parse-gemini-1

Figure 1. The source of this input document is "Alphabet 2024 SEC Form 10-K", page 72.

Competitor parser doesn't properly detect cell and column alignment and hallucinates values.

layout-parse-gemini-2

Gemini layout parser aligns columns correctly, and provides accurate values.

layout-parse-gemini-3

Reduced hallucinations

Unlike pure LLM-based parsers that try to read text that isn't there, Gemini layout parser's foundation in advanced OCR grounds it in the document's actual content. This leads to significantly fewer hallucinations.

Example: In this 10-K excerpt, a competitor model hallucinates and inserts incorrect text. Gemini layout parser provides a clean, accurate extraction of only the text present on the page.

layout-parse-gemini-5

Figure 2. Input Document (Alphabet 2024 10k p75)

Competitor models will hallucinate values.

layout-parse-gemini-6

Gemini layout parser correctly identifies values in images and tables.

layout-parse-gemini-7

Layout-aware chunking

Standard parsers often create chunks removed from their original context, separating a paragraph from its heading. Gemini layout parser understands the document's hierarchy. It creates context-aware chunks that include content from ancestral headings and table headers. A retrieved chunk contains not just the text, but also the structural context needed for an accurate LLM response.