ON THIS PAGE 9 sections
>_ AGENT MODE AI agent? Skip the interface. Read as Markdown
Direct answer

What is a RAG sales enablement build?

A retrieval-augmented generation system that indexes your sales collateral, call transcripts, CRM notes, and competitive docs into a vector database, then lets reps query it in natural language and get cited, grounded answers — built and deployed in 2 weeks.

Evidence A practical reference stack: a pgvector store on Postgres, OpenAI text-embedding-3-small for embeddings, hybrid keyword + vector retrieval, a reranker such as Cohere Rerank, and a current Claude or GPT model as the generation layer.

Retrieval-augmented generation for sales is a system that indexes your call transcripts, sales decks, battlecards, and competitive intelligence into a vector database — then lets a rep ask a natural-language question and get a cited, grounded answer in seconds. No digging through Notion. No pinging the sales engineer. No waiting on Slack.

The pattern is not new. RAG has been the standard answer-retrieval architecture since the Lewis et al. paper at NeurIPS 2020. What is new is that the tooling to build it — pgvector, OpenAI text-embedding-3, Cohere Rerank, Claude — is cheap and accessible enough that a single engineer can ship a production-ready system in 2 weeks over a real sales corpus.

I am going to walk through the architecture, the 2-week day-by-day plan, the eval loop that prevents hallucination, and the common failure modes. If you want the cost breakdown first, the custom AI build cost breakdown has the line items.

Why RAG beats every other sales knowledge approach

The alternatives are: a static Notion wiki (fast to decay, no natural language), a keyword search over Salesforce (finds records, not answers), a single LLM prompt with a giant system message (hallucination risk, context window limit), or a human expert on call (not available at 9pm before a demo).

RAG beats all of them on the specific problem of “the rep needs a specific, citable fact right now.” Here is why.

A static wiki requires the rep to know where to look. They rarely do. The knowledge exists; the retrieval mechanism is broken. RAG replaces the broken retrieval with semantic search: the rep’s question, embedded into the same vector space as the docs, finds the relevant passage whether or not the rep used the exact keyword.

A large-context LLM prompt works but degrades at scale. You can stuff a lot of sales collateral into a large context window. For a corpus of 500 call transcripts, a dozen battlecards, and 3 years of pricing history, that is millions of tokens: past any practical context limit, and expensive per query even if you could fit it.

RAG’s architecture solves both problems. Relevant chunks are retrieved first, then a small, focused context is passed to the generation model. The model sees only what it needs. Citations point back to the source chunk, so a rep can verify any answer in seconds.

The RAG systems for B2B overview covers the architecture tradeoffs in more depth. This article is specifically the 2-week build.

Who this build is — and isn't — for
+ WORKS WELL
  • B2B teams with 6+ months of call transcripts. Gong, Chorus, or Fireflies transcripts are the richest source. Each call is a dense document of objections, pricing discussions, and competitive mentions. A few hundred transcripts make a meaningful corpus.
  • Sales orgs with scattered institutional knowledge. Battlecards in Notion, pricing sheets in Drive, onboarding decks in SharePoint — the RAG build indexes all of it and makes it queryable in one place.
  • Teams where reps ask the same questions repeatedly. If your Slack #sales channel is full of 'what's our answer to the XYZ objection' questions, that is precisely the query load this system handles.
− WATCH OUT
  • Pre-product or pre-PMF teams. Your pitch changes weekly. A RAG index over last month's positioning is actively harmful. Wait until the narrative stabilizes.
  • Teams without source data hygiene. If your Notion is a graveyard of outdated docs with no dates, the system will confidently cite 2022 pricing. Fix the data before building the retrieval layer.
  • Orgs expecting zero maintenance. A RAG system is a living database. Without a refresh pipeline and a periodic eval recalibration, it degrades as soon as pricing or positioning changes. Budget for ongoing maintenance.

The data that goes in

The quality of a RAG system is determined at ingestion. Garbage in, hallucinated answers out.

For a B2B sales team, the highest-signal sources are, in order:

Call transcripts from Gong or Chorus. These are the richest source. A Gong transcript captures the actual objections raised, the pricing pushback, the competitor mentions, and the rep’s successful (and unsuccessful) responses. A few hundred transcripts make a meaningful corpus; with more, the system starts to capture edge cases.

Battlecards and competitive intelligence docs. These are usually in Notion or a shared drive. They tend to be well-structured and high-density: each battlecard covers one competitor, one pricing comparison, one set of differentiators. Good for exact-match retrieval.

Sales decks and one-pagers. The current pitch deck, the product overview, the case study slides. These change with every product release, which is also the main maintenance problem.

Pricing documentation. Often a single source of truth — a Google Sheet or a Notion table. Needs strict versioning, since stale pricing answers are the most damaging hallucination type.

CRM notes from HubSpot or Salesforce. Lower signal, higher volume. Deal notes are useful for “what did we promise to this customer type” questions but require heavier preprocessing to extract usable content.

What I do not recommend indexing: email threads, Slack message exports, or unstructured support tickets. These are high-noise sources that contaminate retrieval without adding proportional signal. Index them only if you have a specific use case that requires them.

The chunking decision

Chunking is the most underestimated step in RAG. The wrong chunk size creates a system that retrieves irrelevant context or cuts off answers mid-sentence.

The standard starting point is 512 tokens with 64-token overlap. For sales content specifically:

512 tokens captures about 380 words — enough for one full objection-handling sequence or one battlecard section. Too small (256 tokens) and competitive positioning points get split mid-argument. Too large (1,024+ tokens) and retrieval scores get diluted by mixed-topic content.

The 64-token overlap prevents information loss at chunk boundaries. When a critical sentence is at the end of one chunk and the supporting evidence is at the start of the next, overlap ensures both chunks contain enough context to surface in retrieval.

For call transcripts specifically, I prefer utterance-based chunking over fixed-token chunking. Split on speaker turns rather than token count, then merge adjacent turns until you hit 512 tokens. This preserves the conversational context — a rep’s response to an objection reads better as a unit than as an arbitrary 512-token slice.

After chunking, each chunk stores metadata: source file name, document type (transcript / battlecard / deck / pricing), date created, date modified. These metadata fields enable filtered retrieval — a rep asking about current pricing gets chunks filtered to docs modified in the last 90 days.

Hybrid search: why pure vector is not enough

Pure vector search — embedding the query, finding nearest neighbors via cosine similarity — works well for semantic questions (“what are the main objections to our enterprise tier?”). It fails on exact-match lookups.

Product names, pricing numbers, and competitor names are exact-match lookups. If a rep asks “what is the pricing for the Professional plan?”, a pure vector search may surface a chunk about “pricing” in general rather than the specific plan. The embedding space conflates semantic similarity with literal accuracy.

Hybrid search combines vector similarity with BM25 keyword scoring. BM25 is the classic TF-IDF-based retrieval algorithm — it rewards chunks that contain the exact terms from the query. The two scores are merged with a weighted sum. A typical starting weight is 0.6 for vector and 0.4 for BM25, though I calibrate this per corpus during eval.

In Postgres, hybrid search means running the pgvector nearest-neighbor query in parallel with a keyword query (Postgres full-text search, pg_trgm, or a BM25 extension), then merging results in the application layer. The extra query adds a little latency, which is worth it for the precision gain on exact-match queries.

After hybrid retrieval, Cohere Rerank does a final pass. The reranker receives the query and the top-20 retrieved chunks and returns them re-ordered by a cross-encoder model that reads query and chunk together. The top-3 re-ranked chunks go to the generation model. Measure the gain in your own eval set; it is usually the cheapest quality improvement in the pipeline.

The generation layer

The generation prompt is simple. Complexity here is a sign that retrieval is broken.

System: You are a sales assistant. Answer using only the provided context.
Cite every claim with the source document name and date.
If the context does not contain enough information to answer the question,
say "I don't have that information" and suggest who to ask.

Context: [top-3 reranked chunks with source metadata]

