simple() strategy performs extraction in a single pass without chunking. Use this for documents small enough to fit within your model’s context window.
Usage
Configuration
The AI SDK language model to use for extraction.
Additional instructions to guide the model’s output format or behavior.
Custom retry executor function. Defaults to
runWithRetries.Enable strict mode for structured output validation. Defaults to
false.When to use
- Your document fits within the model’s context window
- You have a single page or small document
- You want the fastest extraction with lowest token usage
- You don’t need parallel processing
Trade-offs
Advantages:- Fastest extraction time
- Lowest token usage
- Simplest configuration
- No merge complexity
- Cannot handle large documents
- No parallel processing
- Fails if input exceeds context window
Performance characteristics
The strategy estimates 3 steps:- Prepare
- Extract
- Complete