afterbuild/ops
§ S-07/rag-build

RAG development services that answer from your docs.

Ingestion pipeline that keeps up with your content. Vector DB tuned for retrieval precision. Chat UI wired to your auth, your data, your model. Three weeks. $6,999.

$6,999fixed fee
3 weeksship date
evalgolden-set precision/recall you can track
Quick verdict

Our RAG development service, the RAG Build, is a 3-week, $6,999 fixed-fee engagement that audits your content sources (Notion, Confluence, Google Drive, SharePoint, Zendesk, PDFs, custom), ships an ingestion pipeline that keeps up with your changes (nightly batch by default; realtime on specific sources when justified), tunes retrieval with the right vector DB (Pinecone, Chroma, Weaviate, or pgvector), adds a reranker layer (Cohere or cross-encoder) to push precision above 0.85, and ships either a React chat UI with citations or a REST / SSE API your team wraps. Closes with an eval suite of 20–50 golden questions, observability wired, and a runbook for adding sources. You own the code and the system when we hand off.

§ 01/rag-patterns

Five RAG patterns we ship most.

Most RAG builds fit one of these five shapes. The scoping call maps your specific content to the nearest shape and confirms stack choices.

RAG Build · 5 shipping patterns · reranker · citations · eval suite
SituationTodayWhat the build ships
Internal docs sprawl — thousands of Notion pages and PDFs no one readsFull-text search is bad; employees ask in Slack for facts that are documentedRAG with source citations; chat UI wired to your SSO so access is audited
Support KB used only by agents, not customersCustomers can't find answers, so tickets that the KB already answers keep arrivingCustomer-facing RAG chatbot with guardrails, citations, and human-escalation path
Compliance / policy / legal archive no one can search meaningfullyQuestions answered by 'ask legal' — bottlenecks, slow decisionsRAG with strict source citations + confidence threshold; legal approves Q&A patterns
Product documentation fragmented across 5 systemsEngineers ask the same questions in Slack every dayRAG indexing every source nightly; answers pulled live from current docs, not stale copy
Prototype built on LangChain `RetrievalQA` that 'sort of works'No reranker, no eval, hallucinations hidden by confident toneReranker added, eval suite shipped with precision/recall numbers, hallucinations quantified and reduced
§ 02/3-week-schedule

The 3-week RAG-build schedule.

Week 1 ends with a working ingestion hitting one source end-to-end. Week 2 ends with retrieval + reranker tuned against golden questions. Week 3 ends with your chat UI or API live, eval suite running, handoff complete.

  1. W1week 1

    Content audit + ingestion prototype

    Week 1 is the content audit — we inventory every source (Notion, Confluence, Google Drive, SharePoint, S3, custom), assess structure (chunkable? already split? markdown vs. PDF?), identify PII risk, and ship an ingestion prototype hitting one representative source end-to-end. You see real embeddings in a test vector DB by end of week 1.

  2. W2week 2

    Retrieval tuning + reranker

    Week 2 tunes retrieval — chunk size and overlap tuned against real queries, embedding model selected (OpenAI text-embedding-3, Cohere, Voyage, or open-source), metadata filters added (source, recency, permission), and a reranker layer (Cohere Rerank or a cross-encoder) bolts on to push precision above 0.85 on the top-5. You see the precision/recall numbers on real golden Q&A pairs by end of week 2.

  3. W3week 3

    UI / API + evals + handoff

    Week 3 ships the chat UI (React component with streaming, citations, and confidence) or the API (REST or SSE endpoint your team wraps themselves), hardens the eval suite (20–50 golden questions we run every time the ingestion changes), wires cost and usage observability, and runs a 90-minute handoff session. Your team leaves with a working RAG system, an eval harness, and a runbook.

§ 03/sample-eval

A sample eval suite we ship.

Eval is the difference between a RAG demo and a RAG system. The golden-set format below runs on every ingestion change. The numbers in the sample output are illustrative, not client data: your build reports its own. For reference, see the Anthropic contextual retrieval playbook we cross-check against.

