Give Your AI Company Knowledge: A RAG Fast Start

How to let your AI answer from your own SOPs, manuals, price lists, and policies — with citations, permissions, and freshness control — without permanently training a single fact into the model.

Beginner friendly25 minute guideReviewed August 20, 2026

What You Will Be Able To Do

This is the companion to our Build Your Own AI fast start, focused on the one layer most businesses build first: giving the AI access to company knowledge. After reading it, you should be able to:

  • Explain in plain language how retrieval-augmented generation (RAG) works, from document to cited answer.
  • Choose which documents belong in a first knowledge base — and which must stay out.
  • Describe each pipeline step: ingestion, cleaning, chunking, embeddings, retrieval, generation, citation.
  • Explain hybrid search and why semantic-only retrieval misses real business questions.
  • Design basic permissions, freshness, and "I don't know" behavior for a trustworthy system.
  • Run a simple 15-question evaluation before go-live and after every major document update.

Why Not Just Train the Model on Our Documents?

"Can't we just train it?" is the most common question a business asks about RAG — and the answer is no, for three concrete reasons:

Changing facts go stale

A price list changes weekly. A fine-tuned model keeps answering with last month's prices until you retrain — which takes weeks and costs real money. Re-indexing a changed document takes minutes, and the next question gets the new answer immediately.

No citations, no trust

Fine-tuned knowledge cannot point to its source. In a business context, an answer without "here is the policy section it came from" is a guess you have to verify by other means. RAG answers carry their evidence with them.

One source of truth

Your documents already live somewhere — a wiki, shared drive, or document system. RAG reads them where they are, so updating the SOP updates every assistant that uses it. Training copies knowledge into a second place that then has to be kept in sync forever.

The dividing line again: the model learns how to behave (prompts, fine-tuning). The library holds what is true today (RAG). If you are deciding where a fact lives, it goes in the library — every time.

What To Feed It First

The knowledge base is only as good as its contents. Start deliberately small with documents people actually rely on:

Good first sourcesWhy they work well
SOPs and operating proceduresStable, structured, high question volume — the ideal RAG material.
Employee / onboarding manualsAnswer the same questions every new hire asks; instant measurable time savings.
Product documentationSupport and sales both ask about capabilities, limits, and compatibility constantly.
Price lists and packaging termsFrequently referenced, frequently stale — exactly where citations earn their keep.
Policies (HR, travel, security)High stakes if answered wrong; low risk to include with proper permissions.
FAQs and support recordsReal questions in real language — great for matching how people actually ask.
Internal wiki and training docsInstitutional knowledge that currently lives in a few people's heads.
Sales scripts, proposals, contract templatesStyle and substance for drafting assistance (pair with citations so nothing is invented).

Rules for the first collection

  • Start with 20–50 documents people actually use — not the entire drive. A focused, current collection beats an exhaustive dusty one.
  • One source of truth per topic. Two versions of the refund policy in different folders will produce two contradictory answers, and users will trust whichever sounds better.
  • Clean before ingesting: deduplicate, retire superseded versions, delete test documents. RAG will answer confidently from whatever you give it — including expired price lists.
  • Tag each document with an owner, a review date, and an audience (all staff vs. team-specific). You need these tags for freshness control and permissions later.

Garbage in, confident garbage out. A knowledge base is a broadcast system: every stale or wrong document you include becomes a plausible-sounding answer someone will act on. Document hygiene is part of the engineering work, not an afterthought.

How RAG Works, Step by Step

The full pipeline has ten steps. You do not need to code all of them yourself — frameworks (LlamaIndex, LangChain, Haystack) implement most of it — but you need to understand what each step does, because failures happen at specific steps.

1

Collect the documents

Gather PDFs, Word files, wiki pages, and markdown from your chosen sources. Note where each one lives so re-indexing can find it again.

2

Ingest (parse to text)

Convert every file into plain text the system can work with. This is where tables, scanned images, and odd formatting cause problems — a price table that parses as gibberish becomes an unanswerable question.

3

Clean

Strip headers, footers, page numbers, and navigation junk; fix encoding; remove duplicates. Noise here dilutes retrieval and wastes the model's context budget.

4

Chunk