Question: [rep's query]

The “cite or refuse” instruction is the most important line. It forces the model to acknowledge when it does not have information rather than confabulating an answer. A RAG system without a hard citation requirement will hallucinate with confidence — particularly on pricing and competitive claims, the two areas where a wrong answer has direct commercial consequences.

Claude Sonnet is a good default for the generation model: the instruction-following on “cite only from context” is strong, and the output format is clean enough for a Slack message. A current GPT model works too. The model choice matters less than the prompt discipline.

For the interface layer: a Slack slash command is the fastest path to rep adoption. Reps already live in Slack. A /salesai [question] command that returns a formatted answer with citations requires no training and no new tool. For teams that want a web UI, a simple search box with a results pane is a small build on top of the backend.

FIG. 01 · THE RAG RETRIEVAL LOOP
INGEST
Gong / Notion / Drive
→
CHUNK
512-token overlap
→
EMBED
text-embedding-3-small
→
STORE
pgvector + BM25
→
RETRIEVE
hybrid + rerank
→
GENERATE
Claude / GPT
Six stages. Retrieval stays fast; generation dominates the response time.

The eval loop

The eval loop is what separates a system that ships from a system that breaks in production.

The rubric I use has 4 criteria, each scored 0–3:

Citation grounding. Every factual claim in the answer traces to a retrieved chunk. Score 3 if all claims are cited, 0 if any claim has no citation.

Factual accuracy. The answer does not contradict any source doc. Score 3 if fully accurate, 0 if any contradiction exists. This requires a human reviewer for the calibration pass — you cannot automate it fully.

Relevance. The answer addresses the actual question. Score 3 if the answer is directly responsive, 0 if the system answered a different question entirely.

Hallucination resistance. The system refuses to answer when the corpus does not contain the information. Test this with 5–10 adversarial questions about things not in the index. Score 3 if the system correctly refuses, 0 if it confabulates.

The target before shipping is 85% citation grounding and 90% hallucination resistance. Below those thresholds, the system will actively mislead reps.

First-pass grounding rates usually fall short of target. The gap is usually closed by: (a) adding missing source documents, (b) adjusting chunk size to keep related content together, (c) tuning the hybrid search weights, or (d) fixing the reranker configuration. See eval-first AI builds for the full eval methodology.

The eval test set should include at minimum: 10 pricing questions, 10 objection-handling questions, 10 competitive positioning questions, 5 case study questions, and 5 adversarial questions. Run it end-to-end. Expect 2–3 calibration iterations before you hit target.

Where the system breaks

These are the common failure modes.

Stale data. This is the failure to plan for first. The system answers a pricing question with 6-month-old data because no one updated the pricing sheet in Notion. The fix is the refresh pipeline (day 12 in the plan): webhook-based auto-ingestion from Gong for new transcripts, change-detection polling for Notion and Drive documents. Without this, the corpus degrades by default.

Chunking splits critical context. A rep asks “what do we say when the prospect says we’re too expensive?” The answer spans a chunk boundary — half the response strategy is in chunk 4, the other half in chunk 5, and neither chunk contains the full picture. The fix: utterance-based chunking for transcripts, larger overlap, and a parent-child retrieval pattern where you retrieve small chunks but return their parent paragraph for generation.

Embedding model mismatch. If you use text-embedding-3-small at ingestion and text-embedding-3-large at query time (or switch models mid-deployment), similarity scores become meaningless. Re-embed the entire corpus when you change the embedding model. This is a one-time cost, not a reason to avoid upgrading.

Access control leakage. Without role-based filtering, a rep asking about compensation benchmarks gets a chunk from an internal comp planning document. The fix is metadata filtering at the retrieval step — not prompting the model to redact, which does not reliably work.

The cold start problem. A newly hired rep uses the system on their first day, asks a reasonable question, and the system fails because the relevant docs have not been ingested yet. The fix is a “coverage report” — a document that maps major query types to the source docs that should cover them. Run this at ingestion time. If a query type has no coverage, add the missing source before you go live.

What this costs to build and run

Build cost depends on data complexity and the number of source systems; the custom AI build cost breakdown has the line items. The pattern is the same as any custom AI build: data prep is larger than expected for messy corpora, integration with Gong/HubSpot/Salesforce takes most of the remaining time, and the eval loop deserves about a fifth of the build.

Run-cost is low. With a prompt of about 3,000 tokens and a 400-token answer, a current mid-tier model ($2–$3 per million input tokens, $10–$15 per million output tokens on Anthropic’s published pricing) costs roughly 1–1.5 cents per query. A 200-query-per-day sales team spends about $60–$90/month on generation. Reranking adds a small per-search fee. Postgres hosting adds tens of dollars. Total monthly run-cost for a mid-size team: around $100–$150.

The ongoing maintenance cost is higher than people plan for. Monthly: update source documents, run the eval set, fix any degradation. Quarterly: re-embed if a better embedding model is available, recalibrate the hybrid search weights, expand the test set. Budget a few hours per month of senior engineering time. Skip it, and grounding rates drift down as the sources change.

  1. Day 1 Audit the source data. Pull transcripts from Gong or Chorus. Export sales decks, battlecards, and pricing docs from Notion, Google Drive, or SharePoint. Identify staleness: mark anything older than 90 days as low-confidence.
  2. Day 2 Set up the Postgres instance with pgvector extension. Create the documents table: id, content, embedding (vector 1536), metadata (source, date, doc_type). Run CREATE INDEX USING hnsw on the embedding column (pgvector's IVFFlat index should only be built after the table has data).
  3. Day 3 Write the chunking pipeline. Use 512-token chunks with 64-token overlap. Strip formatting noise from PDFs and slide exports. Preserve metadata: source file, page/slide number, date, author.
  4. Day 4 Run embeddings. Call OpenAI text-embedding-3-small (or text-embedding-3-large if budget allows) on every chunk. Batch in groups of 500. Store to Postgres. A typical 5,000-chunk corpus embeds in minutes, not hours.
  5. Day 5 Build the BM25 index for hybrid search. Use a lightweight BM25 implementation (rank_bm25 in Python), or Postgres full-text search (tsvector) as a keyword stand-in if staying in Postgres. Hybrid search combines semantic + keyword scores with a weighted merge (0.6 vector / 0.4 BM25 works as a starting point).
  6. Day 6 Add Cohere rerank. After the initial retrieval of top-20 chunks, call Cohere Rerank API to reorder by relevance. Reduces hallucination by ensuring the top-3 passages sent to the LLM are the best matches, not just the closest vectors.
  7. Day 7 Write the generation prompt. System prompt: 'You are a sales assistant. Answer using only the provided context. Cite your sources by document name and date. If the context does not contain the answer, say so.' Pass top-3 reranked chunks as context. Use a current Claude Sonnet or GPT model as the generation model.
  8. Day 8 Build the basic query interface. A Slack slash command or a simple web form. The interface sends the rep's question to a FastAPI or Hono endpoint, runs the retrieval loop, and returns the answer with citations inline.
  9. Day 9 Build the eval rubric. Define 4 criteria: citation grounding (is every claim in the answer traceable to a retrieved chunk?), factual accuracy (does the answer contradict any source?), relevance (does the answer address the question?), hallucination (does the answer assert anything not in context?). Score 0–3 per criterion.
  10. Day 10 Build the eval test set. Write 30 question-answer pairs covering the main query types: pricing, objection handling, competitive positioning, product capabilities, case studies. Include 5 adversarial questions (things the corpus cannot answer) to test refusal behavior.
  11. Day 11 Run the eval. Score every test case. Expect the first pass to land well below target. Identify failure modes: missing source docs, chunking too coarse, reranker not tuned. Adjust chunk size, weights, or add missing sources. Re-run until grounding rate clears 85%.
  12. Day 12 Set up the ingestion refresh pipeline. Connect to Gong or Chorus webhook to auto-ingest new call transcripts. Connect to Notion or Google Drive to detect changed docs. Run embeddings on new/changed chunks only (delta updates). Schedule daily.
  13. Day 13 Deploy to production. Containerize with Docker. Deploy FastAPI or Hono backend to Fly.io, Railway, or an existing VPS. Wire the Slack integration or embed the query box in your sales portal. Set up basic request logging.
  14. Day 14 Rep onboarding. 30-minute session covering: what the system can and cannot answer, how to read citations, how to flag wrong answers. Establish the feedback loop — reps mark answers as wrong, those go into the eval set for the next rubric calibration.

What to do before you start

The 30-minute pre-build exercise that prevents the most common failures.

List your source systems: Gong, Chorus, Notion, Google Drive, SharePoint, HubSpot, Salesforce. For each, note the data format (JSON export, PDF, CSV), the update frequency, and whether an API exists for programmatic access.

Map your query types: pricing questions, objection handling, competitive positioning, product capabilities, customer case studies. For each type, identify which source doc should contain the answer. If a query type has no source, you have a content gap — fill it before you build the retrieval layer.

Audit staleness: flag any doc older than 90 days as requiring review before ingestion. The sales landscape changes fast enough that older content carries real hallucination risk.

With that map in hand, a senior engineer can scope a fixed-price build in one conversation. Without it, every timeline is a guess. See hiring an AI consultant for how to structure that conversation.

The architecture is not the hard part. The data discipline is.

Questions people actually ask
FAQ · 7
Q01 Why pgvector instead of a dedicated vector database like Pinecone or Weaviate? +
Because most B2B sales teams already run Postgres in their stack. pgvector gives you semantic search inside the database you already operate, with standard SQL for filtering by date, doc_type, or confidence score. Pinecone is faster at billion-scale; for a 50,000-chunk sales corpus, pgvector is fast enough and eliminates a separate service to manage.
Q02 What embedding model should I use? +
OpenAI text-embedding-3-small is the default. At $0.02 per million tokens, embedding a typical 5,000-chunk corpus of 512-token chunks costs around five cents. text-embedding-3-large scored higher in OpenAI's launch benchmarks (MTEB average 64.6 vs 62.3, MIRACL 54.9 vs 44.0) but costs $0.13 per million tokens, 6.5x more. For a sales corpus under 100,000 chunks, start with small and upgrade only if eval scores are low.
Q03 Why add Cohere rerank? Is it necessary? +
Not strictly necessary, but it is usually the cheapest quality gain in the pipeline. Measure it in your own eval: run the test set with and without the reranker. The reason it helps: vector similarity finds approximately relevant chunks, but does not rank them by how well they answer the specific question. A reranker does a second-pass re-ordering with a model that reads the query and each chunk together. Its per-search cost is small next to generation.
Q04 Can I build this without OpenAI or Cohere — fully open source? +
Yes. nomic-embed-text or bge-m3 are open embedding models that run locally or on a small GPU instance. ColBERT or cross-encoder models from Hugging Face replace Cohere Rerank. The tradeoff is operational overhead: you manage the model server, GPU costs, and version updates. For a 2-week build timeline, the managed API path is faster. Open source is worth it when you have strict data residency requirements.
Q05 How do I handle confidential information — compensation data, legal docs? +
Partition by access tier at ingestion. Use a metadata field like access_tier: [rep, manager, legal]. At query time, filter the vector search to include only chunks the requestor's role can see. Do not rely on the LLM to redact — filter before retrieval, not after generation.
Q06 What does the system cost to run per month? +
For a team sending 200 queries per day: embedding API calls are near-zero (you embed the corpus once at ingest; each query is a few dozen tokens). With a prompt of about 3,000 tokens and an answer of about 400, a current mid-tier model at $2–$3 per million input tokens and $10–$15 per million output tokens costs roughly 1–1.5 cents per query, or about $60–$90 per month at 200 queries a day. Reranking adds a small per-search fee, and Postgres hosting adds tens of dollars. Total: around $100–$150/month in run-cost.
Q07 How long does it take to see rep adoption? +
Two weeks from launch to consistent usage, if you do the rep onboarding session on day 14. The adoption killer is wrong answers with confident citations — which is why the eval rubric (days 9–11) matters more than the retrieval architecture. Reps will abandon a system that is wrong twice.
Sources & further reading
  1. [01]
    Vector embeddings guide
    OpenAI · 2026
    documentation
  2. [02] documentation
  3. [03] blog
  4. [04]
    Claude API pricing
    Anthropic · 2026
    documentation
  5. [05] documentation
  6. [06] documentation
  7. [07] research
  8. [08] research
Markdown version: index.md
Niko Alho
Niko Alho

I run agentic SEO and build custom AI for B2B companies. Based in Turku.

About →