CCNA Implement generative AI solutions Questions

29 of 179 questions · Page 3/3 · Implement generative AI solutions · Answers revealed

151
MCQmedium

Refer to the exhibit. You have deployed a GPT-3.5 Turbo model in Azure OpenAI Service with the shown configuration. Users report that the model generates responses that are too repetitive. You need to reduce repetition. Which parameter should you modify?

A.Increase presencePenalty to 0.5
B.Increase frequencyPenalty to 0.5
C.Increase temperature to 1.0
D.Decrease topP to 0.5
AnswerA

Presence penalty reduces the likelihood of repeating any token that has appeared, reducing repetition.

Why this answer

Option D is correct because presence_penalty reduces the likelihood of repeating tokens that have already appeared. Option A is wrong because temperature controls creativity. Option B is wrong because topP controls nucleus sampling.

Option C is wrong because frequency_penalty is set to 0 and could be increased, but presence_penalty is more effective for repetition of topics. However, both can reduce repetition; but presence_penalty is often preferred for reducing repetition of content. Based on typical usage, presence_penalty is the better choice.

152
MCQmedium

You are using Azure OpenAI Service to generate marketing copy. The marketing team reports that the generated content sometimes contains factual inaccuracies. You need to improve the factual accuracy of the generated content. What should you do?

A.Increase the max_tokens parameter
B.Include relevant context and facts in the prompt
C.Decrease the temperature parameter
D.Disable content filtering
AnswerB

Providing context helps the model generate more accurate responses.

Why this answer

Option B is correct because providing relevant context in the prompt gives the model factual information to base its response on. Option A is wrong because reducing temperature does not improve factual accuracy. Option C is wrong because increasing max_tokens does not improve accuracy.

Option D is wrong because disabling content filtering does not address inaccuracies.

153
Multi-Selecteasy

You are deploying a chat application using Azure OpenAI. The application should only answer questions based on a specific set of internal documents. Which THREE features should you use?

Select 3 answers
A.Azure AI Search index with the internal documents
B.Grounding with your data in Azure OpenAI Studio
C.Content filters to block out-of-domain questions
D.System message to limit the assistant's scope
E.Fine-tuning the model on the internal documents
AnswersA, B, D

The index provides the data source for grounding.

Why this answer

Option A is correct because Azure AI Search indexes allow you to ingest internal documents and perform vector or hybrid search over them. When integrated with Azure OpenAI, the search results are used as grounding context for the model, ensuring responses are based solely on your data.

Exam trap

Microsoft often tests the distinction between content filtering (which handles safety) and domain restriction (which requires retrieval or prompt engineering), leading candidates to incorrectly select content filters for limiting question scope.

154
MCQeasy

You need to generate an image of a cat wearing a hat using Azure OpenAI. Which model should you use?

A.Codex
B.DALL-E
C.GPT-4
D.Whisper
AnswerB

DALL-E generates images from text descriptions.

Why this answer

DALL-E is the Azure OpenAI model specifically designed for generating images from natural language descriptions. It uses a diffusion-based architecture to create high-quality, original images based on text prompts, making it the correct choice for generating an image of a cat wearing a hat.

Exam trap

The trap here is that candidates may confuse GPT-4's multimodal capabilities (which can analyze images but not generate them) with DALL-E's generative image creation, leading them to incorrectly select GPT-4 for image generation tasks.

How to eliminate wrong answers

Option A is wrong because Codex is a model specialized for generating code from natural language, not for image generation. Option C is wrong because GPT-4 is a large language model focused on text generation and reasoning, lacking native image generation capabilities. Option D is wrong because Whisper is a speech-to-text model designed for audio transcription, not image generation.

155
MCQeasy

You need to deploy a generative AI model that can be used by multiple applications within your organization. The model must support real-time inference with low latency. Which Azure service should you use?

A.Azure AI Search
B.Azure OpenAI Service
C.Azure Machine Learning real-time endpoint
D.Azure Functions
AnswerB

Azure OpenAI Service provides managed endpoints with low-latency inference for generative AI models.

Why this answer

