Free AI Intermediate practice test

20 questions for the AI Intermediate exam, taken from our 963-question bank and spread across its 5domains by their weighting. No sign-up needed: pick an answer to check it, or open “Show answer & explanation” under any question.

What this test covers

Question 1 · Azure AI Foundry & Azure OpenAI

Woodgrove Bank deploys a GPT-4o model on Azure OpenAI Service for an internal knowledge assistant. Six months later, Microsoft announces that the specific model version (e.g., gpt-4o-2024-05-13) will reach its retirement date. A junior engineer suggests simply doing nothing because Azure will automatically upgrade the deployment. What is the CORRECT statement about Azure OpenAI model version retirement?

Show answer & explanation

Correct answer: D

  • D. Customers must manually update their deployment to a newer model version before the retirement date, or the deployment will become unavailable

When an Azure OpenAI model version is retired, customers must act: they need to update their deployment to a supported model version before the retirement date. After retirement, the old version no longer serves new calls. The claim that every deployment is upgraded automatically is wrong: automatic upgrades happen only when 'auto-update to default' is explicitly enabled on the deployment, and this is not the default behavior for all deployments. The claim that the deployment is deleted and returns HTTP 404 is also wrong: calls to the retired version start to fail, but the resource is not removed in the way described. The claim that the version stays available indefinitely while the subscription is active is wrong because Microsoft controls the lifecycle of hosted model versions.

Question 2 · Azure AI Foundry & Azure OpenAI

A team is monitoring a production Azure OpenAI deployment using Azure Monitor. They have configured diagnostic settings to send logs to a Log Analytics workspace. A developer wants to write a KQL (Kusto Query Language) query to find all requests in the last 24 hours where the total token usage (prompt tokens + completion tokens) exceeded 3,000 tokens. Which Azure Monitor log table and field should the query target?

Show answer & explanation

Correct answer: B

  • B. The 'AzureDiagnostics' table, filtering on the 'total_tokens_d' field emitted by the Azure OpenAI resource diagnostic logs

When Azure OpenAI diagnostic logs are sent to a Log Analytics workspace, they appear in the 'AzureDiagnostics' table. The per-request log entries include fields such as 'prompt_tokens_d', 'completion_tokens_d', and 'total_tokens_d' that KQL can query to filter requests by token usage. The 'AppRequests' option is wrong because that is an Application Insights table for application-level telemetry. It doesn't contain Azure OpenAI token usage fields such as a 'token_count' custom dimension unless you add custom instrumentation. The 'AzureMetrics' option with the 'TokenTransaction' metric is wrong because that table holds aggregated metric time series (for example, total tokens per minute). It doesn't give the per-request detail needed to find individual requests over 3,000 tokens. The 'ContainerLog' option is wrong because that table holds stdout/stderr from containerized workloads. It has nothing to do with Azure OpenAI Service API diagnostic logging, and the managed service doesn't expose container runtime logs to you.

Question 3 · Azure AI Foundry & Azure OpenAI

A solutions architect at Tailwind Traders is configuring Azure OpenAI on your data using an Azure AI Search index as the data source. Users are reporting that the chatbot sometimes answers questions with information that is NOT present in the company documents. Which TWO configuration changes are MOST likely to reduce this behavior? (Select TWO)

Select 2 answers.

Show answer & explanation

Correct answers: B, D

  • B. Enable semantic ranking on the Azure AI Search index so that the most relevant document chunks are retrieved.
  • D. Set in_scope: true in the Azure OpenAI on your data API request body to restrict the model to only answer from the retrieved documents.

Setting in_scope: true and enabling semantic ranking are correct. Setting in_scope: true in the Azure OpenAI on your data payload tells the model to answer only from retrieved documents and to say 'I don't know' when the answer isn't found, which directly reduces out-of-scope answers. Semantic ranking improves the relevance of retrieved chunks, so the most pertinent information reaches the model. That lowers the chance the model makes up answers because of missing context. Raising the TPM quota is wrong because quota controls throughput, not answer grounding. Switching to GPT-4o-mini is wrong because a smaller model does not inherently hallucinate less, and smaller models can hallucinate more. Raising top to 50 is wrong because passing 50 retrieved chunks often adds noise and can actually increase hallucinations by diluting the relevant content.

