This chapter covers Natural Language Processing (NLP), a core AI workload that enables computers to understand, interpret, and generate human language. For the AI-900 exam, NLP appears in roughly 20–25% of questions, focusing on key concepts, Azure services (Text Analytics, Translator, Speech, LUIS, QnA Maker), and common use cases. You will learn what NLP is, how it works at a high level, and exactly what the exam expects you to know about Azure NLP services.
Jump to a section
Imagine a diplomatic meeting where delegates speak English, French, Mandarin, and Arabic. Each delegate has a personal interpreter who listens to their native language, extracts the intended meaning (not just words), and then re-expresses that meaning in the target language, adjusting for idioms, tone, and cultural context. The interpreter doesn't just swap words; they understand that 'raining cats and dogs' means heavy rain, not actual animals. Similarly, NLP systems break down human language into tokens, parse grammatical structure, resolve ambiguity (e.g., 'bank' as river bank vs. financial bank), and then generate a structured representation (like intent and entities) that a computer can act on. Just as an interpreter must handle accents, homonyms, and incomplete sentences, NLP models handle typos, slang, and context. The process involves multiple stages: tokenization (splitting text into words/subwords), part-of-speech tagging, named entity recognition, dependency parsing, and semantic role labeling — each analogous to an interpreter's real-time analysis. The final output is a machine-readable form (e.g., JSON with intent and entities) that triggers downstream actions, like a translator conveying the delegate's request to the chair.
What is NLP and Why Does It Exist?
Natural Language Processing (NLP) is a subfield of artificial intelligence concerned with the interaction between computers and human (natural) language. The goal is to enable computers to read, decipher, understand, and generate human language in a way that is valuable. NLP exists because traditional programming cannot handle the ambiguity, variability, and richness of human language. For example, the sentence 'I saw her duck' could mean I saw a bird owned by her, or I saw her lower her head. Without context, a computer cannot choose the correct meaning. NLP provides the techniques to resolve such ambiguities.
How NLP Works Internally
NLP systems typically follow a pipeline: 1. Tokenization: Splitting text into tokens (words, subwords, or characters). For example, 'I love AI' becomes ['I', 'love', 'AI']. 2. Part-of-Speech (POS) Tagging: Assigning grammatical tags (noun, verb, adjective) to each token. 3. Named Entity Recognition (NER): Identifying entities like people, organizations, locations, dates, etc. For example, 'Microsoft' -> Organization. 4. Dependency Parsing: Analyzing grammatical structure to determine relationships between words. For example, 'John hit the ball' -> subject (John) verb (hit) object (ball). 5. Semantic Role Labeling: Assigning roles like agent, patient, instrument. 6. Coreference Resolution: Determining when different words refer to the same entity (e.g., 'John' and 'he'). 7. Sentiment Analysis: Determining the emotional tone (positive, negative, neutral). 8. Intent Recognition: Identifying the user's goal in a query (e.g., 'Book a flight' -> intent: BookFlight). 9. Entity Extraction: Pulling out specific data points like dates, numbers, product names.
Modern NLP often uses deep learning models like transformers (e.g., BERT, GPT) that process entire sentences in parallel, capturing context bidirectionally. These models are pre-trained on massive corpora and fine-tuned for specific tasks.
Key Components in Azure NLP Services
Azure offers several NLP services under the 'Cognitive Services' umbrella: - Text Analytics: Provides sentiment analysis, key phrase extraction, language detection, and named entity recognition. It works with text input and returns JSON results. - Translator: A cloud-based machine translation service supporting over 100 languages. It uses statistical and neural machine translation. - Speech Services: Includes speech-to-text, text-to-speech, speech translation, and speaker recognition. It uses acoustic and language models. - Language Understanding (LUIS): Extracts intents and entities from conversational text. It is used to build language models for applications like chatbots. - QnA Maker: Creates a question-and-answer service from semi-structured content like FAQs, product manuals, or web pages. It uses a knowledge base to match questions to answers.
Configuration and Verification
To use these services in Azure, you create a resource (e.g., 'Cognitive Services' or a specific service like 'Text Analytics') in the Azure portal. You then get an endpoint URL and subscription key. Example using Text Analytics with Python:
import requests
import json
endpoint = "https://your-resource.cognitiveservices.azure.com/"
key = "your-key"
documents = {"documents": [{"id": "1", "language": "en", "text": "I love Azure AI!"}]}
headers = {"Ocp-Apim-Subscription-Key": key, "Content-Type": "application/json"}
response = requests.post(endpoint + "/text/analytics/v3.0/sentiment", headers=headers, json=documents)
print(response.json())How NLP Interacts with Related Technologies
NLP often works with other AI workloads: - Computer Vision: Combined with OCR (Optical Character Recognition) to extract text from images, which is then processed by NLP. - Conversational AI: NLP is the core of chatbots (using LUIS or QnA Maker) that understand user queries and generate responses. - Search: NLP improves search engines by understanding query intent and content semantics. - Speech: Speech-to-text converts audio to text, which is then analyzed by NLP for sentiment, entities, etc.
Exam-Relevant Details
The AI-900 exam expects you to know the capabilities of each NLP service, not deep technical implementation.
For Text Analytics: Sentiment analysis returns a score from 0 to 1 (negative to positive). Key phrase extraction returns a list of important phrases. Language detection returns the language name and ISO code.
For Translator: Supports text translation, transliteration (converting text from one script to another), language detection, and dictionary lookup.
For LUIS: You define intents (user goals) and entities (data points). The service returns the top intent and extracted entities with confidence scores.
For QnA Maker: You create a knowledge base from sources like URLs or uploaded documents. The service returns the best answer with a confidence score.
For Speech: Speech-to-text returns a JSON with the recognized text and confidence. Text-to-speech accepts SSML (Speech Synthesis Markup Language) for fine control.
Common Exam Traps
Candidates often confuse Text Analytics with LUIS: Text Analytics is for general text analysis (sentiment, entities), while LUIS is specifically for understanding user intent in conversational contexts.
Another trap: Thinking that QnA Maker can handle open-ended conversation. Actually, QnA Maker is for FAQ-style Q&A; for more complex dialogue, you need LUIS or a bot framework.
The exam may ask which service to use for extracting product names from customer reviews. The answer is Text Analytics (Named Entity Recognition), not LUIS.
For translating a document while preserving formatting, the exam expects Translator with document translation feature (batch translation).
Input Text Acquisition
The NLP system receives raw text from various sources: user input via API, file upload, speech recognition output, or database query. The text may contain noise like typos, HTML tags, or inconsistent encoding. Preprocessing steps like cleaning (removing HTML, normalizing Unicode) are applied. The system also detects the language (if not specified) using language detection models that analyze character n-grams and common words. This step is crucial because downstream components depend on correct language identification.
Tokenization and Segmentation
The cleaned text is split into tokens (words, punctuation, subwords). For languages like English, tokenization is straightforward using whitespace and punctuation. For Chinese or Japanese, word segmentation is required because words are not separated by spaces. Subword tokenization (e.g., Byte-Pair Encoding) handles rare words by breaking them into known subword units. The output is a list of tokens with their positions in the original text. Tokenization is language-dependent and uses rules or trained models.
Syntactic and Semantic Analysis
The tokens undergo part-of-speech tagging (e.g., NN for noun, VB for verb), dependency parsing to build a tree of grammatical relationships, and named entity recognition to identify entities. Semantic analysis resolves ambiguity using context (e.g., word sense disambiguation). For example, 'bank' in 'river bank' vs. 'bank account' is disambiguated by surrounding words. This step produces a structured representation like a parse tree or semantic graph that captures meaning.
Intent and Entity Extraction
In conversational AI (LUIS), the system identifies the user's intent (e.g., 'BookFlight') and extracts entities (e.g., 'destination': 'Paris', 'date': 'tomorrow'). This is done using trained models that classify the text into predefined intents and tag spans of text as entities. Confidence scores are assigned to each intent and entity. The top intent is selected based on score. If scores are low, the system may prompt for clarification.
Response Generation and Output
Based on the extracted intent and entities, the system generates a response. For a chatbot, this could be a pre-defined answer from a knowledge base (QnA Maker) or a dynamically generated sentence using language generation models. For translation, the system outputs translated text. For sentiment analysis, it returns a score. The output is typically formatted as JSON and returned to the caller. Performance metrics like latency and throughput are monitored.
Enterprise Scenario 1: Customer Support Chatbot
A large telecom company deploys a chatbot using Azure Bot Service with LUIS and QnA Maker to handle common customer inquiries. The bot identifies intents like 'CheckBill', 'ReportOutage', and 'ChangePlan'. LUIS extracts entities such as account number and date. QnA Maker provides answers from a knowledge base built from the company's FAQ and support articles. The bot handles over 10,000 conversations daily, reducing call center load by 40%. Common issues include low confidence scores when users phrase queries in unexpected ways, requiring retraining with new utterances. Misconfiguration occurs when intents overlap (e.g., 'ChangePlan' vs. 'UpgradePlan') leading to wrong routing. The solution is to combine similar intents or add more training examples.
Enterprise Scenario 2: Sentiment Analysis for Brand Monitoring
A retail company uses Text Analytics to analyze customer reviews and social media posts about their products. They process millions of documents per day to track sentiment trends and identify emerging issues. The service returns sentiment scores (positive, negative, neutral) and key phrases. For example, a spike in negative sentiment with the key phrase 'battery life' prompts a product recall. Performance considerations: The service is rate-limited (e.g., 1000 requests per minute per resource), so the company uses multiple resources and queues. Misconfiguration: If the language is not correctly detected (e.g., mixed-language reviews), sentiment accuracy drops. They use the language detection feature first, then route to the appropriate language model.
Enterprise Scenario 3: Multilingual Document Translation
A global law firm uses Azure Translator to translate legal documents between English, French, German, and Japanese. They use the document translation feature to preserve formatting (PDF, Word). The service handles batch translation with custom glossaries for legal terminology. Throughput is about 1000 pages per hour. Common issues: Untranslated terms due to missing glossary entries, and formatting errors in complex tables. The firm mitigates by using custom translation models trained on their domain-specific data. Misconfiguration: Using the wrong endpoint (text vs. document) leads to errors. They verify by checking the response contains the expected translation and metadata.
Exactly What AI-900 Tests
AI-900 objective 4.1: 'Describe features of NLP workloads on Azure.' The exam expects you to:
Identify which Azure service to use for a given NLP task (Text Analytics, Translator, LUIS, QnA Maker, Speech).
Understand the basic capabilities of each service (e.g., Text Analytics does sentiment, key phrases, entities, language detection).
Recognize common use cases: sentiment analysis for social media, translation for multi-language content, chatbots using LUIS/QnA, speech-to-text for transcription.
Know that LUIS is for intent and entity extraction, QnA Maker for FAQ-style Q&A.
Understand that NLP models are pre-trained and can be customized with your data (custom entities in LUIS, custom translation models).
Common Wrong Answers and Why
Using LUIS for sentiment analysis: LUIS is for intent recognition, not general sentiment. Candidates confuse the two because both process text. Correct service: Text Analytics.
Using QnA Maker for open-ended conversation: QnA Maker returns a single answer from a knowledge base, not a dialogue. For multi-turn conversations, you need a bot framework with LUIS.
Thinking Translator can handle speech: Translator is for text. For speech translation, use Speech Services.
Believing Text Analytics can extract intents: Text Analytics does not do intent recognition; it does sentiment, entities, key phrases, language detection.
Specific Numbers and Terms to Memorize
Sentiment score: 0 (negative) to 1 (positive).
LUIS: intents, entities, utterances.
QnA Maker: knowledge base, confidence score.
Speech-to-text: returns JSON with 'DisplayText' and 'Confidence'.
Translator: supports over 100 languages.
Edge Cases the Exam Loves
Mixed language input: Text Analytics can detect the dominant language, but accuracy drops for short texts.
Ambiguous entities: 'Amazon' could be a company or a river. Text Analytics may return both if context is insufficient.
Low confidence scores: If LUIS returns low confidence for all intents, the bot should ask for clarification, not assume the top intent.
Customization: The exam may ask whether you can train custom models. Answer: Yes, for LUIS (custom intents/entities), Translator (custom translation), and Speech (custom acoustic/language models).
How to Eliminate Wrong Answers
If the question mentions 'understanding user intent', the answer is LUIS.
If it mentions 'extracting key phrases or sentiment', the answer is Text Analytics.
If it mentions 'translation', the answer is Translator.
If it mentions 'answering FAQs', the answer is QnA Maker.
If it mentions 'transcribing audio', the answer is Speech-to-Text.
NLP enables computers to understand, interpret, and generate human language.
Azure NLP services include Text Analytics, Translator, LUIS, QnA Maker, and Speech.
Text Analytics provides sentiment analysis (score 0-1), key phrase extraction, language detection, and named entity recognition.
LUIS extracts intents and entities from user utterances; requires custom training.
QnA Maker creates a knowledge base from FAQs and returns answers with confidence scores.
Translator supports text and document translation, transliteration, and language detection.
Speech Services include speech-to-text, text-to-speech, and speech translation.
NLP models are pre-trained but can be customized with your own data.
The exam tests which service to use for a given task, not deep implementation.
Common wrong answers: using LUIS for sentiment, using QnA Maker for open-ended dialogue.
These come up on the exam all the time. Here's how to tell them apart.
Text Analytics
Used for general text analysis
Returns sentiment, key phrases, entities, language
No intent recognition
Pre-trained, no training required
Good for social media monitoring, feedback analysis
LUIS
Used for conversational intent recognition
Returns intents and entities
No sentiment analysis
Requires custom training with utterances
Good for chatbots, virtual assistants
Mistake
NLP can perfectly understand any human language like a human.
Correct
NLP models have limitations; they struggle with sarcasm, irony, ambiguous pronouns, and low-resource languages. They are probabilistic, not deterministic, and can make errors. The exam expects you to know that NLP is not perfect and that confidence scores indicate reliability.
Mistake
Text Analytics and LUIS are interchangeable.
Correct
Text Analytics is for general text analysis (sentiment, entities, key phrases, language detection) while LUIS is specifically for extracting intents and entities in conversational contexts. They serve different purposes and are not interchangeable.
Mistake
QnA Maker can handle multi-turn conversations.
Correct
QnA Maker is designed for single-turn Q&A. For multi-turn conversations (e.g., asking follow-up questions), you need a bot framework that integrates LUIS for dialogue management. QnA Maker can be used as a knowledge source within such a bot.
Mistake
Translator only supports text translation.
Correct
Azure Translator also supports document translation (preserving formatting), custom translation, and transliteration. The exam may ask about these features.
Mistake
All NLP services require custom training.
Correct
Many Azure NLP services are pre-trained and work out-of-the-box. Customization (e.g., custom entities in LUIS, custom translation models) is optional and used for domain-specific needs.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Text Analytics is a general-purpose NLP service for analyzing text: it detects sentiment (positive/negative/neutral), extracts key phrases, identifies named entities (people, places, dates), and detects language. LUIS (Language Understanding) is specifically for conversational AI: it extracts user intents (e.g., 'BookFlight') and entities (e.g., 'destination'). Text Analytics requires no training; LUIS requires you to provide example utterances. On the exam, if the task is to understand what a user wants, choose LUIS. If the task is to analyze sentiment or extract general information, choose Text Analytics.
QnA Maker is designed for single-turn Q&A: you ask a question, it returns the best answer from its knowledge base. It does not natively handle multi-turn conversations (e.g., asking for clarification). However, QnA Maker can be integrated into a bot built with Azure Bot Service that uses LUIS for dialogue management. In that scenario, the bot can handle follow-ups by using LUIS to understand the context and QnA Maker to retrieve answers. For the exam, remember that QnA Maker alone is not for multi-turn.
Text Analytics returns a sentiment score between 0 (negative) and 1 (positive) for each document. It also returns a label: 'positive', 'negative', 'neutral', or 'mixed'. The score is computed by a machine learning model trained on large datasets. For the exam, know that the score is a decimal between 0 and 1, and that 'mixed' indicates both positive and negative sentiments. Also note that you can analyze sentiment at the document or sentence level.
Azure Translator supports over 100 languages for text translation, including major languages like English, Spanish, French, German, Chinese, Japanese, Arabic, and many more. It also supports transliteration (converting text from one script to another, e.g., Arabic to Latin). For the exam, you don't need to memorize the exact list, but know that it supports a wide range of languages and that you can detect the language of the input text using the 'Detect' method.
No, Text Analytics is a pre-trained service that works out-of-the-box. You just send text and get results. However, you can use custom entities (via the 'Custom Entity Recognition' feature) if you need to extract domain-specific entities not covered by the pre-trained model. For the exam, assume Text Analytics is pre-trained unless the question mentions customization.
Speech-to-text (also called speech recognition) converts spoken audio into text. It returns a JSON with the recognized text and confidence score. Text-to-speech (also called speech synthesis) converts written text into spoken audio. It supports SSML for controlling pronunciation, pitch, rate, etc. Both are part of Azure Speech Services. The exam may ask which service to use for transcribing meetings (speech-to-text) or for generating voice responses (text-to-speech).
No, LUIS is not designed for sentiment analysis. It focuses on intent and entity extraction. If you need sentiment analysis, use Text Analytics. However, you can build a custom sentiment analysis model using Azure Machine Learning, but that is beyond AI-900 scope. On the exam, always pick Text Analytics for sentiment.
You've just covered What is NLP? — now see how well it sticks with free AI-900 practice questions. Full explanations included, no account needed.
Done with this chapter?