Evaluation interview question · Most asked
How would you build an evaluation pipeline for an LLM feature before and after each prompt or model change?
Design Asked in Native AI Engineer · Machine Learning Engineer · Forward Deployed Engineer (FDE) interviews
Summary
Create a versioned test set of realistic inputs with expected outputs or grading criteria, score outputs with automatic checks (exact match, schema validation, code tests) and calibrated LLM-as-judge rubrics where needed, run it in CI on every prompt, model or retrieval change, and compare against the current baseline before shipping. Keep adding production failures to the set.
Longer Answer
- Dataset: real user inputs (anonymised), edge cases, adversarial inputs; labelled by people who know the domain.
- Graders: deterministic checks first; LLM judges with clear rubrics, validated against human labels on a sample; pairwise comparisons for subjective quality.
- Metrics: task success, faithfulness, format validity, refusal correctness, latency and cost.
- Process: thresholds that block regressions; review of changed outputs, not only averages.
- Online: A/B tests or shadow traffic, user feedback, and monitoring for drift.
Key Points
- Versioned dataset of real cases.
- Deterministic checks before LLM judges.
- Validate judges against humans.
- Run on every change; block regressions.
- Feed production failures back.
Explanation
What interviewers look for
Treating evals like a test suite, with calibrated graders and regression gates.
More Evaluation questions
- When do you use code graders, model graders or human graders?
- Evaluation leaf: Why separate retrieval metrics from generation metrics?
- Evaluation leaf: Red teaming for LLM apps?
- Evaluation leaf: Pros/cons of LLM-as-judge?
- How do you decide whether a prompt change is an improvement?
- Evaluation leaf: What is faithfulness/groundedness?
- Evaluation leaf: What is a golden dataset?
- Evaluation leaf: Online metrics that matter?