Courseiva

CCNA Generative AI Optimization Questions

26 questions · Generative AI Optimization · All types, answers revealed

1
Multi-Selecthard

Which TWO techniques should you use to improve the accuracy of a RAG pipeline?

Select 2 answers
A.Reducing the number of documents in the vector store.
B.Upgrading to a more advanced embedding model.
C.Increasing the temperature to 2.0.
D.Optimizing document chunking strategy.
E.Using only one single long chunk for all documents.
AnswersB, D

Higher quality embeddings lead to better semantic relevance.

Why this answer

Chunking strategy and better embedding models directly impact the quality of retrieved data.

2
Multi-Selectmedium

Which THREE factors contribute to increased latency in an LLM application?

Select 3 answers
A.The number of system messages used.
B.The size/complexity of the chosen model.
C.The number of output tokens generated.
D.The use of JSON output mode.
E.The number of input tokens provided.
AnswersB, C, E

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.

3
MCQmedium

You want to evaluate your prompt engineering changes quantitatively. Which method is most reliable for comparing two prompt versions?

A.Monitoring the total request count.
B.Asking developers for subjective feedback.
C.Checking if the model is running on GPT-4.
D.Running the prompts against a benchmark evaluation dataset.
AnswerD

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.

4
MCQeasy

You are configuring a chat application. What is the benefit of enabling streaming in the Azure OpenAI API?

A.Increases the model's accuracy.
B.Removes the need for a system prompt.
C.Reduces time-to-first-token (TTFT) perception for the end-user.
D.Decreases the total number of tokens consumed.
AnswerC

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.

5
MCQhard

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.The model's temperature is set too high.
B.The training dataset size is too large.
C.The model lacks enough epochs.
D.The learning rate is too high.
AnswerD

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.

6
MCQmedium

A user wants to restrict the model's output to valid JSON format. What is the most effective way to ensure this?

A.Increase the temperature.
B.Add 'output must be JSON' to the prompt.
C.Post-process the output with a regex script.
D.Enable JSON mode/Response Format in the API configuration.
AnswerD

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.

7
MCQmedium

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?

A.Implement prompt caching for static instructions.
B.Increase the top_p parameter.
C.Enable dynamic scaling in Azure App Service.
D.Decrease the number of parallel requests.
E.Use a higher model version (e.g., o1-preview).
AnswerA

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.

8
MCQhard

You are optimizing a model for a specific domain language. Which fine-tuning approach minimizes cost while maximizing domain adaptation?

A.Using LoRA (Low-Rank Adaptation).
B.Training the model from scratch.
C.Prompt engineering alone.
D.Full parameter fine-tuning.
AnswerA

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.

9
Multi-Selecteasy

Which TWO of the following strategies are commonly used to optimize for cost in Generative AI?

Select 2 answers
A.Selecting the smallest capable model for the task.
B.Caching frequent prompts or responses.
C.Increasing the context window size to 128k.
D.Enabling verbose logging.
E.Using the highest possible temperature.
AnswersA, B

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.

10
Multi-Selecthard

Which THREE parameters directly affect the output structure or style of an LLM response?

Select 3 answers
A.top_k
B.max_tokens
C.temperature
D.frequency_penalty
E.presence_penalty
AnswersC, D, E

Controls the randomness/creativity of the output.

Why this answer

Presence penalty, frequency penalty, and temperature control the style and token choice of output.

11
Multi-Selecteasy

Which THREE metrics are critical for monitoring a production Generative AI system?

Select 3 answers
A.Latency (Time-to-first-token).
B.The hardware temperature of the Azure server.
C.Model training loss.
D.Token usage per request.
E.Error rates (HTTP 4xx/5xx).
AnswersA, D, E

Vital for UX performance monitoring.

Why this answer

Latency, token usage, and error rates are the standard pillars of LLM monitoring.

12
MCQmedium

You have a large set of documents for a RAG system. How should you optimize retrieval speed?

A.Store embeddings in a dedicated vector database with indexing.
B.Process all documents in the prompt.
C.Increase the model's max_tokens.
D.Perform a brute-force search on all documents.
AnswerA

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.

13
MCQeasy