Option B is correct because Azure OpenAI Service provides managed endpoints with low latency for real-time inference. Option A is wrong because Azure Machine Learning real-time endpoints also work but require more management overhead; Azure OpenAI is more purpose-built for generative AI. Option C is wrong because Azure AI Search is for indexing and search, not inference.

Option D is wrong because Azure Functions is a compute service, not designed for hosting large language models.

156
MCQmedium

Refer to the exhibit. A developer received this response from an Azure OpenAI chat completion call. The prompt was "What is the capital of France?". The finish_reason is "stop". What does this indicate?

A.The response was truncated due to content filtering.
B.The model completed the response naturally.
C.The model stopped generating before the response was complete.
D.The response reached the max_tokens limit.
AnswerB

Finish_reason 'stop' indicates normal completion.

Why this answer

The finish_reason 'stop' indicates that the model completed the response naturally, meaning it generated a complete answer to the prompt and reached a logical stopping point (e.g., the end of a sentence or the end of the generated text). This is the standard behavior for a successful completion where the model did not encounter any content filter, token limit, or other interruption.

Exam trap

Microsoft often tests the distinction between finish_reason values, and the trap here is that candidates confuse 'stop' with 'length' or assume any non-error finish_reason means truncation, when in fact 'stop' explicitly signals a natural and complete generation.

How to eliminate wrong answers

Option A is wrong because 'stop' specifically means the model finished generating on its own, not that content filtering truncated the response; content filtering would return a finish_reason of 'content_filter'. Option C is wrong because 'stop' indicates the model completed the response, not that it stopped prematurely; a premature stop would be indicated by a finish_reason of 'length' (if max_tokens hit) or 'null' (if interrupted). Option D is wrong because reaching the max_tokens limit would result in a finish_reason of 'length', not 'stop'.

157
Multi-Selecteasy

Which TWO Azure services can be used together with Azure OpenAI to implement a Retrieval-Augmented Generation (RAG) solution?

Select 2 answers
A.Azure Blob Storage
B.Azure Cosmos DB
C.Azure AI Search
D.Azure SQL Database
E.Azure Functions
AnswersB, C

Cosmos DB supports vector indexing.

Why this answer

Azure Cosmos DB is correct because it can serve as a vector database for storing and querying embeddings generated by Azure OpenAI. When combined with Azure AI Search, which provides hybrid search (vector + keyword) and indexing capabilities, it enables a complete RAG pipeline where relevant documents are retrieved and passed as context to the OpenAI model for grounded generation.

Exam trap

The trap here is that candidates often assume any storage service (like Blob Storage or SQL Database) can directly support RAG, but they overlook the need for native vector search or hybrid retrieval capabilities that only Azure AI Search and Cosmos DB (with vector support) provide.

158
MCQhard

You are building a generative AI application that uses Azure OpenAI Service. The application must handle sensitive user data and comply with GDPR. You need to ensure that the service does not store or log user prompts and completions. What should you configure?

A.Disable data logging in the Azure OpenAI Service resource
B.Deploy the resource in a GDPR-compliant region
C.Configure content filtering to block sensitive data
D.Use a custom endpoint that anonymizes data
AnswerA

Disabling data logging ensures prompts and completions are not stored.

Why this answer

Option C is correct because disabling data logging in the Azure OpenAI Service resource ensures that prompts and completions are not stored. Option A is wrong because the region does not affect logging. Option B is wrong because content filtering does not prevent logging.

Option D is wrong because the resource endpoint does not affect logging.

159
MCQmedium

You are building a customer support chatbot using Azure OpenAI Service. The chatbot must only respond based on the company's product documentation and should not generate answers outside that scope. Which approach should you use?

A.Implement content filters to block responses not found in the documentation.
B.Fine-tune a GPT-4 model on the product documentation.
C.Use Azure OpenAI On Your Data with a search index built from the documentation.
D.Use prompt engineering with a system message instructing the model to only answer from the documentation.
AnswerC

This approach grounds the model on the indexed documents, ensuring responses are based on the documentation.

Why this answer

Option C is correct because Azure OpenAI On Your Data with a search index ensures the model only generates responses grounded in the provided documents. Option A is wrong because fine-tuning alone does not prevent the model from generating ungrounded content. Option B is wrong because prompt engineering may still result in hallucination.

Option D is wrong because content filters block harmful content but do not enforce domain grounding.

160
Multi-Selecteasy

Which TWO statements about Azure OpenAI Service content filters are true?

Select 2 answers
A.They can be configured with severity levels (low, medium, high)
B.They only filter the output of the model
C.They cannot be customized for specific use cases
D.They are bypassed when using PTU deployments
E.They include categories such as hate, sexual, violence, and self-harm
AnswersA, E

Severity levels allow granular control over filtering.

Why this answer

Option A is correct because Azure OpenAI Service content filters can be configured with severity levels (low, medium, high) to control the strictness of filtering for each content category. This allows administrators to fine-tune the filter sensitivity based on their application's risk tolerance and compliance requirements.

Exam trap

The trap here is that candidates often assume content filters only apply to model outputs (Option B) or that PTU deployments offer a way to bypass safety controls (Option D), but Azure enforces filters uniformly across all deployment types.

161
MCQhard

Your company uses Azure Bot Service with QnA Maker to answer HR questions. You need to migrate to Microsoft Copilot Studio to leverage generative AI capabilities. You have an existing QnA Maker knowledge base. What is the recommended migration path?

A.In Copilot Studio, use the 'Import from QnA Maker' option to directly bring in the knowledge base.
B.Create a new Copilot and manually recreate each Q&A pair.
C.Use Azure PowerShell to export the knowledge base and then upload to Copilot Studio.
D.Export the QnA Maker KB to a TSV file, then import into Azure AI Language custom question answering.
AnswerA

Copilot Studio provides built-in import from QnA Maker.

Why this answer

Option C is correct because Copilot Studio supports importing QnA Maker knowledge bases directly. Option A is wrong because starting from scratch is unnecessary. Option B is wrong because Azure AI Language custom question answering is a different service; Copilot Studio has native import.

Option D is wrong because manual entry is inefficient.

162
MCQhard

Your company is using Azure OpenAI Service to generate marketing copy. The compliance team requires that all generated content be reviewed for sensitive data before delivery. You need to implement a solution that automatically scans the output for personally identifiable information (PII) and blocks it if detected. Which service should you integrate?

A.Azure AI Content Safety with a custom blocklist
B.Microsoft Purview Information Protection
C.Microsoft Defender for Cloud Apps
D.Azure AI Language PII detection
AnswerA

Content Safety can detect and block sensitive content including PII in real-time.

Why this answer

Option A is correct because Azure AI Content Safety with a custom blocklist can flag and block PII in generated content. Option B is wrong because Microsoft Purview Information Protection is for data classification and labeling, not real-time scanning of generative output. Option C is wrong because Azure AI Language PII detection is for recognizing PII but not built for blocking in a pipeline.

Option D is wrong because Microsoft Defender for Cloud Apps is for cloud app security, not content filtering.

163
MCQmedium

You are using Azure AI Document Intelligence to extract data from invoices. The invoices have varying layouts, and you need to build a custom model that can handle multiple document formats. Which type of model should you train?

A.Custom neural model
B.Custom template model
C.Prebuilt invoice model
D.Custom composed model
AnswerA

Neural models handle varied layouts and learn from a variety of document structures.

Why this answer

Option D is correct because a custom neural model is best for extracting data from documents with varied layouts. Option A is wrong because a prebuilt invoice model only works for fixed layouts. Option B is wrong because a custom template model requires consistent layouts.

Option C is wrong because a custom composed model combines multiple custom models, but neural is better for varied layouts.

164
MCQhard

You are building a generative AI solution using Azure AI Foundry. The solution must meet compliance requirements that require all model inputs and outputs to be auditable for a minimum of one year. What should you enable?

A.Azure Monitor alerts for unusual activity.
B.Azure Monitor metrics for the Azure AI Foundry resource.
C.Azure Monitor workbooks to visualize usage.
D.Diagnostic settings to capture request and response logs and store them in a storage account.
AnswerD

Diagnostic settings can log full request/response data for auditing.

Why this answer

Option D is correct because enabling diagnostic settings for the Azure AI Foundry resource allows you to capture detailed request and response logs for all model interactions. By routing these logs to a storage account, you retain the data for the required one-year audit period, meeting compliance needs for full traceability of inputs and outputs.

Exam trap

The trap here is that candidates confuse monitoring features (alerts, metrics, workbooks) with data retention capabilities, assuming any Azure Monitor feature can satisfy audit requirements without understanding that only diagnostic settings provide the raw log capture needed for compliance.

How to eliminate wrong answers

Option A is wrong because Azure Monitor alerts are designed to notify on unusual activity or anomalies, not to provide long-term audit storage of model inputs and outputs. Option B is wrong because Azure Monitor metrics capture aggregated performance data like latency or request counts, not the detailed request/response payloads needed for auditing. Option C is wrong because Azure Monitor workbooks are visualization tools for metrics and logs, not a storage mechanism for raw audit data.

165
MCQhard

You are deploying a generative AI solution using Azure OpenAI Service. The solution must comply with data residency requirements that mandate all data processing and storage remain within a specific geographic region. You need to configure the service to meet these requirements. What should you do?

A.Deploy the Azure OpenAI Service resource in the required region
B.Use a custom endpoint that routes traffic to the required region
C.Select a model that is only available in the required region
D.Configure content filtering to block data leaving the region
AnswerA

Deploying the resource in the required region ensures data processing and storage stay within that region.

Why this answer

Option B is correct because deploying the Azure OpenAI Service resource in the required region ensures data processing and storage stay within that region. Option A is wrong because data residency is determined by the region of the resource, not the model. Option C is wrong because data residency is not related to the content filtering configuration.

Option D is wrong because the resource endpoint is region-specific but does not affect data residency.

166
MCQmedium

You are building a multi-tenant application that uses Azure OpenAI. Each tenant has different content filtering requirements. How should you configure the solution to meet these requirements?

A.Use a single Azure OpenAI deployment and configure content filters at the application level.
B.Configure different system messages for each tenant to enforce content policies.
C.Pass the tenant ID in the API call and use a custom middleware to apply filters.
D.Create separate Azure OpenAI deployments for each tenant with their own content filter configurations.
AnswerD

Each deployment can have its own content filter settings.

Why this answer

Option D is correct because Azure OpenAI content filters are configured at the deployment level, not at the application or API-call level. By creating separate deployments for each tenant, you can assign distinct content filter configurations (e.g., severity thresholds for hate, violence, self-harm) that are enforced server-side by Azure's content filtering service, ensuring isolation and compliance with each tenant's requirements.

Exam trap

The trap here is that candidates assume content filters can be dynamically applied per request using a tenant ID or custom middleware, but Azure OpenAI enforces filters at the deployment level only, requiring separate deployments for different filter configurations.

How to eliminate wrong answers

Option A is wrong because content filters in Azure OpenAI are not configurable at the application level; they are applied per deployment via the Azure AI Studio or ARM templates, and a single deployment shares the same filter configuration across all callers. Option B is wrong because system messages are part of the prompt and do not enforce content filtering policies; they guide model behavior but cannot override or customize the built-in content filter rules that Azure applies before returning responses. Option C is wrong because the tenant ID is not a parameter in the Azure OpenAI API call that affects content filtering; custom middleware could apply post-processing filters, but it cannot modify the pre-built Azure content filters that run server-side before the response is sent.

167
MCQeasy

Your company wants to use Azure OpenAI to generate code snippets. You need to ensure the generated code does not contain security vulnerabilities. Which approach should you take?

A.Scan the generated code with a static analysis tool after generation.
B.Include a system message that instructs the model to generate secure code following best practices.
C.Use content filters to block malicious code.
D.Fine-tune the model on a dataset of secure code examples.
AnswerB

System messages can guide the model to produce secure code.

Why this answer

