# When I ask interviewees to calculate costs, what I want to see isn't multiplication

Date: 2025-12-15
Category: Interview Preparation
Tags: Inference Costs, AI Products, Interviews
Summary: In a reasoning cost estimation problem, what separates people isn't multiplication—it's whether they first break down a single request and whether they know where the cost of each cost-saving move lands.

I once wrote a question on paper: a writing assistant that costs thirty yuan a month, with one thousand daily active users—estimate the inference cost, then say whether that price can hold up.

Most people's first reaction is to ask for the model's unit price, then multiply by the token count. The arithmetic isn't wrong, but people who calculate this way mostly miss the point: the fixed overheads in the call structure get left out, and so does the long tail of the usage distribution.

What I'd rather see is whether they first break a single request apart.

## In a single request, user input is often not the big part

Spread out one call, and it's roughly these blocks: system prompt, a few examples, user input, retrieved material, output.

User input is usually the smallest block. The system prompt and examples are the invisible big part, because you pay for them on every single call, and nobody cares about their length when writing them. I've seen a customer-service scenario where the system prompt ran to over three thousand characters, stuffed with scripts, forbidden-answer ranges, format requirements, and six examples. Per call it isn't expensive; multiplied by daily call volume, it costs several times more than user input.

The worse part is that it grows on its own. Every time someone says "add a rule," another paragraph gets appended, and three months later you're facing a prompt nobody dares to delete. At that point the cost problem and the technical-debt problem are the same problem.

So my first-pass estimate never writes the unit price; it writes the structure: how many fixed tokens per request, how many variable tokens, how long the output, how many calls per day. The unit price goes on its own line, with a date. Prices change several times a year; the structure doesn't change much. When a vendor cuts prices or you switch models, you change one line—no need to redo the whole table.

The table also works in reverse: given a gross-margin target and a subscription price, the token ceiling per request can be calculated. That number then constrains product design—how long the prompt can be, how many retrieval chunks to stuff in, whether to do multi-turn. Having the constraint before designing beats discovering it doesn't make money after designing.

## Hidden multipliers are more lethal than unit price

What really sends the bill out of control is often not the per-call price but the number of calls.

The most common loss of control comes from retries. Format parsing fails, retry; timeout, retry; blocked by a safety policy, rewrite and retry. Engineering writes "retry at most three times," which lands in the cost table as three times.

Then there's multi-turn. A user's "a bit shorter" may be backed by a full call carrying the entire history. By the tenth turn, input tokens are several times the first turn's, while the user feels they just said one sentence.

Tool calls are the same. In one task the model has to decide which tool to call, get the result and decide again, going back and forth several times, each round a full context. The cost structure of agent-type products is nothing like that of chat products; estimating an agent with chat unit prices and being off by an order of magnitude is no surprise.

Parallel sampling is even more blunt. To make answers more stable, generate three candidates and pick one—cost triples. At low traffic this is a great deal; once traffic picks up it's suicide.

My habit is to put a separate line in the cost table for "calls per task," writing the median and also the p95. The gap between these two numbers basically determines whether a product has "predictable costs" or "a bill that can blow up at any time."

## Every cost-saving move subtracts along some dimension

There are only so many cost-saving tricks; the hard part is knowing the price.

Prefix caching is the cleanest. If the system prompt is fixed and content order is stable, the hit rate is high. The price is that the prompt structure gets constrained: dynamic content must go later, timestamps can't be inserted at the front. This constraint affects every later change—it's a one-time design cost.

Semantic caching is temptingly cheap, and the risk is direct: two similar questions get treated as the same question, and an answer that doesn't quite apply gets returned. It suits factual queries with stable answers; it doesn't suit requests with user context. The criterion isn't what similarity threshold to set, but whether a wrong answer will be noticed by the user, and whether it will cause trouble if noticed.

Routing to small models is right in the long run, but you have to accept that it occasionally routes wrong. Users don't know there are two tiers of models behind it; they only know "this product is a bit dumb today." So the routing strategy must come with monitoring—the misjudgment rate for a given class of requests has to be visible separately.

Cutting retrieval chunks, shortening output, trimming the number of examples—all of these draw curves on the eval set. Where to save should be decided by the curves, not by intuition. I've seen a plan that cut retrieval from five chunks to two, recall dropped a notch, and nobody noticed, because nobody ran the evals at all.

Streaming output is the exception: it doesn't save money, it saves perception. With a fast first token, users are willing to wait for the full answer, and the cost hasn't dropped a cent. Conflating these two things makes it easy to create the illusion of "I optimized costs."

## Subscriptions invert on heavy users

A fixed monthly fee plus unlimited usage means keeping all the variance in usage for yourself.

Inference cost follows a power law: a few heavy users eat most of the quota, most people use it lightly. The average looks healthy; the quantiles look ugly. At thirty yuan a month, if someone runs dozens of long-document rewrites a day, that one person's cost can eat the gross margin of dozens of light users.

The available levers are few: quotas, soft rate limits, usage-based add-ons, moving heavy tasks to async and off-peak hours. Each one changes user behavior. Set quotas tight and users are afraid to use it, so product value drops straight off; set them loose and it's as good as none. This line has to be tuned against the real usage distribution, not pulled out of thin air as "fifty times a day."

What I prefer is to separate the expensive path from the cheap path: default to the cheap path, and when higher quality is needed, explicitly tell the user "this time a stronger model will be used" and let them choose. Cost fluctuations then have an explanation, and users don't feel they've been secretly downgraded.

One layer down is the pricing unit. Sell by seat and the more heavy users you have, the more you lose; sell by usage and light users feel they're paying for others. This isn't a pure math problem—it's a question of whom you hand the cost variance to, which I wrote about separately in another piece.

## Cost rewrites product design

This is the sentence I most want to hear in an interview.

When it's expensive, products get designed as one-shot generation, few candidates, human fallback; once it's cheap, the same need can be redesigned: pre-generate in the background, offer three directions at once, automatically retry with a different approach on failure. Many interactions that look awkward today were forced by the unit price of the time. When the unit price drops and the design doesn't follow, that's waste.

The reverse holds too. Designs that were lavish because things were cheap—stuffing full context every time, running the strongest model on every request—become liabilities on the day traffic grows. Changing them then means changing interactions users have already formed habits around.

## How I'd follow up

First question: in your number, which assumption is the most uncertain?

The usual answer is user count and output length. Someone who can clearly say "I can handle user count doubling, but I can't handle output length doubling" is far more reliable than someone who reports a precise number.

Second question: actual usage is three times your estimate—what do you do?

First see which kind of user grew, then decide whether to rate-limit, reprice, or change the architecture. The answer "add machines," blurted out, usually means they haven't done the math, because the bottleneck may be the vendor's rate limits, not your own servers.

Third question: if model prices drop ninety percent tomorrow, how does your product change?

There's no right or wrong answer to this one, but whether they've thought about it is obvious the moment they speak.

> People who can do the math aren't necessarily able to build products, but for people who can't do the math building AI products, the bill ends up making the decisions for you.

I don't always get the estimate right myself. The point of estimating isn't to hit the number—it's to know which assumption you're betting on, and how much room you have left if that assumption turns out wrong.

Further reading: [When asked to add an AI feature, I first ask whether we should add it](/2025/11/26/must-ask-pm-interview-question-if-you-were-to-add-an-ai-feature-to-our/), ["Our data will form a flywheel" — I break this sentence into three questions](/2026/03/07/ai-pm-interview-data-flywheel-three-questions/)
