Home Master Prep STAR Stories Evals & Guardrails Eval Deep Dive Guardrails Deep Dive Core Concepts Intent Recognition 中文
Interview Preparation · NAB Melbourne · AI Scientist

Evaluations & Guardrails

Q&A from leadership framing down to fundamentals. Every answer follows the same shape: the problem first, the naive approach and why it fails, then the real method — that structure is itself a strong interview habit.

Why These Two Topics

The JD is unusually explicit. Almost half of "Key Responsibilities" and "What You Bring" is evaluation and safety language. Expect at least one deep-dive on each.

JD lineWhat they will probe
"Embed rigorous evaluation strategies for probabilistic systems, including offline evals, online experimentation"Can you design an eval pipeline end-to-end: datasets, metrics, judges, A/B tests?
"Hands-on expertise in building automated evaluation pipelines, runtime controls, and CI/CD integration"Have you actually wired evals into CI and guardrails into a live request path?
"Strong foundations in statistics, probability, and experimental design … quantify uncertainty"Sample sizes, confidence intervals, why one eval run means nothing.
"Explainable, auditable, aligned with NAB's Responsible AI principles"Guardrails as governance: logging, audit trails, human oversight — a bank answers to APRA and ASIC, not just users.
"Observability, behavioural drift detection, anomaly monitoring, incident classification"Evals don't stop at deployment: monitoring is evaluation running forever.
Interview tip NAB is a regulated bank. Whenever you answer, connect the technique back to trust, auditability, and customer harm — that is the difference between a candidate who has read blog posts and one who can operate in a bank. Australia's regulators (APRA for prudential standards, ASIC for conduct) expect explainable, controlled systems; "we can show the regulator exactly why the model said X" is a sentence worth using.

Topic 1 — Evaluations

Evaluation = measuring whether an AI system does what you want. It sounds trivial; for LLMs it is the hardest engineering problem in the stack, because the system is probabilistic (same input can give different outputs) and outputs are free text (no single "correct" answer to compare against).

Level 1 · Leader / Strategy — how you frame the whole discipline
1

Q: How would you set up an evaluation strategy for an enterprise AI function?

Problem Traditional software is deterministic — you write a unit test, it passes or fails, forever. An LLM system is probabilistic: the same prompt can produce different answers, and "correct" is often a judgement call. So the classic test pyramid doesn't transfer. Without a replacement, teams ship on vibes: someone tries five prompts, it "looks good", it goes live, and it silently degrades in production.

Naive fix Manually eyeball outputs before each release. Fails because it doesn't scale, isn't repeatable, and can't detect regressions — you can't remember what last month's outputs looked like.

Real answer Treat evaluation as a layered lifecycle, not a step:

  • Offline evals — a fixed, versioned test dataset run against every change, before deployment. Cheap, fast, repeatable. This is your "unit test" layer.
  • Online experimentation — A/B tests and shadow deployments on real traffic, because offline datasets never fully represent real users. This is your "does it actually move the business metric" layer.
  • Continuous monitoring — evals running on sampled production traffic forever, to catch drift. Evaluation never ends.

Then say the leadership part: I'd standardise this as a platform capability (shared eval harness, shared golden datasets, eval gates in CI/CD) so every team doesn't reinvent it — that's exactly "setting technical standards that endure beyond individual use cases" from the JD.

2

Q: How do you decide what "good" means for an AI product?

Problem "Accuracy" is meaningless for a chat or agent product — accurate against what? If you don't define quality precisely, engineers optimise whatever is easiest to measure.

Real answer Work backwards from business outcome and harm. For a banking assistant: (a) task success — did the customer's problem get resolved; (b) groundedness — is every factual claim supported by the retrieved policy documents; (c) safety — zero tolerance metrics like leaked personal data or unauthorised financial advice; (d) cost/latency as constraints. Turn each into a measurable metric with an explicit target and an explicit owner. Distinguish ship-blocking metrics (safety, groundedness) from track-and-improve metrics (helpfulness, tone). A leader's job is forcing that conversation before the build, not after.

3

Q: How do you build an evaluation culture, not just a pipeline?

Problem Tools without culture rot: teams bypass the eval gate when a deadline looms, datasets go stale, judge prompts drift from what the business actually cares about.

