重要
这些特性和功能是 2026-05-01 预览版 REST API 的一部分。 2026-05-01-preview 作为Azure订阅的一部分获得许可,并受Microsoft产品条款、Microsoft产品和服务数据保护附录(“DPA”)和Azure预览版补充使用条款的约束。
2026-05-01-preview 支持连接到其他 Microsoft 服务和第三方服务。 使用这些服务受其各自的条款的约束,可能会导致数据处理或存储超出Azure符合性边界,以及流入Azure符合性边界的数据。
您有责任管理您的数据是否会流出您组织的合规和地理边界之外及其任何相关影响,并确保已配置适当的权限、边界和审批。
你负责仔细查看和测试在特定用例上下文中生成的应用程序,并做出所有适当的决策和自定义。 这包括实施自己的负责任的 AI 缓解措施,例如元系统、内容筛选器或其他安全系统,并确保应用程序满足适当的质量、可靠性、安全性和可信度标准。
Azure 内容理解技能使用 Azure AI 服务中的 Azure 内容理解中的文档分析器来分析非结构化文档和其他内容类型,生成可集成到自动化工作负荷中的有组织的可搜索输出。 此技能提取文本和图像,包括保留文档内每个图像位置的位置的位置元数据。 图像接近相关内容对于 多模式搜索、 代理检索和 检索扩充生成 (RAG)特别有用。
可以使用Azure内容理解技能进行内容提取和分块。 无需在技能集中使用文本拆分技能。 此技能实现与文档布局技能相同的界面,该技能在设置为时outputFormat使用 text。 但是,Azure内容理解技能在文档布局技能上提供了多种优势:
表和数字采用 Markdown 格式输出,使大型语言模型(LLM)更易于理解。 相反,文档布局技能将表和图形输出为纯文本,这可能会导致信息丢失。
对于跨多个页面的表,Azure内容理解技能可以将跨页表识别和提取为单个单元。
Azure内容理解技能允许区块通过语义单元跨多个页面。
Azure内容理解技能比文档布局技能更具成本效益,因为内容理解 API 的成本更低。
局限性
Azure内容理解技能具有以下限制:
此技能不适用于内容理解文档分析器中需要 5 分钟以上的处理的大型文档。 技能超时,但费用仍适用于附加到技能组的 AI 服务资源。 确保文档经过优化,以保持在处理限制范围内,以避免不必要的成本。
此技能调用Azure内容理解文档分析器,因此所有记录不同文档类型的服务行为应用于其输出。 例如,Word (DOCX) 和 PDF 文件可能会产生不同的结果,因为图像处理方式存在差异。 如果需要跨 DOCX 和 PDF 的一致图像行为,请考虑将文档转换为 PDF 或查看 多模式搜索文档 以获取替代方法。
支持的区域
Azure内容理解技能调用 Content Understanding 2025-11-01 REST API。 AI 服务资源必须位于受支持的区域中,该区域在 Azure 内容理解区域和语言支持中进行了介绍。
search service可以位于任何 supported Azure AI 搜索 区域中。 当 AI 服务资源和 Azure AI 搜索服务不在同一区域时,跨区域网络延迟会影响索引器的性能。
支持的文件格式
Azure内容理解技能可识别以下文件格式:
- .JPEG
- .JPG
- .PNG
- .BMP
- .HEIF
- .TIFF
- .DOCX
- .XLSX
- .PPTX
- .HTML
- .TXT
- .MD
- .RTF
- .EML
支持的语言
有关打印文本,请参阅 Azure 内容理解区域和语言支持。
@odata.type
Microsoft.Skills.Util.ContentUnderstandingSkill
数据限制
即使分析文档的文件大小限制在 200 MB 以内,如 Azure 内容理解服务配额和限制中所述,索引编制仍受search service层的 indexer 限制的约束。
图像尺寸必须介于 50 x 50 像素或 10,000 像素 x 10,000 像素之间。
如果 PDF 已锁定密码,请在运行索引器之前删除该锁。
技能参数
参数区分大小写。
| 参数名称 | 允许的值 | Description |
|---|---|---|
extractionOptions |
["images"]、["images", "locationMetadata"]、["locationMetadata"] |
标识从文档中提取的任何额外内容。 定义一个枚举数组,这些枚举对应于要包含在输出中的内容。 例如,如果 extractionOptions 为 ["images", "locationMetadata"],输出包含图像和位置元数据,这些元数据提供与提取内容的位置相关的页面位置和视觉信息。 |
chunkingProperties |
请参阅下表。 | 封装如何对文本内容进行分块的选项。 |
chunkingProperties 参数 |
允许的值 | Description |
|---|---|---|
method |
fixedSize (default) 或 semantic. 从 REST API 开始 2026-05-01-preview 可用。 |
分块策略。
fixedSize 使用基于字符的开窗分块。
semantic 使用布局感知分块,尊重段落边界,并智能处理跨区块边界的大型表。 |
unit |
characters (含 fixedSize)或 tokens (通过 semanticREST API 开始 2026-05-01-preview 可用)。 |
控制 chunk unit 的基数。 仅支持和fixedSize + characters组合。semantic + tokens 如果 unit 省略,则从中 method推断出来。 |
maximumLength |
如果 unit 为 characters,介于 300 和 50,000 之间的整数。 如果 unit 为 tokens100 到 8,000 之间的整数,则为 100 到 8,000。 默认值为 500。 |
在配置的 unit区块长度中测量的最大区块长度。 |
overlapLength |
Integer. 该值必须小于一 maximumLength半。 |
两个文本区块之间的重叠长度。 仅当为 method.fixedSize 必须省略或设置为0何时methodsemantic。 |
技能输入
| 输入名称 | Description |
|---|---|
file_data |
应从中提取内容的文件。 |
输入 file_data 必须是定义为:
{
"$type": "file",
"data": "BASE64 encoded string of the file"
}
或者,可将其定义为:
{
"$type": "file",
"url": "URL to download the file",
"sasToken": "OPTIONAL: SAS token for authentication if the provided URL is for a file in blob storage"
}
可以通过以下方法之一生成文件引用对象:
将
allowSkillsetToReadFileData索引器定义上的参数设置为true. 此设置创建一个/document/file_data路径,该路径表示从 Blob 数据源下载的原始文件数据。 此参数仅适用于Azure Blob 存储中的文件。具有返回提供
$type、data或url和的sastokenJSON 对象定义的自定义技能。 参数$type必须设置为file,并且data必须是文件内容的 base 64 编码字节数组。url参数必须是一个有效的 URL,access才能在该位置下载文件。
技能输出
| 输出名称 | Description |
|---|---|
text_sections |
文本区块对象的集合。 每个区块可以跨越多个页面(考虑配置了任何其他分块)。 文本区块对象包括 locationMetadata (如果适用)以及 imagePath 当区块与文档中的数字跨度重叠时的列表。 |
normalized_images |
仅当包含extractionOptions时images适用。 从文档中提取的图像集合,包括 locationMetadata (如果适用)。 |
每个 text_sections 元素都有以下字段:
| 字段 | 类型 | Description |
|---|---|---|
id |
String | 区块的唯一标识符。 |
content |
String | 区块的 Markdown 内容。 届时methodsemantic,内容包括以 Markdown 形式内联的图形和表的 AI 生成的说明。 |
locationMetadata |
对象 | 页面范围和位置数据(pageNumberFrom、、pageNumberToordinalPosition、source)。 包含extractionOptions时locationMetadata显示 。 |
imagePath |
String | 分号分隔的区块中包含的图像的路径列表。 当区块与文档中的数字跨度重叠时出现。 |
每个 normalized_images 元素都有以下字段:
| 字段 | 类型 | Description |
|---|---|---|
id |
String | 图像的唯一标识符。 |
data |
String | Base64 编码的图像数据。 |
imagePath |
String | 对文档中图像的路径引用,例如 "figures/0"。 |
locationMetadata |
对象 | 页面范围和位置数据。 包含extractionOptions时locationMetadata显示 。 |
示例
第一个示例使用固定大小的分块,并演示如何输出固定大小的区块中的文本内容,以及文档的位置元数据。 第二个示例(从 2026-05-01-preview REST API 开始提供)通过 AI 生成的图像说明使用语义分块。
示例 1:使用图像和元数据提取固定大小的分块
{
"skills": [
{
"description": "Analyze a document",
"@odata.type": "#Microsoft.Skills.Util.ContentUnderstandingSkill",
"context": "/document",
"extractionOptions": ["images", "locationMetadata"],
"chunkingProperties": {
"unit": "characters",
"maximumLength": 1325,
"overlapLength": 0
},
"inputs": [
{
"name": "file_data",
"source": "/document/file_data"
}
],
"outputs": [
{
"name": "text_sections",
"targetName": "text_sections"
},
{
"name": "normalized_images",
"targetName": "normalized_images"
}
]
}
]
}
示例输出
{
"text_sections": [
{
"id": "1_d4545398-8df1-409f-acbb-f605d851ae85",
"content": "What is Azure Content Understanding (preview)?09/16/2025Important· Azure Al Content Understanding is available in preview. Public preview releases provide early access to features that are in active development.· Features, approaches, and processes can change or have limited capabilities, before General Availability (GA).. For more information, see Supplemental Terms of Use for Azure PreviewsAzure Content Understanding is a AI services Tool that uses generative AI to process/ingest content of many types (documents, images, videos, and audio) into a user-defined output format.Content Understanding offers a streamlined process to reason over large amounts of unstructured data, accelerating time-to-value by generating an output that can be integrated into automation and analytical workflows.<figure>\n\nInputs\n\nAnalyzers\n\nOutput\n\n0\nSearch\n\nContent Extraction\n\nField Extraction\n\nDocuments\n\nNew\n\nAgents\n\nPreprocessing\n\nEnrichments\n\nReasoning\n\nImage\n\nNormalization\n(resolution,\nformats)\n\nSpeaker\nrecognition\n\nGen Al\nContext\nwindows\n\nPostprocessing\nConfidence\nscores\nGrounding\nNormalization\n\nMulti-file input\nReference data\n\nDatabases\n\nVideo\n\nOrientation /\nde-skew\n\nLayout and\nstructure\n\nPrompt tuning\n\nStructured\noutput\n\nAudio\n\nFace grouping\n\nMarkdown or JSON schema\n\nCopilots\n\nApps\n\n\\+\n\nFaurIC\n\n</figure>",
"locationMetadata": {
"pageNumberFrom": 1,
"pageNumberTo": 1,
"ordinalPosition": 0,
"source": "D(1,0.6348,0.3598,7.2258,0.3805,7.223,1.2662,0.632,1.2455);D(1,0.6334,1.3758,1.3896,1.3738,1.39,1.5401,0.6338,1.542);D(1,0.8104,2.0716,1.8137,2.0692,1.8142,2.2669,0.8109,2.2693);D(1,1.0228,2.5023,7.6222,2.5029,7.6221,3.0075,1.0228,3.0069);D(1,1.0216,3.1121,7.3414,3.1057,7.342,3.6101,1.0221,3.6165);D(1,1.0219,3.7145,7.436,3.7048,7.4362,3.9006,1.0222,3.9103);D(1,0.6303,4.3295,7.7875,4.3236,7.7879,4.812,0.6307,4.8179);D(1,0.6304,5.0295,7.8065,5.0303,7.8064,5.7858,0.6303,5.7849);D(1,0.635,5.9572,7.8544,5.9573,7.8562,8.6971,0.6363,8.6968);D(1,0.6381,9.1451,5.2731,9.1476,5.2729,9.4829,0.6379,9.4803)"
}
},
...
{
"id": "2_e0e57fd4-e835-4879-8532-73a415e47b0b",
"content": "<table>\n<tr>\n<th>Application</th>\n<th>Description</th>\n</tr>\n<tr>\n<td>Post-call analytics</td>\n<td>Businesses and call centers can generate insights from call recordings to track key KPIs, improve product experience, generate business insights, create differentiated customer experiences, and answer queries faster and more accurately.</td>\n</tr>\n<tr>\n<th>Application</th>\n<th>Description</th>\n</tr>\n<tr>\n<td>Media asset management</td>\n<td>Software and media vendors can use Content Understanding to extract richer, targeted information from videos for media asset management solutions.</td>\n</tr>\n<tr>\n<td>Tax automation</td>\n<td>Tax preparation companies can use Content Understanding to generate a unified view of information from various documents and create comprehensive tax returns.</td>\n</tr>\n<tr>\n<td>Chart understanding</td>\n<td>Businesses can enhance chart understanding by automating the analysis and interpretation of various types of charts and diagrams using Content Understanding.</td>\n</tr>\n<tr>\n<td>Mortgage application processing</td>\n<td>Analyze supplementary supporting documentation and mortgage applications to determine whether a prospective home buyer provided all the necessary documentation to secure a mortgage.</td>\n</tr>\n<tr>\n<td>Invoice contract verification</td>\n<td>Review invoices and contr",
"locationMetadata": {
"pageNumberFrom": 2,
"pageNumberTo": 3,
"ordinalPosition": 3,
"source": "D(2,0.6438,9.2645,7.8576,9.2649,7.8565,10.5199,0.6434,10.5194);D(3,0.6494,0.3919,7.8649,0.3929,7.8639,4.3254,0.6485,4.3232)"
}
...
}
],
"normalized_images": [
{
"id": "1_335140f1-9d31-4507-8916-2cde758639cb",
"data": "aW1hZ2UgMSBkYXRh",
"imagePath": "aHR0cHM6Ly9henNyb2xsaW5nLmJsb2IuY29yZS53aW5kb3dzLm5ldC9tdWx0aW1vZGFsaXR5L0NVLnBkZg2/normalized_images_0.jpg",
"locationMetadata": {
"pageNumberFrom": 1,
"pageNumberTo": 1,
"ordinalPosition": 0,
"source": "D(1,0.635,5.9572,7.8544,5.9573,7.8562,8.6971,0.6363,8.6968)"
}
},
{
"id": "3_699d33ac-1a1b-4015-9cbd-eb8bfff2e6b4",
"data": "aW1hZ2UgMiBkYXRh",
"imagePath": "aHR0cHM6Ly9henNyb2xsaW5nLmJsb2IuY29yZS53aW5kb3dzLm5ldC9tdWx0aW1vZGFsaXR5L0NVLnBkZg2/normalized_images_1.jpg",
"locationMetadata": {
"pageNumberFrom": 3,
"pageNumberTo": 3,
"ordinalPosition": 1,
"source": "D(3,0.6353,5.2142,7.8428,5.218,7.8443,8.4631,0.6363,8.4594)"
}
}
]
}
locationMetadata基于Azure内容理解提供的 source 属性。 有关如何对文件中元素的视觉位置进行编码的信息,请参阅 Document 分析:提取结构化内容。
imagePath 表示存储图像的相对路径。 如果在技能集中配置了知识存储文件投影,则此路径与知识存储中存储的图像的相对路径匹配。
相关内容
- 内容理解(预览版)Azure 是什么?
- 内置技能
- 创建技能集
- 索引器 - 创建 (REST API)