DCF Research

RAG Implementation Consulting: Scope, Cost and Partners

By DCF ResearchEdited by Peter KorpakPublished · Updated

A retrieval-augmented generation (RAG) implementation connects a language model to your own documents. The system ingests and chunks the content, embeds it, stores it in a searchable index, retrieves and ranks passages for each question, and generates an answer from them. Consultants add the most value in retrieval quality, evaluation, security, and run cost, because the model call itself is the easy part.

This guide is part of our AI consulting firms research. Menlo Ventures' 2024 survey of 600 US IT decision-makers reported RAG adoption at 51%, up from 31% a year earlier, against fine-tuning in 9% of production models. Its 2025 report says prompt design remained the dominant customization technique, followed by RAG.

What does a RAG implementation involve?

Seven stages: ingestion and parsing, chunking, embedding, indexing, retrieval and ranking, generation, and evaluation with guardrails. Each has a failure you can test for. Lewis and colleagues introduced the pattern in 2020 as a way to combine a model's built-in knowledge with an external index.

StageDecisionsWhat to test for
Ingestion and parsingSources and connectors; extraction of tables, scans, and layouts; permission metadata; refresh scheduleFlattened tables, unreadable scans, stale or duplicate documents, missing access rules
ChunkingSize, overlap, and structure-aware splits for Markdown, HTML, JSON, or code (LangChain text splitters); adding document context to each chunkAnswers split across chunks; chunks that lose their subject, such as a passage saying revenue grew 3% without naming the company
EmbeddingModel, dimensions, language coverage, re-embedding planSwitching models later forces re-indexing every chunk
IndexManaged or self-run, hybrid search, metadata filters, permission-aware retrieval, scaleFilters and access rules not enforced at query time
Retrieval and rankingKeyword plus vector search, reranking, how many passages to pass onRight passage retrieved but ranked too low or buried in a long prompt
GenerationModel tier, prompt, citations, behavior when the answer is absentAnswers that go beyond or misread the sources
Evaluation and guardrailsLabeled questions, retrieval and answer metrics, injection tests, monitoringNo regression signal; silent quality decay as documents change

OpenAI's embeddings guide lists 1,536 dimensions for text-embedding-3-small and 3,072 for text-embedding-3-large, and says vectors can be shortened with a dimensions parameter, for example to fit a store limited to 1,024. The pgvector README says its indexes cover standard vector columns up to 2,000 dimensions and half-precision columns up to 4,000, so a 3,072-dimension embedding needs half precision or shortening. A partner should have met these limits before.

Do you need RAG at all, and should you build or buy?

Start with the cheapest option that meets the requirement: put a small knowledge base in the prompt, use managed retrieval in the platform you already run, or build custom retrieval only when you need control over ranking, permissions, or data location. Anthropic's 2024 guidance was that a knowledge base under 200,000 tokens, about 500 pages, can go straight into the prompt with prompt caching. Context limits and prices have changed since, so test current figures.

OptionExamplesFits whenWatch for
Whole knowledge base in the promptAny LLM API with prompt cachingSmall, stable corpusCost per call grows with corpus size; Liu et al. found models can use long contexts unevenly
Managed retrieval in your data platformAmazon Bedrock Knowledge Bases, Google Cloud RAG Engine, Azure AI Search, Databricks AI Search, Snowflake Cortex SearchThe corpus already lives on that platform and you want fewer moving partsLess control over chunking and ranking; platform lock-in
Hosted retrieval tool from a model vendorOpenAI file searchPrototypes and low-volume toolsPriced per GB-day and per call on top of tokens; check how much control you get over parsing and ranking
Custom pipelineOpen-source frameworks with pgvector or a vector databaseSpecific ranking, permission, or residency needsHighest engineering and operating effort

RAG and fine-tuning solve different problems: RAG supplies knowledge, and fine-tuning changes behavior or format. In a Microsoft study, RAG consistently outperformed unsupervised fine-tuning for knowledge-intensive tasks, both for facts the model had seen in training and for new ones (Ovadia et al., 2024). Fine-tuning access is also narrowing: OpenAI's pricing page says its self-serve fine-tuning platform is being wound down and is closed to new users.

Which retrieval techniques improve answer quality?

