Skip to content
Back to blog

RAG: When It's Worth Building (And When It's Not)

When to use RAG vs fine-tuning: 4-question retrieval test, overkill signals, realistic 8–13-day build cost, and 3 startup use cases that delivered ROI.

Retrieval-augmented generation (RAG) is one of the most over-hyped and under-specified techniques in AI engineering right now. Every LLM tutorial eventually suggests adding RAG. Most production teams that built it will tell you it was harder than expected, and some will tell you they didn’t need it at all.

This is the third article in the AI pillar series. The first covered business process automation; the second covered AI agents for internal tools. This one asks a harder question: when is RAG the right architecture for your startup, and when is it overkill?

What RAG actually is (in one paragraph)

RAG is a pattern where you retrieve relevant documents from a knowledge store at query time, inject them into the LLM’s context window, and get a response grounded in that content. Instead of the model drawing on training data alone, it draws on your data — product docs, support tickets, contracts, internal wikis — retrieved on the fly.

The appeal: LLMs hallucinate when they don’t know the answer. Give them relevant source material and they mostly stop. The catch: building a RAG system that works reliably in production requires more engineering than most tutorials admit.

The real question: do you have a retrieval problem?

RAG solves a specific problem: the answer exists in a document, but the model doesn’t have it in context. If that’s not your problem, RAG isn’t your solution.

Before architecting a RAG system, ask:

  1. Is the information already in the model? For general-purpose questions (how to write a regex, what’s GDPR, explain this code), a well-prompted LLM already knows the answer. RAG adds latency and complexity for no gain.

  2. Does the information change faster than you can fine-tune? If your knowledge base updates weekly, fine-tuning (which bakes knowledge into weights) is impractical. RAG handles freshness naturally — you update the index, not the model.

  3. Is the answer in a specific document you can point to? RAG retrieves chunks. If the right answer requires synthesizing across 50 documents with conflicting information, RAG retrieval quality degrades fast.

  4. How many tokens of context does the answer require? If the relevant content fits in 2–3 pages, you can often skip RAG entirely and just stuff the whole document into the prompt. This is the most underused alternative.

3 startup use cases where RAG delivered real ROI

The problem: A B2B SaaS startup with 200-page docs and a support team spending 30% of their time answering questions already covered in the documentation.

Why RAG worked: The documentation changed with every release. Fine-tuning was out — you’d be re-training on every deploy. Stuffing all 200 pages into every query prompt would cost ~$0.80/query at GPT-4 pricing, which is prohibitive at scale. RAG brought query cost to ~$0.02 by retrieving only the 3–5 most relevant sections.

What they built: A pgvector index over chunked docs (512-token chunks, 50-token overlap). At query time: embed the question, retrieve top-5 chunks by cosine similarity, inject into a Claude API call with a “answer only from the provided context” prompt. If no relevant chunk is found, fall back to “contact support.”

Result: Support ticket volume for documentation questions dropped 55% in 8 weeks. The retrieval quality degraded for highly technical edge-case queries (where the answer spanned multiple sections), but those were already going to senior support.


2. Internal knowledge base Q&A

The problem: Onboarding documentation scattered across Notion, GitHub READMEs, and Confluence. New hires asking the same questions; senior engineers context-switching to answer.

Why RAG worked: The knowledge base was large enough (400+ docs) that stuffing it into context wasn’t viable. It was also continuously updated — fine-tuning would be stale within days. This is the same pattern covered in the AI agents for internal tools article, but with a dedicated retrieval layer.

What they built: A nightly sync job that pulls from Notion + GitHub APIs, chunks and embeds new/updated docs, and upserts into a Weaviate index. Slack bot queries hit a FastAPI endpoint: retrieve, inject, respond. The system prompt instructs the model to cite the source document and say “I don’t know” when confidence is low.

The lesson: The retrieval quality depended heavily on chunking strategy. Naive sentence splitting produced poor results; splitting by Notion block type (headers, paragraphs) with metadata attached improved precision significantly.


3. Contract and document analysis

The problem: A startup processing supplier contracts — each 30–60 pages — to extract payment terms, liability clauses, and renewal dates. Manual review: 45 minutes per contract.

