How to Build a RAG System That Actually Knows Your Business
RAG stands for Retrieval-Augmented Generation. The pitch is simple: instead of asking an LLM to answer from its training data (which doesn't include your business), you give it relevant context from your own documents before it answers.
The reality is more nuanced. Most RAG implementations I've seen either hallucinate confidently, retrieve irrelevant chunks, or answer so generically they might as well be a basic ChatGPT wrapper. Getting it right takes more than throwing documents at a vector database.
This is the architecture I've settled on after building RAG systems for clients across SaaS, real estate, professional services, and e-commerce.
What RAG actually is (and isn't)
RAG is not fine-tuning. Fine-tuning bakes knowledge into the model's weights — it's expensive, slow to update, and not what you want for most business use cases. RAG retrieves relevant chunks from external storage at query time and injects them into the prompt. Your documents stay up-to-date because you control the index.
A good RAG system has three layers: ingestion (processing your documents into retrievable chunks), retrieval (finding the right chunks when a question is asked), and generation (using an LLM to synthesize those chunks into an answer).
Most failures happen in the first two layers — not the third.
The architecture I use
Document ingestion + chunking
Parse PDFs, Notion pages, Google Docs, Slack threads. Chunk by semantic meaning, not arbitrary token count. Add metadata: source, date, section, document type.
Embedding + vector storage
Embed chunks using text-embedding-3-small (OpenAI) or voyage-3 (Anthropic). Store in Pinecone, Qdrant, or pgvector depending on scale and budget.
Hybrid retrieval
Combine dense vector search with BM25 keyword search. Rerank results using a cross-encoder. Return top 5-8 chunks with source metadata.
Context construction + generation
Build a structured prompt: system instructions, retrieved chunks with citations, conversation history, user query. Generate with Claude or GPT-4o. Return answer + sources.
Delivery layer
Slack bot, web widget, internal portal, or API. Depends on use case. Most clients start with Slack — lowest friction for adoption.
The details that actually matter
Chunking strategy
The most common mistake: chunking by token count. This splits sentences mid-thought and destroys semantic coherence. Use semantic chunking — break at paragraph and section boundaries, keeping related context together. For structured documents (FAQs, SOPs), keep question-answer pairs intact. Aim for chunks of 200-500 tokens with 20% overlap.
Metadata is underrated
Every chunk should carry metadata: source document, section heading, date, document type (policy, FAQ, SOP, etc.), author. This lets you filter retrieval — "only return chunks from documents updated in the last 6 months" — and give users proper citations. Most RAG systems skip this. It's the difference between "I found something relevant" and "here's the answer from page 3 of your refund policy, last updated March 2026."
Hybrid search, not just vectors
Pure vector search misses exact matches. If someone asks "what's the SLA for enterprise?", vector search might return semantically similar chunks that don't contain the actual SLA number. BM25 (keyword) search catches exact terms. The combination — hybrid search — covers both cases. Reciprocal rank fusion is the standard way to merge the two result sets.
Reranking
First-pass retrieval gets you 10-20 candidate chunks. A cross-encoder reranker (Cohere Rerank, or a local model) then scores each chunk against the query for true relevance — not just semantic similarity. This improves answer quality significantly for the cost of one extra API call.
Budget note: For most small-to-mid business RAG systems (under 50,000 documents), pgvector on a $20/month Postgres instance is fine. You don't need Pinecone until you're at scale.
Common pitfalls
Pitfall 1: Trusting the LLM to "figure it out" from bad retrieval. If the right chunk isn't in the context, the model will either say it doesn't know (good) or make something up (bad). Invest in retrieval quality before you invest in prompt quality.
Pitfall 2: Not handling "out of scope" queries. If someone asks your company knowledge base a general question, it should route to a general LLM or say "I don't have information on that" — not hallucinate an answer.
Pitfall 3: Stale indexes. Documents get updated. Your index needs to too. Set up a webhook or scheduled sync so changes propagate automatically.
Where to deploy it
For most clients, I start with Slack. It has zero onboarding friction — the team already lives there. A slash command or @mention triggers the RAG system, returns an answer with sources, and threads naturally into existing conversations.
Second most common: an internal web portal. Useful when you want a dedicated interface, search history, or multi-document comparison.
Third: customer-facing (embedded on your site or in your product). Higher complexity — you need tighter guardrails to prevent hallucination in public contexts.
What to index
Start with high-value, high-query-frequency documents. For most businesses, that's: internal SOPs and processes, product/service documentation, pricing and policy docs, past proposals and case studies, FAQ content.
Don't try to index everything on day one. Start with the 20 documents that would answer 80% of the questions your team actually asks. You can always expand the index later.
Want a RAG system for your business?
I build these end to end — ingestion, retrieval, generation, and delivery. Book a call and we'll figure out what to index and where to deploy it.
Book a free call →