The interview problem

Practice prompt

A customer wants an AI support assistant for 500 employees. Finance says “never spend more than $200 per day,” support leadership wants uninterrupted service, and the platform team has only delayed provider usage reports. As the FDE, turn these requirements into an implementable pilot, a customer-visible operating policy and a tested handover.

Original FDE practice, not a reported company interview. All prices, budgets and usage figures are hypothetical exercise inputs, not vendor quotations. AWS documentation retrieved September 27, 2026.

1. Agree what the cap includes

Start with a written cost boundary. Does $200 mean model inference alone or the whole service, including storage, retrieval, monitoring, fixed infrastructure, taxes and support? Is it supplier cost or the customer's invoice? Which currency, price schedule, time zone and day boundary apply? Can finance authorize exceptions, and does an exception increase the cap or spend an already reserved emergency allowance?

For this exercise, agree a $200 daily limit for variable model-call cost routed through the application's gateway, with a midnight UTC accounting boundary and costs assigned to the day a task is admitted. This task-start convention also needs explicit agreement; it differs from a cap on usage physically incurred during each calendar day. Fixed infrastructure and other charges remain visible in a separate service-cost report. This is a proposed narrowed contract requiring customer agreement, not a way to claim that an application limit caps an entire cloud invoice.

If finance actually requires a strict $200 total-service limit, inventory and bound all cost paths before promising it. Some continuing storage or contractual charges may remain after requests stop. Unbounded external work or a provider with no enforceable maximum invalidates a strict cap claim. Explain that uninterrupted paid inference and an exhausted hard allowance cannot both be guaranteed.

2. Discover cost drivers before choosing a threshold

Trace one support task end to end: input context, generated answer, retrieval calls, tool loops, failed attempts, user retries and background evaluation. Identify which calls incur provider cost even when the customer sees an error. Distinguish an idempotent retry of a local request from a new billable provider attempt.

For a hypothetical model priced at $2 per million input tokens and $8 per million output tokens, a bounded attempt with 6,000 input and 1,000 output tokens costs at most 0.012 + 0.008 = $0.020 under those rates. Two such attempts require a $0.040 envelope. This bound assumes enforced token limits, no other billable dimensions and no unbounded tool loop. Average tokens are useful for forecasting but cannot replace a maximum in hard admission control.

At 5,000 tasks/day, if every first attempt reaches that maximum and 20% require one equally expensive retry, projected model cost is 5,000 × 0.020 × 1.2 = $120. If all tasks need both attempts, it is $200. Neither scenario includes costs outside the agreed boundary. Validate the retry assumption against pilot traces instead of treating a point forecast as a guarantee.

3. Allocate the allowance with the customer

Propose $170 for ordinary work and $30 for an emergency lane used by designated support leads. Both draw from the same $200 total; the emergency lane is not an extra allowance. At two-attempt envelopes of $0.040, $170 can admit 4,250 tasks before any unused reservation is released. This conservative admission capacity is lower than the forecast volume because it protects against the retry worst case.

That gap creates a real customer decision: accept temporary queuing, reduce the maximum context/output size, validate a cheaper workflow, or change the budget. Do not quietly remove retry coverage to make the spreadsheet meet 5,000 tasks. Returning unused reservations after authoritative completion can improve utilization, but the worst-case service promise must still fit the envelope.

Agree who may use the emergency lane, which cases qualify and what evidence is logged. Prevent users from selecting a fake priority flag to bypass the ordinary allowance. Reallocation between lanes must preserve the total. Give finance a clear control to change a future allowance and an audited, explicit path for exceptional increases.

4. Connect the policy to an admission boundary

employee task → authenticated cost gateway → bounded model execution
                         ↕                          ↓
                 allowance + reservations ← authoritative usage
                         ↓                          ↓
                 customer status UI      reconciliation with provider
                         ↓
                 alerts + owned runbook

All covered requests, including background jobs and retries, pass through the gateway. Before dispatch, atomically reserve a conservative upper bound against the applicable allowance. An approved attempt may continue within its envelope; additional work requires another valid reservation or an already reserved retry allocation. Reject direct access paths that can incur covered cost outside this mechanism.

Use a stable logical task ID, distinct attempt IDs and a pinned price version. Keep uncertain execution holds until completion or effective termination is established, then retain enough allocation for accrued but not yet settled charges. Stopping execution prevents future cost; it does not erase cost already incurred. A timeout or canceled browser request does not prove the provider stopped charging. The detailed accounting protocol belongs in the linked usage-accounting guide; the FDE's responsibility is to verify that the actual customer integration satisfies its assumptions.