Option B is correct because Azure OpenAI's system messages allow you to set the context and behavior of the model, including instructing it to follow secure coding best practices (e.g., OWASP Top 10). This is the most direct and scalable way to influence the model's output at inference time without requiring post-processing or retraining. The system message acts as a persistent instruction that guides every response, making it the recommended approach for steering content generation.

Exam trap

Microsoft often tests the misconception that content filters can handle security vulnerabilities, but content filters are for policy compliance (e.g., hate speech, violence), not for code security flaws like injection attacks or improper error handling.

How to eliminate wrong answers

Option A is wrong because scanning generated code with a static analysis tool after generation is a reactive measure that does not prevent vulnerabilities from being created; it only catches them after the fact, and the model may still produce insecure code that requires rework. Option C is wrong because content filters in Azure OpenAI are designed to block harmful or policy-violating content (e.g., hate speech, violence), not to detect or prevent security vulnerabilities in code (e.g., SQL injection, buffer overflows). Option D is wrong because fine-tuning on a dataset of secure code examples is costly, requires significant expertise, and may not generalize well to all coding scenarios; moreover, Azure OpenAI does not currently support fine-tuning for code generation models like GPT-4 in the same way as for text models, and system messages are the simpler, supported alternative.

168
Multi-Selectmedium

You are designing a generative AI solution using Azure OpenAI Service. The solution must meet compliance requirements by preventing the model from generating sensitive personal data. Which TWO configurations should you implement? (Select TWO.)

Select 2 answers
A.Implement data loss prevention (DLP) policies using Microsoft Purview
B.Configure content filters in Azure AI Content Safety
C.Add a system message instructing the model not to generate personal data
D.Deploy the model in a specific region
E.Fine-tune the model with a dataset that excludes personal data
AnswersA, B

DLP policies provide data governance and protection.

Why this answer

Microsoft Purview DLP policies can scan and block sensitive data (e.g., PII, credit card numbers) in prompts and responses when integrated with Azure OpenAI Service, ensuring compliance by preventing data exfiltration. Azure AI Content Safety content filters allow you to configure severity thresholds to block harmful or sensitive content categories, directly preventing the model from generating personal data at the inference layer.

Exam trap

The trap here is that candidates often choose a system message (Option C) as a reliable control, but Microsoft explicitly warns that system messages are not a security boundary and can be bypassed, whereas DLP and content filters provide enforceable guardrails.

169
MCQmedium

You are deploying a generative AI model using Azure Machine Learning. The model is a large language model that requires GPU compute. You need to minimize costs while ensuring the model is always available for inference. Which compute option should you choose?

A.Managed online endpoint with a GPU VM
B.Batch endpoint with GPU
C.Serverless GPU compute
D.CPU-based inference
AnswerA

Managed online endpoints provide real-time inference with GPU, and autoscaling can help cost while keeping availability.

Why this answer

A managed online endpoint with a GPU VM is the correct choice because it provisions a dedicated GPU instance that remains always active, ensuring the model is available for real-time inference at any time. This option balances cost and availability by allowing you to choose a lower-cost GPU SKU (e.g., NCas_v4) while avoiding the cold-start latency of serverless or batch options. The managed endpoint also handles auto-scaling and load balancing, but for constant availability, a fixed minimum instance count is required.

Exam trap

Microsoft often tests the distinction between 'always available' (requiring a persistent compute instance) and 'cost-optimized' (allowing scale-to-zero), leading candidates to mistakenly choose serverless GPU compute because it sounds cheaper, but it fails the availability requirement.

How to eliminate wrong answers

Option B is wrong because batch endpoints are designed for asynchronous, large-scale inference jobs on a schedule or trigger, not for always-on, real-time availability; they incur costs only during job execution but cannot guarantee immediate response. Option C is wrong because serverless GPU compute (e.g., Azure Machine Learning serverless spark or serverless inference) typically scales to zero when idle, meaning the model may not be available for inference without a cold start, which violates the 'always available' requirement. Option D is wrong because CPU-based inference is insufficient for large language models that require GPU acceleration for acceptable latency and throughput; using CPU would result in unacceptable performance or failure to load the model.

