Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
Azure内容理解技能使用 文档分析器从 Azure 内容理解>Azure Foundry Tools 中的内容理解分析非结构化文档和其他内容类型,生成可集成到自动化工作负荷中的有组织的可搜索输出。 此技能提取文本和图像,包括保留文档内每个图像位置的位置的位置元数据。 图像接近相关内容对于 多模式搜索、 代理检索和 检索扩充生成 (RAG)特别有用。
可以使用Azure内容理解技能进行内容提取和分块。 无需在技能集中使用文本拆分技能。 当 outputFormat 设置为 text 时,此技能实现与文档布局技能相同的接口,该技能使用 Foundry Tools 布局模型中的 Azure 文档智能。 但是,Azure内容理解技能在文档布局技能上提供了多种优势:
表和数字采用 Markdown 格式输出,使大型语言模型(LLM)更易于理解。 相反,文档布局技能将表和图形输出为纯文本,这可能会导致信息丢失。
对于跨多个页面的表,文档布局技能逐页提取表页。 Azure内容理解技能可以将跨页表识别和提取为单个单元。
文档布局技能将区块限制为单个页面,但语义单元(如跨页表)不应受到页面边界的限制。 Azure内容理解技能允许区块跨越多个页面。
Azure内容理解技能比文档布局技能更具成本效益,因为内容理解 API 的成本更低。
Azure内容理解技能绑定到 billable Microsoft Foundry 资源。 与其他 Azure AI 资源技能(如 Document 布局技能不同,Azure内容理解技能每天不提供 20 个免费文档。 此技能的执行按 Azure 内容理解价格收费。
小窍门
可以在执行图像语言化和区块矢量化的技能集中使用Azure内容理解技能。 在以下教程中,将文档布局技能替换为Azure内容理解技能。
局限性
Azure内容理解技能具有以下限制:
此技能不适用于内容理解文档分析器中需要 5 分钟以上的处理的大型文档。 技能超时,但费用仍适用于附加到技能组的 Foundry 资源。 确保文档经过优化,以保持在处理限制范围内,以避免不必要的成本。
此技能调用Azure内容理解文档分析器,因此所有记录不同文档类型的服务行为应用于其输出。 例如,Word (DOCX) 和 PDF 文件可能会产生不同的结果,因为图像处理方式存在差异。 如果需要跨 DOCX 和 PDF 的一致图像行为,请考虑将文档转换为 PDF 或查看 多模式搜索文档 以获取替代方法。
支持的区域
Azure内容理解技能调用 Content Understanding 2025-11-01 REST API。 Foundry 资源必须位于受支持的区域中,Azure内容理解区域和语言支持中所述。
search service可以位于任何 supported Azure AI Search 区域中。 当 Foundry 资源和 Azure AI Search service不在同一区域时,跨区域网络延迟会影响索引器的性能。
支持的文件格式
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 |
|---|---|---|
unit |
Characters 是唯一允许的值。 区块长度以字符而不是单词或标记来度量。 |
控制 chunk unit 的基数。 |
maximumLength |
介于 300 和 50000 之间的整数。 | 度量值 String.Length的最大区块长度(以字符为单位)。 |
overlapLength |
Integer. 该值必须小于一 maximumLength半。 |
在两个文本块之间提供的重叠长度。 |
技能输入
| 输入名称 | 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 Storage中的文件。具有返回提供
$type、data或url和的sastokenJSON 对象定义的自定义技能。 参数$type必须设置为file,并且data必须是文件内容的 base 64 编码字节数组。url参数必须是一个有效的 URL,access才能在该位置下载文件。
技能输出
| 输出名称 | Description |
|---|---|
text_sections |
文本区块对象的集合。 每个区块可以跨越多个页面(考虑配置了任何其他分块)。 文本区块对象包括 locationMetadata (如果适用)。 |
normalized_images |
仅当包含extractionOptions时images适用。 从文档中提取的图像集合,包括 locationMetadata (如果适用)。 |
Example
此示例演示如何输出固定大小的区块中的文本内容,以及如何从文档中提取图像以及位置元数据。
包含图像和元数据提取的示例定义
{
"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 Foundry 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 表示存储图像的相对路径。 如果在技能集中配置了知识存储文件投影,则此路径与知识存储中存储的图像的相对路径匹配。