你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Quickstart: Use Content Understanding with multiple files

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.

Screenshot of Content Understanding overview, process, and workflow.

Prerequisites

To get started, make sure you have the following resources and permissions:

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.

  1. Go to the Home page of Azure AI Foundry.
  2. Select your hub based project. You might need to select View all resources to see your project.
  3. Select Content Understanding from the left navigation pane.
  4. Select + Create.
  5. 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.
  6. Enter a name for your task. Optionally, enter a description and change other settings.
  7. 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.

  1. Upload one or multiple sample files of invoice documents or any other document data relevant to your scenario.

    Screenshot of upload step in user experience.

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

    Screenshot of create schema step in user experience.

  3. Once you feel that the schema is ready to test, select Save. You can always come back and make changes if needed.

    Screenshot of completed schema.

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

    Screenshot of user adding reference data.

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

Screenshot of user running analysis on their data.

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

Screenshot of built analyzer.

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.

Screenshot of sample code.

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:

Screenshot of where to find management center.

You can manage the users and their individual roles here:

Screenshot of Project users section of management center.

Next steps