Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
You're sizing a one-time initial corpus embedding. The corpus is 1 billion tokens total. You'll use OpenAI text-embedding-3-small via the synchronous (non-batch) API. Per the OpenAI pricing page in 2026, text-embedding-3-small costs $0.02 per 1 million tokens. Compute the total cost in USD.
1 billion tokens at $0.02 per million is $20. Even at billion-token scale, embedding compute is a rounding error in a production budget.
Think of it like buying flour at the bulk store. A one-million unit bag costs two cents. A billion is a thousand of those bags, which works out to twenty dollars. That is cheap enough that a bakery never worries about flour cost when planning the menu. The bakery worries about rent, ovens, and the labour to bake. Converting text into searchable fingerprints works the same way. The headline price per piece of text is so small that the total bill basically vanishes. The real costs in a working search index live elsewhere: shelf space to hold all those fingerprints, the redo bill when somebody upgrades the fingerprinting machine, and the engineering time to keep the whole system observable.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
2 min: arithmetic walkthrough + cost structure lesson + batch API discount + storage as dominant line item + re-embedding multiplier.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating the embedding compute cost as a blocker for production decisions when it is dwarfed by storage, query cost, and re-embedding cycles.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.