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/content-understanding/best-practices.md
+15-39Lines changed: 15 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,20 +5,20 @@ This document provides guidance on how to effectively use Content Understanding
5
5
6
6
---
7
7
8
-
## Use Field Descriptions to Guide Output
9
-
When defining a schema, it is essential to provide detailed field descriptions and examples. Clear descriptions and relevant examples guide the model to focus on the correct information, improving the accuracy of the output.
8
+
## Use field descriptions to guide output
9
+
When defining a schema, it is essential to provide detailed field descriptions. Clear and concise descriptions guide the model to focus on the correct information, improving the accuracy of the output.
10
10
11
11
### Example 1:
12
12
If you want to extract the date from an invoice, in addition to naming the field `"Date"`, provide a description such as:
13
13
> **"The date when the invoice was issued, typically found at the top right corner of the document."**
14
14
15
15
### Example 2:
16
16
Suppose you want to extract the `"Customer Name"` from an invoice. Your description might read:
17
-
> **"It should be the name of the business or person, but not the entire mailing address. The name of the customer or client to whom this invoice is addressed, usually located near the billing address."**
17
+
> **"The name of the customer or client to whom this invoice is addressed, usually located near the billing address. It should be the name of the business or person, but not the entire mailing address."**
18
18
19
19
---
20
20
21
-
## Fix Mistakes by Editing Field Descriptions
21
+
## Fix mistakes by editing field descriptions
22
22
If the system’s output isn’t meeting expectations, the first thing to try is refining and updating the field descriptions. By clarifying the context and being more explicit about what you need, you reduce ambiguity and improve accuracy.
23
23
24
24
### Example:
@@ -29,14 +29,14 @@ This extra context guides the model to the right location in the document.
29
29
30
30
---
31
31
32
-
## Use Classification Fields for Specific Outputs
32
+
## Use classification fields for specific outputs
33
33
When you need the system to choose from a set of predefined options (e.g., document type, product category, or status), use classification fields. When there's ambiguity with the options, provide clear descriptions for each option, enabling the model to categorize the data accurately.
34
34
35
35
### Example 1:
36
-
If you need to classify documents as either `"Invoice"`, `"Claim"`, or `"Report"`, create a classification field with these words as class names.
36
+
If you need to classify documents as either `"Invoice"`, `"Claim"`, or `"Report"`, create a classification field with these words as category names.
37
37
38
38
### Example 2:
39
-
When processing product images, you might need to assign them to categories like `"Alcoholic Drinks"`, `"Soft Drinks"`, `"Snacks"`, and `"Dairy Products"`. Since some items may appear similar, providing precise definitions for close-call cases can help. For example:
39
+
When processing product images, you might need to assign them to categories like `"AlcoholicDrinks"`, `"SoftDrinks"`, `"Snacks"`, and `"DairyProducts"`. Since some items may appear similar, providing precise definitions for close-call cases can help. For example:
40
40
41
41
-**`"Alcoholic Drinks"`**: Beverages containing alcohol, such as beer, wine, and spirits. This excludes soft drinks or non-alcoholic beverages.
42
42
-**`"Soft Drinks"`**: Carbonated non-alcoholic beverages, such as soda and sparkling water. This does not include juices or alcoholic drinks.
@@ -45,52 +45,28 @@ By clearly defining each category, you ensure that the system correctly classifi
45
45
46
46
---
47
47
48
-
## Use Confidence Scores to Determine When Human Review is Needed
48
+
## Use confidence scores to determine when human review is needed
49
49
Confidence scores help you decide when to involve human reviewers. Customers can interpret confidence scores using thresholds to decide which results need more review, minimizing the risk of errors.
50
50
51
51
### Example:
52
-
For an Invoice review use case, if a key extracted field like `"Total Invoice Amount"` has a confidence score under **80%**, the system routes that document for manual review. This ensures that critical fields like invoice totals or legal statements are verified by a human when necessary.
52
+
For an Invoice review use case, if a key extracted field like `"TotalInvoiceAmount"` has a confidence score under **0.80**, route that document to manual review. This ensures that critical fields like invoice totals or legal statements are verified by a human when necessary.
53
53
54
-
You might set different confidence thresholds based on the type of field. For instance, a lower threshold for a `"comments"` field that’s less critical and a higher one for `"contract termination date"` to ensure no mistakes.
54
+
You might set different confidence thresholds based on the type of field. For instance, a lower threshold for a `"Comments"` field that’s less critical and a higher one for `"ContractTerminationDate"` to ensure no mistakes.
55
55
56
56
---
57
57
58
-
## Reduce Errors by Narrowing Language Selection for Audio and Video
59
-
When working with audio and video content, selecting a narrow set of languages for transcription significantly reduces errors. The more languages you include, the more the system has to guess which language is being spoken, which can lead to increased misclassifications.
58
+
## Reduce errors by narrowing language selection for audio and video
59
+
When working with audio and video content, selecting a narrow set of languages for transcription can potentially reduce errors. The more languages you include, the more the system has to guess which language is being spoken, which may increase misrecognition.
60
60
61
61
### Example 1:
62
-
If your content is only in English and Spanish, configure your transcription to those two languages only. Avoid adding options like French or Arabic unless you truly need them.
62
+
If you are certain that the content only contains English and Spanish, configuring your transcription to these two languages only may improve quality. But if the content accidentally includes another languages, such configuration may actually degrade overall quality.
63
63
64
64
### Example 2:
65
65
If you have conference calls that occasionally include Portuguese speakers, add Portuguese only for those meetings. For all other calls, stick to English if that’s what you expect 90% of the time.
66
66
67
67
---
68
68
69
-
## Transcript, OCR Text, and Speaker Data Don’t Require Fields
70
-
By default, Content Extraction information such as transcripts, OCR results, and video key frames can be accessed directly for immediate review or custom processing. Fields can be used when advanced transformations are needed (e.g., summarizing transcripts, identifying entities, or extracting specific items from OCR). Each field can instruct the system to extract or generate the content you need.
71
-
72
-
---
73
-
74
-
## Connect Analyzer to an Existing Content Understanding Project via REST API
75
-
To connect an analyzer created through the REST API to an existing Content Understanding project, add the following `tags` to the analyzer JSON:
76
-
77
-
```json
78
-
"projectId": "<add your project's ID here! You can find the projectId on the Azure Portal in the Overview of the project resource or by reading any analyzer you created via the project in AI Foundry through the REST API>",
## Transcript, OCR text, and speaker data do not require fields
70
+
By default, Content Extraction information such as transcripts, OCR results, and video key frames can be accessed directly from the analyzer output for immediate review or custom processing. There is no need to define a field in the schema for these items. Fields can be used when additional processing is needed (e.g., summarizing transcripts, identifying entities, or extracting specific items from OCR). Each field can instruct the system to extract or generate the content you need.
0 commit comments