Agents interview question · Most asked

Design an AI agent that resolves customer support tickets using internal tools. How do you keep it safe?

Design Asked in Native AI Engineer · Forward Deployed Engineer (FDE) interviews

Members can save this page, take notes and track progress. See membership · Sign in

Summary

Give the agent narrow, well-described tools (look up order, issue refund up to a limit, create a ticket), run it in a loop with clear stop conditions, require human approval for risky actions, and log every step. Safety comes from least-privilege tools, validation in the tools themselves (not in the prompt), limits on cost and steps, and evaluation on realistic tickets before and after release.

Longer Answer

  • Tools: typed inputs, server-side permission checks per customer, idempotency for actions, clear errors the model can recover from.
  • Policy: refunds above a threshold, account changes and anything irreversible go to a human queue.
  • Prompt injection: ticket text and retrieved documents are untrusted; they can't grant permissions or change instructions; tools enforce rules regardless of what the model asks.
  • Limits: maximum steps, tokens and spend per ticket; timeouts; fallback to a human.
  • Observability: traces of every model call and tool call; dashboards for resolution rate, escalations, errors and cost.
  • Evaluation: a set of historical tickets with expected outcomes, run on every prompt or model change.

Key Points

  • Narrow tools with server-side checks.
  • Human approval for risky actions.
  • Treat all external text as untrusted.
  • Step, token and cost limits.
  • Trace everything; evaluate on real tickets.

Explanation

What interviewers look for

Enforcing safety in code and process rather than trusting the prompt.

More Agents questions

← All Agents questions

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake