Where the bill comes from
- Ingestion embeddings — paid once per chunk, every time you re-embed.
- Query embeddings — paid once per user query.
- Storage — vector size × chunks × replication. Usually small unless you are at tens of millions of rows.
- LLM calls — by far the largest line item once retrieval works. RAG does not save you from this.
Three cost levers that matter
- Cache embeddings by content hash. Re-ingesting the same chunk should cost zero. Hash the text, look up the vector, only call the model on miss.
- Batch. Hosted embedding APIs charge the same per-token whether you send 1 chunk or 100, but a batched call has 1 round-trip instead of 100. Batch sizes of 32–128 are typical.
- Pick a smaller model when your eval allows. A 384-dim local model can match a 3072-dim hosted model on factoid retrieval and costs nothing per call. The eval set tells you whether the gap actually matters for your queries.