productinterview.tools
MenuClose

Build an Inference Cost Calculator and Write the Decision Memo

4 min readcore1 weekendForAI Infrastructure PMApplied AI PM

Build with your agent

Copy the prompt, keep the brief as the source of truth

Paste it into Claude Code, Cursor, Codex or ChatGPT. It points your agent at this page and sets the working rules; the brief, steps and acceptance criteria stay in one place.

Read https://www.productinterview.tools/projects/inference-cost-calculator-write-up/ and build it.
Follow the scope and acceptance criteria exactly.
Ask me up to five questions before starting.
Use synthetic or public data only.
Keep PLAN.md, DECISIONS.md and EVALS.md.
Do not add dependencies without asking.
Stop after each milestone and show me the evidence.
Finish with the deliverables and presentation described in the brief, including a one-page write-up and a 60-second demo script.
On this page
  1. What you'll build and why it impresses
  2. The brief
  3. Steps
  4. Acceptance criteria
  5. How to present it
  6. What interviewers will probe
  7. Variations

What you'll build and why it impresses

Anyone can look up a price per million tokens. Far fewer can explain what a conversation actually costs, which assumptions move the answer, and when a cheaper model stops being cheaper once retries, context and human review are included.

This project is a spreadsheet plus a one-page memo. You will model two model sizes for one real use case, show the cost per conversation and per million tokens, test the assumptions, and make a recommendation. It is the artifact an infrastructure PMProduct Manager. Decides what a product should do, for whom, and why. Read the full explanation or an applied PM needs when someone asks "can we afford to launch this?".

What it proves: you can build a defensible model, separate the big levers from the noise, and turn the numbers into a product decision. It also gives you something concrete to draw on in a back-of-envelope interview.

The brief

Use case. Pick one with a clear shape. Good choices: a customer-support assistant with a 2,000-token knowledge context and a 300-token answer; a document summariser with a 20,000-token input; or an agent that makes three model calls per task. Avoid "a chatbot" with no defined usage.

Models. Compare a small/cheap model and a large/expensive one from the same provider, or two providers with comparable capabilities. Use current public prices and record the source and the date in your private notes; the page itself should not show dates.

Volume. Model three scenarios: 10,000, 100,000 and 1,000,000 conversations per month. The point is to see which costs scale linearly and which have step changes.

Constraints. One region, one currency, no negotiated discounts. Include a sensitivity range for the assumptions you cannot verify.

Out of scope. A full total cost of ownership model with headcount and office costs. Stay on inference, retries, caching and human review.

Steps

  1. Write the usage model. Define a typical conversation: turns per conversation, input tokens per turn, output tokens per turn, and the context you resend each turn. Separate system prompt, retrieved context and conversation history. State every assumption in one table.

  2. Calculate the baseline. For each model, compute:

    • input tokens per conversation and per month;
    • output tokens per conversation and per month;
    • cost at the provider's input and output prices;
    • cost per conversation and per 1,000 conversations.

    Show the formulas, not just the results. See price per million tokens.

  3. Add the real-world multipliers. Retries, failed calls, classification calls, guardrail calls, embedding calls, and human review on a sample. A model that is 3× cheaper per token can lose if it needs two retries or a second model to check its work.

  4. Model caching. If the same system prompt or knowledge context is reused, estimate the saving from prompt caching. Show the break-even hit rate. See prompt caching savings.

  5. Model capacity. Convert monthly tokens into requests per second at peak, then into GPUGraphics processing unit. The chips most AI models are trained and served on. Read the full explanation or provider capacity. Include headroom for peaks and failures. For self-hosted options, estimate memory and throughput. See estimate GPUs for a chat product.

  6. Test the assumptions. Build a sensitivity table for the five inputs that move the answer most: turns per conversation, context size, output length, retry rate and human-review rate. Show the range, not a single number.

  7. Write the memo. Recommend a model or a routing strategy. State the cost per conversation, the quality assumption behind it, the break-even point, and what would change your mind. Include the risks: price changes, model deprecation and quality regressions.

Acceptance criteria

  • A usage model with every assumption listed and sourced where possible.
  • Cost per conversation and per million tokens for two models at three volumes.
  • Formulas visible and auditable; no hard-coded final numbers.
  • Retries, auxiliary calls and human review included.
  • A caching estimate with a break-even hit rate.
  • A capacity estimate with peak and headroom.
  • A sensitivity table for at least five inputs.
  • A one-page recommendation with a clear decision and what would reverse it.
  • A limitations section: no negotiated pricing, one region, quality not measured here.

How to present it

In the memo: lead with the decision ("route 80% of traffic to the small model and escalate the rest"), then the cost per conversation, then the assumptions that matter. Put the full model in an appendix.

In the interview: draw the cost equation on a whiteboard and talk through the levers. The interviewer cares less about the exact number than about whether you know which assumptions dominate.

For an applied PM role: connect the cost to the product. A cheaper model may be the right call if quality holds on your eval set; a more expensive one may be justified by retention or by avoiding human review.

What interviewers will probe

  • What does one conversation cost? Walk through tokens, turns and price. Do not quote a price per million without the usage model.
  • Which assumption matters most? Usually context size, turns or retry rate. Show the sensitivity, not an opinion.
  • When is the cheaper model not cheaper? When it needs retries, a second model or more human review. Quantify it.
  • How does caching change the answer? It depends on reuse and hit rate. Show the break-even. See prompt caching savings.
  • How much capacity do you need? Convert to requests per second at peak and add headroom. See estimate GPUs for a chat product.
  • What would you do if prices doubled? Have a fallback: smaller model, shorter context, caching, batch, or a different provider.

Variations

Easier: one model, one volume, no capacity estimate. Still show the formulas and the sensitivity.

Harder: add a router that sends easy requests to a small model and hard ones to a large model, with a quality threshold; model batch pricing for offline workloads; or compare self-hosting against an API with utilisation assumptions.

Team version: one person owns the usage model, one owns capacity, one owns the memo. Present the disagreements between the models as the finding.