TechSchool
Home / Interview questions / AI engineering / Evaluation and Observability

Evaluation and Observability Interview Questions

Short answers to 10 evaluation and observability interview questions.

Questions and answers (10)

Answers are written in plain English and reviewed for technical accuracy. Each answer states the point first, then the reason.

1. Design an LLM-as-judge evaluation. What are its known biases and how do you correct for them?

Use a strong model as the judge with a fixed rubric, a fixed prompt version, and a small human-labelled calibration set. Known biases are position bias, verbosity bias, self-preference, and score clustering. Correct position bias by swapping the order of the two answers and averaging the scores. Correct verbosity bias by scoring each rubric point separately and by capping answer length. Keep a human-labelled set of 200 items and report judge agreement with it.

2. How do you build an eval set when there is no labelled ground truth and experts are expensive?

Start with a small expert-labelled seed set and grow it with model-assisted labelling plus spot checks. Ask experts to review only the items where two models disagree or where the judge is unsure. This focuses expensive expert time on the cases that change a decision. A seed set of 100 to 300 items is often enough to start.

3. How do you detect and measure hallucinations in a production RAG system?

Measure hallucination with a groundedness check that compares each claim in the answer to the retrieved passages. Split the answer into claims and label each claim as supported, unsupported, or contradicted. Log the rate per model, per prompt version, and per document source. Also track the no-answer rate and the citation click rate as cheap proxies.

4. Design the regression gate that decides whether a prompt or model change ships.

Gate the ship decision on a fixed eval suite with per-slice thresholds and a statistical test against the current baseline. Block the change if any safety slice drops or if the overall score drops beyond the noise band. Run the gate on every prompt or model change and store the result with the change ID. A typical noise band is 2 points on a 500-item set.

5. Why do benchmark scores improve while users say the system got worse? Enumerate the reasons.

Benchmark scores improve while users report worse results for several reasons. The benchmark can fail to match real traffic. The test set can be contaminated. The new model can be better on average but worse on a frequent user slice. Length, tone, latency, and refusal behaviour can change without a score change. Logging and sampling gaps can also hide the regression.

6. What is benchmark contamination and how do you guard against it?

Benchmark contamination means test items or close variants appear in the training data. Guard against it by holding out a private test set that never leaves the team. Check for near-duplicate overlap with n-gram or embedding similarity before you trust a score. Report scores on the private set next to the public set.

7. What observability does a production LLM system need: traces, spans, costs, feedback?

A production LLM system needs traces, spans, token counts, cost, latency, and user feedback on every request. A trace covers one request and spans cover each step such as retrieval, the model call, and the tool call. Log the prompt version, the model name, and the tokenizer used for each span. Store feedback with the trace ID so you can join quality to cost and latency.

8. How do you manage prompt versioning and rollbacks in production?

Store every prompt as a versioned file in source control and load it by version ID at runtime. Tag each request log with the prompt version and the model name. Roll back by changing one config value, not by editing code. Keep the last known good version pinned and test the rollback path on a schedule.

9. Design online evaluation: what do you log, what do you sample, and what do you A/B?

Log the request, the model output, the latency, the token counts, and a user feedback signal. Sample a small part of traffic for human review and keep all error cases. A/B test one change at a time, such as the prompt or the model version, and compare the same metric.

10. How would you evaluate an agent, as opposed to a single model response?

Evaluate the full trajectory, not only the final answer. Score each step: tool choice, tool input, and state change. Use task success rate as the main metric and add step accuracy as a second metric.

Related lessons
Ai evaluation Evaluation safety alignment Ai agent intro Ai transformer