Courseiva

AI-102 Implement generative AI solutions Practice Question

You are building a generative AI application with Azure OpenAI Service. The application must generate responses that are grounded in a specific set of internal documents stored in an Azure AI Search index. You want to use the built-in 'On Your Data' feature. Which configuration parameter should you set to ensure the model retrieves relevant documents before generating a response?

⚠ Common exam trap

Many exam-takers confuse fine-tuning with retrieval-augmented generation, assuming that training a model on documents is equivalent to dynamically retrieving them at inference time.

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 the data source type to Azure Cognitive Search and provide the index name.

The On Your Data feature in Azure OpenAI Service allows the model to retrieve relevant documents from a specified data source, such as Azure Cognitive Search, before generating a response. By setting the data source type to Azure Cognitive Search and providing the index name, the model can ground its answers in the internal documents. This is the intended method for retrieval-augmented generation with Azure OpenAI.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Enable the 'temperature' parameter to a low value to make responses more factual.

    Why it's wrong here

    Adjusting temperature affects the randomness of the model's output but does not provide access to external documents. A low temperature may make responses more deterministic but does not ground them in the internal document set. The On Your Data feature specifically handles document retrieval, not sampling parameters.

  • ✗

    Set the model deployment to a fine-tuned model trained on the documents.

    Why it's wrong here

    Fine-tuning a model on documents is a separate customization approach that embeds knowledge into the model weights. However, it does not dynamically retrieve documents at inference time and is not part of the On Your Data feature. The scenario requires grounding in a specific set of documents, which is better achieved with retrieval-augmented generation.

  • ✗

    Use the 'max_tokens' parameter to limit the response length to match document snippets.

    Why it's wrong here

    The max_tokens parameter controls the maximum length of the generated response and does not influence document retrieval or grounding. Limiting response length does not ensure the model uses the internal documents. The correct approach is to configure a data source that connects to the Azure AI Search index.

  • ✓

    Set the data source type to Azure Cognitive Search and provide the index name.

    Why this is correct

    Configuring the data source to Azure Cognitive Search with the correct index name enables the On Your Data feature to query the index for relevant documents before generating a response. This grounds the model's output in your proprietary data, reducing hallucinations and ensuring answers are based on the specified documents.

About these practice questions

One of 761 original AI-102 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

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.