azure-ai-document-intelligence-dotnet 是什么?
此 Skill 指导 .NET 使用 Azure.AI.DocumentIntelligence 分析文档。按输入用途选择预建 read/layout/invoice/receipt 等模型,也可管理专用模型与分类器。返回字段可能带置信度,适合人工校验或后续业务流程,不宜把提取值无条件当成事实。
中文说明由本站依据来源整理;英文原文保留在页面下方。
怎么接入你的 Agent?
- 定位完整 Skill 目录
打开本项目来源,核对
SKILL.md及其引用的脚本和资料。 - 交给你正在用的 Agent
在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。
- 确认识别,再做具体任务
让 Agent 回报安装目录和识别到的名称
azure-ai-document-intelligence-dotnet,然后按本页使用示例提供材料。
展开并复制给 Codex 的安装指令
安装并检查 azure-ai-document-intelligence-dotnet
请在 Codex 的当前工作环境中安装并检查 azure-ai-document-intelligence-dotnet 这个 Skill。
项目身份:microsoft/skills / azure-ai-document-intelligence-dotnet
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Claude Code 的安装指令
安装并检查 azure-ai-document-intelligence-dotnet
请在 Claude Code 的当前工作环境中安装并检查 azure-ai-document-intelligence-dotnet 这个 Skill。
项目身份:microsoft/skills / azure-ai-document-intelligence-dotnet
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 Cursor 的安装指令
安装并检查 azure-ai-document-intelligence-dotnet
请在 Cursor Agent 的当前工作环境中安装并检查 azure-ai-document-intelligence-dotnet 这个 Skill。
项目身份:microsoft/skills / azure-ai-document-intelligence-dotnet
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。展开并复制给 当前 Agent 的安装指令
安装并检查 azure-ai-document-intelligence-dotnet
请在 当前 Agent 的当前工作环境中安装并检查 azure-ai-document-intelligence-dotnet 这个 Skill。
项目身份:microsoft/skills / azure-ai-document-intelligence-dotnet
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md
1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。装好以后,具体怎么用?
准备哪些材料
- 安装 Azure.AI.DocumentIntelligence 与 Azure.Identity,设置 DOCUMENT_INTELLIGENCE_ENDPOINT;Entra 身份按源文要求使用资源自定义子域名。
- 准备服务可读取的测试文档 URL;训练模型另需训练样本和 Blob SAS 权限。
- 使用 key 时从安全配置读取;生产环境优先基于项目身份授权。
实际使用顺序
- 先决定目标是OCR全文/版面、票据抽字段、还是自定义字段;分别选 prebuilt-read、prebuilt-layout、prebuilt-invoice/receipt。
- 用 AnalyzeDocumentAsync 发起操作并等待完成;按 DocumentField.FieldType 读取字符串、金额、日期或列表,校验字段存在。
- 对表格或阅读顺序需求读取 Pages/Lines/Tables;不要把页面行数当作模型质量指标。
- 只有预建模型无法满足字段定义时才用行政客户端训练自定义模型;建设前检查数据集、SAS可访问性与模型配额。
从一个具体任务开始
本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。
复制一个具体任务
请为现有 .NET 测试程序写一个仅分析测试发票的最小示例,使用 prebuilt-invoice,从 DOCUMENT_INTELLIGENCE_ENDPOINT 认证,并安全地检查 VendorName、InvoiceTotal 字段类型及置信度。不要访问外部 URL 或创建模型。得到一次分析调用草案和字段校验逻辑;文档未实际上传或分析。
使用条件与边界
- 源文的示例 URL 和 SAS 均为占位符,不是可直接使用的文件或凭证。
- 抽取置信度表示模型对字段的估计,低置信字段仍需针对业务复核。
- BuildModel/BuildClassifier 会创建服务端资源,删除模型会造成真实资源变更。
常见问题
只想从PDF取文字,应该选哪个模型?
先看是否只需OCR文字:用 prebuilt-read;需要布局、表格、选择标记则考虑 prebuilt-layout。
为什么 Entra 登录认证失败?
先核对 endpoint 是否为资源自定义子域名,并确认当前身份对资源有调用权限;仅能登录 Azure 不代表具有服务数据面权限。
来源原文与资料状态
- 源文件
- 已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
- 中文使用说明
- 已针对下方源文件版本整理用途、用法和常见问题
- 安装与任务测试
- 本站未执行安装或任务测试
- 来源复核
- 本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料
.github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z
以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。
抓取成功不代表已完成安装或任务测试。
Azure AI Document Intelligence SDK for .NET. Extract text, tables, and structured data from documents using prebuilt and custom models. Use for invoice processing, receipt extraction, ID document analysis, and custom document models. Triggers: "Document Intelligence", "DocumentIntelligenceClient", "form recognizer", "invoice extraction", "receipt OCR", "document analysis .NET".
查看源文件章节 / Source sections
- 原文:Azure.AI.DocumentIntelligence (.NET)
- 安装 / Installation
- 原文:Environment Variables
- 原文:Authentication
- 原文:Microsoft Entra Token Credential
- 原文:API Key
- 原文:Client Types
- 原文:Prebuilt Models
- 原文:Core Workflows
- 原文:1. Analyze Invoice
- 原文:2. Extract Layout (Text, Tables, Structure)
- 原文:3. Analyze Receipt
- 原文:4. Build Custom Model
- 原文:5. Build Document Classifier
- 原文:6. Classify Document
- 原文:7. Manage Models
- 原文:Key Types Reference
- 原文:Build Modes
- 原文:Best Practices
- 原文:Error Handling
- 原文:Related SDKs
- 原文:Reference Links
原文:Azure.AI.DocumentIntelligence (.NET)
Extract text, tables, and structured data from documents using prebuilt and custom models.
安装 / Installation
```bash dotnet add package Azure.AI.DocumentIntelligence dotnet add package Azure.Identity ``` **Current Version**: v1.0.0 (GA)
原文:Environment Variables
```bash DOCUMENT_INTELLIGENCE_ENDPOINT=https://<resource-name>.cognitiveservices.azure.com/ # Required: Document Intelligence endpoint DOCUMENT_INTELLIGENCE_API_KEY=<your-api-key> # Only required for AzureKeyCredential auth BLOB_CONTAINER_SAS_URL=https://<storage>.blob.core.windows.net/<container>?<sas-token> # Optional: blob container SAS URL for training data AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production ```
原文:Microsoft Entra Token Credential
```csharp using Azure.Identity; using Azure.AI.DocumentIntelligence; string endpoint = Environment.GetEnvironmentVariable("DOCUMENT_INTELLIGENCE_ENDPOINT"); // Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential> var credential = new DefaultAzureCredential( DefaultAzureCredential.DefaultEnvironmentVariableName ); // Or use a specific credential directly in production: // See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#credential-classes // var credential = new ManagedIdentityCredential(); var client = new DocumentIntelligenceClient(new Uri(endpoint), credential); ``` > **Note**: Entra ID requires a **custom subdomain** (e.g., `https://<resource-name>.cognitiveservices.azure.com/`), not a regional endpoint.
原文:API Key
```csharp string endpoint = Environment.GetEnvironmentVariable("DOCUMENT_INTELLIGENCE_ENDPOINT"); string apiKey = Environment.GetEnvironmentVariable("DOCUMENT_INTELLIGENCE_API_KEY"); var client = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(apiKey)); ```
原文:Client Types
| Client | Purpose | |--------|---------| | `DocumentIntelligenceClient` | Analyze documents, classify documents | | `DocumentIntelligenceAdministrationClient` | Build/manage custom models and classifiers |
文件 SHA256:1001dec59391d6c024c21d74db6f99cbf92c9ff868e18cd2d57cde4ea743c5d6
仓库许可证记录:MIT;skill-declaration-captured-not-interpreted,查看来源。
Azure AI Document Intelligence SDK for .NET. Extract text, tables, and structured data from documents using prebuilt and custom models. Use for invoice processing, receipt extraction, ID document analysis, and custom document models. Triggers: "Document Intelligence", "DocumentIntelligenceClient", "form recognizer", "invoice extraction", "receipt OCR", "document analysis .NET".
历史收录数据
| 来源仓库 | microsoft/skills |
|---|---|
| Skill源路径 | .github/plugins/azure-sdk-dotnet/skills/azure-ai-document-intelligence-dotnet/SKILL.md |
安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。
