All jobs / AI engineer / Production AI Engineering
AI engineer interview question · 1–3 years
During a provider slowdown your model bill for the hour tripled. The SDK retries three times, your service wrapper retries three times, and the queue re-delivers a failed job three times.
What is going on, and what do you change?
The strongest answer
The layers multiply — one job can become 27 calls, and a call we gave up on may still be billed. Retry in one layer only, with backoff and jitter, on retryable errors, within a budget
Why it works
Exactly — retries belong to one owner, and that owner has a budget. Work the provider already started can cost money even after you stopped listening.
What a good answer covers
- Retries in layers multiply.
- One layer owns the retries.
- Backoff, jitter, retryable errors only.
- Cap them with a retry budget.
Answers that fall short
- Close, but not the strongest: There are too many retries; lower each layer from three to two so that fewer calls are made
Fewer per layer still multiplies: two times two times two is eight. The fix is one layer that owns retries, not smaller numbers everywhere. - Weak: Retries are free because failed calls are not billed, so the extra cost must come from somewhere else
A request you timed out on may well have been processed and billed. And even unbilled retries deepen the slowdown you are retrying against. - Red flag: Add more retries with no delay between them, so jobs finish sooner and the backlog clears
Immediate retries against a struggling provider make the slowdown worse for everyone, you included, and multiply the bill while doing it.
Who gets asked this
More Production AI Engineering questions
- 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?
- The monthly model bill doubled, and nobody can say which customers or which features caused it. What do you…
- 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…