Detect that the questions changed when the evals did not
RolesAI Evaluation and ReliabilityAI Data SystemsLLM Product Engineering
The question
Your eval scores have been flat all year. A product owner tells you that what users ask has changed a lot since spring. How do you detect that change from telemetry, and what do you do with the result?
Answer it first, aloud or on paper. Then open the answer.
The answer
Show short answer
Embed the prompts, pool them per week, and compare the week with a trailing baseline using a population stability index or a KL divergence. A rising score means the input distribution moved, even when the scores on your fixed eval set did not. Alert above a threshold, then sample and label prompts from the new distribution, refresh the eval set, and recheck routing and prompts against it.
Show full answer
Why the evals cannot see it
An eval runs the model on a fixed, labeled set. It measures the model on last spring's questions. When the questions change, the eval set does not, so the score stays flat while the product quietly serves a different population.
The detector
The capstone runs a weekly job. It pools the prompt embeddings of the week and computes the PSI against the trailing 4-week baseline. The key terms table gives the usual reading: a PSI above 0.2 signals a meaningful shift. The sample output shows a quiet week at 0.08, below that threshold. The same job can use a KL divergence on the same embeddings. Track the eval score trend next to it, so that both views sit on one page.
Per application, not only global
A global score averages the drift away. The capstone's exercise computes the PSI per application id, which shows which surface moved. A support bot and a code assistant rarely drift together.
What to do with a real shift
- Sample prompts from the new distribution, label them, and refresh the eval set.
- Rerun the evals on the refreshed set. A flat score on the old set says nothing about the new one.
- Recheck anything trained or tuned on the old distribution: a routing classifier, the prompt templates, the cache thresholds.
Where it lives
In the observability plane: spans land in the span store, the weekly job reads them, writes a metric, and the alert chain picks it up.
Follow-ups
L2WorkingWhat is the difference between a PSI on prompts and a falling eval score?
Show expected answer
the PSI measures the inputs, the eval measures the model on fixed inputs, and the first can move while the second stays flat.
L2WorkingWhy run the detector per application id?
Show expected answer
a global score averages the drift away, and the per-application view shows which surface moved.
L3SeniorWhat goes wrong with a one-week baseline?
Show expected answer
weekly seasonality looks like drift, and the baseline moves along with the inputs it should measure.
L3SeniorThe PSI crossed the threshold after a marketing campaign. Is that a problem?
Show expected answer
it is a real shift in the inputs. The question is whether quality held on them, so sample, label and evaluate.
Wrong answers
Show the wrong answers that interviewers hear
“Flat eval scores mean no drift.”
The eval set is fixed, so it cannot see the inputs change.
“Compare the raw prompt strings.”
Wording varies on every request. Embeddings capture the topic distribution.
“Alert on any score above zero.”
Small values are noise. The capstone's threshold is 0.2.
Taught in
The observability dashboard capstone runs the weekly PSI job on prompt embeddings and sets the alert chain.