Skip to content

Commit d29cca2

Browse files
authored
Merge pull request #246720 from laujan/vinod-release-ga-doc-intel-v3-1
vinod release ga doc intel v3 1
2 parents d7232cf + 4a1a1a5 commit d29cca2

26 files changed

+962
-143
lines changed

articles/ai-services/document-intelligence/concept-add-on-capabilities.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ monikerRange: 'doc-intel-3.1.0'
1717

1818
<!-- markdownlint-disable MD033 -->
1919

20-
# Document Intelligence add-on capabilities (preview)
20+
# Document Intelligence add-on capabilities
2121

2222
[!INCLUDE [applies to v3.1](includes/applies-to-v3-1.md)]
2323

@@ -42,7 +42,7 @@ The task of recognizing small text from large-size documents, like engineering d
4242
The `ocr.formula` capability extracts all identified formulas, such as mathematical equations, in the `formulas` collection as a top level object under `content`. Inside `content`, detected formulas are represented as `:formula:`. Each entry in this collection represents a formula that includes the formula type as `inline` or `display`, and its LaTeX representation as `value` along with its `polygon` coordinates. Initially, formulas appear at the end of each page.
4343

4444
> [!NOTE]
45-
> The `confidence` score is hard-coded for the `2023-02-28` public preview release.
45+
> The `confidence` score is hard-coded.
4646
4747
```json
4848
"content": ":formula:",
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
title: Contract data extraction – Document Intelligence
3+
titleSuffix: Azure AI services
4+
description: Automate tax document data extraction with Document Intelligence's tax document models.
5+
author: laujan
6+
manager: nitinme
7+
ms.service: applied-ai-services
8+
ms.subservice: forms-recognizer
9+
ms.topic: conceptual
10+
ms.date: 07/18/2023
11+
ms.author: lajanuar
12+
monikerRange: 'doc-intel-3.1.0'
13+
---
14+
15+
<!-- markdownlint-disable MD033 -->
16+
17+
# Document Intelligence contract model
18+
19+
[!INCLUDE [applies to v3.1](includes/applies-to-v3-1.md)]
20+
21+
The Document Intelligence contract model uses powerful Optical Character Recognition (OCR) capabilities to analyze and extract key fields and line items from a select group of important contract entities. Contracts can be of various formats and quality including phone-captured images, scanned documents, and digital PDFs. The API analyzes document text; extracts key information such as Parties, Jurisdictions, Contract ID, and Title; and returns a structured JSON data representation. The model currently supports certain English tax document formats.
22+
23+
## Automated contract processing
24+
25+
Automated contract processing is the process of extracting key contract fields from documents. Historically, the contract analysis process has been done manually and, hence, very time consuming. Accurate extraction of key data from contracts is typically the first and one of the most critical steps in the contract automation process.
26+
27+
## Development options
28+
29+
Document Intelligence v3.0 supports the following tools:
30+
31+
| Feature | Resources | Model ID |
32+
|----------|-------------|-----------|
33+
|**Contract model** | &#9679; [**Document Intelligence Studio**](https://formrecognizer.appliedai.azure.com)</br> &#9679; [**REST API**](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-2022-08-31/operations/AnalyzeDocument)</br> &#9679; [**C# SDK**](quickstarts/get-started-sdks-rest-api.md?view=doc-intel-3.0.0&preserve-view=true)</br> &#9679; [**Python SDK**](quickstarts/get-started-sdks-rest-api.md?view=doc-intel-3.0.0&preserve-view=true)</br> &#9679; [**Java SDK**](quickstarts/get-started-sdks-rest-api.md?view=doc-intel-3.0.0&preserve-view=true)</br> &#9679; [**JavaScript SDK**](quickstarts/get-started-sdks-rest-api.md?view=doc-intel-3.0.0&preserve-view=true)|**prebuilt-contract**|
34+
35+
## Input requirements
36+
37+
[!INCLUDE [input requirements](./includes/input-requirements.md)]
38+
39+
## Try contract document data extraction
40+
41+
See how data, including customer information, vendor details, and line items, is extracted from contracts. You need the following resources:
42+
43+
* An Azure subscription—you can [create one for free](https://azure.microsoft.com/free/cognitive-services/)
44+
45+
* A [Form Recognizer instance (Document Intelligence forthcoming)](https://portal.azure.com/#create/Microsoft.CognitiveServicesFormRecognizer) in the Azure portal. You can use the free pricing tier (`F0`) to try the service. After your resource deploys, select **Go to resource** to get your key and endpoint.
46+
47+
:::image type="content" source="media/containers/keys-and-endpoint.png" alt-text="Screenshot of keys and endpoint location in the Azure portal.":::
48+
49+
## Document Intelligence Studio
50+
51+
1. On the Document Intelligence Studio home page, select **Tax Documents**
52+
53+
1. You can analyze the sample tax documents or select the **+ Add** button to upload your own sample.
54+
55+
1. Select the **Analyze** button:
56+
57+
:::image type="content" source="media/studio/invoice-analyze.png" alt-text="Screenshot of the analyze invoice menu.":::
58+
59+
> [!div class="nextstepaction"]
60+
> [Try Document Intelligence Studio](https://formrecognizer.appliedai.azure.com/studio/prebuilt?formType=invoice)
61+
62+
## Supported languages and locales
63+
64+
>[!NOTE]
65+
> Document Intelligence auto-detects language and locale data.
66+
67+
| Supported languages | Details |
68+
|:----------------------|:---------|
69+
| English (en) | United States (us)|
70+
71+
## Field extraction
72+
73+
The following are the fields extracted from a contract in the JSON output response.
74+
75+
|Name| Type | Description | Example output |
76+
|:-----|:----|:----|:---:|
77+
| Title | String | Contract title| Service agreement |
78+
| ContractId | String | Contract title| AB12956 |
79+
| Parties | Array |List of legal parties| |
80+
| ExecutionDate | Date |Date when the agreement was fully signed and agreed upon by all parties|`On this twenty-third day of February two thousand and twenty two` |
81+
| ExpirationDate | Date |Date when the contract ends to be in effect| One year |
82+
| RenewalDate | Date |Date when the contract needs to be renewed| `On this twenty-third day of February two thousand and twenty two` |
83+
| Jurisdictions | Array | List of jurisdictions| |
84+
85+
The contract key-value pairs and line items extracted are in the `documentResults` section of the JSON output.
86+
87+
## Next steps
88+
89+
* Try processing your own forms and documents with the [Document Intelligence Studio](https://formrecognizer.appliedai.azure.com/studio)
90+
91+
* Complete a [Document Intelligence quickstart](quickstarts/get-started-sdks-rest-api.md?view=doc-intel-3.0.0&preserve-view=true) and get started creating a document processing app in the development language of your choice.
92+

articles/ai-services/document-intelligence/concept-custom-classifier.md

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ monikerRange: 'doc-intel-3.1.0'
1616

1717
# Document Intelligence custom classification model
1818

19-
[!INCLUDE [applies to v3.1](includes/applies-to-v3-1.md)]
19+
**This article applies to:** ![Document Intelligence checkmark](media/yes-icon.png) **The latest [GA SDK](sdk-overview.md) supported by Document Intelligence REST API version [2023-07-31](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-2023-07-31/operations/AnalyzeDocument)**.
2020

2121
> [!IMPORTANT]
2222
>
23-
> Custom classification model is currently in public preview. Features, approaches, and processes may change, prior to General Availability (GA), based on user feedback.
23+
> Custom classification model is now generally available!
2424
>
2525
26-
Custom classification models are deep-learning-model types that combine layout and language features to accurately detect and identify documents you process within your application. Custom classification models can classify each page in an input file to identify the document(s) within and can also identify multiple documents or multiple instances of a single document within an input file.
26+
Custom classification models are deep-learning-model types that combine layout and language features to accurately detect and identify documents you process within your application. Custom classification models perform classification of an input file one page at a time to identify the document(s) within and can also identify multiple documents or multiple instances of a single document within an input file.
2727

2828
## Model capabilities
2929

@@ -35,7 +35,9 @@ Custom classification models can analyze a single- or multi-file documents to id
3535

3636
* A single file containing multiple instances of the same document. For instance, a collection of scanned invoices.
3737

38-
Training a custom classifier requires at least two distinct classes and a minimum of five samples per class.
38+
Training a custom classifier requires at least two distinct classes and a minimum of five samples per class. The model response contains the page ranges for each of the classes of documents identified.
39+
40+
The model classifies each page of the input document to one of the classes in the labeled dataset. Use the confidence score from the response to set the threshold for your application.
3941

4042
### Compare custom classification and composed models
4143

@@ -57,7 +59,7 @@ Custom classification models require a minimum of five samples per class to trai
5759

5860
## Training a model
5961

60-
Custom classification models are available with the [v3.1 and v3.0 APIs](v3-migration-guide.md) starting with API version ```2023-07-31```. [Document Intelligence Studio](https://formrecognizer.appliedai.azure.com/studio) provides a no-code user interface to interactively train a custom classifier.
62+
Custom classification models are only available in the [v3.1 API](v3-migration-guide.md) starting with API version ```2023-02-28-preview```. [Document Intelligence Studio](https://formrecognizer.appliedai.azure.com/studio) provides a no-code user interface to interactively train a custom classifier.
6163

6264
When using the REST API, if you've organized your documents by folders, you can use the ```azureBlobSource``` property of the request to train a classification model.
6365

@@ -131,6 +133,43 @@ File list `car-maint.jsonl` contains the following files.
131133
{"file":"sample1/car-maint/Commercial Motor Vehicle - Trey.pdf"}
132134
```
133135

