All jobs / AI engineer / Production AI Engineering
AI engineer interview question · 3–5 years
The monthly model bill doubled, and nobody can say which customers or which features caused it. What do you build so that this cannot happen again?
The strongest answer
Tag every model call with tenant, user and feature at the gateway, meter tokens and cost per tag, set budgets with alerts and hard caps, and define what each feature does when its cap is reached
Why it works
Exactly — attribution first, then budgets, then a planned behavior at the cap. A runaway loop or one heavy tenant shows up the same day, not on the invoice.
What a good answer covers
- You cannot budget what you cannot attribute.
- Tag calls: tenant, user, feature.
- Budgets with alerts and hard caps.
- Decide the behavior at the cap.
Answers that fall short
- Close, but not the strongest: A dashboard of total daily spend, with an alert when the bill crosses a threshold
A total tells you that spend rose, not who or what raised it, and an alert with no cap stops nothing. - Weak: One spending cap on the provider account, so that the bill can never double again
One global cap means every customer loses the feature on the same day, and you still cannot say who spent the money. - Red flag: Usage grew, so the bill grew; that is a forecasting matter for finance, not something engineering needs to build for
Unattributed spend is an engineering gap. If you cannot tell growth from a runaway loop, nobody can forecast it either.
Who gets asked this
More Production AI Engineering questions
- Your provider announces that the model version you pinned will be retired in a few months. Forty prompts…
- What is going on, and what should you have measured?
- Offline evals say a cheaper model is about as good as the current one for your support assistant. Product…
- Why does a call to a model need a timeout, and what should the user see when it fires?
- Many providers offer a moving alias that always points at their newest model, and fixed dated versions. Which…
- During a provider slowdown your model bill for the hour tripled. The SDK retries three times, your service…
- What is missing from your system, and what do you add?
- What pattern stops this, and what does the AI feature do while it is active?