你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
This quickstart shows you how to use the Content Understanding service in the Azure AI Foundry portal to extract structured information from your data. Azure AI Foundry enables you to build and deploy generative AI applications and APIs responsibly.
Suppose you have document files and you want to automatically extract key information from them, while also comparing to reference data to infer conclusions from your files. Using Content Understanding, you can create a task to streamline your data processing, define a field schema to specify the information to extract or generate, and develop an analyzer that applies reasoning to your data, delivering key insights and conclusions. The analyzer becomes an API endpoint that you can integrate into your applications or workflows.
In this guide, we walk through building and testing an analyzer for your scenario. You can start from scratch or use suggested templates for common use cases.
Prerequisites
To get started, make sure you have the following resources and permissions:
An Azure subscription. If you don't have an Azure subscription, create a free account.
An Azure AI Foundry hub-based project created in one of the following supported regions:
westus
,swedencentral
, oraustraliaeast
. A project is used to organize your work and save state while building customized AI apps. You can create a project from the home page of AI Foundry, or the Content Understanding landing page.
Note
You must use a hub based project for this feature. A Foundry project isn't supported. See How do I know which type of project I have? and Create a hub based project.
Create your multi-file task powered by Content Understanding Pro mode
Follow these steps to create a custom task in the Azure AI Foundry. This task is used to build your first analyzer.
- Go to the Home page of Azure AI Foundry.
- Select your hub based project. You might need to select View all resources to see your project.
- Select Content Understanding from the left navigation pane.
- Select + Create.
- In this guide, we use a
multi-file task
utilizing Content Understanding Pro mode, but if you're interested in creating a single-file task utilizing Standard mode, refer to Create an Azure AI Content Understanding single-file task in the Azure AI Foundry portal. For more information on which mode is right for your scenario, check out Azure AI Content Understanding pro and standard modes. - Enter a name for your task. Optionally, enter a description and change other settings.
- Select Create.
Create your first analyzer
To create a multi-file Content Understanding task, start by uploading one or more samples of data and building your field schema. The schema is the customizable framework that guides the analyzer to extract the preferred insights from your data.
In this example, the schema is created to extract key fields from an invoice document, but you can bring in any document based data and the steps remain the same. For a complete list of supported file types, see input file limits.
Upload one or multiple sample files of invoice documents or any other document data relevant to your scenario.
Add fields to your schema:
Specify clear and simple field names. Some example fields might include vendorName, items, price.
Indicate the value type for each field (strings, dates, numbers, lists, groups). To learn more, see supported field types.
[Optional] Provide field descriptions to explain the desired behavior, including any exceptions or rules.
Specify the method to generate the value for each field.
Once you feel that the schema is ready to test, select Save. You can always come back and make changes if needed.
Upload one or more documents for reference data for the service to analyze. Adding reference data allows the model to compare and apply multi-step reasoning to your test data in order to infer conclusions about that data.
Run analysis on your data. Kicking off analysis generates an output on your test files based on the schema that you created, and applies predictions by comparing that output to your reference data.
- Once you're satisfied with the quality of your output, select Build analyzer. This action creates an analyzer ID that you can integrate into your own applications, allowing you to call the analyzer from your code.
Now you successfully built your first Content Understanding analyzer, and are ready to start extracting insights from your data. You can select the analyzer you created and view sample code to get started.
Check out Quickstart: Azure AI Content Understanding REST APIs to utilize the REST API to call your analyzer.
Sharing your project
In order to share and manage access to the project you created, navigate to the Management Center, found at the bottom of the navigation for your project:
You can manage the users and their individual roles here:
Next steps
- Learn how to call the REST API at Quickstart: Azure AI Content Understanding REST APIs