Senior interview question
Your agent has a delete_records tool. What has to happen between the model emitting a call and the delete running?
Model answer
Treat the arguments as a stranger's input: an allowlist of tools, a schema check, then app-side policy (who may delete what, how many, after which confirmation). Code catches an invalid tool or invalid parameters, not a wrong value: lbs = 100 when the user said 120 passes every check. Confirmation is app state, the user's click, never a "confirmed": true the model wrote. Strict tool use guarantees shape, not values: a schema-valid delete is still a delete.
Practise the rest
8 Tools & constraints questions, 492 in all, each with a model answer. Free.
More Tools & constraints interview questions
- In tool calling, who executes the tool, and what does the model need in order to use the result?
- The model keeps calling search_orders for refund questions that another tool handles. What do you change first?
- Explain one step of constrained sampling. What does it guarantee, and what doesn't it?
- Should you turn on grammar-constrained decoding for every structured output? What would you watch?
- Implement a client that spreads LLM calls across several providers, respecting their rate limits and failing over when one is down.
- Design an AI chat for a spreadsheet product that turns commands like sum column K or delete row 5 into validated tool calls on the sheet.