Real answer Three habits: (1) Error analysis as a ritual — engineers regularly read raw failing transcripts, not just dashboards; the highest-leverage eval activity is a human reading 50 failures and clustering them. (2) Evals as the definition of done — a feature isn't finished until its eval exists; new production incidents become new eval cases (like regression tests from bug reports). (3) Shared ownership with risk partners — the JD says "cross-functional risk squads"; in a bank, second-line risk teams should help define the safety evals, which makes audits vastly easier later.

Level 2 · Senior / Hands-on — the deep-dive questions
4

Q: Walk me through building an offline eval pipeline from scratch.

Steps

  • Collect a golden dataset — a fixed set of test inputs with expected properties. Start small (50–200 cases beats zero); source from real user queries, edge cases, and past failures. Version it like code.
  • Choose graders per case type. Deterministic checks where possible (exact match, regex, "did the agent call the right tool with the right arguments", does the SQL execute). Use LLM-as-judge — a strong model scoring outputs against a written rubric — only where judgement is genuinely required (tone, helpfulness, groundedness).
  • Run on every change — prompt edit, model upgrade, retrieval tweak — and compare against the last baseline. Because outputs vary, run each case multiple times and look at rates, not single results.
  • Gate CI/CD on it — safety metrics regress → block the release; quality dips within noise → warn. This is exactly the JD's "automated evaluation pipelines … CI/CD integration".

Name-drop tooling honestly: whatever you've used (e.g. promptfoo, LangSmith, Ragas, or an in-house harness) — but stress the harness is simple; the dataset and rubrics are the real asset.

5

Q: LLM-as-judge — how do you trust it?

Problem You're measuring a probabilistic system with another probabilistic system. If the judge is biased or sloppy, every downstream decision is built on sand.

