A RAG implementation has two distinct cost categories: a one-time build cost and ongoing monthly operating costs. Build cost varies widely by scope -- a focused proof of concept with a single document corpus can be delivered for roughly $8,000--$30,000, while a production system with multiple sources, access controls, and enterprise integrations typically runs $30,000--$120,000 or more. Monthly operating costs at modest query volumes are often $300--$2,500; they scale nonlinearly with query volume and corpus size. These ranges carry wide assumptions and no two projects scope identically -- what matters is understanding what is included in any specific proposal before comparing numbers.
Infrastructure pricing from major cloud providers is published and verifiable. Engineering labor -- which typically dominates build cost -- is not, and it depends on vendor rates, team experience, and scope definition. Budget for both, and get itemized estimates before committing.
Featured snippet: Retrieval-augmented generation (RAG) connects a language model to an external knowledge source at query time. It retrieves relevant documents, inserts them into the model's prompt, and generates an answer grounded in that retrieved content. Implementation cost depends on corpus size and complexity, query volume, retrieval architecture, security requirements, and the engineering scope of data preparation, integration, evaluation, and deployment.
Retrieval-augmented generation connects a language model to an external knowledge base so the model can answer questions using content it was not trained on. At query time, the system retrieves documents relevant to the user's question, inserts them into the language model's prompt as context, and generates a response grounded in that retrieved content rather than relying solely on the model's training data. This makes RAG well suited for internal knowledge bases, customer support, document search, and any use case requiring answers anchored to specific, up-to-date, or proprietary information.
Budgeting RAG well requires understanding what the system actually does, because each step carries distinct cost implications. A RAG pipeline typically involves four stages:
Each stage consumes resources -- compute for embedding and generation, storage for the index, and engineering time for data preparation, retrieval tuning, evaluation, and operations. Buyers who understand the pipeline are better positioned to question cost estimates, negotiate scope, and avoid surprises when the first invoice arrives.
A RAG implementation includes more than building a chat interface on top of a language model API. The substantive engineering work is the pipeline that makes retrieval accurate, the data preparation that makes documents usable, and the infrastructure that makes the system reliable, measurable, and secure.
A realistic implementation scope covers:
Teams often iterate across these phases rather than completing them in sequence. A discovery finding -- a data-quality problem, an access-control complexity, an unexpected file format -- may require rework in a phase that appeared finished. A responsible proposal should account for this iteration, not assume a linear waterfall delivery.
TechRadiant's guide to securing CFO approval for AI projects walks through how to frame costs, set ROI assumptions, and structure an AI business case your finance team will take seriously.
The biggest single determinant of RAG build cost -- after data complexity -- is the architecture approach. Managed RAG services reduce upfront engineering effort but introduce usage-based costs and varying degrees of flexibility. Custom pipelines give full control but require more build time, operational expertise, and ongoing maintenance. Hybrid approaches sit between the two.
Several cloud platforms offer managed retrieval or file-search services that handle ingestion, indexing, and retrieval as a single abstraction. OpenAI's vector store (used with the Assistants API or Responses API) charges for storage above the first 1 GB at $0.10 per GB per day, with additional charges for file search execution and the model tokens used for generation.1 AWS Bedrock Knowledge Bases manages ingestion and retrieval on demand; reranking is available at $0.001 per Amazon Rerank request (up to 100 document chunks) or $2.00 per 1,000 queries for Cohere Rerank 3.5.2 Azure AI Search offers multiple tiers on a dedicated SU (Search Unit) model, with a Serverless option priced per compute unit-hour plus storage; semantic ranking is charged per semantic query, and agentic retrieval per reasoning token.3
Managed services reduce the engineering burden for ingestion and retrieval, but they do not eliminate it. Data must still be prepared, cleaned, and formatted to meet ingestion requirements. Access controls, metadata, and permissions must be mapped before ingestion. Evaluation, integration, and monitoring are still the buyer's responsibility. Managed services are often appropriate for teams without deep ML infrastructure experience, or for projects where time-to-value matters more than full retrieval customization.
A custom pipeline assembles individual components: a parsing library, an embedding model API, a vector database, an orchestration framework such as LangChain or LlamaIndex, and a generation model API. Both LangChain and LlamaIndex are open-source frameworks with no direct licensing cost, though their enterprise tiers and commercial extensions carry separate pricing. The pipeline can be built to exact specifications -- specific chunking strategies, custom rerankers, access-control enforcement at retrieval time, and proprietary scoring logic -- but every customization requires engineering time to build, test, and maintain.
Custom pipelines carry higher build cost and more operational responsibility, but they avoid some managed-service constraints: vendor lock-in is lower, retrieval logic can be optimized for specific use cases, and total operating cost at high scale can be lower if infrastructure is sized efficiently.
Vector database costs vary significantly by deployment model. Pinecone Serverless (list pricing as of mid-2026) charges approximately $0.33 per GB of storage per month plus metered read and write units, with an entry-level paid plan requiring a $50/month minimum.4 Weaviate Cloud bills by stored vector dimensions; Qdrant Cloud charges by cluster resources (RAM, CPU, disk), starting around $0.014 per node-hour. For teams already running PostgreSQL, the pgvector extension adds vector search to an existing database with no separate licensing, though the Postgres instance itself carries a cost -- roughly $50--$180 per month on AWS RDS for small to mid-size workloads.4 AWS OpenSearch Serverless for vector search (used with Bedrock) has a minimum cost of roughly $175--$350 per month for the first vector search collection due to minimum OCU requirements, regardless of query volume.2
The right choice depends on team familiarity, query patterns, scale expectations, and whether the team wants to manage index infrastructure or pay for a managed service. For small corpora and low query volume, pgvector or a free-tier managed option is often cost-effective. For high-scale production workloads with millions of queries per month, a purpose-built vector database often justifies its cost through lower latency and better recall at scale.
Generation model pricing is typically the largest single recurring line item once a system reaches meaningful query volume. As of October 2026, representative published list prices (USD per million tokens, input/output) for commonly used models include:
| Model | Input (per 1M tokens) | Output (per 1M tokens) | Typical use case |
|---|---|---|---|
| GPT-4o | $2.50 | $10.00 | High-quality chat and reasoning |
| GPT-4o-mini | $0.15 | $0.60 | Lightweight retrieval, routing, classification |
| GPT-4.1 | $2.00 | $8.00 | Long-context documents (1M token window) |
| o3 | $2.00 | $8.00 | Complex reasoning tasks |
| o4-mini | $1.10 | $4.40 | Cost-optimized reasoning |
Source: modelcompare.dev, retrieved October 2026 (modelcompare.dev collects prices from OpenAI's published pricing page). Verify current rates at your cloud provider before budgeting; list prices change and batch discounts of 50% are available on select models.
For embedding models, OpenAI's text-embedding-3-small is priced at $0.020 per million tokens -- meaning embedding one million 500-token document chunks costs approximately $10 at that rate.1 text-embedding-3-large is $0.130 per million tokens; ada-002 is $0.100 per million tokens. Embedding cost becomes meaningful at large corpus sizes and when re-embedding is triggered by model changes or chunking strategy updates.
Batch inference reduces token costs by 50% on supported models. Prompt caching -- which reuses previously computed representations of repeated context (such as a system prompt sent with every query) -- can cut effective input token costs substantially on compatible platforms. Neither technique requires application rearchitecting, and both deserve attention when modeling ongoing costs.
The largest cost drivers in a RAG project are data complexity, corpus size, retrieval requirements, query volume, and engineering scope. Each is discussed below. One important general point: vendors and articles commonly note that buyers who model only API call costs underestimate total RAG cost by 2--3x, because data preparation, evaluation, integrations, and ongoing operations are consistently undercounted.5
Data preparation is routinely the most expensive and most underestimated phase in a RAG project. Industry practitioners cite data preparation as representing 30--50% of total project effort in practice.5 Relevant factors include:
Model token costs scale directly with usage. The key variables are: queries per month, tokens retrieved per query (retrieved context), tokens in the system prompt and conversation history, and tokens in the generated response. A system that retrieves five 500-token chunks per query and uses GPT-4o for generation processes roughly 3,000 input tokens plus output per query. At 10,000 queries per month, that is approximately 30 million input tokens -- $75 at GPT-4o's input price. At 100,000 queries per month, that is $750, and at 1 million queries per month, $7,500 -- just for input tokens, before output or embedding costs.
Context window size amplifies this: systems that retrieve more chunks for thoroughness, or that maintain long conversation history, pay proportionally more per query. A reranking step adds additional model calls; query rewriting for better retrieval adds further calls. Each additional model call should be priced explicitly before being added to a production pipeline.
Simple vector search requires only embedding the query and running a nearest-neighbor lookup -- one embedding call and one database query per user request. Hybrid retrieval (combining vector and keyword search) adds a keyword search call but generally uses the same index. Reranking adds a separate model call per query to re-score retrieved chunks before passing them to the generation model. Agentic retrieval -- where a reasoning model plans and executes multiple retrieval steps, synthesizes findings, and iterates -- multiplies token costs by the number of reasoning steps. Multi-step and agentic workflows can deliver meaningfully better answers on complex queries, but buyers should model their token cost explicitly before committing to them at scale.
A prototype can run on the minimum viable infrastructure tier. A production system serving internal users with a reasonable SLA needs redundancy: read replicas, load balancing, health checks, and a deployment process that allows zero-downtime updates. These requirements add infrastructure cost and engineering time, but the exact amount depends on the platform and team. A system that must stay available during a regional cloud outage, maintain low latency under load spikes, or operate across multiple geographies adds further complexity and cost at each layer of the stack.
Build cost for a RAG system depends on scope, data complexity, infrastructure choices, and vendor or team rates -- not on a single industry benchmark. The ranges below are synthesized from multiple practitioner sources (see citations) and reflect patterns across reported projects. They are planning inputs, not quotations. Any specific project may fall outside them based on its requirements, data situation, and what is included in the scope.
The ranges below draw on reported cost data from practitioners at AlphaCorp AI (March 2026, citing Stratagem Systems data from 89 reported deployments), Ment.tech (September 2026), and RaftLabs (August 2025/2026). None of these sources disclose their full methodology, and all are vendors that also sell RAG development services. Treat them as directional, not as market surveys.
These ranges exclude internal staff time unless otherwise noted, ongoing monthly operating costs, taxes, support contracts, and costs specific to heavily regulated environments.
Within these ranges, the common components and their approximate weight in the total build are:
Several line items are frequently quoted as add-ons and may not appear in a base estimate:
Source: AlphaCorp AI (March 2026), citing Stratagem Systems data. These are vendor-reported figures -- verify against specific proposals.
Monthly operating costs depend on query volume, corpus size, retrieval architecture, and infrastructure choices. A low-volume internal tool with 10,000 queries per month can run for as little as $300--$600 per month in direct infrastructure costs. A mid-scale production system handling 100,000 queries per month typically runs $2,500--$8,000 per month. At 1 million queries per month, cost depends heavily on model choice, caching strategy, and retrieval architecture.
The following table shows estimated monthly operating ranges by scale, based on reported practitioner data. These figures reflect direct infrastructure costs and exclude internal engineering and support time.
| Component | Small (<10K queries/mo) | Medium (10K–100K/mo) | Enterprise (100K+/mo) |
|---|---|---|---|
| Vector database hosting | $0–$100 | $200–$500 | $800–$2,000 |
| LLM inference (generation) | $20–$200 | $300–$800 | $1,500–$10,000 |
| Embedding (ingestion + queries) | $20–$150 | $200–$500 | $600–$1,500 |
| Application infrastructure / hosting | $50–$200 | $200–$500 | $500–$3,000 |
| Logging, tracing, observability | $20–$100 | $100–$300 | $300–$1,000 |
| Reranking (if used) | Minimal | $100–$300 | $300–$4,500+ |
| Estimated total | $110–$750 | $1,100–$2,900 | $4,000–$22,000+ |
Ranges synthesized from AlphaCorp AI (March 2026) and Ment.tech (September 2026) practitioner data. LLM inference ranges reflect model selection variability; reranking range includes AWS Bedrock's published $0.001/request (Amazon Rerank) to $2.00/1,000 queries (Cohere Rerank 3.5). Verify against current provider pricing.
A concrete cost modeling example: embedding one million 500-token documents with OpenAI's text-embedding-3-small costs approximately $10 in embedding fees (1M chunks × 500 tokens = 500M tokens, at $0.020 per million tokens). Re-embedding that same corpus -- triggered by an embedding model change or a significant chunking strategy revision -- costs the same amount again. At large corpus sizes, re-embedding costs can be significant.
Several cost categories appear reliably in post-project reviews but not in initial estimates:
Buyers can build a first-order estimate with a handful of workload inputs. Gather the following before modeling costs:
With these inputs, total monthly token cost can be estimated as: (queries per month) × (input tokens per query: system prompt + retrieved context + conversation history) × (input price per million) + (queries per month) × (output tokens per response) × (output price per million). Add vector database, embedding for new ingestion, infrastructure, and observability on top. Run the estimate at 1x, 2x, and 5x your forecast query volume to understand the cost curve.
One practitioner analysis reported a system at 1,000 queries per day costing approximately $500 per month, while the same architecture at 100,000 queries per day could reach approximately $50,000 per month without rearchitecting retrieval.5 Retrieval optimization -- caching frequently retrieved chunks, routing simpler queries to cheaper models, reducing average context size, using batch inference where latency allows -- can substantially change the cost curve, but these optimizations require engineering work to implement and evaluate.
No single approach is universally cheapest or best. The right choice depends on team experience, time constraints, control requirements, and how the system's requirements may evolve.
| Approach | Build cost | Monthly cost | Flexibility | Operational burden | Lock-in |
|---|---|---|---|---|---|
| Managed RAG service (e.g. OpenAI File Search, Bedrock Knowledge Bases) | Lower (less custom engineering) | Usage-based; predictable at low volume, can grow quickly at scale | Limited to service capabilities and supported file types | Lower (no index infrastructure) | High -- retrieval logic, index, and data format tied to provider |
| Custom pipeline (open-source orchestration, vector DB, model APIs) | Higher (more engineering) | Infrastructure-based; more predictable at scale | Full control over chunking, retrieval, scoring, and access control | Higher (team manages index infrastructure) | Lower -- components can be swapped independently |
| Hybrid (managed embedding + custom retrieval, or custom ingestion + managed generation) | Medium | Depends on which components are managed | Selective control; managed components carry managed constraints | Medium | Partial -- managed components create partial dependency |
For healthcare AI specifically, compliance requirements around data residency, audit logging, access control, and business associate agreements may constrain architecture options regardless of cost preference. See TechRadiant's healthcare AI development cost guide for cost considerations specific to regulated healthcare environments.
A clear, reliable proposal answers specific questions about scope, assumptions, and operating cost -- not just the total number. Buyers should work through the following before accepting or signing a proposal.
TechRadiant's RAG agency directory lists verified development partners ranked by capability, specialisation, and client outcomes — so you can shortlist with confidence before requesting proposals.
Several budgeting errors appear consistently across RAG projects that run over cost or schedule.
TechRadiant's resource library covers AI development costs, build-vs-buy frameworks, business case construction, and procurement guidance for technology teams and their stakeholders.
1 OpenAI vector store pricing ($0.10/GB/day above first 1 GB free) and embedding model prices (text-embedding-3-small $0.020/1M tokens; text-embedding-3-large $0.130/1M; ada-002 $0.100/1M) sourced from fast.io's OpenAI vector store analysis citing OpenAI's pricing page, and from modelcompare.dev (updated May 2026), which aggregates OpenAI's published list prices. Verify at OpenAI's pricing page before budgeting.
2 AWS Bedrock reranking prices (Amazon Rerank 1.0 at $0.001/request; Cohere Rerank 3.5 at $2.00/1,000 queries) and OpenSearch Serverless minimum costs (~$175--$350/month) sourced from ecorpit.com's Bedrock managed vs self-managed analysis (July 2026), citing AWS Bedrock pricing page as of that date. Verify current rates at AWS Bedrock Pricing.
3 Azure AI Search billing model (Search Units, Serverless CU/hr plus storage, semantic ranker per query, agentic retrieval per reasoning token) sourced from Microsoft Learn: Plan and manage costs of Azure AI Search. Verify current tier prices at Azure AI Search Pricing.
4 Pinecone Serverless storage (~$0.33/GB-month, $50/month minimum) and pgvector/Postgres RDS entry-level cost sourced from SpendArk vector database pricing analysis (updated June 25, 2026) and Mixpeek vector database cost comparison (updated July 6, 2026). Both sources note prices were retrieved from vendor pages as of their publication dates; verify at vendor pricing pages before budgeting.
5 Data preparation as 30--50% of project effort, and the 2--3x API-only underestimation claim, cited from AlphaCorp AI's RAG cost analysis (March 2026) and RaftLabs' RAG development cost guide (August 2025/2026). Both are vendors; treat as practitioner experience, not independent research.
Human-verified rankings across AI, development, and marketing — updated quarterly.