What is the Parser?
The parser extracts document structure (blocks, layout) before AI extraction. This structured representation helps the AI understand document context and relationships between elements. Parser Output Includes:- Text blocks with coordinates
- Layout structure (headers, footers, tables)
- Reading order
- Document hierarchy
Parser Toggle
use_parser
Controls whether to parse document structure before extraction.
- With Parser (true)
- Without Parser (false)
When to use:
- Multi-page documents
- Complex layouts (tables, forms)
- Documents requiring high accuracy
- When you need citations
- When using advanced chunking strategies
- Higher extraction accuracy
- Better context understanding
- Supports all chunking strategies
- Enables citations
- Handles complex layouts better
- Slower processing
- Higher cost per document
Parser Modes
Whenuse_parser: true, you can select the parser quality level with parser_mode.
Available Modes
LITE
Fastest, lowest cost (Default)Basic parsing for simple documents
- Citations automatically disabled
- Good for receipts, simple forms
PLUS
BalancedGood accuracy for most documents
- Handles tables and forms well
- Best for general use
PRO
Highest accuracyBest quality for complex documents
- Advanced layout analysis
- Best for contracts, complex invoices
Mode Comparison
| Feature | LITE | PLUS | PRO |
|---|---|---|---|
| Speed | Fastest | Fast | Slower |
| Cost | Lowest | Medium | Highest |
| Accuracy | Good | Better | Best |
| Citations | ❌ Disabled | ✅ Supported | ✅ Supported |
| Tables | Basic | Good | Excellent |
| Complex Layouts | Basic | Good | Excellent |
| Best For | Simple docs | General use | Complex docs |
Selecting Parser Mode
If not specified,
parser_mode defaults to LITE.Impact on Other Features
Citations
For citation details, see the Citations Configuration.
Chunking Strategies
Parser mode affects available chunking strategies: With Parser (use_parser: true):
- ✅ VARIABLE - Dynamic chunking by character size
- ✅ SECTION - Chunk by document sections
- ✅ PAGE - Chunk by pages
- ✅ PAGE_SECTIONS - Hybrid page and section chunking
- ✅ BLOCK - Chunk by layout blocks
use_parser: false):
- ✅ PAGE - Only strategy available
For chunking details, see the Chunking Configuration.