Hybrid search, which combines keyword and vector retrieval, plus reranking is the best-documented improvement. In Anthropic's 2024 tests across codebases, fiction, arXiv papers, and science papers, the share of relevant passages missed in the top 20 fell from 5.7% to 3.7% with contextual embeddings (a 35% reduction), to 2.9% when contextual keyword search was added (49%), and to 1.9% with a reranker (67%). Contextual embeddings prepend a short, chunk-specific description of where the passage sits in its document before indexing. These are one vendor's results on its own datasets, so replicate them on your documents.

Platforms now ship this pattern. Bedrock's managed knowledge bases always use hybrid search with reranking on by default. Azure AI Search merges BM25 and vector results with reciprocal rank fusion and offers a semantic ranker. Snowflake's Cortex Search combines vector and keyword retrieval with semantic reranking, and Databricks AI Search supports hybrid search and reranking.

More passages are not always better. Anthropic found 20 passages beat 10 or 5 in its tests, while Liu et al. found that performance can drop significantly when the relevant passage sits in the middle of a long input. Tune the number and order of passages on your own evaluation set. Agentic retrieval, where an LLM plans sub-queries, is in preview in Azure AI Search, and graph-based retrieval adds a knowledge-graph layer. Both add components and calls, so adopt them only if evaluation shows hybrid retrieval with reranking falls short.

What drives RAG cost?

People cost dominates the build. At run time, generation tokens dominate and scale with query volume, while embedding and vector storage are usually small. Prices change often; the list prices below are as of October 2026 and link to each vendor's page.

Cost driverPricing basisPublished price (October 2026)
EmbeddingPer million tokensOpenAI: text-embedding-3-small $0.02, text-embedding-3-large $0.13. Weaviate hosted Snowflake Arctic embed models: $0.025 to $0.040. Pinecone llama-text-embed-v2: $0.16
Vector store or search servicePlan minimum plus storage and read and write units, or computePinecone Standard: $50 monthly minimum, $0.33 per GB per month, $16 to $18 per million read units, $4 to $4.50 per million write units. Weaviate Cloud Flex: from $45 a month, based on stored vector dimensions and storage. Qdrant Cloud: usage-based on compute, memory, and storage, with a free 1 GB RAM cluster. pgvector: no license fee; you pay for Postgres
RerankingPer 1,000 requestsPinecone: $2 per 1,000 requests for bge-reranker-v2-m3 and pinecone-rerank-v0; $2 per 1,000 rerank units for cohere-rerank-4-fast
GenerationPer million tokens, input and output priced separatelyAnthropic: Claude Sonnet 5.5 $2 input and $10 output; Claude Haiku 5.5 $0.10 and $0.50 for prompts up to 100,000 tokens; cached input reads as low as $0.10 on Sonnet 5.5
Hosted retrieval toolPer GB-day of storage and per call, plus tokensOpenAI file search: $0.10 per GB per day (first GB free) and $2.50 per 1,000 calls

Token counts depend on the tokenizer. Anthropic notes that its newer models' tokenizer produces about 30% more tokens for the same text than earlier ones, so estimate with each vendor's own counter.

DCF Research estimate: an internal assistant over 200,000 documents averaging 5,000 tokens, answering 5,000 questions a day. All volumes are assumptions.

  • Corpus: 200,000 × 5,000 = 1.0 billion tokens. Chunks of 500 tokens with 10% overlap give about 2.2 million chunks and 1.1 billion tokens to embed.
  • One-time embedding: 1,100 million tokens × $0.13 per million = $143 with text-embedding-3-large, or $22 with text-embedding-3-small.
  • Storage: 2.2 million chunks × 3,072 dimensions × 4 bytes ≈ 27 GB, about $9 a month at $0.33 per GB; at 1,024 dimensions, about 9 GB and $3 a month. The $50 plan minimum applies either way.
  • Per query: 6 passages × 500 tokens + 700 tokens of instructions + 300 tokens of question and history = 4,000 input tokens, plus 400 output tokens.
  • Generation: (4,000 × $2 + 400 × $10) ÷ 1 million = $0.012 per query on Claude Sonnet 5.5, so 150,000 queries a month cost $1,800. On Claude Haiku 5.5 the cost is $0.0006 per query, or $90 a month.
  • Reranking: 150,000 × $2 ÷ 1,000 = $300 a month.
  • Run total: $1,800 + $300 + $50 ≈ $2,150 a month with the mid-tier model, about $26,000 a year. At ten times the volume, generation alone is $18,000 a month.
  • Build: 3 engineers × 10 weeks × 40 hours × $175 per hour (an assumed blended rate) = $210,000, about eight times the annual infrastructure bill.

