Home / GenAI Engineer practice test / Evaluation and Monitoring

Free · 8 questions with explanations

Evaluation and Monitoring: Databricks Generative AI Engineer Associate Practice Questions

Exam-style questions on Evaluation and Monitoring. Pick your answer, then open the explanation to see why it's right — and why the other options are wrong.

1 Evaluation and Monitoring

A team enables Databricks Agent Monitoring on a deployed LangChain agent. Agent Monitoring is configured with the same LLM judge metrics used in offline evaluation: faithfulness and answer relevance. What is the PRIMARY operational benefit of running Agent Monitoring continuously in production compared to running only periodic offline evaluations?

  1. AAgent Monitoring uses a faster LLM judge model than offline evaluation, reducing the cost of each scoring call by approximately 50%
  2. BAgent Monitoring stores evaluation results in Unity Catalog with automatic versioning, whereas offline evaluation results are stored only in MLflow experiment runs without version history
  3. CAgent Monitoring eliminates the need for any offline pre-deployment evaluation because it covers all quality assurance after deployment
  4. DAgent Monitoring continuously applies quality judges to real production traffic — catching distribution shift, adversarial query patterns, and corpus-driven quality changes that a fixed offline evaluation dataset cannot represent, enabling teams to detect regressions between scheduled evaluations and trigger rapid response before degradation impacts many users
Show answer & explanation

Correct answer: D

WHY D is correct: The core advantage of continuous production monitoring over periodic offline evaluation is coverage of live, dynamic traffic. Production queries differ from curated evaluation sets — they include unanticipated phrasings, edge cases, domain shifts, and adversarial patterns. Agent Monitoring detects regressions caused by changes in user behavior, corpus drift, or downstream model updates in real time, allowing the team to respond before widespread user impact occurs. WHY NOT A: Agent Monitoring does not inherently use a 'faster' LLM judge model. Both offline and online evaluation can use the same judge, and cost differences depend on sampling rate, not a fixed 50% reduction. WHY NOT B: Both offline evaluation results (in MLflow) and Agent Monitoring results can be stored with versioning in Databricks. The storage mechanism is not the primary functional difference between them. WHY NOT C: Agent Monitoring and offline evaluation serve complementary roles in the Gen AI application lifecycle. Offline evaluation provides a controlled, reproducible quality gate before deployment. Production monitoring is not a replacement — the two phases are explicitly distinguished in the Gen AI lifecycle framework.

2 Evaluation and Monitoring

A company deploys multiple LLM-backed applications via Databricks AI Gateway. The security team needs to enforce that no single team can exceed 100,000 tokens per minute across all their calls, and the finance team needs a query-able log of all token consumption grouped by application for monthly cost allocation. Which AI Gateway features address BOTH requirements simultaneously?

  1. ARate limiting — configure a per-route token rate limit of 100,000 tokens/minute per team key; Usage Tables — query the AI Gateway usage tables in SQL to aggregate token consumption by application for cost allocation
  2. BModel Signatures — define token count fields in input/output schemas so every request documents its token usage
  3. CMLflow Experiment tags — tag every AI Gateway request with the application name and export tags to an analytics dashboard
  4. DInference table column filtering — create a view over the inference table that exposes only token-count columns to finance
Show answer & explanation

Correct answer: A

WHY A is correct: AI Gateway rate limiting configures per-route token-per-minute caps that are enforced at the gateway layer — requests exceeding the limit receive a 429 response without reaching the LLM, preventing budget overrun. AI Gateway Usage Tables capture cumulative token consumption per route/key/application in a structured, query-able format that finance teams can aggregate per application for monthly cost allocation. Both capabilities are native AI Gateway features. WHY NOT B: Model Signatures define the input/output schema structure for validation purposes. They do not enforce rate limits and do not log token consumption to a cost-allocation data store. WHY NOT C: MLflow Experiment tags are associated with training and evaluation runs, not with production AI Gateway serving requests. AI Gateway requests are not automatically tagged to MLflow experiments. WHY NOT D: Filtering inference table columns controls data access visibility but does not enforce rate limits, and inference tables log endpoint-level request/response data — not necessarily structured by AI Gateway application routing keys in the format needed for per-application cost allocation.

