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: v4.0 (preview) | Previous versions: v3.1 (GA) v3.0 (GA) v2.1 (GA)
This content applies to: v3.1 (GA) | Latest version: v4.0 (preview) | Previous versions: v3.0 v2.1
This content applies to: v3.0 (GA) | Latest versions: v4.0 (preview) v3.1 | Previous version: v2.1
This content applies to: v2.1 | Latest version: 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
andCustom 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.
With the model compose operation, you can assign up to 200 models to a single model ID. If the number of models that I want to compose exceeds the upper limit of a composed model, you can use one of these alternatives:
Classify the documents before calling the custom model. You can use the Read model and build a classification based on the extracted text from the documents and certain phrases by using sources like code, regular expressions, or search.
If you want to extract the same fields from various structured, semi-structured, and unstructured documents, consider using the deep-learning custom neural model. Learn more about the differences between the custom template model and the custom neural model.
Analyzing a document by using composed models is identical to analyzing a document by using a single model. The
Analyze Document
result returns adocType
property that indicates which of the component models you selected for analyzing the document. There's no change in pricing for analyzing a document by using an individual custom model or a composed custom model.Model Compose is currently available only for custom models trained with labels.
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:
משוב
https://aka.ms/ContentUserFeedback.
בקרוב: במהלך 2024, נפתור בעיות GitHub כמנגנון המשוב לתוכן ונחליף אותו במערכת משוב חדשה. לקבלת מידע נוסף, ראה:שלח והצג משוב עבור