AI-102 Practice Question: Implement natural language processing solutions
A developer is using Azure Cognitive Service for Language to perform sentiment analysis on customer reviews. The service returns sentiment labels (positive, negative, neutral) and confidence scores. For a particular review, the service returns 'positive' with a confidence score of 0.55. The developer wants to ensure that only high-confidence results are used. What should the developer do?
⚠ Common exam trap
Many exam-takers assume they can retrain the prebuilt sentiment model (Option B) or use a different API (Option A) to solve the confidence issue, when in fact the correct solution is a simple application-level threshold check.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Configure a minimum confidence threshold of 0.75 in the application logic.
The developer must implement a confidence threshold in the application logic to filter out low-confidence results. The Azure Cognitive Service for Language returns confidence scores between 0 and 1 for each sentiment label, and the developer can set a minimum threshold (e.g., 0.75) to ensure only high-confidence predictions are used. This approach does not require retraining the model or modifying the input text, as the threshold is applied post-inference in the client code.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use the Text Analytics for Health API instead.
Why it's wrong here
Text Analytics for Health extracts medical entities and relations; it returns no sentiment labels or confidence scores, so it cannot filter reviews. It is tempting because it is another Language service, and it would be correct for clinical text extraction rather than sentiment thresholding.
- ✗
Retrain the sentiment analysis model with additional labeled data.
Why it's wrong here
The prebuilt sentiment model cannot be retrained with custom labelled data, so this is not an available action. It is tempting because custom training improves domain-specific accuracy, and it would be correct for a custom text classification model rather than the fixed prebuilt sentiment service.
- ✓
Configure a minimum confidence threshold of 0.75 in the application logic.
Why this is correct
A minimum confidence threshold of 0.75 in application logic discards the 0.55 result, ensuring only high-confidence sentiment labels are used. The service itself always returns a label with a score; filtering must therefore happen client-side, which this configuration achieves.
- ✗
Adjust the input text by removing ambiguous phrases.
Why it's wrong here
Editing input text does not change the model's scoring; the service still returns whatever confidence it computes, so the 0.55 result persists. It is tempting because cleaner input can improve accuracy, and it would be correct where ambiguous phrasing causes misclassification rather than low confidence.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AI-102 question from scratch — 761 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-102 exam.