136+
## Model response
137+
138+
Analyze an input file with the document classification model
139+
140+
```rest
141+
https://{service-endpoint}/formrecognizer/documentClassifiers/{classifier}:analyze?api-version=2023-07-31
142+
```
143+
144+
The response contains the identified documents with the associated page ranges in the documents section of the response.
145+
146+
```json
147+
{
148+
...
149+
150+
"documents": [
151+
{
152+
"docType": "formA",
153+
"boundingRegions": [
154+
{ "pageNumber": 1, "polygon": [...] },
155+
{ "pageNumber": 2, "polygon": [...] }
156+
],
157+
"confidence": 0.97,
158+
"spans": []
159+
},
160+
{
161+
"docType": "formB",
162+
"boundingRegions": [
163+
{ "pageNumber": 3, "polygon": [...] }
164+
],
165+
"confidence": 0.97,
166+
"spans": []
167+
}, ...
168+
]
169+
}
170+
171+
```
172+
134173
## Next steps
135174

136175
Learn to create custom classification models:

articles/ai-services/document-intelligence/concept-custom-label.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ Tabular fields are also useful when extracting repeating information within a do
126126
* View the REST API:
127127

128128
> [!div class="nextstepaction"]
129-
> [Document Intelligence API v3.0](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v3-0-preview-2/operations/AnalyzeDocument)
129+
> [Document Intelligence API v3.1 (GA)](https://westus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-2023-07-31/operations/AnalyzeDocument)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
title: Custom model lifecycle- Document Intelligence
3+
titleSuffix: Azure AI services
4+
description: Document Intelligence custom model lifecycle and management guide.
5+
author: laujan
6+
manager: nitinme
7+
ms.service: applied-ai-services
8+
ms.subservice: forms-recognizer
9+
ms.topic: conceptual
10+
ms.date: 07/24/2023
11+
ms.author: lajanuar
12+
monikerRange: '>=doc-intel-3.0.0'
13+
---
14+
15+
16+
# Document Intelligence custom model lifecycle
17+
18+
**This article applies to:** ![Document Intelligence v3.0 checkmark](media/yes-icon.png) **Document Intelligence v3.0** and ![Document Intelligence v3.1 checkmark](media/yes-icon.png) **Document Intelligence v3.1**.
19+
20+
With the v3.1 API, custom models now introduce a expirationDateTime property that is set for each model trained with the 3.1 API or later. Custom models are dependent on the API version of the Layout API version and the API version of the model build operation. For best results, continue to use the API version the model was trained with for all alanyze requests. The guidance applies to all Document Intelligence custom models including extraction and classification models.
21+
22+
## Models trained with GA API version
23+
24+
With the v3.1 API, custom models introduce a new model expiration property. The model expiration is set to two years from the date the model is built for all requests that use a GA API to build a model. To continue to use the model past the expiration date, it's required that you train the model with a current GA API version.
25+
26+
## Models trained with preview API version
27+
28+
For build requests, using a preview API version, the expiration date is set to three months from the date the model is built. Models trained with a preview API shouldn't be used in production and should be retrained once the corresponding GA API version is available. Compatibility between preview API versions and GA API versions isn't always maintained. You should expect that models trained with a preview API version aren't useable once the preview API is retired.
29+
30+
Preview APIs are typically retired within three months of the corresponding GA API being available.
31+
32+
## Viewing model expiration date
33+
34+
The GET model API returns the model details including the ```expirationDateTime``` property.
35+
36+
```rest
37+
GET /documentModels/{customModelId}?api-version={apiVersion}
38+
{
39+
"modelId": "{customModelId}",
40+
"description": "{customModelDescription}",
41+
"createdDateTime": "2021-09-24T12:54:35Z",
42+
"expirationDateTime": "2023-01-01T00:00:00Z",
43+
"apiVersion": "2023-07-31",
44+
"docTypes": { ... }
45+
}
46+
```
47+
48+
## Retrain a model
49+
50+
To retrain a model with a more recent API version, ensure that the layout results for the documents in your training dataset correspond to the API version of the build model request. For instance, if you plan to build the model with the ```2023-07-31``` API version, the corresponding *.ocr.json files in your training dataset should also be generated with the ```2023-07-31``` API version. The ocr.json files are generated by running layout on your training dataset. To validate the version of the layout results, check the ```apiVersion``` property in the ```analyzeResult``` of the ocr.json documents.
51+
52+
## Next steps
53+
54+
Learn to create and compose custom models:
55+
56+
> [!div class="nextstepaction"]
57+
>
58+
> [**Build a custom model**](how-to-guides/build-a-custom-model.md) [**Compose custom models**](how-to-guides/compose-custom-models.md)

0 commit comments

Comments
 (0)