3 Evaluation and Monitoring

A company has deployed a customer-facing RAG chatbot for technical support. Six months post-launch, the team needs to establish ongoing production monitoring. Which set of metrics is MOST comprehensive for this specific deployment scenario?

  1. ATraining loss curve, validation perplexity during fine-tuning, and the number of GPU hours consumed per training epoch
  2. BNumber of active users per day, page load time of the chat UI, and the size of the Vector Search index on disk
  3. CBLEU score on a fixed benchmark, embedding model training set size, and Delta table write throughput
  4. DResponse faithfulness to retrieved context (LLM judge), answer relevance to user query (LLM judge), endpoint latency (p50/p95), token consumption per request, toxicity/safety flag rate, and retrieval quality (Precision@K on sampled queries)
Show answer & explanation

Correct answer: D

WHY D is correct: Production RAG monitoring requires a multi-dimensional metric set: faithfulness and relevance catch quality degradation from document corpus drift; latency (p50/p95) detects serving infrastructure issues; token consumption drives cost monitoring; safety flag rate detects abuse pattern changes; and retrieval quality helps isolate whether degradation originates in the retriever vs the generator. WHY NOT A: Training loss and GPU hours are training-time metrics. They are irrelevant to a deployed, serving endpoint that has already been trained. Production monitoring tracks inference-time behavior, not training process health. WHY NOT B: UI page load time and index storage size are infrastructure concerns, not LLM quality or safety metrics. Daily active users is a product engagement metric, not a model quality signal for an AI chatbot. WHY NOT C: BLEU score requires ground-truth reference texts to compute — it cannot be calculated in real-time on live production traffic without pre-prepared references. Embedding model training set size and Delta write throughput are static configuration attributes, not ongoing monitoring signals.

4 Evaluation and Monitoring

A team uses the Databricks Agent Evaluation review app to collect SME ratings on their deployed agent's responses. Subject matter experts annotate responses with thumbs-up/thumbs-down ratings and optional free-text corrections. Which Databricks-native workflow BEST describes how to use these annotations to improve the agent in the next iteration?

  1. AExport SME annotations to a CSV file and share with the model vendor to request a custom model fine-tune from the third party
  2. BUse the thumbs-down annotations as negative examples in a reward model for RLHF, replacing all other evaluation and training processes
  3. CIgnore the free-text corrections and use only the binary thumbs-up/thumbs-down ratings to compute a human preference score for each model version in MLflow
  4. DUse the Databricks review app's built-in integration to store annotations in a Unity Catalog Delta table; use thumbs-down examples (with free-text corrections as expected responses) to extend the offline evaluation dataset in MLflow Agent Evaluation; re-run mlflow.evaluate() with the augmented dataset against the updated agent to measure improvement; optionally use curated annotation pairs as fine-tuning data for the next model version
Show answer & explanation

Correct answer: D

WHY D is correct: The Databricks review app integrates with Unity Catalog to persist SME annotations. The recommended workflow is: (1) stored annotations become new labeled evaluation examples (thumbs-down + free-text correction = question + expected_response pair), (2) these augment the offline evaluation dataset registered in MLflow Agent Evaluation, (3) re-running mlflow.evaluate() with the augmented dataset against the updated agent measures whether the specific failure modes identified by SMEs have been resolved, (4) high-quality annotation pairs can be used as supervised fine-tuning data for future model versions. WHY NOT A: Exporting to CSV and sharing with an external vendor is operationally slow, introduces data governance risks, and bypasses the Databricks-native annotation-to-evaluation pipeline that the review app is designed to support. WHY NOT B: RLHF (Reinforcement Learning from Human Feedback) is a valid but complex technique that requires significant infrastructure for reward model training. Using thumbs-down annotations exclusively for RLHF while abandoning offline evaluation and prompt engineering ignores simpler, faster improvement levers available in the Databricks platform. WHY NOT C: Ignoring the free-text corrections discards the most actionable signal in the SME annotations — the expert's statement of what the correct response should have been. Binary ratings alone provide a quality signal but not the expected response content needed to build evaluation examples or fine-tuning pairs.

