All jobs / AI engineer / Production AI Engineering
AI engineer interview question · 0–1 years
Why does a call to a model need a timeout, and what should the user see when it fires?
The strongest answer
Model calls can hang or run very long, and a request that waits forever holds a connection and a user; set a limit, then show a clear message or a simpler fallback, and log it
Why it works
Exactly — the timeout protects your servers and the fallback protects the user. Both are decided before the first slow day, not during it.
What a good answer covers
- Every external call gets a time limit.
- Set it from what users will tolerate.
- Show an honest message or a fallback.
- Log every timeout.
Answers that fall short
- Close, but not the strongest: So that the request does not hang forever; when it fires we return an error to the client
Right reason, but “an error” is half the design. Decide what the person sees and whether a cheaper path can still help them. - Weak: Models always answer eventually, so a timeout only throws away work that was nearly finished
A stuck connection may never answer, and waiting users pile up behind it. A limit is how one slow call stays one slow call. - Red flag: Catch the timeout and return an empty answer so the user never sees an error; there is no need to log it
A silent empty answer looks like a broken product, and with no log nobody will ever find out why it happened.
Who gets asked this
More Production AI Engineering questions
- 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?
- 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…