Retrieval Augmented Generation (RAG), Quick Start
In today's world, the amount of available information is growing exponentially, and important details are often lost in the data stream. RAG is an innovative approach that combines the power of vector search and language models, allowing you to get relevant answers from vast knowledge bases in seconds. Master RAG to make your chatbot not just a source of random facts, but a true expert capable of answering accurately, quickly, and convincingly.
In 2025, knowledge of RAG is required in 90% of GenAI vacancies
Questions
- What steps is RAG broken down into?
- Why is A (Augmentation) needed?
- How does R (Retrieve) work?
- What needs to be done with the data to make it Retrieve-able?
Steps
1. Watch 2 videos
I have a coffee machine manual that is 30 mega-tokens long... but I don't want to pass it in the request every time - what should I do? Watch the first video - and you'll find out!
This is David's most beloved channel on YouTube. ⬆️
2. Play with RAG!
3. How to work with ipynb?
Ipynb (Interactive Python Notebook) is an interactive notebook that allows you to write code, text, math, and results in one document.
There are two ways to work with ipynb:
- Google Colab - in any browser
- VS Code - locally
4. Now let's create our own RAG!
Replicate the following ipynb, play with the code:
- https://python.langchain.com/docs/tutorials/rag/
- ✦ https://python.langchain.com/docs/tutorials/qa_chat_history/
Extra Steps
Now we know...
Now you know how RAG works and what each letter means. Let's move on!
Exercises
In next modules...
- Why do we need RAG? - we will learn when we need the RAG approach and when we need other methods
- Embeddings and vector databases - we will learn how texts are converted into vectors and how to store them
- ✦ Data preprocessing - we will learn how to prepare data for RAG
- ✦ Hybrid RAG - not only vectors matter!
- ✦ Working with structured data - we will learn how to make RAG with huge tables
- ✦ Working with other (besides just text) unstructured data - we will learn how to make RAG with images, audio and video