5 Evaluation and Monitoring

A developer writes a custom Scorer to evaluate whether the agent cites sources in its responses. The scorer should return 1.0 if at least one citation is present (e.g., '[Source: doc_name]') and 0.0 if no citation is found. Which implementation structure is correct for registering this as a Databricks custom Scorer?

  1. Adef citation_scorer(response): return 1.0 if '[Source:' in response else 0.0, then call mlflow.evaluate(model, data, extra_metrics=[citation_scorer])
  2. BA plain Python function that raises NotImplementedError for non-string inputs and returns True/False for citation detection, registered via mlflow.log_metric('citation_scorer', score)
  3. CA LangChain Runnable chain that takes response text as input, applies a regex tool, and outputs a binary classification label stored in a Delta table
  4. Dfrom mlflow.metrics import make_metric; citation_scorer = make_metric(eval_fn=lambda row: MetricValue(scores=[1.0 if '[Source:' in row.predictions else 0.0]), greater_is_better=True, name='citation_presence'); then pass citation_scorer in the extra_metrics list to mlflow.evaluate()
Show answer & explanation

Correct answer: D

WHY D is correct: MLflow custom metrics (Scorers) are created using mlflow.metrics.make_metric(), which accepts an eval_fn that receives a row object with predictions and targets fields, and returns a MetricValue. The metric is given a name and a greater_is_better direction. It is passed to mlflow.evaluate() via the extra_metrics parameter. This is the correct API for integrating custom scoring logic into MLflow's evaluation framework. WHY NOT A: A plain Python function passed directly to extra_metrics without the make_metric wrapper is not recognized by MLflow as a valid custom metric. The extra_metrics parameter expects EvalMetric objects created with make_metric, not raw callables. WHY NOT B: Returning True/False (boolean) instead of a numeric MetricValue, and using mlflow.log_metric() to log a single number outside of the evaluate() framework, does not integrate the scorer into per-example evaluation tables or aggregate evaluation reports. WHY NOT C: A LangChain Runnable chain that writes to a Delta table is a data pipeline, not an MLflow evaluation scorer. It does not integrate with mlflow.evaluate() and cannot produce per-example evaluation results within the MLflow evaluation framework.

6 Evaluation and Monitoring

A team has enabled inference logging on a Databricks Model Serving endpoint for their RAG application. After one week of production traffic, they want to identify whether the retriever is returning relevant context for user queries. Which analysis using inference logs is MOST directly useful for this purpose?

  1. AFilter the inference logs to extract the retrieved document chunks logged alongside each request; sample 100 query–chunk pairs and compute a retrieval relevance score (using an LLM judge or manual review) to measure what percentage of retrievals are topically appropriate to the user query
  2. BQuery the inference log table to count the total number of requests per hour and plot hourly traffic volume to identify peak usage times
  3. CCompare the average response length in tokens across different time periods to detect whether the model is becoming more verbose over time
  4. DCheck the inference log table for any rows with NULL response values to identify failed requests and measure the endpoint's error rate
Show answer & explanation

Correct answer: A

