08
No Hype AI: RAG & Knowledge Systems
Build retrieval-augmented generation systems — embeddings, vector databases, chunking, advanced retrieval, knowledge graphs, and production RAG.
Why retrieval-augmented generation exists — solving knowledge cutoffs, hallucination, and private-data access by retrieving relevant context at query time — with a side-by-side of pure-LLM vs RAG answers.
The foundation of semantic search — what embeddings are, how encoder models create them, distance metrics (cosine, dot product, Euclidean), and how to choose an embedding model.
Where to store and search embeddings — Pinecone, Weaviate, Chroma, and pgvector — plus indexing algorithms (HNSW, IVF), the recall/speed trade-off, metadata filtering, and a selection framework.
How you split documents drives retrieval quality — fixed-size, recursive, semantic, and structure-aware chunking, the size/overlap trade-offs, and metadata enrichment, measured across approaches.
Build a complete RAG system end-to-end in Python — ingestion, cleaning, chunking, embedding, vector storage, retrieval, context assembly, and grounded generation with source citation.
Beyond basic similarity search — hybrid search (dense + BM25), cross-encoder re-ranking, query expansion, HyDE, and parent-child retrieval, added incrementally with quality measured at each step.
Measure RAG at every stage — retrieval (precision@k, recall@k, MRR), generation (faithfulness, relevance), and end-to-end correctness — with frameworks like RAGAS, golden sets, and LLM-as-judge.
Add structured relationships to retrieval — graph construction from documents, graph-based and hybrid retrieval, and answering multi-hop questions vector search alone cannot.
From prototype to production — caching, document updates and re-indexing, versioning, monitoring for quality drift, scaling, and the failure modes unique to production RAG.
Handle images, tables, charts, and code in RAG — multi-modal embeddings (CLIP-style), table extraction, syntax-aware code retrieval, and routing queries to the right modality.