Skip to content

Commit 53ba2bc

Browse files
committed
update
1 parent 4b15a2a commit 53ba2bc

File tree

2 files changed

+35
-37
lines changed

2 files changed

+35
-37
lines changed

articles/ai-services/document-intelligence/concept-composed-models.md

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,31 +31,38 @@ ms.author: lajanuar
3131
::: moniker-end
3232

3333
> [!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?
3538

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.
3839
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.
3940

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.
4148

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.
4350

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.
5152

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.
5254

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.
5360

5461
::: moniker range="doc-intel-4.0.0"
5562

56-
## How to use model compose
63+
## How to use model compose
5764

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.
5966

6067
* 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.
6168

@@ -65,42 +72,34 @@ The new model compose, requires you to train an explicit classifier, which provi
6572

6673
Use the `splitMode` parameter to control the file splitting behavior:
6774

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.
7178

7279
## Billing and pricing
7380

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/).
7582

7683
::: moniker-end
7784

85+
::: moniker range="<=doc-intel-3.1.0"
7886

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
8488

8589
* Start by creating a list of all the model IDs you want to compose into a single model.
8690

8791
* Compose the models into a single model ID using the Studio, REST API, or client libraries.
8892

8993
* Use the composed model ID to analyze documents.
9094

95+
## Billing
9196

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/).
9598

9699
* There's no change in pricing for analyzing a document by using an individual custom model or a composed custom model.
97100

98-
99101
::: moniker-end
100102

101-
102-
103-
104103
## Composed models features
105104

106105
* `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
111110

112111
* 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.
113112

114-
115113
## Compose model limits
116114

117115
* 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:

articles/ai-services/document-intelligence/toc.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,9 @@ items:
230230
- name: Custom model overview
231231
displayName: table, label, ocr, confidence, template, neural
232232
href: concept-custom.md
233-
- name: Custom model lifecycle
234-
displayName: custom, train, modelId, model ID, expiration, train, build
235-
href: concept-custom-lifecycle.md
233+
- name: 🆕 Composed models
234+
displayName: custom, assign, modelId, model ID
235+
href: concept-composed-models.md
236236
- name: Custom template model
237237
displayName: structure, selection, labels, tables, tabular, train, template, neural, build mode, signatures, custom
238238
href: concept-custom-template.md
@@ -251,9 +251,9 @@ items:
251251
- name: Custom labeling tips
252252
displayName: structure, selection, labels, tables, tabular, train, tips
253253
href: concept-custom-label-tips.md
254-
- name: Composed models
255-
displayName: custom, assign, modelId, model ID
256-
href: concept-composed-models.md
254+
- name: Custom model lifecycle
255+
displayName: custom, train, modelId, model ID, expiration, train, build
256+
href: concept-custom-lifecycle.md
257257
- name: Code samples
258258
items:
259259
- name: "C#/.NET"

0 commit comments

Comments
 (0)