WHY A is correct: Inference logs capture the full request payload, including retrieved context chunks when logged as part of the input. Sampling logged query–chunk pairs and scoring retrieval relevance directly measures the retriever's production performance on real user traffic — the exact goal stated. This identifies whether the retriever is failing on specific query types or corpus sections in production. Inference logs capture the full request payload, including retrieved context chunks when logged as part of the input. Sampling logged query–chunk pairs and scoring retrieval relevance directly measures the retriever's production performance on real user traffic — the exact goal stated. This identifies whether the retriever is failing on specific query types or corpus sections in production. WHY NOT B: Hourly traffic volume analysis is operational capacity planning, not retrieval quality assessment. It tells nothing about whether the retrieved chunks are relevant to user queries. WHY NOT C: Response verbosity over time may indicate model behavior drift but does not measure retrieval relevance. A brief response can still be grounded in highly relevant retrieved context, or a verbose response may be based on irrelevant chunks. WHY NOT D: Counting NULL responses measures endpoint reliability and error rate — an important operational metric but entirely separate from retrieval quality. NULL responses indicate system failures, not relevance degradation.

7 Evaluation and Monitoring

A data scientist runs mlflow.evaluate() on a RAG agent's responses using Databricks Agent Evaluation. The evaluation dataset contains 50 question-answer pairs. After the run, which information is available from mlflow.evaluate() results that CANNOT be obtained from simple batch inference alone?

  1. AThe raw text of each model response for all 50 questions
  2. BThe total wall-clock time to generate all 50 responses
  3. CThe names of the Python packages installed in the evaluation environment
  4. DPer-example LLM judge scores (e.g., faithfulness, answer correctness, relevance) for each of the 50 evaluation examples, aggregated metrics across the dataset, and a comparison against previous evaluation runs logged to the same MLflow experiment
Show answer & explanation

Correct answer: D

WHY D is correct: mlflow.evaluate() invokes LLM judges (configured quality scorers) against each example in the evaluation dataset, producing per-example scores for metrics like faithfulness, answer correctness, and relevance. It aggregates these into dataset-level statistics and logs them to the MLflow experiment run, enabling comparison across model versions. None of this — judge scoring, aggregation, and run comparison — is produced by simple batch inference, which only generates raw model outputs. WHY NOT A: Raw model response text is produced by both batch inference and mlflow.evaluate(). It is not unique to the evaluation function. WHY NOT B: Wall-clock inference time can be measured by any timed batch inference loop. MLflow logs latency metrics more precisely, but wall-clock time measurement alone is not unique to mlflow.evaluate(). WHY NOT C: Package names in the evaluation environment are logged as part of MLflow's run environment metadata — a side effect of any MLflow run, not a unique feature of mlflow.evaluate().

8 Evaluation and Monitoring

A team is setting up automated evaluation for a deployed knowledge base assistant. They have an evaluation dataset of 200 questions but NO labeled correct answers — only the user questions and retrieved source documents. Which judges can they apply to this dataset WITHOUT needing to first add ground-truth labels? Select ALL that apply.

  1. AAnswer Correctness — compares the generated answer against a reference to verify factual accuracy
  2. BFaithfulness — evaluates whether each claim in the response is supported by the retrieved source documents
  3. CAnswer Relevance — evaluates whether the response addresses the user's question
  4. DRetrieval Precision — evaluates whether the retrieved document chunks are relevant to the user's query
  5. EDocument Recall — measures what fraction of the correct reference documents were retrieved
Show answer & explanation

Correct answer: BCD

WHY BCD is correct: Faithfulness (B) requires only the response and its retrieved context — both available without ground truth. Answer Relevance (C) requires only the question and the response — both available at inference time. Retrieval Precision (D) evaluates whether each retrieved chunk is relevant to the query — requires only the query and retrieved chunks, no labeled answer. WHY NOT A: Answer Correctness explicitly compares the generated answer against a labeled reference (ground truth). Without expected_response labels in the dataset, this judge cannot compute a score — it has nothing to compare against. WHY NOT E: Document Recall measures what fraction of the 'correct' or relevant documents were retrieved. To calculate this, you must know which documents are considered correct for each query — a form of ground truth. Without labeled relevant document sets, recall cannot be computed.

Take the full GenAI Engineer practice test →