Question 4 · Azure AI Foundry & Azure OpenAI

A DevOps engineer is managing Azure OpenAI deployments and needs to perform a zero-downtime model version upgrade for a GPT-4o deployment that currently serves 100% of production traffic. The team wants to test the new model version with 10% of live traffic before fully cutting over, and must be able to roll back instantly if issues arise. Which Azure capability and approach should they use?

Show answer & explanation

Correct answer: E

  • E. Deploy the new model version to a separate managed online endpoint and implement traffic split using the endpoint's deployment weight settings, using blue-green deployment for rollback.

Option E is correct. For zero-downtime canary/blue-green model upgrades with fine-grained traffic control and instant rollback, the recommended approach is to deploy the new model version to a managed online endpoint (in Azure AI Foundry or Azure Machine Learning) and use the endpoint's deployment weight settings to split traffic (e.g., 10% to the new 'green' deployment, 90% to the existing 'blue' deployment). Rollback is instant by resetting weights to 100%/0%. Option A is incorrect; using Azure Front Door across two separate OpenAI resources is architecturally complex, harder to manage, and not the canonical approach—it also introduces cross-region latency inconsistencies. Option B is incorrect in its premise: Azure OpenAI Service itself does not provide native traffic splitting between two deployments within the same resource; that capability lives at the managed online endpoint layer. The option conflates OpenAI resource deployments with managed online endpoint traffic split. Option C is incorrect; there is no built-in A/B testing feature within a single Azure OpenAI deployment object—traffic split is not configurable at the deployment level. Option D is incorrect; Azure OpenAI does not automatically perform canary rollouts when you update a deployment's model version—it performs an in-place update.

Question 5 · Azure AI Foundry & Azure OpenAI

A developer is using the Azure OpenAI model catalog in Azure AI Foundry and wants to deploy an open-source Mistral model alongside a GPT-4o deployment. After finding Mistral in the model catalog, which deployment target allows them to run the Mistral model as a scalable API endpoint without managing underlying infrastructure?

Show answer & explanation

Correct answer: D

  • D. Deploy as a Serverless API (pay-as-you-go) or to a Managed Compute endpoint from the model catalog

The Azure AI Foundry model catalog offers two main deployment options for third-party and open-source models. Serverless API is a pay-as-you-go managed endpoint where Microsoft manages the infrastructure and billing is per token. Managed Compute is a dedicated endpoint backed by Azure ML compute. Both provide scalable API access without the developer managing the underlying VMs or containers. A local Docker container exposed through a REST port is not a scalable production approach and is not a catalog deployment target. Deploying to AKS with a Helm chart is a custom bring-your-own-infrastructure approach, not the catalog's deployment mechanism. Azure Batch pools, even with autoscaling, are built for large-scale asynchronous batch jobs, not low-latency real-time inference API endpoints.

Question 6 · Google Vertex AI & Gemini

A retail company is using Vertex AI Matching Engine (now part of Vertex AI Vector Search) to power a product recommendation system. An engineer notices that after adding 2 million new product embeddings, the approximate nearest neighbor (ANN) query latency has increased significantly. Which TWO actions are most likely to reduce query latency while maintaining acceptable recall? (Select TWO)

Select 2 answers.

Show answer & explanation

Correct answers: B, F

  • B. Increase the number of index shards to distribute the vector index across more nodes
  • F. Increase the number of deployed index replicas (horizontal scaling of the index endpoint)

Option B is correct: increasing the number of shards distributes the ANN index across more nodes, reducing per-node query load and improving latency. Option F is correct: adding more replicas to the index endpoint enables horizontal scaling, distributing concurrent query traffic and reducing latency under load. Option A is incorrect: changing the distance measure does not materially affect ANN query latency; it changes which neighbors are returned. Option C is a common misconception — reducing leafNodeEmbeddingCount increases the number of leaf nodes visited, which can actually increase latency; the parameter to reduce for a latency-recall tradeoff is 'num_neighbors' or the tree depth configuration. Option E is incorrect: re-embedding with lower dimensionality would require re-indexing all vectors and may degrade recommendation quality; it also doesn't address the root cause of latency from additional vectors. Option D is incorrect: streaming updates affect index freshness, not query latency for an existing index.

