AI-102 Implement generative AI solutions Practice Question
You are developing a solution that uses Azure Document Intelligence to extract data from invoices and then uses Azure OpenAI to summarize the extracted data. The solution occasionally produces summaries that omit key fields like the invoice total. What should you do to improve accuracy?
⚠ Common exam trap
Many candidates assume that model size or parameter tuning (temperature, max_tokens) is the primary fix for content omission, when in fact prompt engineering—specifically structured prompts with explicit field requests—is the correct solution for ensuring specific data is included in the output.
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
✓
Define a structured prompt that explicitly requests each field and provide examples
The issue is that the summarization prompt lacks explicit instructions for which fields to include. By defining a structured prompt that explicitly requests each key field (e.g., invoice total, date, vendor) and providing examples, you guide the Azure OpenAI model to consistently extract and include those fields in the summary, reducing omission errors. This approach leverages prompt engineering to improve output reliability without changing model parameters or size.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Set temperature to 0 to make the output more deterministic
Why it's wrong here
Temperature 0 makes token selection deterministic but does not force the model to include every extracted field; omission stems from prompt grounding, not sampling randomness. It is tempting because determinism sounds like accuracy, and temperature 0 would be correct for reproducible classification or extraction tasks with a fixed answer.
- ✗
Use a larger model like GPT-4 instead of GPT-3.5
Why it's wrong here
A larger model does not guarantee that every invoice field is carried into the summary; the omission reflects prompt and grounding design rather than raw model capability. It is tempting because GPT-4 handles nuanced language well, and upgrading would be correct for complex reasoning or ambiguous instructions.
- ✗
Increase the max_tokens parameter
Why it's wrong here
max_tokens caps response length; raising it permits longer output but does not compel the model to include the invoice total. It is tempting because truncation can drop trailing content, and increasing max_tokens would be correct when summaries are being cut off mid-sentence by the limit.
- ✓
Define a structured prompt that explicitly requests each field and provide examples
Why this is correct
Document Intelligence output can be summarised loosely by a free-form prompt, causing omissions. A structured prompt naming each required field, with few-shot examples showing the expected format, constrains the model to include the invoice total and other key values.
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.