Skip to content

E-Document: Add MLLM extraction with ADI fallback#6893

Open
Groenbech96 wants to merge 6 commits intomainfrom
features/mllm
Open

E-Document: Add MLLM extraction with ADI fallback#6893
Groenbech96 wants to merge 6 commits intomainfrom
features/mllm

Conversation

@Groenbech96
Copy link
Contributor

@Groenbech96 Groenbech96 commented Feb 27, 2026

Summary

  • Add MLLM (Multimodal LLM) extraction as a new structured data handler for e-document PDF processing, with automatic fallback to ADI (Azure Document Intelligence) when MLLM fails
  • Introduce experiment gate in EDocPDFFileFormat with OnOverrideStructureDataImpl integration event for cross-app override
  • Add dedicated "E-Document MLLM Analysis" Copilot Capability enum value
  • Prefill accounting_customer_party from Company Information to help the LLM distinguish buyer from vendor
  • Add system prompt instructions for customer vs vendor identification

Magnus Hartvig Grønbech and others added 6 commits February 20, 2026 15:27
Add a new extraction method using Azure OpenAI GPT-4.1 Mini Preview
to extract structured invoice data from PDF documents. The MLLM handler
sends the PDF via AddFilePart with a JSON schema prompt and maps the
response to E-Document Purchase Header/Line records.

New objects:
- Table/Page 6142: E-Doc. MLLM Extraction Schema (per-service JSON schema)
- Codeunit 6202: E-Document MLLM Handler (IStructureReceivedEDocument)
- Codeunit 6203: E-Doc. MLLM Schema Helper (default schema + JSON mapping)
- System prompt resource for extraction rules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Renumber codeunits to available IDs: E-Document MLLM Handler (6202→6231),
E-Doc. MLLM Schema Helper (6203→6232), E-Doc. Purchase Draft Writer
(6204→6234). Update app.json idRanges accordingly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ompany prefill

- Add EDocPDFFileFormat experiment gate with OnOverrideStructureDataImpl integration event
- Implement EDocumentMLLMHandler with LLM-first extraction and ADI fallback
- Add dedicated "E-Document MLLM Analysis" copilot capability enum value
- Prefill accounting_customer_party from Company Information in schema helper
- Add system prompt instructions for customer vs vendor identification
- Refactor handler into CallMLLM and ValidateAndUnwrapResponse for readability

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Groenbech96 Groenbech96 requested review from a team as code owners February 27, 2026 08:50
@github-actions github-actions bot added the AL: Apps (W1) Add-on apps for W1 label Feb 27, 2026
@github-actions
Copy link

Could not find a linked ADO work item. Please link one by using the pattern 'AB#' followed by the relevant work item number. You may use the 'Fixes' keyword to automatically resolve the work item when the pull request is merged. E.g. 'Fixes AB#1234'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AL: Apps (W1) Add-on apps for W1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant