You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/document-intelligence/concept-composed-models.md
+29-31Lines changed: 29 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,31 +31,38 @@ ms.author: lajanuar
31
31
::: moniker-end
32
32
33
33
> [!IMPORTANT]
34
-
> [The `model compose` operation behavior is changing from api-version=2024-07-31-preview](#composed-models-2024-07-31-preview-enhancements). Model compose v4.0 and lateradds an explicitly trained classifier instead of an implicit classifier for analysis. For the previous composed model version, *see*[Composed custom models v3.1](). If you are currently using composed models consider upgrading to the latest implementation.
34
+
>
35
+
> [The `model compose` operation behavior is changing from api-version=2024-07-31-preview](#benefits-of-the-new-model-compose-operation). The `model compose` operation v4.0 and later adds an explicitly trained classifier instead of an implicit classifier for analysis. For the previous composed model version, *see* Composed custom models v3.1. If you are currently using composed models consider upgrading to the latest implementation.
36
+
37
+
## What is a composed model?
35
38
36
-
# What is a composed model?
37
-
Some scenarios require classifying the document first and then analyzing the document with the model best suited to extract the fields from the model. This could include scenarios where a user uploads a document to your app where you don’t know the document type explicitly, or when a user scans multiple documents together into a single file and submits the file for processing. Your app then needs to identify the component documents and select the best model for each of the component documents.
38
39
With composed models, you can group multiple custom models into a composed model called with a single model ID. 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.
39
40
40
-
The implmentation of model compose prior to API version 2024-07-31-preview performed an implicit classification to decide which custom model best represents the submitted document. The new implementation of the `model compose` operation replaces the implicit classification from the earlier versions with an explicit classification step and adds conditional routing.
41
+
Some scenarios require classifying the document first and then analyzing the document with the model best suited to extract the fields from the model. Such scenarios can include ones where a user uploads a document but the document type isn't explicitly known. Another scenario can be when multiple documents are scanned together into a single file and the file is submitted for processing. Your application then needs to identify the component documents and select the best model for each document.
42
+
43
+
In previous versions, the `model compose` operation performed an implicit classification to decide which custom model best represents the submitted document. The `2024-07-31-preview` implementation of the `model compose` operation replaces the implicit classification from the earlier versions with an explicit classification step and adds conditional routing.
44
+
45
+
## Benefits of the new model compose operation
46
+
47
+
The new `model compose` operation requires you to train an explicit classifier and provides several benefits.
41
48
42
-
## Benefits of the new model compose
49
+
***Continual incremental improvement**. You can consistently improve the quality of the classifier by adding more samples and [incrementally improving classification](concept-incremental-classifier.md). This fine tuning ensures your documents are always routed to the right model for extraction.
43
50
44
-
The new model compose, requires you to train an explicit classifier, which provides a few benefits.
45
-
• You can continually improve the quality of the classifier by adding additional samples and [incrementally improving the classification](concept-incremental-classifier.md) ensuring your documents are always routed to the right model for extraction.
46
-
• This implementation provides complete control over routing. By adding confidence-based routing, you provide a confidence threshold in addition to the mapping of the analysis model to the doc type of the classification response.
47
-
• Ignoring documents, earlier implementations of model compose always selected the best analysis model for extraction based on the highest confidence score even if the confidence scores were very low. By providing a confidence threshold or explicitly not mapping a known document type from classification to an extraction model, you can ignore specific document types.
48
-
• Analyze multiple instances of the same document type. This implementation of model compose when paired with ```splitMode``` option of the classifier can detect multiple instances of the same document in a file and split the file to process each document independently. This enables the processing of multiple instances of a document in a single request.
49
-
• Support for additional features. Add on features like query fields or barcodes can also be specified as a part of the analysis model parameters.
50
-
• Expanding the number of composed models to 500 models. The new implementation of model compose allows you to assign up to 500 trained custom models to a single composed model.
51
+
***Complete control over routing**. By adding confidence-based routing, you provide a confidence threshold for the document type and the classification response.
51
52
53
+
***Ignore document specific document types during the operation**. Earlier implementations of the `model compose` operation selected the best analysis model for extraction based on the confidence score even if the highest confidence scores were relatively low. By providing a confidence threshold or explicitly not mapping a known document type from classification to an extraction model, you can ignore specific document types.
52
54
55
+
***Analyze multiple instances of the same document type**. When paired with the `splitMode` option of the classifier, the `model compose` operation can detect multiple instances of the same document in a file and split the file to process each document independently. Using `splitMode` enables the processing of multiple instances of a document in a single request.
56
+
57
+
***Support for add on features**. [Add on features](concept-add-on-capabilities.md) like query fields or barcodes can also be specified as a part of the analysis model parameters.
58
+
59
+
***Assigned custom model maximum expanded to 500**. The new implementation of the `model compose` operation allows you to assign up to 500 trained custom models to a single composed model.
53
60
54
61
::: moniker range="doc-intel-4.0.0"
55
62
56
-
## How to use model compose
63
+
## How to use model compose
57
64
58
-
* Start by collecting samples of all your needed documents including the documents information should be extracted from and documents that should be ignored.
65
+
* Start by collecting samples of all your needed documents including samples with information that should be extracted or ignored.
59
66
60
67
* Train a classifier by organizing the documents in folders where the folder names are the document type you intend to use in your composed model definition.
61
68
@@ -65,42 +72,34 @@ The new model compose, requires you to train an explicit classifier, which provi
65
72
66
73
Use the `splitMode` parameter to control the file splitting behavior:
67
74
68
-
***None**. The entire file is treated as a single document.
69
-
***perPage**. Each page in the file is treated as a separate document.
70
-
***auto**. The file is automatically split into documents.
75
+
***None**. The entire file is treated as a single document.
76
+
***perPage**. Each page in the file is treated as a separate document.
77
+
***auto**. The file is automatically split into documents.
71
78
72
79
## Billing and pricing
73
80
74
-
Composed models are billed the same as individual custom models. The pricing is based on the number of pages analyzed by the the downstream analysis model. You are only billed the extraction price for the pages routed to an extraction model. With the addition of the explict classification, you are also billed for classification of all pages in the input file. For more information, see the [Document Intelligence pricing page](https://azure.microsoft.com/pricing/details/cognitive-services/form-recognizer/).
81
+
Composed models are billed the same as individual custom models. The pricing is based on the number of pages analyzed by the downstream analysis model. Billing is based on the extraction price for the pages routed to an extraction model. With the addition of the explicit classification charges are incurred for the classification of all pages in the input file. For more information, see the [Document Intelligence pricing page](https://azure.microsoft.com/pricing/details/cognitive-services/form-recognizer/).
75
82
76
83
::: moniker-end
77
84
85
+
::: moniker range="<=doc-intel-3.1.0"
78
86
79
-
80
-
::: moniker range="doc-intel-3.1.0"
81
-
82
-
// **This should include all previous versions**
83
-
## How to use model compose
87
+
## Use model compose
84
88
85
89
* Start by creating a list of all the model IDs you want to compose into a single model.
86
90
87
91
* Compose the models into a single model ID using the Studio, REST API, or client libraries.
88
92
89
93
* Use the composed model ID to analyze documents.
90
94
95
+
## Billing
91
96
92
-
## Billing and pricing
93
-
94
-
Composed models are billed the same as individual custom models. The pricing is based on the number of pages analyzed. You are only billed the extraction price for the pages routed to an extraction model. For more information, see the [Document Intelligence pricing page](https://azure.microsoft.com/pricing/details/cognitive-services/form-recognizer/).
97
+
Composed models are billed the same as individual custom models. The pricing is based on the number of pages analyzed. Billing is based on the extraction price for the pages routed to an extraction model. For more information, see the [Document Intelligence pricing page](https://azure.microsoft.com/pricing/details/cognitive-services/form-recognizer/).
95
98
96
99
* There's no change in pricing for analyzing a document by using an individual custom model or a composed custom model.
97
100
98
-
99
101
::: moniker-end
100
102
101
-
102
-
103
-
104
103
## Composed models features
105
104
106
105
*`Custom template` and `custom neural` models can be composed together into a single composed model across multiple API versions.
@@ -111,7 +110,6 @@ Composed models are billed the same as individual custom models. The pricing is
111
110
112
111
* 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. The `model compose` operation is best suited for scenarios when you have documents of different types being submitted for analysis.
113
112
114
-
115
113
## Compose model limits
116
114
117
115
* With the `model compose` operation, you can assign up to 500 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:
0 commit comments