eval-suite/golden-set.yaml
yaml
01# eval-suite/golden-set.yaml (trimmed)02# 20 golden Q&A pairs we rerun every time ingestion changes.03 04- id: q-00105  question: What's our SLA for customer support tickets on Enterprise plan?06  expected_answer_contains: ["4 business hours", "Enterprise"]07  forbidden: ["24 hours", "best effort"] # wrong answers that have appeared before08  must_cite_sources:09    - "enterprise-sla-2026.pdf"10  threshold_precision: 0.8011 12- id: q-00213  question: How do I rotate the Stripe webhook signing secret?14  expected_answer_contains: ["Stripe Dashboard", "webhooks", "rotate"]15  must_cite_sources:16    - "runbook-stripe-ops.md"17  threshold_precision: 0.7518 19# ... 18 more20 21# Run:  pnpm eval:rag -- --set golden22# Output:23#   Precision@5: 0.87 (target: 0.85 — PASS)24#   Recall@5:    0.92 (target: 0.80 — PASS)25#   Hallucination rate (answer contains no citation): 3.2% (target: <5% — PASS)26#   Avg latency:  1.8s (p95: 3.1s)27#   Per-query cost: $0.018 average (with Anthropic caching on the system prompt)
20–50 questions. Precision, recall, hallucination rate, latency, per-query cost — tracked over time.
§ 04/ledger

What the build delivers.

Five deliverables. Production RAG. Yours to own and extend.

§ 05/vector-db

Choosing a vector database.

The vector database stores your chunk embeddings and returns the closest matches to each question. We pick it on the scoping call from your document count, query volume, filter needs and hosting rules. Retrieval quality depends on more than the database: in Anthropic's contextual retrieval tests, contextual embeddings plus contextual BM25 cut top-20 retrieval failures by 49%, and adding a reranker took that to 67%. That is why every build ships with a reranker. New to the moving parts? Our guide to RAG development covers chunking, embeddings and retrieval step by step.

Vector database options · picked on scoping · sources below
OptionPick it whenWhat it does
pgvector (Postgres)You already run Postgres and want no new infrastructureExact nearest-neighbor search by default; add an HNSW or IVFFlat index for approximate search
PineconeYou want a managed service with strong filteringA metadata filter limits each search to matching records, which is how source and permission filters work
WeaviateExact terms (SKUs, error codes, names) matter as much as meaningHybrid search fuses a vector search and a keyword (BM25F) search into one result set
ChromaA small-to-medium project you want to self-hostSimple to run; we move to one of the above when scale or filtering needs grow
§ 06/permissions

Security, permissions and private data.

A RAG system must never answer from a document the person asking could not open themselves. We store each chunk's source, date and permissions as metadata at ingestion and filter on them at retrieval, so the model only sees what that user is allowed to see.

The chat UI signs in through your SSO, so every question is tied to a real account and can be audited. PII is flagged in the week-1 content audit, and the HIPAA path keeps PHI inside your BAA-covered stack. Answers carry citations to the source chunks, and below a tuned confidence threshold the system says it doesn't know instead of guessing.

§ 07/engagement-price

Fixed fee. Reranker included. Eval suite from day one.

One content domain per build. Adding a second domain later runs at $4,999 (patterns reused). HIPAA path adds $2,000 for BAA coordination and PHI-aware chunking.

rag
price
$6,999
turnaround
3 weeks
scope
Ingestion · vector DB · reranker · chat UI or API · golden-set eval · handoff
guarantee
Precision > 0.85 on golden-set. Source citations required. Eval suite yours to run.
book the build→
§ 08/vs-alternatives

RAG Build vs fine-tuning vs vendor RAG vs DIY.

Four dimensions. The lime column is what you get when you build RAG right — with eval, with citations, with a reranker, at fixed price, yours to run. Weighing agencies instead? See how RAG development companies for enterprises compare.

RAG Build · reranker · eval suite · citations · yours to extend
DimensionFine-tuningVendor RAGDIY LangChainAfterbuild Labs RAG
ApproachFine-tuningVendor RAG (Glean, etc.)DIY (LangChain RetrievalQA)Afterbuild Labs RAG Build
PriceTraining runs, repeated as content changesAnnual subscription, quoted by the vendorYour engineers' time, open-ended$6,999 fixed · 3 weeks · yours to run
FreshnessFrozen at training timeConnectors on vendor's cadenceDepends on what you wireRe-ingest nightly · answers pulled from live docs
EvalPerplexity + vibesVendor dashboardRare — most DIY RAG has noneGolden-set eval suite · precision/recall you can track
§ 09/fit-check

Who should book the build (and who should skip it).

RAG is not always the answer. Anthropic suggests that a knowledge base under 200,000 tokens (about 500 pages) can go straight into the prompt with no retrieval layer at all. If your users need the model to take actions rather than answer from documents, our AI agent development services fit better, and if you only need a model wired into an existing app, start with AI integration services.

Book the build if…

  • →You have 500+ documents that matter and a real 'chat with the docs' use case.
  • →Your team or customers are asking questions your docs could answer if retrieval worked.
  • →You want source citations in every answer — not vibes-based summaries.
  • →You need an eval suite to track precision over time, not a one-shot demo.
  • →You want to own the system, not rent from Glean / Guru / Moveworks / Notion AI.

