All jobs / AI engineer / Production AI Engineering
AI engineer interview question · 3–5 years
The model provider is not down, but responses that took two seconds now take forty. Your API’s worker pool fills with waiting calls, and unrelated endpoints start failing too.
What pattern stops this, and what does the AI feature do while it is active?
The strongest answer
A circuit breaker around the model dependency, plus a tight timeout and its own bounded pool: after repeated failures it fails fast, the feature serves a degraded mode, and probe calls decide when to resume
Why it works
Exactly — slow is worse than down, because nothing fails until everything does. The breaker turns slow into fast failure, and the degraded mode was designed in advance.
What a good answer covers
- A slow dependency takes everything down.
- Isolate model calls in their own pool.
- Trip the breaker; fail fast.
- Design the degraded mode in advance.
Answers that fall short
- Close, but not the strongest: Set a shorter timeout on the model call so that the waiting calls are released sooner
A timeout is part of it, but every request still waits the full limit and shares the pool. The breaker stops sending calls you already know will fail. - Weak: Scale out the API servers so there are enough workers to absorb the slow calls
More workers fill up with the same forty-second calls. You pay for more servers that are all waiting on the same dependency. - Red flag: Restart the API servers whenever the pool fills up; that clears the stuck calls
Restarting drops every in-flight request, healthy ones included, and the pool fills again within minutes because the cause is untouched.
Who gets asked this
More Production AI Engineering questions
- 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…
- 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?