Document Processing
Document processing is the core function of DocAI Fabric. This guide explains how documents flow through the system and how each processing step works.
Processing Pipeline
Upload → Import → OCR → Split → Classify → Extract → Validate → Review → Export
Only the shape is fixed, not the steps: a project's workflow decides which activities run and in what order, and can add branching, transformation, redaction and notification steps. The pipeline above is the common case.
Import
Import ingests the uploaded files and converts them into the normalized page images every later step works on:
- PDF files → one page image per page
- Images → normalized and optimized for OCR
- Multi-page documents → one image per page
PDF rendering uses poppler-utils through pdf2image. Resolution and JPEG quality are set on the step; see Import.
If a page_limit was set when creating the transaction, only the first N pages of each source file are converted to images. All downstream steps (OCR, split, classification, extraction) only see those pages. The original source file is always preserved in full.
OCR (Optical Character Recognition)
Extracts text from page images, giving every later step both the words and where they sit on the page:
- Full page text extraction
- Word-level bounding boxes for precise data location
- Automatic document-language detection, stored with each page
- Configurable parallel processing (
MAX_PARALLEL_OCR, default 10)
The engine is chosen per project, and which engines a deployment offers varies: Microsoft Read and Microsoft Layout, Tesseract, PaddleOCR and ABBYY are all supported. A digitally-born PDF usually needs no OCR at all, because its embedded text is exact; see OCR for how that is decided page by page.
Split (Document Boundary Detection)
Detects where one document ends and another begins in multi-document uploads:
- Uses AI to analyze page content and detect boundaries
- Creates individual documents from a batch upload
- Assigns pages to the correct document
Classification
Categorizes each document by type using a large language model:
- Compares document content against the project's document classes
- Returns a class with a confidence score
- Can be steered or bypassed entirely by classification rules, for example classifying from the file name or the sending mailbox
Extraction
Extracts structured data from each document using a large language model:
- Uses the document class's field definitions as a schema
- Returns field values with confidence scores
- Provides bounding box coordinates showing where each value was found
- Handles groups and repeating groups (tables), not just single values
Validate, Review and Export
The steps after extraction turn results into something you can rely on and send onward: Validate runs the project's business rules, Review puts a person in front of anything that needs one, and Export produces the output files.
Parallel Processing
DocAI Fabric processes documents in parallel where possible:
- OCR runs in parallel across pages (configurable via
MAX_PARALLEL_OCR) - Classification & Extraction run in parallel across documents (
MAX_PARALLEL_LLM, default 5) - Activities within a workflow run sequentially (each depends on the previous)
Error Handling
- Failed activities can be retried individually
- The system includes circuit breakers and rate limiting for external API calls
- Detailed error information is stored with each activity execution