Do not book the build if…

  • →You have fewer than 100 documents — the LLM can just read them all in context, no RAG needed.
  • →Your docs change by the minute (breaking news, live trading data) — that's a streaming ETL problem, not RAG.
  • →You want an autonomous agent with 2–3 tools — book AI Agent MVP ($9,499) instead.
  • →You want to add a chatbot to your product UI with no search backend — book the API Integration Sprint.
  • →Your corpus is in an exotic format (audio archives, hand-written scans at scale) — confirm fit on scoping.
§ 10/build-faq

RAG Build — your questions, answered.

FAQ
How much does RAG development cost?
The RAG Build is $6,999 fixed for one content domain: ingestion, vector DB, reranker, chat UI or API, golden-set eval suite and handoff. A second content domain later is $4,999 because the patterns are reused. The HIPAA path adds $2,000. Corpora above about 10M documents need a custom build, quoted after scoping.
How long does it take to build a RAG system?
Three weeks. Week 1 ships an ingestion prototype on one real source, week 2 tunes retrieval and the reranker against golden questions, and week 3 ships the chat UI or API, the eval suite and a 90-minute handoff.
Can RAG respect user permissions?
Yes. Permissions are stored as metadata on every chunk at ingestion and applied as a filter at retrieval, so a user's question only searches documents that user can already open. The chat UI signs in through your SSO, so every question is tied to a real account and can be audited.
Which vector DB should we pick?
Depends on scale and stack. Pinecone is the default for SaaS teams (fast, managed, strong filters). Chroma for small-to-medium self-hosted projects. Weaviate when you need hybrid search and strong metadata filtering. pgvector for teams that already run Postgres and want to avoid a new infra dependency — it works well up to ~5M vectors. We make the call on the Day-1 scoping based on your document count, query volume, filter needs, and whether you require self-hosting.
Realtime ingestion or batch?
Batch (nightly) is the default because it's cheaper and simpler. Realtime (within seconds of source update) is worth it when: (1) your content changes throughout the day and answers need to reflect that, (2) you have webhook-friendly sources (Notion, Confluence, Zendesk), (3) the volume justifies streaming infra. For most teams, nightly batch is fine and we add realtime for specific sources only where needed.
How do you prevent hallucinations?
Three layers. (1) Reranker after retrieval pushes precision above 0.85, so the LLM is fed relevant context, not noise. (2) Source citations are required — every claim in the answer links back to the source chunks, and the UI shows them. (3) Confidence threshold — below a tuned threshold, the model returns 'I don't know, here's what I found' instead of fabricating. Eval suite quantifies the hallucination rate (answers with no supporting citation); we target under 5%.
Which content sources do you support?
First-class: Notion, Confluence, Google Drive (Docs + PDFs), SharePoint, Dropbox, Zendesk KB, HelpScout, Intercom, raw PDFs, raw markdown, websites (Firecrawl crawl). Custom sources (your internal DB, a proprietary CMS, a Git repo) are straightforward to add — usually a day of work inside the 3-week scope. We confirm source compatibility on the scoping call.
Can this scale to 1M+ docs?
Yes. Above ~1M documents we shift defaults: Pinecone or Weaviate over Chroma/pgvector, hierarchical chunking (parent-child), metadata sharding, and a two-stage retrieval (broad filter → dense retrieval → rerank). Above 10M docs we usually recommend a custom build rather than this fixed-scope sprint — the eval and latency work at that scale is its own engagement. Confirm on scoping.
HIPAA-compliant RAG path?
Yes, with caveats. On the scoping call we check BAA coverage for every vendor in the stack (model provider, embedding API, reranker, vector DB) against your own agreements. Where a vendor won't sign one, that component runs inside infrastructure you control, such as pgvector in your own Postgres. No PHI goes to an embedding API outside your BAA-covered stack. HIPAA RAG adds ~$2,000 to the engagement to cover BAA coordination, PHI-aware chunking (to avoid accidentally embedding PII across doc boundaries), and audit-log requirements.
What about graph RAG?
Graph RAG (GraphRAG, LightRAG, Neo4j + embeddings) is worth the complexity when your corpus has explicit entity relationships that matter for answering — org charts, legal citations, product SKU hierarchies, scientific literature with cross-references. For most business content (Notion, Confluence, support KB) it's over-engineered. We evaluate fit on the scoping call and quote it as an add-on if it's the right shape.
Next step

Build a RAG system that ships. Three weeks.

Three weeks. $6,999 fixed. Production RAG with ingestion, vector DB, reranker, chat UI or API, and a golden-set eval suite you can track over time.

Book free diagnostic →