AI-102 Implement generative AI solutions Practice Question
You are a senior AI engineer at a financial services company. You are building a generative AI solution to assist financial advisors with client portfolio recommendations. The solution must use Azure OpenAI Service. The following requirements must be met:
1. Responses must be based on the latest market data and client profiles stored in Azure SQL Database. 2. The solution must not generate investment advice that is not backed by the data. 3. The solution must be cost-effective and minimize API calls. 4. The system must provide citations for the data used in the response.
You design a RAG pattern with Azure AI Search indexing the portfolio data. You also implement a system message instructing the model to only use provided context. However, the model occasionally generates advice that contradicts the data or invents new facts. You need to modify the solution to ensure responses are strictly grounded in the retrieved data. What should you do?
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
✓
Set temperature to 0 in the Azure OpenAI completion request.
Setting the temperature to 0 makes the model deterministic, reducing its tendency to generate creative or ungrounded responses. This enforces adherence to the provided context (retrieved data) and minimizes hallucination. Option B is incorrect: reducing top_k limits the number of retrieved documents but does not force the model to rely solely on them; the model can still invent facts if the temperature is high. Option C is incorrect: increasing chunk size provides more context per document but does not prevent the model from ignoring or contradicting that context. Option D is incorrect: Azure OpenAI Service on your own data still uses a language model that can hallucinate if not properly constrained (e.g., with low temperature); it does not directly query SQL databases in real time.
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 in the Azure OpenAI completion request.
Why this is correct
Temperature 0 makes output deterministic and grounded in provided context.
- ✗
Reduce the top_k parameter in the search query to retrieve fewer documents.
Why it's wrong here
Retrieving fewer documents may reduce context but doesn't prevent invention.
- ✗
Increase the chunk size in the index to provide more context per document.
Why it's wrong here
More context helps but doesn't stop invention if model is creative.
- ✗
Use Azure OpenAI Service on your own data integration to directly query the SQL database.
Why it's wrong here
Direct integration still uses model; temperature adjustment is key.
Go deeper
Related to this question
About these practice questions
This AI-102 question is part of Courseiva's 945-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.