Skip to main content

Configuration Options

When creating a new Extraction Agent, the schema is the most important part. However, there are a few other options that can significantly impact the extraction process.

  • Extraction Mode: The mode of extraction to use. Can be either FAST, BALANCED, MULTIMODAL, or PREMIUM. The default is BALANCED. You can start here and switch to MULTIMODAL/PREMIUM for higher accuracy, if needed. FAST mode is suitable for simpler documents with no OCR and limited tabular extraction and is the fastest mode. MULTIMODAL mode is suitable for visually rich documents with a mix of text, tables, and images. PREMIUM mode does OCR, complex table/header and layout detection and is suitable for documents that require the highest accuracy.
  • System Prompt: Any additional system level instructions for the extraction agent. Note that you should use the schema descriptions to pass field-level instructions, few-shot examples, formatting instructions, etc.
  • Extraction Target: Whether to use the schema on a per-page basis or on the entire document. For the per-page mode, the schema is applied to each page of the document and an array of results is returned.

Advanced Options/Extensions

These features are currently available under Advanced Settings in the UI. These return schema-level metadata in the extraction_metadata field of the response.

  1. Citations: Corresponding to every leaf-level field in the schema, this returns the page and verbatim text that the field is extracted from. Use the ExtractConfig.cite_sources argument from the SDK to enable this feature.
  2. Reasoning: Corresponding to every leaf-level field in the schema, this returns a brief explanation for the extracted value based on the text provided or an error message in case the text does not contain enough information to extract the field. Use the ExtractConfig.use_reasoning argument from the SDK to enable this feature.
  3. Confidence Scores (beta): Fetch confidence scores for the extracted fields. This feature adds three confidence-related fields to the extraction metadata:
    • parsing_confidence: Confidence score indicating how well the relevant context was parsed from the source document. Only available for Multimodal extraction mode.
    • extraction_confidence: Confidence score indicating the relevance of the extraction based on the JSON schema field.
    • confidence: Combined confidence score that incorporates both parsing and extraction confidence. Use the ExtractConfig.confidence_scores argument from the SDK to enable confidence scores. This currently has a 20-page size limit.

Note: Citation and confidence scores will significantly slow down extraction processing time.