Part 4 Full Quiz
15 scenario-based questions covering all 3 Part 4 topics. Select an answer to reveal the explanation.
Which Azure AI Language feature provides sentiment at the amenity level?
B is correct. Opinion Mining identifies specific targets (amenities) and the sentiment towards each. "The pool is fantastic but the WiFi is terrible" → {pool: positive}, {WiFi: negative}. Standard Sentiment Analysis (A) only gives an overall review sentiment — it won't tell management which specific amenity is problematic. NER (C) identifies entity names but not the sentiment towards them. Key Phrase Extraction (D) gives key topics but no associated sentiment.
A developer calls the Azure AI Translator API but gets an authentication error. Their code uses: endpoint="https://my-resource.cognitiveservices.azure.com/" and passes the key in the Ocp-Apim-Subscription-Key header. What is wrong?
B is correct. Azure AI Translator uses a GLOBAL endpoint: https://api.cognitive.microsofttranslator.com — not a resource-specific cognitiveservices.azure.com URL. Additionally, you must pass the Ocp-Apim-Subscription-Region header with your Azure region (e.g. "eastus"). Missing the region header also causes authentication errors. The key header (Ocp-Apim-Subscription-Key) is correct.
Which Azure AI Language feature and method should be used?
B is correct. recognize_pii_entities() is the specific method for PII detection and redaction. It identifies PII categories (Name, DateOfBirth, MedicalCondition, etc.) and returns result.redacted_text — the original text with all PII already replaced by asterisks — ready to use directly. recognize_entities() (A) is general NER that doesn't focus on PII and doesn't provide redacted text. Content Safety (C) detects harmful content categories, not PII. Custom NER (D) would require significant training effort when the prebuilt PII model already handles this use case.
Which Azure AI Translator capability is correct for this requirement?
B is correct. Document Translation is Azure AI Translator's feature specifically for translating entire document files while preserving structure and formatting. DOCX files are supported. You upload source documents to Azure Blob Storage, submit a batch translation job specifying target languages, and translated files appear in the target container — formatting intact. Option A loses formatting during text extraction. Transliteration (C) converts script, not language/meaning. Dictionary Lookup (D) handles individual words, not entire contracts.
A customer service platform receives tickets in 8 different languages. Before analysis, each ticket must be identified by its language so it can be routed to the regional team. Which Python method achieves this with a single batch call for all tickets?
B is correct. detect_language() accepts a list of documents and returns for each: primary_language.name (e.g. "French"), primary_language.iso6391_name (e.g. "fr"), and primary_language.confidence_score. It processes all documents in one batch API call — efficient for high volume. Sentiment analysis (A) gives emotional tone, not language. GPT-4o (C) is accurate but much more expensive and slower for a simple classification. Key phrases (D) don't identify language.
Which Azure AI Speech capability delivers this?
B is correct. Speech Translation using TranslationRecognizer handles audio input and produces translated text output for multiple languages simultaneously in real time. You call add_target_language("fr"), add_target_language("ja"), etc. The result.translations dictionary contains all translations at once. Option A (sequential STT + Translator) adds latency and complexity — Speech Translation handles this in one integrated step. Speaker Identification (C) identifies who is speaking, not language preferences. TTS (D) generates audio output, not real-time captions.
What does ResultReason.Canceled indicate and what should the developer check?
B is correct. ResultReason.Canceled means an error occurred — not that audio was processed normally. The developer must create CancellationDetails from the result to get the specific error. Common causes: invalid API key (authentication error), expired key, network connectivity issue, or invalid audio format. NoMatch (C) is when audio is processed but speech isn't recognised. RecognizedSpeech is the success state. Always check result.reason before reading result.text.
What should be implemented to improve accuracy?
B is correct. Custom Speech models are specifically designed to improve recognition for domain-specific vocabulary. Pronunciation data provides the correct phoneme sequences for drug names (critical for brand names with unusual phonetics). Language data provides text samples of pharmaceutical phrases to improve the language model. Whisper (A) has no custom training capability. NER post-processing (C) identifies what entities are mentioned — it cannot correct STT errors in the transcribed phonemes. Pricing tiers don't affect vocabulary recognition.
A developer generates text-to-speech audio for a financial disclosure announcement. Legal requirements state the text must be read slowly with a 2-second pause after "Important notice:" and the word "risk" must be spoken with strong emphasis. Which approach satisfies all requirements?
B is correct. SSML is precisely designed for this scenario — fine-grained control over how text is spoken. <prosody rate="slow"> controls speaking rate, <break time="2s"/> inserts an exact pause, and <emphasis level="strong"> adds vocal emphasis. speak_text_async() (A) is for plain text without formatting control. Pause characters (C) in plain text don't produce predictable timing. Concatenating separate files (D) is complex and doesn't control emphasis.
Which Azure AI Speech feature enables speaker-to-sentence attribution?
B is correct. Speaker Identification determines which of a set of known (enrolled) speakers is speaking at any given moment — exactly what's needed for meeting transcription with advisor attribution. The system maintains enrolled profiles for all 20 advisors, and during transcription identifies which advisor's voice profile matches each audio segment. Speaker Verification (A) is for authentication — "is this person who they claim to be?" — not for attribution in multi-speaker scenarios. Custom Speech (C) improves vocabulary, not speaker identity. Batch Transcription diarisation (D) separates speakers but can't identify who each speaker is without enrolled profiles.
Which Azure AI Language service is most appropriate and what key design decision must be made?
B is correct. CLU (Conversational Language Understanding) is the service for intent + entity recognition in conversational scenarios. The key design decisions: define intents for each action users can take, add a None intent for out-of-scope messages, define entity types (destination, dates, reservationNumber), label training utterances, and train the model. Custom Text Classification (A) categorises documents but doesn't extract entities. Custom Q&A (C) answers FAQ questions — not for routing/action detection. Prebuilt NER (D) extracts entities but doesn't classify intent — you'd get "London" extracted but wouldn't know if the user wants to book, cancel, or enquire about London.
A developer tests their CLU model and notices that completely unrelated questions like "What's your name?" and "Tell me a joke" are being classified as the "GetWeather" intent with 45% confidence. What is the most likely cause and fix?
B is correct. Without a None intent, the CLU model must classify every utterance into one of the defined intents — even when the utterance is completely unrelated. Adding a None intent with diverse examples of irrelevant utterances gives the model a legitimate "doesn't apply" category. The 45% confidence (below typical acceptance thresholds like 70-80%) is a symptom of being forced to choose the closest match. Adding more GetWeather utterances (A) would make the training worse. Lowering the threshold (C) would reject even more results rather than fixing classification. Deployment slot (D) is unrelated to this issue.
Which Azure service is most appropriate?
B is correct. Custom Question Answering is purpose-built for FAQ chatbot scenarios. You import the 300-page document and the service extracts Q&A pairs and indexes them. At runtime it uses semantic similarity to match user questions to the best answer — no intent definition, no utterance labelling, no complex logic needed. CLU (A) would require manually defining intents for hundreds of FAQ topics — massive effort. Azure AI Search (C) returns document chunks for keyword search — it doesn't extract and present direct answers in conversational format. Custom Text Classification (D) categorises documents, not questions, and doesn't return answers.
What should be implemented?
B is correct. Custom NER is for exactly this scenario — when prebuilt NER doesn't have the specific entity categories needed. Prebuilt NER might classify a judge's name as a Person and a date as DateTime, but it won't recognise the specific CAS-YYYY-NNNNN format for case references or distinguish "Presiding Judge" from any other person. CLU (C) is designed for conversational intent/entity in chatbot scenarios, not batch document extraction. Key Phrase Extraction (D) identifies key topics as phrases but doesn't categorise them into structured entity types.
Which set of Azure services correctly matches all five requirements?
A is correct. (A) detect_language() identifies the language of incoming messages. (B) Azure AI Translator translates text between languages — for text messages, the text translation API is correct. (C) CLU identifies customer intents (TransferMoney, CheckBalance, DisputeTransaction) and extracts entities. (D) Custom Q&A provides a knowledge base for policy questions — semantic similarity matches questions to answers without complex logic. (E) Azure AI Speech Batch Transcription is designed for large-scale processing of recorded audio files stored in Blob Storage — ideal for compliance archiving. Option B misuses Custom NER and Sentiment for intent/detection. Option C misuses Custom Text Classification for intent (it can classify but doesn't extract entities or handle conversation flow). Option D uses Speech Translation (for audio, not text) for requirement B and TTS (generates audio, doesn't transcribe) for E.