170
Multi-Selecthard

You need to monitor and audit usage of Azure OpenAI Service to ensure compliance with company policies. Which TWO actions should you take?

Select 2 answers
A.Configure content filtering and review the filtered content logs.
B.Enable diagnostic settings to stream logs to a Log Analytics workspace.
C.Use Azure Monitor metrics to track token consumption.
D.Apply Azure Policy to restrict model deployments.
E.Connect Azure OpenAI to Microsoft Purview for data lineage.
AnswersA, B

Content filtering logs show when content is blocked.

Why this answer

Option A is correct because diagnostics logs capture API calls. Option C is correct because content filtering logs capture blocked requests. Option B is wrong because Azure Monitor metrics are aggregated, not audit logs.

Option D is wrong because Azure Policy enforces rules but does not audit usage. Option E is wrong because Microsoft Purview is for data governance, not monitoring.

171
Multi-Selecthard

Which THREE factors should you consider when selecting a model for a generative AI solution on Azure?

Select 3 answers
A.Cost per token and deployment options.
B.Model capability and modality (text, code, image).
C.Latency and throughput requirements.
D.Number of transformer layers in the model.
E.Training data source and licensing.
AnswersA, B, C

Cost and deployment flexibility are key considerations.

Why this answer

Option A is correct because cost per token directly impacts operational expenses in pay-per-use models like GPT-4 on Azure OpenAI, and deployment options (e.g., global vs. regional, provisioned throughput) affect availability and scalability. These are fundamental considerations when operationalizing a generative AI solution.

Exam trap

The trap here is that candidates confuse internal model architecture (like transformer layers) with selection criteria, when in fact Azure abstracts those details and you only need to consider cost, capability, latency, and deployment options.

172
MCQeasy

You need to generate realistic synthetic data for training a machine learning model while ensuring the data does not contain personally identifiable information (PII). Which Azure service should you use?

A.Azure AI Search
B.Azure AI Document Intelligence
C.Azure OpenAI Service
D.Azure AI Language
AnswerC

GPT models can generate realistic synthetic data without PII when properly prompted.

Why this answer

Azure OpenAI Service provides access to powerful generative AI models (e.g., GPT-4) that can create realistic synthetic data by learning patterns from training data. Crucially, these models can be configured to avoid memorizing or reproducing PII, and you can apply content filters and data masking to ensure the generated output is free of personally identifiable information.

Exam trap

The trap here is that candidates confuse Azure AI Language's text generation capabilities (e.g., summarization, question answering) with the full generative AI power of Azure OpenAI Service, but Azure AI Language does not offer the same level of flexible, high-fidelity synthetic data generation.

How to eliminate wrong answers

Option A is wrong because Azure AI Search is a search-as-a-service solution for indexing and querying data, not a generative AI service capable of creating synthetic data. Option B is wrong because Azure AI Document Intelligence (formerly Form Recognizer) is designed to extract structured information from documents (e.g., OCR, key-value pairs), not to generate new synthetic datasets. Option D is wrong because Azure AI Language provides pre-built and custom NLP capabilities (e.g., sentiment analysis, entity recognition) but does not include generative models for creating realistic synthetic data from scratch.

173
MCQhard

A financial services firm wants to use Azure OpenAI to generate investment advice summaries. They must ensure that the model does not produce any advice that could be interpreted as personalized financial advice. What is the most effective strategy?

A.Set temperature to 0 and top_p to 0 to make outputs deterministic.
B.Use a system message that instructs the model to avoid personalized advice and apply strict content filtering.
C.Provide few-shot examples of disclaimers in the prompt.
D.Fine-tune the model on a dataset of generic financial summaries.
AnswerB

System messages and content filtering directly address content restrictions.

Why this answer

Option B is correct because Azure OpenAI's system messages allow you to set the model's behavior and constraints at the conversation level, which is the most direct and effective way to enforce a policy like avoiding personalized financial advice. Combined with Azure's content filtering (which can block harmful or restricted content), this approach provides both instruction-based and filter-based guardrails without requiring model retraining or relying solely on example-based prompting.

