Document Intelligence composed custom models

Important

  • Document Intelligence public preview releases provide early access to features that are in active development.
  • Features, approaches, and processes may change, prior to General Availability (GA), based on user feedback.
  • The public preview version of Document Intelligence client libraries default to REST API version 2024-02-29-preview.
  • Public preview version 2024-02-29-preview is currently only available in the following Azure regions:
  • East US
  • West US2
  • West Europe

This content applies to: checkmark v4.0 (preview) | Previous versions: blue-checkmark v3.1 (GA) blue-checkmark v3.0 (GA) blue-checkmark v2.1 (GA)

This content applies to: checkmark v3.1 (GA) | Latest version: purple-checkmark v4.0 (preview) | Previous versions: blue-checkmark v3.0 blue-checkmark v2.1

This content applies to: checkmark v3.0 (GA) | Latest versions: purple-checkmark v4.0 (preview) purple-checkmark v3.1 | Previous version: blue-checkmark v2.1

This content applies to: checkmark v2.1 | Latest version: blue-checkmark v4.0 (preview)

Composed models. A composed model is created by taking a collection of custom models and assigning them to a single model built from your form types. When a document is submitted for analysis using a composed model, the service performs a classification to decide which custom model best represents the submitted document.

With composed models, you can assign multiple custom models to a composed model called with a single model ID. It's useful when you train several models and want to group them to analyze similar form types. For example, your composed model might include custom models trained to analyze your supply, equipment, and furniture purchase orders. Instead of manually trying to select the appropriate model, you can use a composed model to determine the appropriate custom model for each analysis and extraction.

  • Custom form and Custom template models can be composed together into a single composed model.

  • With the model compose operation, you can assign up to 200 trained custom models to a single composed model. To analyze a document with a composed model, Document Intelligence first classifies the submitted form, chooses the best-matching assigned model, and returns results.

  • For custom template models, the composed model can be created using variations of a custom template or different form types. This operation is useful when incoming forms belong to one of several templates.

  • The response includes a docType property to indicate which of the composed models was used to analyze the document.

  • For Custom neural models the best practice is to add all the different variations of a single document type into a single training dataset and train on custom neural model. Model compose is best suited for scenarios when you have documents of different types being submitted for analysis.

With the introduction of custom classification models, you can choose to use a composed model or classification model as an explicit step before analysis. For a deeper understanding of when to use a classification or composed model, see Custom classification models.

Compose model limits

Note

With the addition of custom neural model , there are a few limits to the compatibility of models that can be composed together.

Composed model compatibility

Custom model type Models trained with v2.1 and v2.0 Custom template models v3.0 Custom neural models 3.0 Custom Neural models v3.1
Models trained with version 2.1 and v2.0 Supported Supported Not Supported Not Supported
Custom template models v3.0 Supported Supported Not Supported Not Supported
Custom template models v3.0 Not Supported Not Supported Not Supported Not Supported
Custom template models v3.1 Not Supported Not Supported Not Supported Not Supported
Custom Neural models v3.0 Not Supported Not Supported Supported Supported
Custom Neural models v3.1 Not Supported Not Supported Supported Supported
  • To compose a model trained with a prior version of the API (v2.1 or earlier), train a model with the v3.0 API using the same labeled dataset. That addition ensures that the v2.1 model can be composed with other models.

  • With models composed using v2.1 of the API continues to be supported, requiring no updates.

  • For custom models, the maximum number that can be composed is 200.

Development options

Document Intelligence v4.0:2023-02-29-preview supports the following tools, applications, and libraries:

Feature Resources
Custom model Document Intelligence Studio
REST API
C# SDK
Java SDK
JavaScript SDK
Python SDK
Composed model Document Intelligence Studio
REST API
C# SDK
Java SDK
JavaScript SDK
Python SDK

Document Intelligence v3.1:2023-07-31 (GA) supports the following tools, applications, and libraries:

Feature Resources
Custom model Document Intelligence Studio
REST API
C# SDK
Java SDK
JavaScript SDK
Python SDK
Composed model Document Intelligence Studio
REST API
C# SDK
Java SDK
JavaScript SDK
Python SDK

Document Intelligence v3.0:2022-08-31 (GA) supports the following tools, applications, and libraries:

Feature Resources
Custom model Document Intelligence Studio
REST API
C# SDK
Java SDK
JavaScript SDK
Python SDK
Composed model Document Intelligence Studio
REST API
C# SDK
Java SDK
JavaScript SDK
Python SDK

Document Intelligence v2.1 supports the following resources:

Feature Resources
Custom model Document Intelligence labeling tool
REST API
Client library SDK
Document Intelligence Docker container
Composed model Document Intelligence labeling tool
REST API
C# SDK
Java SDK
• JavaScript SDK
Python SDK

Next steps

Learn to create and compose custom models: