RAG Systems
Answers grounded in your documents, not the model's memory.
How retrieval-augmented generation really works, from parsing messy PDFs and chunking them, through keyword, vector and hybrid search, reranking and prompt assembly, to evaluating answers, keeping data secure and choosing a platform. Vendor-neutral: open-source vector databases and the managed services on AWS, Google Cloud and Azure. Builds on LLM Foundations. By the end you can design a RAG system, measure it, and find out why it gave a wrong answer.
- 7
- chapters
- 23
- modules
- ~11h
- of learning
- 23
- live now
Take modules in any order. The route suggests one that builds up naturally.
has a live module in progress complete
Take a look inside
The big picture, before the details
What RAG does: place the question among the documents by meaning, fetch the nearest passages, answer from them. A real embedding map and real answers from a small open model.
“When is the last date to pay property tax, and is there a discount for paying early?”
The map flattens 384-dimensional vectors onto a page, so “nearest” is measured in the full vectors, not by distance on the map.
A taste of module 2: the same small model answering from memory, then with the corporation's documents.
To apply for a passport at the nearest Passport Office or Post Office in your area, you can follow these steps: 1. **Visit the nearest Passport Office**: The nearest Passport Office is located at 205-207 Kalpanagar, Kolkata, West Bengal, India. 2. **Gather Required Documents**: - A recent photograph of yourself. - Proof of identity
Fluent and confident, but generic or simply made up. Kalpanagar is a made-up town.
The big picture
What RAG is for, and every part of a working system.
2 modules · 55 min
Preparing documents
Turning real documents into clean, searchable pieces.
3 modules · 85 min
Core
Parsing real documents
Scans, tables, columns and Hindi text: where naive extraction breaks.
Core
Chunking
How big each searchable piece should be, and where to cut.
Core
Metadata, freshness & deletions
Filters, versions and keeping the index in step with the documents.
From words to meaning
Keyword search, vector search, and combining them.
5 modules · 140 min
Core
Keyword search & BM25
The inverted index and the scoring formula behind most search boxes.
Core
Embeddings for retrieval
Searching by meaning, and choosing an embedding model.
Deep dive
Vector indexes
Why exact search doesn't scale, and how HNSW and IVF trade accuracy for speed.
Core
Hybrid search & fusion
Keywords plus meaning, merged with reciprocal rank fusion.
Core
Reranking & relevance filtering
A second, sharper look at the top results before the model sees them.
Better context
Improving the query, the chunks and the prompt.
3 modules · 75 min
Core
Understanding the question
Rewriting, expanding and splitting questions before searching.
Deep dive
Contextual retrieval & small-to-big
Chunks that know where they came from, and returning more than you matched.
Core
Assembling the prompt
Order, citations, and teaching the model to say 'I don't know'.
Beyond basic RAG
Tables, graphs, agents and images.
4 modules · 105 min
Applied
Tables & SQL
When to query a database instead of searching text.
Deep dive
GraphRAG
Entities, relationships and communities for questions about a whole collection.
Applied
Agentic RAG & MCP
Retrieval as a tool the model decides when and how to use.
Deep dive
Multimodal RAG
Charts, forms and page images as searchable knowledge.
Measuring & running it
Evaluation, security, platforms and cost.
4 modules · 115 min
Core
Evaluating retrieval
Recall, MRR and nDCG against a test set you build.
Core
Evaluating answers
Faithfulness, relevance, and using a model as the judge.
Applied
Security & access control
Permissions, poisoned documents and personal data.
Applied
Platforms, cost & long context
Vector databases and managed services, and when a long context window is enough.
Capstones
Put it all together.
2 modules · 80 min