
Retrieval-Augmented Generation is the most oversold architecture in AI engineering right now. Not because it does not work. It does. But because the gap between "RAG demo on a blog post" and "RAG system serving 10,000 users reliably" is enormous, and almost nobody talks about the costs that live in that gap.
We maintain six production RAG systems across different clients. Their monthly infrastructure costs range from $2,400 to $34,000. In every single case, the actual cost was 3x to 7x higher than the initial estimate. Not because anyone was bad at math, but because RAG introduces hidden costs at every layer of the stack that only become visible under production load.
Let us walk through the five layers of what we call the RAG tax.
Layer one is embedding costs. Every document that enters your RAG system needs to be converted into vector embeddings. The common estimate is to calculate the token count of your corpus, multiply by the embedding model price, and call it done. But documents are not static. In 4 of our 6 RAG deployments, the underlying corpus changes daily. New documents are added, existing documents are updated, and stale documents need to be re-embedded when you upgrade your embedding model.
One client has a knowledge base of 50,000 documents averaging 2,000 tokens each. The initial embedding cost was about $15 using OpenAI's text-embedding-3-large. Trivial. But they add 200 new documents per day and update 500 existing ones. That is 1,400 documents per day that need embedding, costing about $0.42 per day or $12.60 per month. Still trivial. Except that when they upgraded their embedding model for better retrieval quality, they needed to re-embed the entire corpus. That $15 one-time cost suddenly appeared every time they wanted to improve their system.
The real embedding cost is not the initial load. It is the ongoing maintenance plus the option cost of being locked into an embedding model because re-embedding is expensive.
Layer two is vector database costs. Pinecone, Weaviate, Qdrant, pgvector. Every option has a different cost profile, and the costs scale in non-obvious ways. The primary driver is not storage, it is query volume and index size.
A Pinecone serverless deployment for our smallest client costs $70 per month for 100,000 vectors and about 50,000 queries per day. That same client's pgvector deployment on an existing Postgres instance costs effectively $0 in additional infrastructure but requires manual index tuning and delivers 3x slower query latency. Our largest RAG client runs a dedicated Qdrant cluster at $2,800 per month for 5 million vectors and 500,000 queries per day.
The hidden cost here is not the database bill itself. It is the engineering time spent on index optimization. Vector search performance degrades as your corpus grows, and the degradation is not linear. Our Qdrant client hit a performance cliff at 3 million vectors where p99 query latency jumped from 120ms to 800ms. It took two weeks of engineering work to implement a sharding strategy that brought latency back down. That was about $18,000 in engineering time that nobody budgeted for.
Layer three is chunking and preprocessing. This is the most underestimated cost because it is almost entirely engineering time rather than infrastructure spend. How you chunk your documents determines the quality of your retrieval, and getting chunking right is surprisingly hard.
Our standard approach is to start with simple fixed-size chunks of around 512 tokens with 50-token overlap. This works for homogeneous document collections like blog posts or product descriptions. But most real-world corpora are heterogeneous. They contain PDFs with tables, HTML with nested structures, markdown with code blocks, and scanned documents with OCR artifacts.
For one legal client, we spent 4 weeks building a custom chunking pipeline that handles contracts, court filings, and regulatory documents differently. The pipeline uses structure-aware chunking that respects section boundaries, keeps table rows together, and preserves cross-references between sections. That custom pipeline cost about $30,000 to build and requires ongoing maintenance every time a new document type is introduced.
The alternative is to use a generic chunking strategy and accept worse retrieval quality. We have seen retrieval accuracy drop by 25 to 40 percentage points when using naive chunking on complex documents. For some applications, that degradation is acceptable. For legal and medical applications, it is not.
Layer four is retrieval quality monitoring and evaluation. This is the cost that nobody budgets for and everyone needs. How do you know your RAG system is returning the right chunks? How do you detect when retrieval quality degrades?
In a traditional API, you can monitor latency, error rates, and status codes. In a RAG system, the system can return a 200 status code with perfect latency while serving completely wrong information because the retrieval step pulled irrelevant chunks. Detecting this requires a retrieval evaluation pipeline, which means building or buying a system that tests retrieval quality against a golden dataset on an ongoing basis.
We build evaluation pipelines for all our RAG clients. The typical cost is $5,000 to $10,000 to build initially and $500 to $1,000 per month to run, primarily in LLM costs for automated evaluation. Clients who skip this step inevitably discover quality issues through user complaints, which is significantly more expensive in terms of trust and churn.
Layer five is the LLM context window tax. RAG works by stuffing retrieved chunks into the LLM's context window along with the user's query. More chunks means better coverage but higher token costs and slower responses. Fewer chunks means lower costs but higher risk of missing relevant information.
In practice, we find that most RAG systems need to include 5 to 15 chunks per query to achieve acceptable answer quality. At an average chunk size of 512 tokens, that is 2,560 to 7,680 additional input tokens per query. On Claude Sonnet, that adds $0.008 to $0.023 per query in input token costs alone. At 50,000 queries per day, that is $400 to $1,150 per month just in the context window overhead from retrieved chunks.
This cost compounds with reranking. Most production RAG systems retrieve 20 to 50 candidate chunks and then use a reranking model to select the top 5 to 15. The reranking step adds another layer of token costs and latency.
Adding up all five layers for a mid-size RAG deployment serving 50,000 queries per day with a corpus of 100,000 documents gives us roughly the following monthly costs. Embedding maintenance runs $50 to $200. Vector database costs are $500 to $3,000. Chunking pipeline maintenance is $1,000 to $3,000 in engineering time. Quality monitoring is $500 to $1,000. Context window overhead is $400 to $1,200. LLM generation costs for the actual answer are $3,000 to $8,000. The total ranges from $5,450 to $16,400 per month.
Compare that to the typical initial estimate, which only accounts for the LLM generation costs and maybe the vector database, and you see why the actual cost is 3x to 5x higher than expected.
RAG is still often the right architecture. But go in with your eyes open about the true costs, build evaluation pipelines from day one, and budget for ongoing chunking and retrieval optimization. The teams that treat RAG as "just add a vector database" are the ones who end up with expensive systems that give wrong answers.
About the Author
Fordel Studios
AI-native app development for startups and growing teams. 14+ years of experience shipping production software.
We love talking shop. If this article resonated, let's connect.
Start a ConversationTell us about your project. We'll give you honest feedback on scope, timeline, and whether we're the right fit.
Start a Conversation