Home▸Free interview questions▸LLM evaluation and guardrails questions
free · no sign-up · no loginLLM evaluation and guardrails questions, answered
20 questions with short answers, picked from the Q&A in the AI Engineer course. Tap a question to see the answer.
What are AI guardrails?
Guardrails are checks around a model that keep it safe and on task. Input checks catch prompt injection and personal data. Output checks catch harmful text, the wrong format and claims the sources do not support. Tool permissions are enforced in code, so even a fooled model cannot do damage. Evaluation then measures how well all of it works.
- Check what goes in
- Check what comes out
- Limit what tools can do
- Measure quality with test sets
No question matches that search. Try a shorter word.
LLM evaluation and guardrails questions
The full set, with labs and mock interviews, is in the AI Engineer course.
Evaluation, Guardrails & Safety
1Why is testing an LLM app different from normal software?
Normal code gives the same output every time. AI answers change between runs, and a small change can break other answers. So you test quality on many examples, not a few pass/fail tests.
2Offline vs online evaluation?
Offline testing uses a fixed test set before release. Online testing watches real chats after release. You need both.
3What is a guardrail?
A guardrail is a safety check before or after the model, like hiding card numbers or blocking off-topic requests.
4What is a golden dataset?
A trusted set of inputs with the correct outputs, checked by people. You run every new version against it to see whether quality went up or down.
5How do you collect user feedback for an agent?
Thumbs up and down, short comments, whether the user retried or asked for a human, and whether they accepted the agent's action. Link each piece of feedback to its trace so you can see why it happened.
6What is least privilege for agents?
Give the agent only the access the task needs, nothing more: read-only if it only reads, one folder instead of the whole drive. If it's tricked or makes a mistake, it can do far less harm.
7How do you guard actions, not just text?
Put limits on the server, like 'refunds above a set amount need a human'. Ask the customer to confirm changes. The model can ask; the system decides.
8What is pass@k versus pass^k?
pass@k means success if at least one of k tries works, which is fine when you can pick the best result. pass^k means success only if all k tries work, which measures reliability. Agents used by real customers need a high pass^k.
9What is the 'lethal trifecta'?
An agent that has all three: access to private data, exposure to untrusted content, and a way to send data out. Together, an attacker can trick it into leaking data. Remove at least one of the three.
10What is LLM-as-a-judge?
You use another model, with clear rules, to score answers. It's fast and scales well, but check it against human scores first.
11What goes into a good test set?
Real user questions, the right facts with their sources, tricky cases, and questions the system must refuse.
12What is a release gate?
A release gate is an automatic check that stops a new version from going live if its test scores drop.
13What are the parts of an agent eval?
A set of tasks, a way to run the agent on each one, graders that score the results, and a report. For agents, also record the steps taken, the cost and the time, not just the final answer.
14Code, model or human graders: when do you use each?
Code graders are exact and cheap, for checks like 'does the JSON parse' or 'did the test pass'. Model graders judge quality at scale but can be biased. Humans are the most trusted but slow and costly, so use them to check the other two.
15What is prompt injection, and how do you defend against it?
Prompt injection is hidden text that tries to override the rules. Treat outside text as data, limit what tools can do, and ask for confirmation before actions.
16Your AI judge prefers long answers. What do you do?
Add rules that don't reward length, compare it with human scores, compare two answers side by side, and penalise claims with no source.
17What do you monitor after launch?
Thumbs-down rate, hand-overs to humans, blocked messages, judge scores on sample chats, speed and cost. Alert on sudden changes.
18What is eval noise, and how do you handle it?
Agent results change from run to run, so a score can move by chance. Run each case several times, use enough cases, and report averages with a range. Don't trust a 1% change from a single run.
Evaluation, Testing, Benchmarking and Model Quality
19How do you build a golden set for a new customer?
Start with 30 to 50 real questions from the people who do the work, each with the correct answer and the evidence. Cover every category, and include known difficult cases and questions that must be refused. Have a domain expert check the labels. Grow the set every time a failure is found in production.
AI Security, Privacy, Guardrails and Governance
20What is tenant isolation, and how do you prove it?
One customer's data must never appear for another. Put the tenant ID on every record and chunk, and apply the filter in the backend on every query, not in the prompt. Prove it with tests: as tenant A, ask for tenant B's data in many ways and show that nothing comes back.
More free interview questions by topic
Now test yourself
Play the free quiz, or try a mock interview where you answer out loud and get a score.