Split documents into passages of a few hundred words at natural boundaries (headings, sections), with a little overlap so no sentence is cut in half. Too big and the relevant detail gets drowned; too small and the context around it is lost. Chunk size is one of the first things to tune when retrieval underperforms.

5

Embed

An embedding model converts each chunk into a numeric "meaning fingerprint" (a vector). Chunks about similar things land near each other in this space — that is what makes "find the relevant passage" a math problem instead of a keyword gamble.

6

Store in a vector / search database

Vectors go into a search engine (pgvector, Qdrant, Chroma, Weaviate, Milvus) alongside metadata: source document, section, owner, review date, audience tag. The metadata is what powers permissions and freshness later — store it from day one.

7

Retrieve

When a question arrives, embed the question and find the closest chunks — typically the top 3–10. This is the step that decides everything: if the right passage is not retrieved, no model in the world can produce the right answer.

8

Build the context

The retrieved passages, the question, and your system prompt ("answer only from the provided passages; cite them; say so if they do not contain the answer") are assembled into a single prompt.

9

Generate the answer

The LLM answers using the provided context. Because the passages were in front of it, the answer reflects your documents — and only them.

10

Cite the sources

The system shows which document and section each part of the answer came from. This is what turns "the AI says" into "page 4 of the refund policy says" — the difference between a toy and a tool people dare to rely on.

documents ──▶ ingest ──▶ clean ──▶ chunk ──▶ embed
                                                    │
question  ──▶ embed ──▶ retrieve ◀── vector/search DB
                          │
                          ▼
        retrieved passages + question + instructions
                          │
                          ▼
                    LLM generates answer
                          │
                          ▼
             answer with citations / "not in our docs"

Hybrid Search: Meaning Plus Keywords

Vector search is excellent at matching meaning: "how do I claim travel expenses?" finds a document titled "Reimbursement Procedure for Business Travel." But it is weak on exact strings — part numbers, error codes, product names, acronyms — where a traditional keyword search (full-text / BM25-style) wins decisively.

Semantic search alone misses

"What does the ERR-4412 code mean?" — embeddings may not connect "ERR-4412" to anything, because it is a code, not a concept. Keyword search finds it instantly.

Keyword search alone misses

"Why did my refund take so long?" — the policy never uses the word "long." Semantic matching bridges that gap to the section on processing timelines.

Hybrid = both, combined

Run both searches and combine their scores; a passage strong in either signal can be retrieved. Most modern vector databases support this natively, and PostgreSQL full-text search plus pgvector is the classic self-hosted combination.

Practical note: you do not need to design hybrid search from scratch — but when a user reports "it can't find X," ask which kind of lookup failed. Meaning-miss and exact-match-miss need different fixes, and knowing the difference tells you whether to tune embeddings, add keyword indexing, or fix the document itself.

Making Answers Trustworthy

The gap between "impressive demo" and "system people use in their jobs" is built from four controls:

Citations are non-negotiable

Every factual answer should point to its source document and section. Make it a hard rule in the system prompt and in your evaluation: no citation on a factual claim means the answer fails, regardless of how plausible it sounds.

Teach "I don't know" — and mean it

Instruct the model to say the answer is not in the company documents when the retrieved context does not support one. Then verify in evaluation that it actually does (models have a confident-fabrication bias; the instruction alone is not enough). A system that admits gaps earns trust faster than one that occasionally invents policies.

Freshness control

Store review dates in metadata, re-index whenever documents change, and surface "last updated" in answers where it matters (prices, policies, product specs). A monthly document-review cadence — owner confirms each assigned document is current — keeps the library honest.

Permissions: who can see what

  • Document-level access: tag documents by audience and filter retrieval by the user's role. HR policy details, salary bands, and vendor contracts should not be retrievable by everyone — the AI inherits your permission model.
  • The AI is a reader, never an editor: it queries the knowledge base read-only; humans update documents through their normal workflow.
  • Watch for personal data: support records and HR documents may contain PII. Anonymize where possible, scope who can retrieve the rest, and remember that "retrieved" means "shown to a model" — your privacy rules apply to what you index, not just what people read.

