View on GitHub
Runnable reference for this extractor — inputs, parameters, output fields, embedding models, and copy-paste examples. Auto-generated from the live registry.
View extractor details at api.mixpeek.com/v1/collections/features/extractors/document_graph_extractor_v1 or fetch programmatically with
GET /v1/collections/features/extractors/{feature_extractor_id}.Pipeline Steps
- Layout detection (if
use_layout_detection, the default) — find all document elements withlayout_detector(pymupdffast rule-based, ordoclingSOTA ML/DiT). Detects text regions and non-text elements (scanned images, figures, charts) as separate blocks. - Block grouping — when layout detection is off, group text spans into blocks using
vertical_threshold/horizontal_threshold; drop blocks shorter thanmin_text_length. - Confidence scoring — assign
base_confidenceto native text (penalties for OCR artifacts / encoding issues), then tag each block A/B/C/D. - VLM correction (if
use_vlm_correctionand confidence <min_confidence_for_vlm) — re-read low-confidence blocks withvlm_provider/vlm_model. Skipped entirely infast_mode. - Text embedding (if
run_text_embedding) — embed block text with E5-Large (1024-d). - Thumbnails (if
generate_thumbnails) — render full-page and/or per-block thumbnails perthumbnail_mode. - Output — one document per block with layout class, bbox, text, confidence, and optional embedding/thumbnails.
When to Use
When NOT to Use
Input Schema
Supported input types: PDF only (max 1 PDF per object). Max file size 100MB. For scanned documents, 150–300 DPI originals give the best OCR.
Output Schema
One document per detected block:Parameters
Layout Detection
Spatial Clustering (text-only fallback)
Only used whenuse_layout_detection=false.
Confidence & VLM Correction
Embedding & Thumbnails
Configuration Examples
Layout Types
The extractor classifies blocks into theseobject_type values:
Confidence Tags
Extraction quality is graded with confidence tags (thresholds onoverall_confidence):
Performance & Costs
Vector Index
The embedding is optional. Set
run_text_embedding: false for a layout-only extraction with no vector index.Limitations
- PDF only: Accepts a single PDF per object; does not process Word docs, images, or other formats.
- VLM cost: Each correction adds cost (see Billing & Pricing); gate it with
min_confidence_for_vlmor disable viafast_mode. - Layout-detector tradeoff:
doclingis more accurate but markedly slower thanpymupdf. - Memory: Large PDFs (100+ pages) may require increased memory.
- Language / handwriting: OCR works best with Latin scripts; handwriting detection is experimental and less reliable.
- External dependency: VLM correction depends on the selected provider’s availability.
Search the Extracted Text
Extracted block text (native or OCR/VLM-corrected) is embedded into thedocument_graph_extractor_v1_text_embedding index, so you search it with a feature_search stage against mixpeek://document_graph_extractor@v1/intfloat__multilingual_e5_large_instruct (input_mode: "text"). For a ready-to-copy retriever — including confidence and layout-type filtering — see Cookbook → Search OCR Text from Scanned PDFs.

