Azure Document Intelligence for Java
Gives Java developers practical patterns for extracting and classifying data with Azure Document Intelligence.
The skill uses environment variables for endpoints, credentials, and API keys rather than instructing users to hard-code secrets, and its described operations are generally scoped to document analysis and model management. However, it does not disclose the document data flow to Azure, provide sensitive-ID handling or retention guidance, or require confirmation, rollback, or recovery for the model deletion example; external URLs and SAS sources also lack security boundaries. These omissions warrant substantial deductions.
SKILL.md and examples.md cover synchronous, asynchronous, administration, polling, and basic HTTP-error paths. However, the stated latest GA version is 1.0.7 while the installation example pins 1.0.0, examples often omit complete dependency/import context, and timeout, polling failure, malformed-input, and service-edge handling are thin. Static evidence cannot establish compilation or execution, so the score remains below the static ceiling.
The Java audience, trigger phrases, and scenarios for invoices, receipts, IDs, layout, custom models, and classification are relatively clear. Non-fit cases, input constraints, regional/API compatibility boundaries, and exclusion triggers are under-specified, and there is no Chinese-language guidance. The core function depends on Azure cloud endpoints without discussing mainland-China network, regional availability, or alternatives, so points are deducted.
The main document plus references/examples.md provides useful progressive disclosure, installation, authentication, environment variables, migration mapping, error handling, model listings, and MIT licensing. It lacks skill-specific versioning, changelog, named maintenance responsibility, and a clear update path; the 1.0.7 versus 1.0.0 dependency mismatch and incomplete troubleshooting/FAQ coverage further reduce maintainability.
The material supplies directly relevant patterns for client construction, file/URL analysis, field and table extraction, custom models, classification, async usage, migration, and errors. Nevertheless, users must manually verify SDK-version compatibility, imports, permissions, regional resources, and data-protection requirements; no static evidence verifies representative outputs or direct execution. The score is therefore limited to 6 under the static calibration.
The skill includes traceable links to an Azure SDK migration guide and Microsoft Learn, while repository context shows CI/evaluation workflows. There is no skill-specific committed test suite, compile result, or third-party execution evidence covering these key paths, and citations do not cover all material claims, so verifiability is limited.
- The dependency example uses azure-ai-documentintelligence 1.0.0 while the document identifies 1.0.7 as latest GA; verify the installed API before implementation.
- IDs, invoices, and receipts may contain sensitive data, but upload, retention, regional, and access-control requirements are not documented.
- The model-deletion example lacks confirmation, backup, or recovery guidance and may be irreversible.
- Reachability, regional compliance, and mainland-China network suitability for Azure endpoints and external sample URLs are not addressed.
What it does & when to use it
This skill is for Java developers using the Azure AI Document Intelligence SDK. It covers extraction of text, tables, selection marks, key-value fields, and structured data from receipts, invoices, identity documents, and other files. It explains synchronous, asynchronous, administration, API-key, and DefaultAzureCredential client setup. It also includes prebuilt models, custom model and classifier management, error handling, and migration from the older Form Recognizer SDK.
It guides developers through adding com.azure:azure-ai-documentintelligence and optionally azure-identity, setting DOCUMENT_INTELLIGENCE_ENDPOINT and related environment variables, building clients, and starting analysis from local files or URLs. The examples read pages, lines, selection marks, tables, and analyzed document fields; use prebuilt models for receipts, invoices, IDs, contracts, and other supported documents; build and manage custom models and classifiers; and catch HttpResponseException. Before implementation, it directs the user to query the microsoft-docs MCP and verify API parameters against the installed SDK version.
- A Java backend needs to extract text, layout, tables, or selection marks from PDF documents.
- A finance application needs to read merchant names, transaction dates, and other fields from receipts or invoices.
- An identity or workflow application needs to analyze passports, licenses, contracts, or US tax forms.
- A team handling non-standard documents needs to build, list, retrieve, or delete custom document models.
- A document intake system needs to distinguish document types such as invoices and receipts with a custom classifier.
Pros & cons
- Covers file and URL analysis, prebuilt models, custom models, and document classification.
- Includes API-key, DefaultAzureCredential, synchronous-client, and asynchronous-client examples.
- Provides a migration table from azure-ai-formrecognizer to azure-ai-documentintelligence.
- Includes practical patterns for options, model administration, and HTTP error handling.
- Requires an Azure Document Intelligence resource, endpoint, and authentication setup.
- The source instructs users to query the microsoft-docs MCP to verify current API parameters.
- No standalone test suite, performance data, or cost information is provided.
- Some older models are retired in API version 2024-11-30, which may require migration work.
How to install
Run npx skills add microsoft/skills and select azure-ai-formrecognizer-java in the installation wizard. The skill is located at .github/plugins/azure-sdk-java/skills/azure-ai-formrecognizer-java/. Add com.azure:azure-ai-documentintelligence to the Java project; add com.azure:azure-identity when using DefaultAzureCredential. The source examples use versions 1.0.0 and 1.14.2 respectively, while identifying 1.0.7 as the latest GA version; verify the version actually installed before implementation.
How to use
After installation, trigger it with a prompt such as “Extract text and tables from a PDF with Java Document Intelligence” or “Analyze an invoice in Java and read its fields.” Configure DOCUMENT_INTELLIGENCE_ENDPOINT; for production use of DefaultAzureCredential, configure AZURE_TOKEN_CREDENTIALS=prod. Then use the documented beginAnalyzeDocument, beginClassifyDocument, or administration-client patterns. The source does not provide a standalone run script or complete project template.
Compared to similar skills
The source explicitly compares the new azure-ai-documentintelligence package with the legacy azure-ai-formrecognizer package. The legacy package targets API version 2023-07-31, while new projects should use Document Intelligence. The retired prebuilt-businessCard and prebuilt-document models require the legacy package according to the source.