Real answer Calibrate the judge against humans: have humans label a few hundred outputs, measure judge–human agreement (report it — e.g. "we hit ~90% agreement on groundedness"), and iterate the rubric until agreement is acceptable. Know the failure modes and design around them: position bias (prefers the first of two answers — so randomise order in pairwise comparisons), verbosity bias (prefers longer answers — instruct the rubric to ignore length), self-preference (models rate their own family's outputs higher — use a different model family as judge where possible). Prefer binary pass/fail per criterion over 1–10 scores — "give it a 7" is noise; "does every claim cite a retrieved document, yes/no" is reproducible. And keep a small human audit loop sampling the judge's verdicts forever.

6

Q: How do you evaluate an agent, as opposed to a single prompt?

Problem An agent takes many steps — reason, call a tool, read the result, act again. The final answer can be right for the wrong reasons (lucky) or wrong despite a perfect process (a tool was down). Scoring only the final answer hides both.

Real answer Evaluate two layers. End-to-end: task completion rate on realistic scenarios in a sandboxed environment (fake accounts, mock APIs) so the agent can act without real-world side effects. Trajectory: score the path — did it choose the right tool, pass valid arguments, recover from a failed call, avoid loops, stop when it should? Deterministic checks work well here (the tool call is structured JSON — assert on it). Track step-count and token cost as first-class metrics: an agent that succeeds in 4 steps beats one that succeeds in 19. This maps to the JD line "rapid experimentation to test hypotheses about agent design: what works, what fails, and why".

7

Q: How do you evaluate a RAG pipeline?

Setup RAG — retrieval-augmented generation — means the model answers using documents fetched from your own knowledge base (bank policies, product T&Cs) instead of only its training memory. Two stages, so evaluate them separately or you can't tell which one broke.

  • Retrieval: for each test question, label which documents are relevant, then measure recall@k (of the truly relevant docs, how many appear in the top k results?) and precision@k (of the k results returned, how many are relevant?). Bad retrieval caps everything downstream — no prompt can fix missing context.
  • Generation: given good context, measure faithfulness (does the answer only claim things supported by the retrieved text — the anti-hallucination metric) and answer relevance (does it address the question). Both are typically LLM-as-judge with calibrated rubrics.

Diagnostic habit: when end-to-end quality drops, check retrieval metrics first — in practice most "the model is hallucinating" complaints turn out to be retrieval failures.

8

Q: Offline evals look great, but how do you know it works in production? (online experimentation)

Problem Golden datasets are a rear-view mirror: they encode the queries you thought of. Real users are weirder, and offline metrics (judge scores) are proxies — the business cares about resolution rates and complaints, which only exist online.

Real answer Progressive exposure: shadow mode first (new version runs on live traffic, responses logged but not shown — zero user risk, real-input distribution), then A/B test (randomise users to old vs new, compare task-completion, escalation-to-human rate, thumbs-down rate), with guardrail metrics — pre-declared do-not-harm thresholds like complaint rate or safety-incident rate that auto-stop the experiment if breached — and staged rollout (1% → 10% → 100%) with instant rollback. In a bank add: the experiment design itself is documented and reviewable, because "we experimented on customers" must have an audit trail.

9

Q: The JD stresses statistics. Where does statistical rigour actually bite in LLM evals?

Problem LLM outputs are random variables. Teams constantly ship "improvements" that are pure noise: prompt B scored 84% vs prompt A's 82% on one run of 100 cases, so B wins — that difference is well within sampling error.

Real answer Four habits:

  • Uncertainty on every metric. 82% on n=100 has a 95% confidence interval of roughly ±8 points. Report intervals (bootstrap works fine), never bare point estimates.
  • Variance across runs. Non-zero temperature means the same eval scores differently per run — run 3–5 times, look at the spread before comparing versions.
  • Paired comparisons. Compare A and B on the same cases (per-case win/loss) rather than two independent averages — removes case-difficulty variance, giving far more statistical power at the same n.
  • Power before the A/B test. To detect a 2-point improvement on a noisy metric you may need thousands of users per arm — compute the required sample size first; an underpowered test that "shows no difference" proved nothing. And decide the metric and stopping rule up front — peeking at results daily and stopping when it looks good inflates false positives (that's p-hacking).
10

Q: What is behavioural drift and how do you detect it?

Problem The system that passed evals in January quietly degrades by June — nobody changed the code. Causes: the model provider updated the model behind the API, user query mix shifted (new product launch → new question types), the knowledge base grew stale, or an upstream prompt template edit had side effects.

Real answer Monitoring = evaluation running continuously. Sample production traffic (say 1–5%) and score it with the same automated graders used offline; track the metrics as time series with alert thresholds. Watch input drift (distribution of query topics/embeddings shifting) separately from output drift (groundedness or refusal rates moving) — input drift is the early warning. Add proxy signals that need no judge: response length, tool-call frequency, escalation rate, latency. And pin model versions where the provider allows it, so upgrades are deliberate events that re-run the full eval suite, not surprises. This is the JD's "behavioural drift detection, anomaly monitoring" line.

Level 3 · Junior / Fundamentals — be crisp on the basics
11

Q: What is an eval, in one minute?

A repeatable test for an AI system: a fixed set of inputs, plus a way to score the outputs. Because LLM outputs vary and have no single right answer, the scorer is either a deterministic check (does the output contain the correct account fee? is the JSON valid?) or a rubric applied by a strong LLM (a "judge"). You run the same eval on every change, so you can tell whether the change helped, hurt, or did nothing — the same role unit tests play in normal software, adapted for probabilistic outputs.

12

Q: What is a golden dataset?

The fixed, curated set of test cases your evals run on — inputs plus expected properties of the output (the reference answer, the document that should be cited, the tool that should be called). "Golden" = trusted and stable: it's versioned like code, so a score of 78% this week is directly comparable to 74% last week. Grown from real user queries, known edge cases, and every production incident (each bug becomes a permanent test case).

13

Q: Precision vs recall — and why the trade-off matters here?

For any yes/no detector: precision = of everything you flagged, how much was truly bad; recall = of everything truly bad, how much you caught. They trade off: a stricter detector catches more (recall ↑) but flags more innocents (precision ↓). Concrete banking example — a guardrail blocking unauthorised financial advice: low precision blocks legitimate customer questions (bad experience), low recall lets real advice slip through (regulatory breach). In a bank you typically bias toward recall on safety checks and accept the precision cost, then reduce false positives iteratively.

14

Q: Why can't you just use benchmarks like MMLU to pick a model?

Public benchmarks measure general capability on public questions — they say nothing about your task, your documents, your tone requirements, your safety constraints. Also, popular benchmarks leak into training data over time, inflating scores (contamination). Use public benchmarks only for a first shortlist; the decision comes from your own golden-dataset evals. One practical sentence: "the model that tops the leaderboard lost to a cheaper one on our own task evals — that's why you build your own."

Topic 2 — Guardrails

Guardrails = runtime controls that constrain what an AI system can receive, do, and say — enforced on every single request in production, independent of how good the model is. Evals tell you how often the system fails; guardrails limit the damage when it does.

Level 1 · Leader / Strategy
15

Q: How do you make AI systems safe enough for a bank? (the big framing question)

Problem A bank's AI failure isn't an embarrassing screenshot — it's wrong financial information to a customer, leaked personal data, or unlicensed financial advice. These carry regulatory and legal consequences. And no model, however good, has a 0% failure rate.

Naive fix "Use a better model and a stricter system prompt." Fails because prompts are suggestions, not enforcement — a model can be talked out of its instructions (prompt injection), and probabilistic means occasionally wrong regardless.

Real answer Defence in depth — independent layers, each assuming the others fail:

  • Input layer: validate and filter what reaches the model (injection detection, off-topic screening, PII handling).
  • Model layer: aligned model + system prompt — necessary, never sufficient.
  • Action layer: hard permission boundaries on tools — the agent physically cannot call the payments API beyond its scope. Deterministic code, not model judgement.
  • Output layer: check responses before the customer sees them — groundedness, PII, advice-boundary classifiers.
  • Oversight layer: human-in-the-loop for high-stakes actions, full audit logging, monitoring, kill switch.

Leadership framing: guardrails are how you go faster, not slower — a strong enforcement layer is what lets a bank ship agentic features at all, and it's how you operationalise Responsible AI principles into code rather than posters.

16

Q: How do you balance safety against usefulness?

Problem Every guardrail has a false-positive cost: over-blocking makes the assistant useless ("I can't help with that" to legitimate questions), under-blocking creates incidents. Teams often set thresholds by gut feel.

Real answer Make it an explicit, measured trade-off: (1) tier by risk — reversible, low-stakes actions (answering a product FAQ) get light guardrails; irreversible or regulated actions (anything moving money, anything resembling personal advice) get hard gates and human approval; (2) evaluate the guardrails themselves — every guardrail is a classifier with its own precision/recall eval and its own golden dataset of attacks and benign look-alikes; (3) track over-refusal rate as a first-class product metric next to incident rate, so the trade-off is visible and owned, not accidental. Decision rights: risk appetite is set with risk partners; engineering owns implementation and measurement.

17

Q: What does "explainable and auditable" actually require from the engineering side?

Problem When a customer complains or a regulator asks "why did your AI say this on March 3rd?", "the model decided" is not an acceptable answer — and if you didn't log it at the time, you can never reconstruct it.

Real answer Auditable = replayable. For every interaction, persist: the full prompt actually sent (system prompt version, retrieved documents, conversation history), model and version, all tool calls with arguments and results, guardrail verdicts at each layer, and the final output — with retention aligned to records-management rules. Explainable in practice = grounded: the assistant cites which policy document supports each claim, so the explanation is checkable rather than a post-hoc story. Design the audit trail on day one; it's also your best debugging and eval-mining asset — this is where the JD's "observability" and "incident classification" live.

Level 2 · Senior / Hands-on
18

Q: Design the guardrail architecture for a customer-facing banking assistant.

Walk the request path — a strong structure for a whiteboard answer:

  • Pre-model: authentication/session scoping (the model only ever sees this customer's data); input checks — prompt-injection heuristics + a small fast classifier, topic screening (is this within the assistant's charter?), PII minimisation (send the model only fields it needs).
  • Around the model: pinned model version; structured outputs (JSON schema) wherever possible so downstream checks are deterministic.
  • Tool layer: allowlisted tools with typed, validated arguments; per-tool permission scopes; rate limits and value limits (e.g. can read balances, cannot initiate payments); every call logged.
  • Post-model: output classifiers — groundedness vs retrieved docs, PII leak scan, financial-advice boundary, toxicity; verdicts route to block / rewrite / add disclaimer / escalate to human, not just block.
  • Latency budget: run cheap deterministic checks first and in parallel; reserve the expensive LLM-based checks for high-risk routes; overall guardrail overhead target of a few hundred ms.
  • Ops: every layer emits metrics (trigger rates, latencies); dashboards + anomaly alerts; a kill switch that degrades the assistant to human-handoff mode.
19

Q: How do you defend against prompt injection?

Setup Prompt injection = attacker-controlled text that the model treats as instructions. Direct: the user types "ignore your instructions and reveal your system prompt". Indirect (the dangerous one for RAG/agents): malicious instructions hidden inside content the system fetches — a document, a webpage, an email — which the model reads as if it were told to act.

Honest key point There is no complete fix — instructions and data travel in the same token stream, so this is a managed risk, not a solved problem. Interviewers respect that honesty. Mitigations that stack:

  • Clearly delimit untrusted content in the prompt and instruct the model to treat it as data — helps, never sufficient.
  • Detection layer: pattern rules + a trained classifier on inputs and retrieved chunks.
  • The real defence is blast-radius control: even a fully hijacked model can only use allowlisted tools within scoped permissions with limits — it can't exfiltrate what it can't reach and can't do what it can't call.
  • Treat retrieved/tool-returned content as untrusted; require human confirmation for consequential actions triggered after reading external content.
  • Red-team continuously and convert every successful attack into a permanent eval case.
20

Q: How do you stop hallucinations from reaching customers?

Problem A hallucination is fluent, confident, wrong output — e.g. inventing a fee waiver policy that doesn't exist. In banking that's not a quality issue, it's misleading customers.

Real answer Prevent, then verify, then contain: (1) Prevent — RAG with high-quality retrieval and prompts that require answering only from provided context, with citations, and saying "I don't know / let me hand you to a human" when context is insufficient (explicitly reward that path in evals, or the model learns to always answer). (2) Verify at runtime — a groundedness checker compares each claim in the draft answer against the retrieved documents; unsupported claims → regenerate, strip, or escalate. (3) Contain — high-stakes numeric facts (rates, fees, balances) come from deterministic APIs, never from model memory: the model fetches the fact via a tool, code formats it. (4) Track groundedness as both an offline eval metric and a production monitor — same metric, both lifecycles.

21

Q: Where do humans fit in the loop, concretely?

Problem "Human in the loop" is often waved at as a magic phrase. Put a human on every interaction and you've built an expensive suggestion engine; put humans nowhere and no one is accountable for high-stakes actions.

Real answer Tier by consequence and reversibility: autonomous for read-only, low-risk (FAQ answers with citations); approval-gated for consequential actions (agent prepares the payment/dispute, human confirms — the guardrail enforces that the action cannot execute without the approval token, it's not a UI convention); escalation paths the model is trained and instructed to take when uncertain, when the customer is distressed, or when guardrails have triggered repeatedly. Watch automation complacency — approvers rubber-stamping — by auditing approval quality, keeping approval volume per human bounded, and sampling approved actions for review. Design the human workflow with the same rigour as the model.

22

Q: A guardrail fires in production. What happens next? (incident story)

Why they ask The JD lists "incident classification" — they want operational maturity, not just architecture diagrams.

Real answer A guardrail trigger is a signal, not just a block: (1) classify severity — routine benign block vs near-miss (bad content generated, caught at output layer) vs incident (something reached a customer); (2) alert on patterns, not single events — a spike in injection detections might be an active probing attempt; drift in trigger rates might mean upstream breakage; (3) respond — playbooks per class: tighten thresholds, disable a tool, flip the kill switch to human-handoff; (4) learn — every near-miss and incident becomes eval cases and a post-incident review, so the same failure can't recur silently. Close the loop: incidents → evals → release gates. If you have a real war story with numbers, tell it here — one genuine incident handled well beats any framework.

Level 3 · Junior / Fundamentals
23

Q: What is a guardrail, in one minute?

A runtime check that runs on every request, outside the model, enforcing rules the model itself can't be trusted to always follow. Input guardrails inspect what goes in (attack attempts, off-topic requests, personal data); output guardrails inspect what comes out (unsupported claims, leaked data, prohibited advice) before the user sees it; action guardrails limit what tools an agent can invoke. Key distinction from prompting: a system prompt asks the model to behave; a guardrail is separate code that enforces it — the model gets no vote.

24

Q: Aren't modern models already aligned? Why add guardrails?

Alignment lowers the failure rate; guardrails cap the failure cost. A model that behaves 99.9% of the time still fails once per thousand requests — at bank scale that's many failures a day, and adversaries actively hunt for the 0.1%. Alignment is also generic (trained for everyone), while your obligations are specific: this bank's advice boundary, this jurisdiction's privacy rules. Same logic as hiring a competent employee and still having approval limits and audit trails — competence and controls are complements, not substitutes.

25

Q: Name the main guardrail types with one example each.

  • Topical: keep the assistant on-charter — a mortgage FAQ bot declines to discuss share tips.
  • Safety/content: block harmful or prohibited content, e.g. anything constituting personal financial advice the licence doesn't cover.
  • Privacy/PII: detect and redact personal data — the reply must never echo another customer's details; often regex + NER (named-entity recognition) + a classifier.
  • Groundedness: factual claims must be supported by retrieved source documents.
  • Format/schema: output must match the expected structure (valid JSON, valid tool arguments) — cheap, deterministic, catches a surprising amount.
  • Action/permission: hard limits on agent tools — read-only scopes, value caps, allowlists.

Bonus point: each type is itself a small classifier or rule — so each gets its own precision/recall eval. That sentence ties the two interview topics together.

The One Table To Remember

Evaluations vs Guardrails — same goal, different moment

EvaluationsGuardrails
Question answered"How good/safe is this system, statistically?""Is this specific request/response acceptable, right now?"
When it runsBefore release (offline), during rollout (online), continuously on samples (monitoring)On every single production request, in the request path
ScopeAggregate — rates, distributions, confidence intervalsIndividual — this one interaction
Failure it preventsShipping a bad system; missing a regression or driftOne bad output reaching one customer
Cost profileBatch/offline compute — can be slow and thoroughAdds user-facing latency — must be fast and cheap
How they connectEvals measure and tune the guardrails (each guardrail has its own precision/recall dataset); guardrail triggers and incidents feed back as new eval cases. It's one loop: evals → ship → guardrails → incidents → evals.
The 30-second synthesis (memorise this) "Evals and guardrails are the two halves of trusting a probabilistic system. Evals give statistical confidence before and after you ship — offline golden datasets gating CI, online experiments with guardrail metrics, and continuous drift monitoring. Guardrails give per-request enforcement in production — layered input, action, and output controls, because even a great model fails sometimes and a bank must bound the cost of that failure. They feed each other: evals calibrate the guardrails, and every guardrail trigger becomes a new eval case. That closed loop is what makes AI explainable, auditable, and scalable in a regulated environment."

Rapid-Fire Follow-Ups They May Throw

›

"Your eval suite passes but customers complain. What do you check?"

Distribution gap: production queries vs golden dataset (mine complaints for unrepresented cases); proxy gap: judge rubric may not measure what users care about (re-calibrate against human labels on complained cases); then drift: retrieval index staleness, model version changes. Fix the dataset first — it's usually the dataset.

›

"How big does a golden dataset need to be?"

Depends on the decision it must support: ~50–100 well-chosen cases catch gross regressions; distinguishing a 2–3 point improvement with confidence needs several hundred to thousands (confidence intervals shrink with √n). Start small, grow from production failures, and always report the uncertainty rather than pretending n=100 is precise.

›

"Guardrails double your latency. Product is unhappy. Go."

Measure per-check latency; run deterministic checks in parallel (they're ~milliseconds); move heavy LLM checks to a smaller fine-tuned model; risk-tier the routes so only sensitive paths pay full cost; consider streaming with checkpoint checks. What I won't do is silently drop safety checks — I'll show the risk owner the trade-off options and let the risk appetite decide.

›

"How would you evaluate the evaluators?" (meta)

Judge–human agreement rates, re-measured periodically; inter-judge consistency across model versions; adversarial cases in the judge's own test set (answers that look good but are wrong — verbose, confident, unfaithful). The judge is a model, so it gets a golden dataset too.