
- Extract text and layout from incoming contracts (OCR for scanned pages).
- Identify, label, and tag legal clauses (domain-specific classification).
- Summarize or surface only the relevant parts and flag risky or sensitive content.
- Return enriched fields and metadata so Azure AI Search can index the enhanced content.

- Enhanced document processing: Connect to Document Intelligence (formerly Form Recognizer) to extract structured data—tables, key-value pairs, and named fields—from unstructured PDFs and scanned forms (invoices, contracts, receipts).
- Machine learning model integration: Call Azure Machine Learning or other hosted models to run sentiment analysis, domain-tuned classification, intent extraction, or entity linking.
- Custom business logic and governance: Apply rules to tag high-risk clauses, redact personally identifiable information (PII), compute compliance scores, or run transformations before indexing.

| Resource Type | Typical Purpose | Example |
|---|---|---|
| Document Intelligence | Extract structured fields and tables | Parse invoices, receipts, and contracts |
| Azure Machine Learning | Domain-specific model scoring | Classify clause types or risk levels |
| Custom API / Business Logic | Rule-based transformations, redaction | Tag high-risk clauses, redact PII |
- Implementation: Custom skills are web APIs (HTTP endpoints). Host them on Azure Functions, App Service, containers, or any HTTPS-accessible service.
- Invocation: The Azure AI Search enrichment pipeline sends data to the custom skill via HTTP POST. The skill processes inputs and returns structured JSON that the pipeline consumes for further enrichment or indexing.
- Contract: The skill receives a “values” array of records and must return a “values” array mapping recordIds to outputs so the pipeline can correlate results.
Custom skills follow a simple JSON contract: send a “values” array of input records and return a “values” array with matching recordIds and enriched outputs. Ensuring this schema is implemented correctly lets the enrichment pipeline map inputs to outputs reliably.

- Azure AI Search — What is Azure Search?
- Azure Functions overview
- Document Intelligence (Form Recognizer) overview
- Azure Machine Learning documentation