← Back to the journal

The full bill behind a RAG pipeline.

A retrieval-augmented system has a preparation bill and a query bill. Keeping the two visible makes it easier to decide which optimizations will actually matter.

01

Price the document lifecycle

Count ingestion, parsing, chunking, embeddings, storage, and re-indexing. Track how often source documents change. Reprocessing a whole collection for a small update can dominate an otherwise modest query budget.

02

Measure the query path

Include retrieval, reranking, context length, generation, and retries. Test how many retrieved passages improve the answer rather than always sending the maximum. Measure factual quality alongside response latency.

03

Keep the system maintainable

Set sensible update schedules and remove obsolete content. Compare managed infrastructure with the operational cost of hosting it yourself. Check which parts of the stack a credit offer actually covers; an API balance does not pay every database or hosting bill.