Why RAG worked: Contracts have known structure. You can chunk by section and tag metadata (section type, contract ID, date). At query time, retrieval is precise: “payment terms” reliably returns the right chunks. The extraction task (structured output from known context) plays to LLM strengths.

What they built: A preprocessing step that parses PDF → section headers → chunks with metadata. Queries were structured (“extract payment terms for contract ID X”) not free-form. A human reviewed every AI output before it entered the system of record.

Result: 45-minute manual review → 8-minute human-review of AI draft. At 40 contracts/month, that’s 25+ engineering hours recovered per month. The human-in-the-loop gate was non-negotiable — hallucination risk in legal extraction is high; the AI was a draft tool, not a source of truth.


When RAG is overkill

RAG adds real complexity: an embedding pipeline, a vector store, a retrieval evaluation loop, and latency at query time. These signals suggest you don’t need it yet:

  • Your knowledge base fits in a single prompt. If the relevant context is under 20 pages, try prompt-stuffing first. It’s simpler, faster to iterate, and often good enough.
  • You have fewer than ~100 documents. Below this threshold, a well-structured keyword search or even a simple search API (Elasticsearch, Typesense) is faster to build and easier to debug than a vector index.
  • Your queries are highly structured. If users are always asking for specific records (“show me the invoice for customer X”), a database query is more reliable than retrieval.
  • Retrieval quality is hard to measure. If you can’t define a ground-truth eval set — real questions with known correct answers — you can’t know if RAG is working. Shipping a RAG system you can’t evaluate is shipping a system you can’t improve.

RAG vs fine-tuning: which do you need?

The comparison that comes up in every architecture discussion:

RAGFine-tuning
When to useYour data changes frequently; answers live in documentsYou want the model to behave differently (tone, format, domain style)
CostInference + embedding + vector storeTraining compute + re-training cadence
FreshnessReal-time (update the index)Stale until next training run
Hallucination riskLower (grounded in retrieved context)Higher for factual claims not in training
ComplexityRetrieval pipeline + eval loopTraining pipeline + evaluation
Best forKnowledge retrieval, Q&A, document extractionCode style, domain-specific generation, classification

The most common mistake: teams fine-tune when they should RAG (because they want the model to “know” their docs), and RAG when they should fine-tune (because they want different output behavior). These are different problems.

Realistic build cost

A RAG system that works in demos is a weekend project. A RAG system that works reliably in production typically requires:

  • Indexing pipeline: chunking strategy, embedding model selection, metadata schema — 2–3 days
  • Retrieval evaluation: ground-truth eval set, precision/recall measurement, tuning chunk size and top-k — 3–5 days (often skipped, always regretted)
  • Production infrastructure: vector store (managed: Pinecone, Weaviate Cloud; self-hosted: pgvector), embedding API costs, index update cadence — 2–3 days
  • Prompt + fallback logic: citation formatting, no-answer fallback, context injection strategy — 1–2 days

Total: 8–13 engineering days for a focused scope. Teams that skip retrieval evaluation ship RAG systems that feel smart in the demo and embarrass them in production.

Build vs buy

Managed RAG products (Glean, Guru AI, Notion AI, Confluence AI) handle a lot of this without custom code. Evaluate these first if:

  • Your data lives in the tools they already integrate
  • You don’t need control over the chunking strategy or retrieval logic
  • You want to move in days, not weeks

Build custom when:

  • Your data is in proprietary or non-standard sources
  • Retrieval quality is a core product differentiator
  • You need to combine structured (database) and unstructured (documents) retrieval

The decision in one question

Before building a RAG system, answer this:

Can you write 20 real questions that users will ask, and for each one, point to the specific document or section that contains the answer?

If yes — you have a retrieval problem, and RAG is a reasonable architecture. If the answers are spread across many documents with no clear source, or if there’s no document at all and you just want the model to “know more” — RAG won’t fix it.

The retrieval quality of your system is bounded by the quality of your index. Garbage in, garbage out — but also: poorly chunked documents in, unhelpful answers out.

If you’re evaluating whether RAG is the right architecture for your product or internal tooling, let’s talk. A fractional CTO can help you scope the retrieval problem correctly before you commit to building the pipeline.


Next in the AI series → Choosing the Right LLM for Your Startup — Claude vs GPT-4o vs Gemini: a use-case decision matrix, cost comparison table, and when to switch models mid-project.