Skip to content

← All series & guides

Series

RAG from scratch

6 parts

This path is for you if you want answers from your own files, not from the model's memory. It covers cutting documents into pieces, embeddings, filters, a mix of search types, and a citation you can check. No part is live on this page yet. Start with the Practical AI part on retrieval in plain English, then come back for the build.

Start with part 1 →

  1. 1 What is RAG? How AI answers questions from your own documents RAG separates knowledge lookup from model reasoning. Embed, retrieve, augment the prompt, then generate. Bad retrieval looks like a broken search engine with better prose.
  2. 2 How big should document chunks be for AI document search? Choose chunking for your docs: fixed, recursive, or semantic, with overlap. Special-case tables and code. Prefer small chunks for search and larger parents for answers when you can.
  3. 3 How to combine meaning search and keyword search for better AI document search Use dense vectors for semantic match, sparse for exact terms, and hybrid fusion when both matter. Consider Matryoshka dims to cut storage. Test on your queries.
  4. 4 How to use metadata filters in AI document search to hide private and outdated files Attach tenant, role, freshness, and doc-type metadata to every chunk. Prefer pre-retrieval filters for security. Treat ACL mistakes as incidents, not UX bugs.
  5. 5 How to make AI document search (RAG) cite the exact source for each answer Ship RAG with visible sources, passage-level cites when you can, and automated checks that quotes exist in retrieved text. Latency trades are real; inventing footnotes is not allowed.
  6. 6 Why AI document search gives wrong answers, and how to find the cause Watch for stale docs, bad neighbors, and unsupported claims. Add freshness signals, rerankers, and refusal paths. Treat RAG outages like search outages.
  7. 7 How to test the answers of a RAG chatbot, even if you’re not an engineer Run light RAG evals with a golden question set, simple faithfulness and relevance scores, and a repeatable schedule. Vibe checks do not replace labeled cases. Scheduled · October 23, 2026
  8. 8 How to give an AI your company’s knowledge: RAG, fine-tuning, or long context Choose RAG for changing private knowledge with citations, fine-tuning for tone and rigid formats, and long context for whole-document comparison. Most production stacks blend the three on purpose. Scheduled · October 25, 2026