AWS documents that budget notifications can arrive after charges are incurred. Treat a provider budget alert as a monitoring layer, not proof of a real-time stop. Reconcile the local model-call estimate against provider usage and investigate discrepancies. If prices or billing dimensions change outside the validated envelope, stop new affected admissions or deploy an approved conservative bound before continuing.

5. Calculate available budget during an incident

At 16:00 UTC, the total allowance is $200. Confirmed cost is $142, active bounded reservations total $28, and unresolved attempts hold $10. These categories are disjoint: confirmed amounts have already been removed from their original holds. Available allowance is 200 − 142 − 28 − 10 = $20.

At $0.040 per two-attempt task, at most 500 additional tasks can be reserved against that total, subject to remaining lane balances. A screen showing only confirmed cost would incorrectly suggest $58 available, enough for 1,450 tasks. That would ignore $38 of already committed or uncertain exposure.

Suppose a completed batch settles $6 of actual cost against $8 of its active holds. Confirmed cost rises to $148; active holds fall to $20; unresolved holds remain $10. Availability becomes $22. Only $2 is released. Removing the whole $8 without adding the $6 cost would overstate capacity.

At midnight, do not clear unresolved records. Under the agreed task-start accounting policy, work admitted before midnight remains charged against its original day's envelope; new-day work uses a new allowance. Provider invoices may allocate usage differently. Explain that a task-start cap is not automatically a cap on every calendar day's provider-billed activity, especially for long-running tasks crossing the boundary.

6. Define what users see when capacity is exhausted

Normal mode offers the validated assistant workflow. Near the limit, disable optional expensive enrichment only if the reduced workflow has passed its own quality checks. At exhaustion, show a clear message: “Today's AI allowance is fully allocated. You can continue with manual search, save this task, or request an authorized urgent review.” An allocated hold is not necessarily a finalized charge, so the wording should not claim that all money has already been spent.

Saving a task does not grant permission to run it tomorrow. Preserve the user's inputs under the agreed retention rules, and require a documented queue policy or renewed user action before later execution. Queued tasks need expiration and cancellation controls; silently running old support actions can produce stale answers or duplicate side effects.

Do not switch models invisibly if that changes reliability, data location or contractual terms. Prevalidate fallback models and disclose meaningful capability changes. Cache reuse must respect authorization and freshness. A cheaper answer that exposes another customer's context is not a successful cost optimization.

7. Prove the pilot controls and hand them over

Demonstrate concurrent submissions with only $0.080 free: at most two $0.040 envelopes can be accepted before settlement, even if ten employees submit at once. Inject a timeout after provider acceptance and confirm that its hold stays allocated. Retry the same task ID and confirm it does not accidentally create a second logical operation; any genuine second provider attempt must still be covered.

Test midnight rollover, delayed usage, lost cancellation acknowledgments, price-version mismatch, ordinary-lane exhaustion and emergency-lane authorization. Confirm that optional background evaluation cannot bypass the gateway. Reconcile a sample of task IDs to provider records and explain residual unmatched amounts rather than adjusting totals until dashboards agree.

Acceptance evidence should include a signed scope definition, price and token assumptions, customer-visible mode transitions, concurrency results, reconciliation examples and named owners. Finance owns allowance decisions; the application team owns admission correctness; operations owns alerts and unresolved-attempt response; support owns manual fallback and customer communication.

Monitor cost per successfully resolved task alongside total cost, failure rate and user wait time. A deployment can appear cheaper simply because it refuses most requests. Publish both service coverage and cost so the customer can judge whether the chosen constraint remains useful.

8. Follow-ups and self-review

Follow-ups: Does an 80% budget email enforce a cap? No. Can timeout holds expire automatically? Not just because a timer elapsed. Release only the amount proven unnecessary after accounting for accrued charges and any still-possible future cost; retain a conservative allocation for unresolved usage. Is a lower average cost enough to guarantee the daily limit? No. Who decides whether critical work continues after exhaustion? The agreed authorized owner, within a defined emergency allowance or an explicit cap increase. Can an application cap promise the total cloud bill? Only if every relevant cost path is included and bounded.

Score 0–2 each for an honest cost boundary, correct worst-case and remaining-budget arithmetic, handling unknown attempts, useful customer-visible degraded modes, and acceptance evidence with named owners. Full marks require resolving the service-versus-budget conflict explicitly.

Sources and next steps

The prices, allocation policy, incident arithmetic and handover plan are original exercises. Continue with usage accounting and reservations for the underlying distributed protocol.

Continue your preparation

Choose a connected learning path or browse more FDE interviews questions. Read our editorial method and attribution policy.