Practiced one out loud? Paste your answer into the free self-check and get a score in 30 seconds
What the interviewer is testing
Whether you approach cost with measurement and a ranked list of levers, while protecting quality with evaluation.
Answer framework
- Measure: cost per request and per successful task, broken down by feature, model, input and output tokens.
- Right-size models: route easy requests to smaller models and reserve large ones for hard cases.
- Cut tokens: shorter prompts, fewer retrieved chunks, output length limits, and summarized history.
- Reuse and batch: response and prefix caching, and batch APIs for offline jobs.
- Self-hosted levers: quantization, continuous batching and high GPU utilization; re-run evals after every change.
Sample answer
I start by measuring where the money goes. I break down spend by feature, model and token type, because output tokens usually cost several times more than input tokens, and I look at cost per successful task rather than per call, since a cheap model that needs three retries is not cheap.
The biggest lever is usually model choice. Many requests, such as classification, extraction or simple rewrites, work well on a small model, so a router sends those there and only escalates hard cases. Next is token volume: trim system prompts, retrieve five good chunks instead of twenty, cap output length and summarize long conversation history.
Then reuse: exact-match caching for repeated requests, prefix caching by putting static content first, and batch APIs, often discounted, for offline jobs such as nightly summarization. If we host our own models, quantization, continuous batching and keeping GPUs busy lower cost per token, and distillation can replace a large model on a narrow, high-volume task. Every change goes through the eval suite, because a cost cut that hurts task success can cost more in user trust.
Likely follow-ups
Common mistakes
- Optimizing without a cost breakdown.
- Measuring cost per call instead of per successful task.
- Ignoring output tokens, which are often priced higher.
- Cutting cost without re-running quality evals.
The 0 to 1 AI Engineer Interview Playbook covers the answer frameworks, system-design walkthroughs and an 8-week plan.
Get the playbook 40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.
Interviewing for PM or TPM? See the full PM package, $59 on Gumroad: a resume system, a PM, TPM and PGM interview handbook, a 1:1 cheat sheet and a PM playbook. PM and TPM content, not AI engineer prep.
Related questions
Based on question #84 in the full question bank.