Which TWO techniques should you use to improve the accuracy of a RAG pipeline?
Higher quality embeddings lead to better semantic relevance.
Why this answer
Chunking strategy and better embedding models directly impact the quality of retrieved data.
26 questions · Generative AI Optimization · All types, answers revealed
Which TWO techniques should you use to improve the accuracy of a RAG pipeline?
Higher quality embeddings lead to better semantic relevance.
Why this answer
Chunking strategy and better embedding models directly impact the quality of retrieved data.
Which THREE factors contribute to increased latency in an LLM application?
Larger models take longer to compute per token.
Why this answer
Model size, input/output token count, and network transit time are the main drivers of latency.
You want to evaluate your prompt engineering changes quantitatively. Which method is most reliable for comparing two prompt versions?
Evaluation datasets ensure consistent, objective comparison metrics.
Why this answer
A/B testing with a ground-truth dataset allows for objective measurement of performance changes.
You are configuring a chat application. What is the benefit of enabling streaming in the Azure OpenAI API?
Streaming provides immediate feedback rather than waiting for the entire response.
Why this answer
Streaming improves perceived latency by delivering tokens as they are generated.
You are fine-tuning a model on Azure OpenAI and notice the training loss curve is fluctuating significantly. What is the most likely cause?
A high learning rate causes the model to overshoot optimal weights.
Why this answer
High learning rate in fine-tuning often causes divergence and loss fluctuations.
A user wants to restrict the model's output to valid JSON format. What is the most effective way to ensure this?
This feature forces the model to output valid JSON.
Why this answer
Using the 'Response Format' feature in Azure OpenAI enforces structured output, reducing parsing errors.
Your Azure OpenAI deployment is experiencing high latency during peak hours. You observe that input tokens are consistently high. Which strategy is most effective for reducing latency while maintaining quality?
Caching static portions of the prompt reduces the computation required for input token processing.
Why this answer
Prompt caching and reduction of redundant input tokens are primary methods for reducing latency in high-traffic deployments.
You are optimizing a model for a specific domain language. Which fine-tuning approach minimizes cost while maximizing domain adaptation?
LoRA is computationally efficient and requires fewer resources than full fine-tuning.
Why this answer
Low-Rank Adaptation (LoRA) allows for efficient fine-tuning by updating only a small subset of model parameters.
Which TWO of the following strategies are commonly used to optimize for cost in Generative AI?
Smaller models are significantly cheaper than flagship models.
Why this answer
Caching and choosing smaller, task-appropriate models are the primary levers for cost management.
Which THREE parameters directly affect the output structure or style of an LLM response?
Controls the randomness/creativity of the output.
Why this answer
Presence penalty, frequency penalty, and temperature control the style and token choice of output.
Which THREE metrics are critical for monitoring a production Generative AI system?
Vital for UX performance monitoring.
Why this answer
Latency, token usage, and error rates are the standard pillars of LLM monitoring.
You have a large set of documents for a RAG system. How should you optimize retrieval speed?
Vector databases provide optimized search algorithms for large datasets.
Why this answer
Using a managed vector store with optimized indexing is essential for large-scale retrieval speed.
Which parameter in the Azure OpenAI API should be adjusted to make the model's output more deterministic and repeatable?
A temperature of 0.0 makes the model deterministic.
Why this answer
Lowering the temperature parameter reduces randomness, making outputs more deterministic.
You are optimizing prompt latency by reducing tokens. Which of the following is the most effective way to reduce input token count for a recurring task?
System messages are often handled more efficiently and reduce the redundant tokens sent in the user prompt.
Why this answer
Using a system message for static instructions instead of repeating them in every user prompt saves tokens per request.
You are optimizing a long-context application. Which technique is most effective for reducing context window costs in Azure OpenAI?
Summarization compresses token counts significantly compared to passing full history.
Why this answer
Summarizing previous turns in a conversation history reduces the number of tokens sent in each request, lowering costs.
An application is hitting rate limits on the Azure OpenAI service. Which action is the most standard approach for handling this in production?
Backoff strategies allow the client to wait and retry, preventing service overload.
Why this answer
Implementing exponential backoff is the standard architectural pattern for handling rate-limited API responses.
Which feature in Azure OpenAI allows you to reserve throughput for a consistent user experience during high demand?
PTUs guarantee capacity, preventing performance degradation during bursts.
Why this answer
Provisioned Throughput Units (PTUs) provide dedicated capacity for predictable performance.
Which TWO methods are best for debugging an LLM pipeline that fails on complex queries?
Allows developers to see exactly what the model saw.
Why this answer
Prompt logging and trace inspection are the best ways to understand why a model fails on specific inputs.
You notice that your fine-tuned model is 'forgetting' base capabilities after training on a small dataset. What strategy should you use to mitigate this?
Mixing datasets prevents the model from over-optimizing for the new data at the expense of old capabilities.
Why this answer
Rehearsal or mixing in base data (catastrophic forgetting prevention) preserves core capabilities.
Which cost-tracking tool in the Azure portal allows you to view usage by specific Azure OpenAI deployments?
Provides detailed breakdowns of spending across resources.
Why this answer
Azure Cost Analysis allows you to filter and group costs by resource and resource-specific tags or deployments.
You are debugging a prompt that is performing poorly on edge cases. You decide to use a 'Chain-of-Thought' approach. Why does this improve performance?
Intermediate reasoning steps guide the model toward correct final conclusions.
Why this answer
CoT forces the model to generate intermediate reasoning steps, which improves logic in complex tasks.
Which TWO of the following are effective ways to reduce hallucination?
This stops the model from speculating.
Why this answer
Giving the model an 'I don't know' option and providing relevant context are proven techniques.
You notice your model is outputting redundant information. Which parameter specifically targets the penalty for repeating tokens?
Frequency penalty penalizes tokens based on how many times they have already appeared.
Why this answer
The frequency_penalty parameter is explicitly designed to reduce the probability of tokens that have already appeared.
Which THREE steps are necessary to successfully fine-tune an Azure OpenAI model?
JSONL is the standard format for fine-tuning data.
Why this answer
Data preparation, selecting the base model, and managing the fine-tuning job are fundamental steps.
To optimize costs for an enterprise chatbot, you want to implement token usage monitoring. Which Azure service should you integrate to track token consumption per user?
Azure Monitor allows for custom queries on token usage metrics.
Why this answer
Azure Monitor logs can be used to track and analyze usage metrics exported from Azure OpenAI instances.
Which technique is most appropriate for optimizing RAG performance when the vector database returns too much noisy information?
Re-ranking improves precision of context retrieval.
Why this answer
Re-ranking filters top retrieved results to ensure high-quality context is passed to the LLM.
Ready to test yourself?
Try a timed practice session using only Generative AI Optimization questions.