Exam trap

The trap here is that candidates often assume deterministic parameters (temperature=0, top_p=0) guarantee safe outputs, but they only control randomness, not content compliance—Azure's system message and content filtering are the correct tools for enforcing content policies.

How to eliminate wrong answers

Option A is wrong because setting temperature to 0 and top_p to 0 makes outputs deterministic but does not prevent the model from generating personalized financial advice; it only reduces randomness, not content compliance. Option C is wrong because few-shot examples of disclaimers in the prompt can be ignored or overridden by the model if the underlying training data biases it toward personalized responses; system messages have higher priority in the instruction hierarchy. Option D is wrong because fine-tuning on generic financial summaries requires significant labeled data and compute, and it does not guarantee the model will avoid personalized advice—it may still generate such content if the fine-tuning dataset is not carefully curated to exclude it.

174
MCQmedium

You are building a chatbot for a retail company using Azure OpenAI Service. The chatbot must provide product recommendations based on customer preferences. To ensure the chatbot does not generate harmful or inappropriate responses, you need to implement a content filtering solution. What should you use?

A.Azure AI Content Safety
B.Azure OpenAI Service content filtering
C.Azure AI Search
D.Microsoft Purview Information Protection
AnswerB

Azure OpenAI Service provides built-in content filtering that can be configured to block harmful content.

Why this answer

Azure OpenAI Service content filtering is the correct choice because it provides built-in, configurable filters that block harmful or inappropriate content at the model level, directly within the Azure OpenAI endpoint. This ensures that the chatbot's product recommendations remain safe without requiring external services, as the filtering is applied to both input prompts and output completions based on severity levels for categories like hate, violence, and self-harm.

Exam trap

The trap here is that candidates often confuse Azure AI Content Safety (a standalone moderation service) with the built-in content filtering of Azure OpenAI Service, assuming that a separate service is required for safety when the native filtering is both sufficient and more tightly integrated.

How to eliminate wrong answers

Option A is wrong because Azure AI Content Safety is a separate service for moderating user-generated content (e.g., images, text) but does not integrate natively with Azure OpenAI Service's model responses; using it would require an extra API call and custom orchestration, adding latency and complexity. Option C is wrong because Azure AI Search is a retrieval service for indexing and querying data (e.g., product catalogs) and has no content filtering capabilities for harmful or inappropriate responses. Option D is wrong because Microsoft Purview Information Protection is a data governance and classification tool for protecting sensitive information (e.g., PII, compliance labels) and does not filter model-generated content for safety or appropriateness.

175
MCQmedium

A company uses Azure OpenAI to generate code snippets. They notice that the model sometimes produces code that uses deprecated APIs. They want to minimize this without retraining the model. What should they do?

A.Fine-tune the model on a dataset of recent code.
B.Set the temperature parameter to 0 to reduce randomness.
C.Add a system message instructing the model to use only current, non-deprecated APIs.
D.Provide a few-shot example of correct code in the prompt.
AnswerC

System messages effectively guide model behavior.

Why this answer

Option C is correct because adding a system message in Azure OpenAI allows you to set high-level instructions that guide the model's behavior without retraining. By explicitly instructing the model to use only current, non-deprecated APIs, you leverage the system prompt's ability to influence output style and content, effectively reducing deprecated API usage in generated code snippets.

Exam trap

Microsoft often tests the distinction between prompt engineering techniques (system messages, few-shot examples, parameter tuning) and model customization (fine-tuning), and the trap here is that candidates may confuse few-shot prompting (Option D) with a system message, not realizing that a system message provides a more persistent and scalable way to enforce behavioral rules across all responses.

How to eliminate wrong answers

Option A is wrong because fine-tuning requires retraining the model on a custom dataset, which contradicts the requirement to minimize deprecated API usage without retraining. Option B is wrong because setting the temperature parameter to 0 reduces randomness and makes outputs more deterministic, but it does not prevent the model from generating deprecated APIs—it only affects creativity and variability. Option D is wrong because providing a few-shot example of correct code in the prompt can help guide the model, but it is less reliable than a system message for consistently enforcing a rule across all responses, as the model may still default to deprecated APIs in other contexts.