Question 7 · Google Vertex AI & Gemini

An organization is evaluating Gemini model distillation on Vertex AI. They have a large, capable teacher model producing high-quality outputs and want to create a smaller, faster student model for edge deployment. Which THREE statements accurately describe Vertex AI model distillation? (Select THREE)

Select 3 answers.

Show answer & explanation

Correct answers: C, E, F

  • C. An unlabeled or lightly labeled dataset can be augmented with teacher-generated labels during distillation
  • E. The student model is trained to mimic the teacher model's output distribution, not just hard labels
  • F. Distillation can be used to transfer knowledge from a large Gemini model to a smaller, more efficient model

Option E is correct: distillation trains the student on soft targets (the teacher's output probability distribution), which carries more information than hard labels. Option F is correct: a core use case is compressing a large Gemini model into a smaller, faster student model. Option C is correct: a teacher model can generate synthetic labels for an unlabeled dataset, which are then used to train the student — a key advantage of distillation. Option A is wrong: distillation does not require identical architectures; the student is typically smaller. Option B is wrong: the student is expected to be smaller and may sacrifice some accuracy for efficiency, not exceed the teacher. Option D is wrong: distillation is distinct from SFT on human labels; it uses teacher-generated soft labels, not just original human annotations.

Question 8 · Google Vertex AI & Gemini

A team is deploying a conversational customer support agent using Vertex AI Agent Builder. They want the agent to: (1) answer questions from a corpus of product manuals stored in Cloud Storage, and (2) escalate to a live agent by calling an internal REST API when the user's sentiment is negative. Which TWO Vertex AI Agent Builder capabilities enable these requirements respectively?

Select 2 answers.

Show answer & explanation

Correct answers: A, C

  • A. A data store connected to Cloud Storage for unstructured document search (requirement 1)
  • C. An OpenAPI tool integration that allows the agent to call the escalation REST API (requirement 2)

Vertex AI Agent Builder supports data stores backed by Cloud Storage for unstructured documents (option A), enabling the agent to retrieve and answer questions from product manuals. For calling external APIs, Agent Builder supports OpenAPI tool definitions (option C) that allow the agent to invoke REST endpoints—such as an internal escalation service—when triggered by intent or conditions. Option B (Matching Engine) requires custom engineering outside Agent Builder and is not a built-in Agent Builder capability. Option D is incorrect: Vertex AI Pipelines are ML workflow orchestrators, not conversational agent components. Option E (BigQuery data store) is used for structured, SQL-queryable data—not for unstructured product manuals in Cloud Storage.

Question 9 · Google Vertex AI & Gemini

A Vertex AI evaluation team uses Gemini as a judge in a pointwise evaluation run for a RAG-based Q&A system. The team notices that evaluation scores are consistently high (average 4.8/5) even for answers that subject-matter experts rate as mediocre. Which THREE factors are MOST likely contributing to this score inflation?

Select 3 answers.

Show answer & explanation

Correct answers: B, C, E

  • B. The evaluation prompt (judge prompt) is too permissive or vague, lacking a clear rubric that penalizes incomplete or partially correct answers
  • C. The eval dataset contains examples that are too easy or unrepresentative, so most model responses appear correct relative to the reference answers
  • E. The judge model (Gemini) has a verbosity bias, rewarding longer, more detailed answers with higher scores regardless of factual accuracy

The three most likely causes of score inflation are: (B) a vague or permissive judge prompt — if the rubric does not clearly define what constitutes a deduction (e.g., missing information, factual errors), Gemini will default to lenient scoring; (C) an unrepresentative or too-easy eval dataset — if the test cases do not include hard or ambiguous questions, most model responses will genuinely match references, inflating scores; and (E) verbosity bias — LLM judges, including Gemini, are known to favor longer, fluent responses over concise but accurate ones, inflating scores for verbose outputs. Positional bias (A) primarily affects pairwise evaluation where the order of Candidate A vs. B matters; in pointwise evaluation there is only one candidate, so positional bias is not a primary concern. Pointwise evaluation is a valid and calibrated approach (D is false); pairwise is complementary, not superior for all cases. Pipeline caching (F) would return identical outputs but would not systematically inflate scores — and caching affects component execution, not the evaluation scoring logic itself.

Question 10 · Google Vertex AI & Gemini

A team has deployed a Gemini 1.5 Pro model on Vertex AI with context caching enabled for a large system prompt. They observe that on some requests the cached context is not being used, causing higher latency and cost. A developer suggests THREE possible reasons. Which THREE are valid causes for a cache miss that would force full context re-processing?

Select 3 answers.

Show answer & explanation

Correct answers: C, E, F

  • C. The request is routed to a different Google Cloud region than where the cache was created, because context caches are region-scoped
  • E. The system prompt text was modified between the cache creation call and the inference request, causing a cache key mismatch
  • F. The cached content's TTL (time-to-live) has expired before the request was made, causing the cache entry to be evicted

Valid causes for a context cache miss include: (F) TTL expiration — context caches have a configurable TTL and are evicted after it expires, requiring full context reprocessing on the next request; (C) region mismatch — Vertex AI context caches are regional resources; if a request is routed to a different region than where the cache was created, the cache is unavailable and the context is reprocessed; (E) prompt modification — the cache is keyed to the exact content of the cached prefix; any change to the system prompt text produces a different cache key, resulting in a miss. Option D is incorrect: the non-cached (dynamic) portion of the request is expected to change and does not affect the cache for the static prefix — that is the entire purpose of context caching. Option B is partially true (model version must match), but the scenario does not indicate a model version change — it is not 'always' a cause relative to the three clearest answers. Option A is incorrect: Vertex AI context caching does not have a bypass triggered solely by total token count as long as the cached tokens meet the minimum token threshold; the non-cached portion is appended separately.

Question 11 · AWS Bedrock & AI Services

A company uses Amazon Bedrock with the on-demand pricing model. During a product launch, traffic spikes dramatically, and the team observes throttling and high latency for their most critical inference workloads. The model they use is available for provisioned throughput. What is the PRIMARY benefit of switching to provisioned throughput for this workload?

Show answer & explanation

Correct answer: D

  • D. Provisioned throughput guarantees a reserved level of model units (throughput), preventing throttling for predictable high-volume workloads

Provisioned throughput in Amazon Bedrock allows customers to purchase a fixed number of model units, guaranteeing a consistent throughput level that prevents throttling — ideal for high-volume, predictable workloads. It does not make inference free after a one-time purchase; customers pay for the committed capacity regardless of actual usage, which is a commitment cost, not free inference. Provisioned throughput applies to a specific model in specific Regions; it does not grant access to every model across all Regions or bypass Regional quotas. Provisioned throughput is a committed capacity purchase with a term (e.g., 1 month or 6 months) and does not auto-scale with traffic — that characteristic describes on-demand pricing.

Question 12 · AWS Bedrock & AI Services

A company is using Amazon Bedrock Guardrails with grounding checks enabled. A user asks the chatbot a question, and the model generates a response. The grounding check evaluates the response. What is the grounding check SPECIFICALLY designed to detect?

Show answer & explanation

Correct answer: B

  • B. Whether the model's response is factually consistent with the retrieved reference content (source documents), flagging hallucinations

Grounding checks in Bedrock Guardrails compare the model's generated response against a provided reference source (e.g., retrieved Knowledge Base passages) and compute a grounding score. Responses that contain claims not supported by the reference content are flagged as potentially hallucinated — this is precisely what grounding checks are designed for. Detecting offensive or harmful language in user input is the role of content filters, not grounding checks. Restricting conversations to approved topics is handled by the denied topics feature. Detecting PII in model responses or user inputs is handled by sensitive information filters (PII redaction), not grounding checks.

Question 13 · AWS Bedrock & AI Services

A developer at a retail company wants to build a product image moderation system. The application must automatically detect inappropriate or adult content in user-uploaded product photos before they are published to the catalog. The team wants a fully managed AWS service with no ML expertise required. Which AWS service is the MOST appropriate for this use case?

Show answer & explanation

Correct answer: C

  • C. Amazon Rekognition with content moderation labels

Amazon Rekognition provides a fully managed Content Moderation API that detects explicit, suggestive, or violent content in images and videos with no ML expertise required. This is exactly what it was built for. Bedrock with a Stability AI model is wrong because that is a generative model for creating images, not for classifying or moderating them. SageMaker with a pre-built image classifier is wrong because setting up and maintaining a custom classifier takes significant ML expertise. Textract is wrong because it extracts text and structured data from documents and does not moderate image content.

Question 14 · AWS Bedrock & AI Services

A developer at a healthcare company is building a Bedrock-powered application and wants to evaluate how well the foundation model's responses are grounded in the retrieved source documents from a Knowledge Base (i.e., the model should not hallucinate information not present in the sources). They want this evaluation to run automatically at scale without human reviewers. Which evaluation metric available in Amazon Bedrock's automatic model evaluation is MOST appropriate for this goal?

Show answer & explanation

Correct answer: D

  • D. Groundedness metric that measures whether the response is supported by the source passages

The Groundedness metric in Amazon Bedrock's automatic model evaluation measures whether the model's generated response is factually supported by the provided source passages, which directly addresses the hallucination concern in RAG use cases. It checks whether claims in the response can be traced back to the retrieved context. ROUGE-L measures lexical overlap between a generated response and a reference answer; it does not assess whether the content is grounded in source documents and is better suited to summarization tasks. BERTScore measures semantic similarity against a reference text, not against source passages, so it does not assess grounding in retrieved context. The Correctness metric with an LLM judge compares the response against a golden reference answer for factual accuracy, but it requires pre-defined reference answers and does not directly evaluate grounding against retrieved passages the way the Groundedness metric does.

Question 15 · Hugging Face & Open Source Models

A developer is exploring the Hugging Face Hub and wants to find a suitable embedding model for a multilingual semantic search application. They filter by task type and notice that some models are listed under 'feature-extraction' while others are listed under 'sentence-similarity'. They select intfloat/multilingual-e5-large and call model.encode() on a batch of queries and documents. Which statement BEST describes the correct usage pattern for this model when computing similarity scores?

Show answer & explanation

Correct answer: D

  • D. Prepend 'query: ' to each query string and 'passage: ' to each document string before encoding, then compute cosine similarity between the resulting embeddings.

Correct: D. The multilingual-e5-large model (and E5 models in general) are trained with task-specific instruction prefixes. Queries must be prefixed with 'query: ' and documents/passages with 'passage: ' before encoding. Omitting these prefixes degrades retrieval quality significantly because the model was fine-tuned to expect them. Cosine similarity is then computed between the resulting embeddings. C is wrong because E5 models require the query: and passage: prefixes — using raw strings without prefixes is a common mistake that leads to suboptimal results. B is wrong because multilingual-e5-large is a bi-encoder (it encodes queries and documents independently), not a cross-encoder; it has no predict() method for pairs. A is wrong because E5 embeddings are L2-normalized by default, making cosine similarity equivalent to dot product — but more importantly, the claim that cosine similarity should not be used is incorrect.

Question 16 · Hugging Face & Open Source Models

A team is building a private internal tool and hosts their proprietary fine-tuned models in a Hugging Face Organization rather than under individual user accounts. Which of the following are valid benefits of using a Hugging Face Organization for this purpose? (Select TWO)

Select 2 answers.

Show answer & explanation

Correct answers: B, D

  • B. Organization repositories can be set to private, restricting access to approved members only.
  • D. Multiple team members can be granted access and collaborate on the same model repositories under a shared namespace.

(B) Correct — Organizations support private repositories, so only members with the appropriate role can access the models. (D) Correct — Organizations provide a shared namespace where multiple collaborators can push, pull, and manage model files, making team collaboration straightforward. (E) Incorrect — Hugging Face does not change or upgrade the license of a model based on where it is hosted; licenses are determined by the model creator. (A) Incorrect — Rate limits on the Inference API are tied to account tier/subscription, not simply whether a model is in an organization. (C) Incorrect — Hugging Face does not offer SLA-backed uptime guarantees for standard Hub hosting; that is a feature of their enterprise/dedicated offerings.

Question 17 · Hugging Face & Open Source Models

An NLP team is building a pipeline to classify customer support tickets into categories. They want to use a Hugging Face model but need the solution to handle ticket categories that were NOT seen during the model's original training — without any additional fine-tuning. Which approach and model type best fits this requirement?

Show answer & explanation

Correct answer: D

  • D. Use pipeline('zero-shot-classification') with a model such as facebook/bart-large-mnli, providing the target category labels at inference time.

Option D is correct. Zero-shot classification models (like facebook/bart-large-mnli) use natural language inference to score candidate labels provided at inference time, so they can classify into arbitrary categories never seen during training — no fine-tuning required. Option C is wrong because a sentiment classification model (SST-2) outputs only positive/negative labels; it cannot generalize to unseen support ticket categories and would require retraining or fine-tuning. Option A is wrong because a model fine-tuned on the original support ticket categories has a fixed output head — remapping logits to new labels does not give meaningful predictions for categories outside the training distribution without additional fine-tuning. Option B (feature extraction + k-NN) could support new categories at query time, but the k-NN classifier still requires labeled examples from the original categories to compute neighbors — it does not handle truly unseen categories without any training data, making it inferior to zero-shot classification in this scenario.

Question 18 · LLM Evaluation & Fine-tuning

A team is building a golden evaluation dataset for a RAG-based HR policy assistant. They want each example to include a user question, the correct answer, and the specific document chunks that should be retrieved. Which of the following practices BEST improves the reliability of this dataset? (Select TWO)

Select 2 answers.

Show answer & explanation

Correct answers: B, D

  • B. Document clear annotation guidelines specifying what constitutes a complete and correct answer
  • D. Have at least two independent annotators label each example and measure inter-annotator agreement

B and D are correct. Clear annotation guidelines that define a complete and correct answer reduce subjectivity, and having at least two independent annotators label each example (and measuring their agreement) catches labeling errors. A is wrong: keeping only questions the system already gets right hides its failure modes; a golden set should include edge cases and hard questions. C is wrong: generating questions with the same LLM being evaluated introduces circular bias and misses its blind spots. E is wrong: a single annotator introduces idiosyncratic bias and gives no quality check. F is wrong: restricting examples to verbatim, single-chunk answers makes the benchmark unrealistically easy and misses multi-hop and ambiguous questions.

Question 19 · LLM Evaluation & Fine-tuning

An ML team is building annotation guidelines for a golden evaluation dataset for a medical Q&A system. Which three practices most improve the reliability and validity of the resulting dataset? (Select THREE)

Select 3 answers.

Show answer & explanation

Correct answers: A, D, E

  • A. Seeding the dataset with adversarial and edge-case examples
  • D. Including inter-annotator agreement measurement (e.g., Cohen's kappa) as a quality gate
  • E. Defining explicit, example-anchored rubrics for each quality dimension

Explicit, example-anchored rubrics reduce ambiguity and help annotators apply criteria consistently. Measuring inter-annotator agreement (e.g., Cohen's kappa) quantifies label reliability and identifies where guidelines need clarification. Including adversarial and edge-case examples ensures the dataset probes failure modes rather than only easy cases. Using a single annotator eliminates the ability to measure agreement and introduces unchecked individual bias. Scraping unannotated web data without review introduces noise and unlabeled examples that do not constitute a golden dataset. Using the evaluated model to pre-label creates a circular dependency and contaminates the evaluation with the model's own errors.

Question 20 · LLM Evaluation & Fine-tuning

An ML engineer wants to fine-tune a 70B-parameter LLM but has access only to consumer-grade GPUs with 24 GB VRAM each. Which technique is specifically designed to make this feasible by combining quantization with low-rank adaptation?

Show answer & explanation

Correct answer: B

  • B. QLoRA

QLoRA quantizes the base model weights to 4-bit precision (dramatically reducing VRAM requirements) and then applies LoRA adapters in a higher precision, making it feasible to fine-tune very large models on limited hardware. RLHF requires training a separate reward model and running PPO, which is more memory-intensive, not less. Full SFT with gradient checkpointing reduces activation memory but does not reduce the memory footprint of the model weights themselves sufficiently for 70B models on 24 GB GPUs. DPO is a preference-learning method that still requires full or LoRA-based fine-tuning; it does not inherently address quantization for VRAM savings.

Pick an answer on each question to check it. 20 questions in this test.

943 more AI Intermediate questions

Sign up free to start practising, or subscribe (from $4.97/mo) for the full 963-question bank, flashcards and timed mock exams.

AI Intermediate course overview and study guides →