The RAG pipeline is only as trustworthy as its knowledge base (KB)—the curated corpus of sources you are willing to retrieve from. Unlike a raw file dump, a KB has ownership, freshness SLAs, access rules, and quality gates. It feeds chunking and the vector store; indexing makes it searchable at scale.
Learning Objectives
By the end of this lesson, students should be able to:
- Define a RAG knowledge base vs an ungoverned document pile.
- List source types and ingestion patterns (batch, CDC, crawlers).
- Set freshness, ownership, and deprecation policies.
- Connect KB governance to metadata and ACLs.
- Plan evaluation sets drawn from real KB questions.
- Explain why garbage-in still yields fluent garbage-out with RAG.
A knowledge base for RAG is the governed collection of documents (and their derived chunks) that an organization designates as authoritative evidence for retrieval-augmented answers, including processes for update, access, and retirement.
KB Building Blocks
| Element | Questions to answer |
|---|---|
| Sources | Which systems are in-scope? Who owns them? |
| Ingest | Batch nightly? Event-driven? Manual publish? |
| Quality | Deduped? PII scrubbed? Structured enough? |
| Access | Tenant / role visibility? |
| Lifecycle | How are obsolete docs removed from the index? |
Curated KB
- Owned pages
- Review cadence
- Higher trust
Raw lake
- Everything indexed
- Fast coverage
- Noise & conflicts
Hybrid policy
- Tier A/B sources
- Boost curated
- Common in prod
Code: Tiny KB Registry
Strengths of a governed KB
- Fewer conflicting answers
- Clear owners for bad content
- Safer ACL boundaries
Tradeoffs
- Curation costs time
- Coverage gaps hurt recall
- Stale “active” flags poison RAG
“If it is in SharePoint, it belongs in the KB.” Drafts, duplicates, and personal folders create contradictory evidence. Scope the KB deliberately; quarantine low-trust sources or mark them tier-B with lower boosts.
Knowledge Check
- Short Answer: What makes a KB “governed”? Answer: Ownership, freshness, access, and retirement processes—not just files.
- True/False: Retiring a doc requires removing its vectors too. Answer: True.
- Multiple Choice: Tiered sources help by: (a) boosting trusted content, (b) removing GPUs, (c) CSS. Answer: (a).
- Short Answer: Name an ingest pattern. Answer: Batch, CDC/event-driven, or crawl/publish (any).
- True/False: RAG fixes contradictory source documents automatically. Answer: False.
- Multiple Choice: Eval sets should come from: (a) real user questions on the KB, (b) only lorem ipsum, (c) DPI settings. Answer: (a).
- Short Answer: Why track owners? Answer: Accountability when content is wrong or stale.
- True/False: Personal draft folders are ideal tier-A sources. Answer: False.
- Multiple Choice: Next lecture: (a) Indexing, (b) Vol. 1 only, (c) printers. Answer: (a).
- Short Answer: How does metadata support the KB? Answer: Encodes tier, ACL, freshness, and provenance for retrieval.
Key Takeaways
- A RAG KB is a governed evidence corpus, not a file dump.
- Lifecycle and ACLs matter as much as embedding quality.
- Garbage sources produce fluent wrong answers.
- Next: Indexing.
Lab: Inventory 20 candidate sources; label A/B/exclude; justify three exclusions.
Discussion: Who has authority to publish into production RAG?
Recap: The knowledge base is RAG’s system of evidence. Continue with Indexing.