Skip to content

[P1] Add multimodal augmentation for complex document page extraction #1137

Description

@paullizer

Summary

Add an optional document extraction enhancement that flags complex PDF/document pages and sends those selected pages through a multimodal model for structured analysis, while preserving the existing standard or Document Intelligence extraction path.

User Value

Admins and users get richer, more reliable document context for pages that contain complex layouts such as images, tables, tables spanning multiple pages, formulas, diagrams, or other structure that plain text extraction and standard chunking can miss.

Proposed Behavior

Admins can enable this capability in the Search and Extract settings area and choose which multimodal model should be used. During document processing, the existing extraction workflow still saves the page text and chunks using the configured standard or enhanced extraction method. In parallel, pages with complex structures are tagged or flagged for multimodal analysis. The selected page content is sent to the configured multimodal model, which returns structured JSON describing the detected content and layout. That JSON is then associated with the saved page or page chunks so downstream search, retrieval, and chat citation behavior can use the augmented structure.

Acceptance Criteria

  • Admin settings include a feature toggle for multimodal augmentation in the Search and Extract area.
  • Admin settings allow selecting the multimodal model/deployment used for flagged page analysis.
  • Document processing can identify or flag pages with complex structures, including images, tables, multi-page tables, formulas, diagrams, or other non-trivial layout content.
  • Existing standard and enhanced extraction workflows continue to save page text and chunks without regression.
  • Flagged pages are analyzed through the configured multimodal model as a parallel augmentation step.
  • Multimodal output is captured as structured JSON with enough metadata to associate it back to the source document, page number, and relevant chunks.
  • Augmented page/chunk metadata is available to search, retrieval, and chat flows without replacing the original extracted text.
  • Failures in multimodal augmentation are surfaced/logged without causing the base document extraction to fail when the original extraction succeeded.
  • Functional tests cover settings, page flagging, JSON association, and fallback behavior when augmentation is disabled or fails.

Notes

Priority: P1
Estimated size: L

Relevant areas likely include document extraction, Document Intelligence enhanced extraction, chunk persistence, admin Search and Extract settings, model configuration, search indexing, and chat retrieval/citation behavior.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

Status
Pending Evaluation

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions