All jobs / AI engineer / AI Observability
AI engineer interview question · 0–1 years
What do you record for each LLM call so that you can debug it later?
The strongest answer
The prompt as sent, or its version and variables, the model and settings, the response, token counts, latency, any error, and an id linking it to the user’s request — with sensitive content handled deliberately
Why it works
Right — you cannot debug an answer without seeing exactly what the model was given, by which version, at what cost and in what time.
What a good answer covers
- Record what the model actually saw.
- Prompt, model, settings, response.
- Tokens, latency, errors.
- One id back to the user request.
Answers that fall short
- Close, but not the strongest: The user’s question and the model’s answer, stored in a table for later review
The question is not the prompt. Without the rendered prompt, the context and the versions, you cannot reproduce what the model actually saw. - Weak: The HTTP status and the duration, the same as for any other outbound API call
A wrong answer comes back as a successful response. Status codes catch outages, not bad output. - Red flag: Nothing beyond errors; logging prompts is expensive and the provider keeps its own logs
You cannot debug your application from someone else’s logs, and a bad answer raises no error for you to catch.
Who gets asked this
More AI Observability questions
- To debug a chatbot, a teammate adds a line that writes every full prompt and response into the general…
- A user reports that your agent gave a confidently wrong answer yesterday. All you stored was the final…
- Your LLM bill doubled this month while the number of requests stayed flat. How do you find out why?
- Complaints about answer quality jumped this week, and your team deployed nothing. How does your observability…
- You have a few hundred traces that users marked as bad. How do you turn them into improvements?
- Error-rate and latency alerts are already in place for your LLM feature. What else do you monitor in…