Skip to main content
Welcome to this lesson on text analysis in Azure. This guide covers two complementary approaches for extracting meaning from text:
  • Flexible, prompt-driven general-purpose AI models (e.g., GPT-style models).
  • Specialized Azure Language capabilities with pre-built, production-ready NLP features.
We first explore general-purpose models and a practical example, then review Azure Language and when to choose it. By the end, you’ll know which approach fits different scenarios and how to get started in the Azure portal.

Text analysis with general-purpose AI models

General-purpose AI models are designed to handle many language tasks through natural-language prompts instead of requiring a different model for every task. You describe what you want in plain language and the model returns the result. Common tasks you can perform with a single general-purpose model:
  • Key phrase extraction: Identify important words or phrases (e.g., “excellent battery life”, “bright display”).
  • Named Entity Recognition (NER): Detect entities like people, organizations, locations, and dates.
  • Sentiment analysis: Determine tone (positive, negative, neutral).
  • Text summarization: Create concise summaries that capture the main points.
The big advantage: you can ask for different analyses without switching services or endpoints—just change the prompt.
A slide titled "Text Analysis With General-Purpose AI Models" that says natural language prompts can handle text analysis without task-specific models. Four labeled boxes list Key Phrase Extraction, Named Entity Recognition, Sentiment Analysis, and Text Summarization with colorful icons.

Example: prompt-driven extraction

Below is a simple playground-style example that shows how you can extract locations using a single prompt (for example using gpt-4.1-mini or a similar general-purpose model):
Example model output:
This interaction shows how the model interprets your instruction and returns only the requested information, without you having to build explicit extraction rules.
General-purpose models are ideal for exploratory workflows, rapid prototyping, and tasks that change frequently—because you can refine or expand the prompt at any time.
Important: Outputs from general-purpose models can be non-deterministic. Responses may vary between runs (especially when generation settings like temperature allow randomness). For production systems that require highly consistent, structured outputs, you may need additional validation or post-processing.

Text analysis with Azure Language

Azure Language provides specialized, pre-built NLP features that return structured results suited for production use. Instead of one flexible model, you get focused tools designed for specific tasks with predictable, structured outputs. Key Azure Language capabilities:
  • PII detection and redaction: Detect and optionally redact personally identifiable information (names, addresses, emails, phone numbers, SSNs), returning labeled entities or redacted text.
  • Language detection: Automatically identify the language of a text to route content appropriately.
  • Named Entity Recognition (NER): Detect entities (type, text, and character offsets).
  • Text Analytics for health: Domain-specific extraction for clinical concepts—conditions, medications, procedures.
  • Confidence scores: Each detected item typically includes a confidence value to support deterministic handling.
These features are useful when your workflow requires consistent output formats, compliance controls, or high-volume processing.
A screenshot of an Azure AI Language web UI titled "Text Analysis With Azure AI Language," showing a "Text PII redaction" playground. The interface highlights detected PII in sample text (dates, names, organizations, addresses, SSNs) and lists extraction results in a sidebar.
When redaction is enabled, the service can return text with sensitive values replaced by labels (for example, [PERSON] or [ADDRESS]) and provide the extracted items and confidence scores separately so downstream systems do not process raw PII.

Choosing the right approach

Use this quick reference to decide which approach fits your needs.
A slide titled "Choosing the Right Approach" comparing "General-Purpose AI Models" and "Azure Language in Foundry Tools." Each column lists key points — flexible, prompt-driven NLP and natural-language responses on the left, and structured, production-grade results with confidence scores and compliance features on the right.

Summary and next steps

  • Choose general-purpose models for flexibility, conversational outputs, and rapid iteration.
  • Choose Azure Language for deterministic, structured, and compliance-focused text analysis at scale.
  • In many workflows you may combine both: use general-purpose models for higher-level understanding and Azure Language for downstream, structured processing and compliance.
Proceed to the Azure portal to try sample projects, the Language Studio, and the PII redaction playground to evaluate which approach fits your use case.

Watch Video