176
MCQhard

Your company is building a multi-tenant SaaS application using Azure AI Foundry. Each tenant (customer) should have isolated model deployments and data, but you want to share the base models across tenants to reduce costs. Which approach should you use?

A.Use a single model deployment and a shared endpoint with tenant ID in the header.
B.Create separate fine-tuned models for each tenant.
C.Deploy separate base models for each tenant.
D.Deploy one model per base model and use separate endpoints with routing logic per tenant.
AnswerD

Separate endpoints with routing isolate tenants while sharing the model.

Why this answer

Option D is correct because deploying a single model and using separate endpoints per tenant with dynamic routing enables isolation while sharing the base model. Option A is wrong because fine-tuned models per tenant increase costs. Option B is wrong because shared endpoints with tenant IDs in headers may cause data leakage.

Option C is wrong because separate model deployments per tenant increases costs.

177
MCQhard

You are designing a generative AI solution that uses Azure OpenAI Service. The solution must generate code snippets in Python and JavaScript. You need to ensure the model reliably outputs code in the correct language based on user input. Which approach should you use?

A.Set the top_p parameter to a low value.
B.Use a system message to specify the desired language.
C.Fine-tune the model on a dataset of code in both languages.
D.Set the temperature to 0 to make the model deterministic.
AnswerB

System messages can instruct the model on the language to use.

Why this answer

Option C is correct because the system message can specify the language and instruct the model to output code in that language. Option A is wrong as temperature controls creativity. Option B is wrong as fine-tuning is overkill.

Option D is wrong as top_p controls diversity.

178
MCQmedium

You are deploying a generative AI application. You have the JSON configuration above. You need to ensure that the model stops generating output at the end of each sentence. The current configuration uses a stop sequence of "\n". What should you do?

A.Change the stop sequence to [".", "!" , "?"]
B.Reduce the maxTokens to 500.
C.Set the topP to 0.5.
D.Set the temperature to 0.
AnswerA

These are sentence-ending punctuation marks.

Why this answer

Option A is correct because the goal is to stop generation at the end of each sentence. A sentence can end with a period (.), exclamation mark (!), or question mark (?). The current stop sequence of "\n" only stops at newline characters, which does not guarantee sentence boundaries.

By changing the stop sequence to an array containing [".", "!", "?"], the model will halt output whenever it generates any of these punctuation marks, ensuring each sentence is complete.

Exam trap

The trap here is that candidates often confuse parameters that control output randomness (temperature, topP) or length (maxTokens) with parameters that define explicit stopping conditions, leading them to select options that do not actually enforce sentence boundaries.

How to eliminate wrong answers

Option B is wrong because reducing maxTokens to 500 limits the total number of tokens generated but does not control where generation stops relative to sentence boundaries; the model could still cut off mid-sentence. Option C is wrong because setting topP to 0.5 adjusts the nucleus sampling threshold, affecting token selection diversity, not the stopping condition; it does not enforce sentence-ending punctuation. Option D is wrong because setting temperature to 0 makes the model deterministic (greedy decoding) but does not introduce a stop condition based on sentence-ending characters; the model will still generate until maxTokens or another stop sequence is reached.

179
MCQhard

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?

A.Set temperature to 0 in the Azure OpenAI completion request.
B.Reduce the top_k parameter in the search query to retrieve fewer documents.
C.Increase the chunk size in the index to provide more context per document.
D.Use Azure OpenAI Service on your own data integration to directly query the SQL database.
AnswerA

Temperature 0 makes output deterministic and grounded in provided context.

Why this answer

Option B is correct because setting temperature to 0 makes the model deterministic and less likely to invent. Option A is wrong because lowering top_k still allows creativity. Option C is wrong because adjusting chunk size affects retrieval but not the model's adherence.

Option D is wrong because integrating with the data doesn't prevent hallucination if temperature is high.

← PreviousPage 3 of 3 · 179 questions total

Ready to test yourself?

Try a timed practice session using only Implement generative AI solutions questions.