All jobs / AI engineer / AI Safety & Guardrails
AI engineer interview question · 3–5 years
Your output content filter is a separate classifier call, and your answers stream to the user. What happens when the filter times out, and how do the two fit together?
The strongest answer
Fail-open or fail-closed is decided per surface by risk, not left to an exception handler; high-risk surfaces fail closed to a safe fallback. With streaming I check buffered chunks before release, and every block is logged for review
Why it works
Exactly — a guardrail that silently disappears under load is not a guardrail. Decide the failure mode on purpose, pay the buffering latency where the risk justifies it, and keep the evidence.
What a good answer covers
- Choose the filter’s failure mode on purpose.
- Fail closed where the risk is high.
- Buffer streamed chunks before release.
- Log every block and review them.
Answers that fall short
- Close, but not the strongest: I run the filter on the complete answer after streaming has finished and remove the message from the screen if it is flagged
Checking afterwards means the user has already read it. Retraction can be acceptable on a low-risk surface, but say that it is a choice, and say what happens on a timeout. - Weak: If the filter times out the answer goes through; the filter is an extra, and availability matters more than moderation
Fail-open can be right for a low-risk surface, but as a blanket default it means your protection switches off exactly when the system is stressed. - Red flag: I would drop the filter from the streaming path entirely — it adds latency, and the model’s own safety training is good enough
Removing the only independent check to save latency, and trusting the thing being checked instead, is what worries the interviewer.
Who gets asked this
More AI Safety & Guardrails questions
- What do you build, and what do you refuse to leave to the model?
- Your organisation is about to launch an LLM feature that summarises and ranks CVs for recruiters. A…
- What is a guardrail in an LLM application, and where does it sit?
- Your assistant gets a question it has no information to answer. What should happen, and how do you get that…
- A health-information assistant was tightened after a complaint. It now refuses ordinary questions about…
- How do you make sure the assistant cannot commit the company to things that are not true?