Documents are untrusted input. A malicious or sloppy document can contain text that tries to instruct the AI ("ignore previous instructions and…"). Treat retrieved content as data, never as commands — and keep tool permissions tight so a manipulated answer cannot become a manipulated action. Our Privacy & Security guide covers prompt injection in depth.

Common Pitfalls

Wrong chunk size

Chunks too big dilute the answer with irrelevant text; too small lose the context that makes a fact meaningful. Symptom: right document retrieved, mediocre answer. Fix: tune size and boundaries around your actual question patterns.

Stale documents

The classic silent killer — confident answers from last year's price list. Symptom: users stop trusting the system after one "that's not right anymore." Fix: review dates, re-index on change, visible freshness.

No citations

Without sources, every answer requires independent verification — which erases the time savings. Symptom: people screenshot answers and ask a human to confirm. Fix: make "cite or decline" a hard requirement in prompt and evaluation.

The whole-drive dump

Indexing everything you own buries signal in noise, imports secrets by accident, and makes permissions impossible. Symptom: retrieval quality that no amount of tuning fixes. Fix: curate a working collection with owners; expand deliberately.

Mixing embedding models

Adding new chunks embedded with a different model to an old collection silently degrades retrieval — the fingerprints are in different coordinate systems. Symptom: quality drops after "we just added documents." Fix: one embedding model per collection; re-index everything when you change it.

Skipping evaluation

Without a test set you re-run after changes, every document update is a coin flip. Symptom: nobody knows if last week's re-index helped or hurt. Fix: the 15-question test below, run before go-live and after every major change.

A 15-Question Test

You cannot improve what you do not measure. Before go-live — and after every significant document update or configuration change — run a fixed set of questions across these categories. Fifteen is enough to catch real regressions; write the correct answers down first, then score the system.

CategoryHow manyExample questions (adapt to your business)
Knowledge accuracy5"What is our refund window?" · "Which product plan includes API access?" · "Who approves travel over the monthly threshold?"
Retrieval & citations3Same facts asked differently ("I was double-charged — what are my options?"). Check: right document retrieved? Source actually cited? Citation points to the correct section?
Hallucination resistance2Ask about a policy that does not exist ("What is our remote-work stipend for dogs?") and a fact close to but not in the docs. Correct behavior: "not in our documents," not an invention.
Permission enforcement2An HR-specific question asked by a non-HR user (should be filtered/refused) and the same question by an HR user (should answer with citation).
Edge cases3A question spanning two documents · an ambiguous question that needs clarification · a stale fact where the old version still exists somewhere in the collection.

How to read failures: wrong answer with wrong document retrieved → retrieval problem (chunking, hybrid search, embeddings). Right document, wrong answer → prompt or model problem. Answered from a stale version → freshness/metadata problem. Refused when it should have answered → permissions or over-strict "say so if you don't know" tuning. Each failure type points at a different layer — fix the layer, then re-run.

When To Go Further

A knowledge base answers questions about what your company knows. The next capabilities live in other layers — see the Build Your Own AI fast start for the full map:

  • "What is the status right now?" → live data belongs in your systems of record, reached through read-only tools (MCP/APIs): check_inventory(), get_customer(). Don't copy fast-changing data into documents.
  • "It sounds wrong even when it's right" → style and format problems. Strong system prompt with examples first; fine-tune (LoRA/QLoRA) only after evaluation shows prompts can't reach the target.
  • "It should do a whole workflow, not just answer" → a bounded agent with tools, budgets, and approval gates — and only after the knowledge base and read-only tools are solid.

Build a 20-document pilot this week

  1. Pick one high-volume question stream (onboarding questions, support first-line queries, or sales product questions).
  2. Gather the 20 documents people actually use for it; note owner and last-updated date for each.
  3. Put them in a RAG setup with citations on (a hosted chat-with-docs feature is fine for a pilot).
  4. Write the "answer only from provided passages, cite sources, say so if not present" system prompt.
  5. Build your 15-question test with correct answers; run it twice — once as asked, once rephrased.
  6. Sit with two real users for a day. Their misses are your roadmap: retrieval, documents, permissions, or live data.

You will finish the week knowing exactly which layer to build next — with evidence instead of opinion.

Related guides