4.1Structured outputs for text analysis
For new work, sentiment, topics, entities and summaries come from an LLM that must return JSON matching your schema.
From CCA-F: The CCA-F pattern of forcing a tool call with a strict input_schema to get reliable JSON. Azure's version: response_format with a JSON schema and strict: true.
How it works
- Write the schema (or a Pydantic model)
- responses.parse(..., text_format=Model) or response_format={json_schema, strict: true}
- Read typed fields; handle refusals
Must know
- Strict mode: every property listed in required, additionalProperties: false.
- JSON mode guarantees valid JSON, not your schema.
- Optional fields: make the type nullable rather than leaving them out of required.
Traps
- "JSON mode with an example" is the runner-up when the stem says code must rely on the shape.
- Language sentiment or summarisation for a new service = legacy feature.
Check yourself: d4-q23 · d4-c1 · Microsoft Learn
4.2Azure Language: what's still core
PII detection, named entities, language detection and health text stay with Azure Language.
From CCA-F: New for you. CCA-F had no managed NLP service; think of these as deterministic, pre-built tools you'd call instead of prompting.
How it works
- Create a TextAnalyticsClient with Entra ID
- recognize_pii_entities(docs, language=...)
- Use redacted_text downstream
Must know
- PII detection returns entities and redacted_text.
- You can limit PII categories with categories_filter.
- Text Analytics for health extracts medical entities and relations.
- Custom NER is trained on your labelled examples.
Traps
- PII redaction doesn't need an LLM: Language returns the redacted text.
- Detecting language first is often the step before translation.
Check yourself: d4-n1 · d4-y1 · Microsoft Learn
Several Language features still work but are legacy: don't build new on them.
From CCA-F: New for you. Retirement dates are a favourite distractor: the working-but-retiring service is the runner-up.
How it works
- Retired → never pick
- Legacy → don't pick for new work
- Core → fine
Must know
- Retired: LUIS (31 Mar 2026).
- Legacy, retire 31 Mar 2029: sentiment and opinion mining, key phrases, summarisation, CLU, custom question answering, custom text classification.
- Entity linking: retires 1 Sep 2028.
- Language Studio moves into Foundry (studio retires 20 Mar 2027).
Traps
- Entity linking retires a year before the other legacy features.
- "Use CLU" for a new intent model: legacy; an LLM with structured outputs or an agent is the forward path.
Check yourself: d4-y1 · Microsoft Learn