RAG from Zero
In progress
Free RAG full course in Hindi, beginner to pro
Retrieval Augmented Generation, built up one piece at a time. We make one support bot, DocBot, answer questions from a company handbook, and every episode fixes something real that went wrong in the last one.
- You build
- DocBot, a support bot that answers from your own documents, with the code in Python and JavaScript.
- Episodes out
- 2, 15 min of video
- Level
- Beginner to advanced
- Language
- Hindi and English videos, English notes
Watch one question go through DocBot
This is the whole system the course builds. Each episode opens up one of these steps.
Customer asks
paisa wapas kab milega?
Embedding
[0.021, -0.384, 0.117, 0.590, -0.072, 0.243, ...]1,536 numbers
Handbook, 5 of 67 slips
- [1]Refunds Refunds go back to the original payment method within 5 to 7 working days.0.82
- Shipping Orders leave the warehouse within 2 business days.0.29
- [2]Cancelling an order You can cancel from My Orders any time before the order ships.0.71
- [3]Returns Unused items can be returned within 30 days for a full refund.0.66
- Leave policy Employees get 24 days of paid leave each year.0.18
Similarity to the question. Illustrative scores.
Message to the model
Answer using only these slips.
- [1] Refunds go back to the original payment method within 5 to 7 working days.
- [2] You can cancel from My Orders any time before the order ships.
- [3] Unused items can be returned within 30 days for a full refund.
Question: paisa wapas kab milega?
DocBot answers
Your money goes back to your original payment method within 5 to 7 working days of the refund. If the order has not shipped yet, cancel it from My Orders first.
Sources [1] Refunds [2] Cancelling an order
The model reads only that message and answers, with sources you can check.
Episodes
Point at an episode to see which part of the system it works on.
- Questiona customer asks
- Searchfind the right paragraphs
- Slipsthe paragraphs we keep
- Modelthe LLM reads them
- Answergrounded, with sources
- Episode 1What is RAG? Why AI never read your docsYour company's docs were never in the model's training data. RAG fixes that without training anything: search first, then ask. We open the exact message our demo bot sends and run the same question with and without RAG.
- Episode 2Embeddings: how AI knows “refund” = “paisa wapas”Text becomes numbers that capture meaning. We build the idea from a 2-number toy map to 3,072 dimensions, then test it on DocBot's real data, where one model puts a Hinglish question in the wrong place.
- Coming upVector databases, or just SQLite?
- Coming upChunking and messy PDFs
- Coming upKeyword search vs embeddings
- Coming upReranking the slips
- Coming upEvaluating answers without labels
What you will learn in this RAG course
What RAG is and when you need it
Why a model has never read your docs, why fine-tuning is a weak way to add facts, and when a small handbook fits in the prompt without RAG.
Embeddings
How text becomes numbers that capture meaning, why models use 1,536 or 3,072 dimensions, and how to cut them down safely.
Cosine similarity and vector search
How to find the paragraphs closest to a question, and when cosine, dot product and Euclidean distance give the same ranking.
Multilingual and Hinglish questions
Why one embedding model files a Hinglish question in the wrong place and another gets it right, tested on real data.
Chunking
How to split long and messy documents so search returns whole, useful paragraphs.
Reranking and evaluation
How to reorder search results before the model reads them, and how to measure answer quality without hand-made labels.
Who this course is for
- Developers who can call an API and want to make an LLM answer from their own documents
- Students moving into AI engineering who want to see how RAG works, not just which library to import
- Anyone who tried a RAG tutorial, got a wrong answer and could not tell which step broke
What you need before you start
- Basic Python or JavaScript
- You have called an API before
- No machine learning or maths background needed: every idea is built from scratch
Questions about the course
What is RAG?
RAG stands for Retrieval Augmented Generation. Before the model answers, your app searches your own documents for the relevant paragraphs and adds them to the message the model reads. The model then answers from those paragraphs instead of from memory.
Is this RAG course free?
Yes. The videos are free on YouTube, and the notes, code and quizzes are free on this site with no sign-up.
Which language is the course in?
The videos are in Hindi with English technical terms. The notes, code and quizzes are in English.
Do I need a machine learning background?
No. You need basic Python or JavaScript and to have called an API before. Embeddings, cosine similarity and the rest are explained from scratch with small examples first.
Is the code in Python or JavaScript?
Both. Every code sample in the notes has a Python tab and a JavaScript tab.
How is RAG different from fine-tuning?
Fine-tuning retrains the model, which is slow to repeat every time a document changes and is better at changing style than teaching new facts. RAG leaves the model alone and changes the message you send it, so updating a document updates the answers. Episode 1 explains when each one fits.
Which models and tools does the course use?
We test real models on the same data, such as OpenAI's text-embedding-3-small and Google's gemini-embedding-001, and show where they differ. An upcoming episode tests whether you need a vector database or whether SQLite is enough.