AI Advanced · 20% practice allocation

AI Advanced: AI Observability & Evals Practice Questions

5 free sample questions from the AI Observability & Evals domain, with answers and explanations. The full AI Advanced bank has 794 questions across 5 domains. Questions follow the AI Advanced course content.

1.

An AI team wants to run a statistically valid A/B test comparing two system prompts for a customer-facing Q&A bot. A junior engineer proposes running Prompt A for the first two weeks of the month and Prompt B for the last two weeks. What is the MOST significant flaw in this experimental design?

  • A. Sequential prompt testing violates most LLM providers' terms of service, which require that prompt variants be evaluated concurrently through their official experimentation APIs rather than rotated in production.
  • B. Two weeks is always too short a period to collect enough samples for statistical significance, so each prompt must run for at least a full month before comparing results.
  • C. The design confounds prompt version with time, meaning any observed difference could be caused by temporal factors (e.g., different user behavior on weekdays vs. month-end) rather than the prompt itself.✓ Correct
  • D. A/B testing requires both prompts to run on an identical model version, which cannot be guaranteed across two calendar periods because providers silently update hosted model snapshots between the periods without any versioning notice to API customers.
Explanation

Confounding prompt version with time is correct. Running each variant in its own time window causes temporal confounding: differences in traffic patterns, user intent, or outside events between the two periods cannot be told apart from the prompt's effect. A proper A/B test randomly assigns requests to the variants at the same time. The claim that two weeks is always too short is wrong in absolute terms: two weeks may be enough depending on traffic volume, because significance depends on sample size, not calendar duration alone. The claim that the model version cannot be guaranteed across periods is a false constraint: model version is a separate variable that can be controlled (for example, by pinning it) regardless of the time period. The claim that sequential testing violates provider terms of service is false: no major LLM provider prohibits A/B testing of prompts.

2.

An observability engineer is instrumenting a multi-step LLM pipeline: (1) query rewriting, (2) vector retrieval, (3) LLM answer generation. They want all three steps to be correlated under a single trace in their OpenTelemetry backend. What is the MOST important mechanism that ensures all three spans are linked to the same trace?

  • A. The trace context (trace_id and parent span_id) must be propagated across all three steps, either automatically via OTel context propagation or explicitly when creating child spans✓ Correct
  • B. The spans must share identical resource attributes such as service.name, service.version, and deployment.environment, which the backend uses to stitch spans into one trace tree and assign them a common trace_id
  • C. All three spans must be exported through the same OTel Collector endpoint and batch processor, since the collector assembles spans into a trace based on which pipeline received them
  • D. Each span must be started with a synchronized wall-clock timestamp from the same NTP source, so the backend can group spans that fall within the same time window into a single trace
Explanation

Propagating trace context is correct: trace correlation in OpenTelemetry comes from context propagation — each child span carries the parent's trace_id and span_id, forming a causal tree. Without propagating this context across service boundaries or async steps, spans appear as disconnected root spans. The synchronized-timestamp answer is wrong — timestamps do not link spans; two unrelated spans can share a timestamp. The same-collector answer is incorrect — the collector is a transport mechanism, and multiple collectors can receive spans from the same trace. The shared-resource-attributes answer is wrong because resource attributes affect service identity in the backend but do not create parent-child relationships between spans.

3.

An AI team wants to detect 'prompt drift' in their production LLM application — the phenomenon where small, incremental changes to the system prompt accumulate over time and degrade output quality. Which observability practice BEST enables early detection of prompt drift?

  • A. Log the full system prompt or a versioned hash of it alongside each LLM call in the observability platform, then correlate prompt version with quality score trends over time✓ Correct
  • B. Instruct the model to append a 1–10 self-evaluation score to every response, log that score per call, and alert when the rolling average falls, since the model can judge its own output quality against the prompt's intent
  • C. Monitor CPU, GPU, and memory utilization on the inference servers, since accumulated prompt edits increase token counts and resource consumption, making infrastructure metrics an early drift signal
  • D. Rely on users to report quality degradation through support tickets, tagging each ticket with the date so the team can map complaint spikes back to recent prompt edits
Explanation

Logging the prompt or a versioned hash with each call is correct: teams can then segment quality metrics by prompt version and see when a particular version is associated with score degradation, making drift visible before it becomes a major incident. The CPU/GPU/memory monitoring answer is false — prompt drift affects semantic quality, not infrastructure resource consumption. The self-evaluation score answer can add noise, since models tend to rate themselves highly regardless of actual quality; it also doesn't identify the prompt version as the cause. The support-ticket answer relies on a reactive, lagging signal that detects drift only after significant user harm.

4.

A team monitoring a production recommendation LLM with Arize AI receives an alert: 'Embedding drift detected in the query encoder.' The model's task accuracy metric has not yet changed. What is the MOST appropriate immediate action?

  • A. Treat the alert as an early warning: investigate whether the distribution of incoming queries has shifted, and prepare a dataset refresh and re-evaluation before accuracy degrades.✓ Correct
  • B. Ignore the alert until task accuracy drops, because embedding drift without measurable accuracy degradation is a statistical false positive that Arize flags by default.
  • C. Roll back the LLM to the previous checkpoint immediately, since embedding drift in the query encoder is always caused by a bad model or encoder weight update.
  • D. Raise the drift alert threshold in Arize (e.g., increase the PSI cutoff) to suppress noise from statistical fluctuations in the query embedding distribution until accuracy changes.
Explanation

Embedding drift is a leading indicator of coming quality loss. It shows a shift in the input distribution before task metrics move. The right response is to investigate early and refresh the dataset. Waiting for accuracy to drop throws away the point of early-warning monitoring. Rolling back right away is premature, because drift can come from organic changes in user behavior, not just model updates. Raising the alert threshold hides a valid signal and reduces observability.

5.

What is the PRIMARY purpose of a 'score' object in Langfuse, as distinct from a 'generation' object?

  • A. A score represents a single LLM API call, recording its input messages, output completion, model name, model parameters, and prompt/completion token usage, which Langfuse nests inside a parent trace for cost and latency analysis.
  • B. A score attaches a numeric or categorical quality evaluation to a trace, span, or generation — sourced from automated evaluators or human annotators — enabling quality tracking over time.✓ Correct
  • C. A score stores the raw LLM response text and final completion payload for later retrieval and replay, while a generation stores only the prompt and completion token counts.
  • D. A score is a dashboard metric that Langfuse computes automatically from p50/p95 latency percentiles of each trace, used to flag slow generations against a configurable threshold.
Explanation

The quality-evaluation answer is correct. In Langfuse's data model, a Score is an evaluation result (e.g., a relevance rating, a human thumbs-up, or an LLM-as-judge output) attached to a trace or generation to measure quality. It is separate from the generation itself and can be added asynchronously after the fact. The option saying scores store response text and generations store token counts gets both definitions backwards. The option describing a single LLM API call with inputs, outputs, model, and token usage is describing a Generation object, not a Score. The latency-percentile option is wrong because scores are not auto-computed from latency. They are semantic quality evaluations, not performance metrics.

Test yourself across every AI Advanced domain

The free AI Advanced practice test mixes about 20 questions weighted like the exam. The full 794-question bank adds instant grading, flashcards and a timed mock exam.

Study this domain

AI Observability & Evals study guide (AI Advanced) →

Other AI Advanced domains

← All AI Advanced study resources