Which parameter in the Azure OpenAI API should be adjusted to make the model's output more deterministic and repeatable?

A.max_tokens
B.presence_penalty
C.temperature
D.frequency_penalty
AnswerC

A temperature of 0.0 makes the model deterministic.

Why this answer

Lowering the temperature parameter reduces randomness, making outputs more deterministic.

14
MCQhard

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?

A.Changing the model to GPT-4o.
B.Moving static task instructions to the system message.
C.Removing the API key from the request.
D.Using a higher temperature.
AnswerB

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.

15
MCQhard

You are optimizing a long-context application. Which technique is most effective for reducing context window costs in Azure OpenAI?

A.Using a smaller batch size.
B.Summarizing conversation history before passing to the next prompt.
C.Disabling streaming responses.
D.Increasing the frequency penalty.
AnswerB

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.

16
MCQeasy

An application is hitting rate limits on the Azure OpenAI service. Which action is the most standard approach for handling this in production?

A.Delete the deployment and recreate it.
B.Implement exponential backoff in the client application.
C.Disable the rate limit in the portal.
D.Increase the temperature of the model.
AnswerB

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.

17
MCQeasy

Which feature in Azure OpenAI allows you to reserve throughput for a consistent user experience during high demand?

A.Regional failover.
B.Auto-scaling groups.
C.Provisioned Throughput Units (PTUs).
D.Token throttling.
AnswerC

PTUs guarantee capacity, preventing performance degradation during bursts.

Why this answer

Provisioned Throughput Units (PTUs) provide dedicated capacity for predictable performance.

18
Multi-Selectmedium

Which TWO methods are best for debugging an LLM pipeline that fails on complex queries?

Select 2 answers
A.Inspecting raw input and output tokens via logs.
B.Tracing the request flow through the RAG pipeline.
C.Increasing the number of API users.
D.Disabling all security controls.
E.Deleting the deployment and rebuilding it.
AnswersA, B

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.

19
MCQmedium

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?

A.Include a portion of the original training data during fine-tuning.
B.Increase the fine-tuning learning rate.
C.Change the model architecture to GPT-4.
D.Reduce the batch size to 1.
AnswerA

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.

20
MCQeasy

Which cost-tracking tool in the Azure portal allows you to view usage by specific Azure OpenAI deployments?

A.Azure Network Watcher.
B.Azure Cost Analysis.
C.Azure Advisor.
D.Azure Policy.
AnswerB

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.

21
MCQhard

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?

A.It enables the model to break down complex logic into sequential steps.
B.It bypasses the safety alignment layer.
C.It forces the model to use more input tokens, reducing costs.
D.It reduces the context window size.
AnswerA

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.

22
Multi-Selecteasy

Which TWO of the following are effective ways to reduce hallucination?

Select 2 answers
A.Increasing the temperature to 0.7.
B.Removing the system prompt.
C.Using the longest possible response length.
D.Explicitly instructing the model to say 'I don't know' if the context is insufficient.
E.Providing ground-truth reference context in the prompt.
AnswersD, E

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.

23
MCQhard

You notice your model is outputting redundant information. Which parameter specifically targets the penalty for repeating tokens?

A.max_tokens
B.presence_penalty
C.frequency_penalty
D.top_p
AnswerC

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.

24
Multi-Selectmedium

Which THREE steps are necessary to successfully fine-tune an Azure OpenAI model?

Select 3 answers
A.Manually update the model weights in the code.
B.Prepare and upload a training dataset in JSONL format.
C.Disable the input filter in the portal.
D.Select a compatible base model for fine-tuning.
E.Monitor the training job progress.
AnswersB, D, E

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.

25
MCQmedium

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?

A.Azure Data Factory.
B.Azure Cognitive Search.
C.Azure SQL Database.
D.Azure Monitor with Log Analytics.
AnswerD

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.

26
MCQmedium

Which technique is most appropriate for optimizing RAG performance when the vector database returns too much noisy information?

A.Changing the embedding model to a smaller one.
B.Implementing a re-ranking stage.
C.Increasing the number of chunks retrieved.
D.Reducing the temperature to 0.
AnswerB

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.