At modest volume the infrastructure bill is small next to the build team. As volume grows, model choice, passage count, prompt length, caching, and routing routine questions to a smaller model decide the run cost.

How do you evaluate a RAG system and a RAG partner?

Require a labeled question set built from your own documents, and metrics that separate retrieval from generation. The open-source RAGAS library, for example, defines context precision, context recall, faithfulness, and response relevancy as separate metrics. A partner that cannot show retrieval metrics from a prior project has not yet shown it can improve retrieval.

Barnett and colleagues catalogued seven failure points from three case studies: missing content, the right document ranked too low, the right document lost when passages are consolidated into the prompt, the answer present but not extracted, the wrong output format, the wrong level of specificity, and incomplete answers. They also concluded that a RAG system can only be validated in operation and that its reliability evolves after launch, so budget for calibration.

  1. How do you measure retrieval quality separately from answer quality, and on whose questions? Expect a labeled set from your documents, not a generic benchmark.
  2. Show metric changes across chunking, embedding, and reranking experiments on a prior project.
  3. How do you extract tables and scans, and how do you test that extraction?
  4. How are permissions enforced at query time, and how do you test for leakage between users?
  5. What happens when the answer is not in the sources, and how is the no-answer rate measured?
  6. How do updates and deletions reach the index, and how stale can it get?
  7. What does cost per query look like at pilot and at target volume, and which levers reduce it?
  8. What do you hand over: evaluation set, harness, dashboards, and runbooks?

For monitoring, track retrieval hit rate on the labeled set, faithfulness and response relevancy on sampled traffic, latency by stage at the median and the 95th percentile, index freshness against how often sources change, cost per query, no-answer rate, user feedback, and periodic permission tests. Set thresholds from the baseline measured at acceptance rather than from a generic target.

What security and data-governance controls should a partner provide?

Ask for permission-aware retrieval, isolation between tenants, validation of what enters the index, retrieval logging, and a deletion path. The OWASP Top 10 for LLM Applications (2025) lists vector and embedding weaknesses as a risk (LLM08). It covers unauthorized access and cross-context leakage when groups share a vector database, embedding inversion, and poisoned data. It also notes that RAG does not fully mitigate prompt injection (LLM01).

  • Enforce access control at query time. Azure AI Search documents security filters and document-level access control, with ACL and RBAC support in preview. On any platform, ask how permissions sync from the source system and how long changes take to apply.
  • Separate tenants and groups logically in the index, and test for cross-user leakage.
  • Validate ingested content for hidden instructions and untrusted sources. OWASP's example is hidden text in a résumé that redirects the model.
  • Check what guardrails cover. Bedrock's documentation says guardrails apply to the input and the generated response, not to retrieved references.
  • Log retrievals immutably, and treat embeddings as sensitive data, since OWASP notes they can be inverted to recover source information.
  • Propagate deletions from source documents to chunks and embeddings, and confirm each vendor's retention, training-use, and regional-processing terms.
  • If you use the NIST AI Risk Management Framework, ask the partner to map controls to its generative AI profile, NIST AI 600-1.

What should the engagement look like?

Plan four phases with gates: discovery and evaluation set, ingestion and baseline retrieval, tuning against the evaluation set, and hardening with hand-over. If a quote omits evaluation or hardening, compare it line by line before signing.

DCF Research estimate: the durations below are planning assumptions for a team of three working on one language, a few internal sources, and an existing cloud account. They are built from the deliverables listed, not from a survey of projects. Multi-tenant or customer-facing systems, strict latency targets, and regulated data take longer.

PhaseWeeks (estimate)Deliverables
Discovery and evaluation set1Source inventory, access model, labeled questions, success thresholds
Ingestion and baseline3Parsing, chunking, embedding, index, baseline metrics
Tuning3Hybrid retrieval, reranking, prompt and model-tier choices measured on the evaluation set
Hardening and hand-over3Permission tests, monitoring, runbooks, cost dashboard, team training

The phases sum to 10 weeks, which gives the $210,000 build estimate above (3 × 10 × 40 × $175). Replace the rate with quotes you receive. For a feasibility phase before committing, see GenAI consulting proof of concept; for pricing models, see AI consulting pricing; and for registry and monitoring practices that carry over, see MLOps consulting.

Our AI consulting firms directory tracks 50 data and AI consulting firms using public evidence: partner-directory listings, each firm's own service pages, and public case studies, checked on 2026-10-23. Firms cannot pay to change their score or rank, and we have not audited client projects or tested firms' work.

Sources

More in AI Consulting