What is RAG, and why does almost every AI chatbot that “knows” your documents use it? Watch the 10-minute video below, then use this post as a quick written guide with screenshots from the whiteboard.
Large language models are great at writing and reasoning, but they only know what they were trained on. Ask one about your company’s Jira tickets, your Confluence pages or last week’s product doc, and it either says it doesn’t know or, worse, confidently makes something up. Retrieval-Augmented Generation (RAG) is the technique that fixes this, and it’s the backbone of almost every “chat with your documents” tool you see today.
In this video I explain RAG from scratch on a whiteboard, with no code. This post is a written companion with screenshots from the video, so you can skim the key ideas or come back to them later.
Who this is for
Beginners, students, product managers, business leaders and anyone curious about how AI chatbots answer questions about data they were never trained on. No programming background needed.
1. The data problem (0:00)

Picture a support team. A new ticket comes in, and to resolve it someone has to dig through Jira, Confluence and product docs, usually by typing keywords into a search box and hoping the right page shows up. Keyword search is brittle: if the answer uses different words than your query, you miss it.
An LLM could summarise all of that knowledge in seconds, but out of the box it has never seen your internal data. Two problems follow:
- Outdated knowledge: the model only knows what existed when it was trained.
- Hallucinations: when it doesn’t know, it may still produce a confident, wrong answer.
2. Introduction to RAG: an open-book test (2:08)

The easiest way to think about RAG is an open-book test. Instead of expecting the model to memorise everything, we let it look up the relevant pages first and then answer.
The idea was introduced in the 2020 research paper Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks (Lewis et al.), and it has since become the standard way to connect LLMs to private or fresh data.
The setup has three pieces: the user asks a question, an app sits in the middle, and the LLM generates the answer. The app’s job is to fetch the right material and hand it to the model along with the question.
3. Where the knowledge comes from

Your knowledge lives in many places, such as Jira, Confluence and Google Drive, and in many formats: PDFs, plain text, Excel sheets, CSV and TXT files, even images. RAG needs all of it in one searchable place.
4. Vector database, chunking and embedding

That searchable place is a vector database. To get documents into it, two things happen:
- Chunking: each document is split into smaller pieces. A 50-page PDF becomes many short passages, so we can retrieve just the part that matters.
- Embedding: each chunk is passed through an embedding model, which turns the text into a list of numbers (a vector) that captures its meaning. Chunks with similar meaning end up close together.
The vectors, along with the original text, are stored in the vector database.
5. Chunking strategies (4:03)

How you chunk has a big effect on answer quality. The main options covered in the video:
- Fixed size: split every N characters or tokens. Smaller chunks are precise but can lose context; larger chunks keep context but bring in noise.
- Overlap: let neighbouring chunks share a little text so an idea that crosses a boundary isn’t cut in half.
- Semantic: split where the meaning changes, for example by paragraph or topic, rather than at an arbitrary length.
- Hierarchical: keep the document’s structure (sections, sub-sections) so a small chunk can be linked back to its larger parent for context.
There’s no single best choice; it depends on your documents and the questions people ask.
6. The RAG workflow (7:25)

Once your data is in the vector database, every question follows the same loop:
- Question: the user asks something in the app.
- Search (semantic): the app embeds the question and searches the vector database for chunks with similar meaning, not just matching keywords.
- Chunks: the most relevant chunks come back.
- Question + retrieved chunks: the app sends both to the LLM.
- Summary: the LLM writes an answer grounded in those chunks and returns it to the user.
Because the model is answering from real, retrieved text, answers are current and far less likely to be made up, and you can show the sources.
7. Key components of RAG (9:27)

Putting it all together, a RAG system is made of:
- Data sources: where your documents live.
- Chunking + embedding model: turns documents into searchable vectors.
- Vector database: stores vectors and finds the nearest ones to a question, typically with k-nearest neighbours (KNN) using cosine similarity.
- The app (orchestrator): handles the question, retrieval and prompt.
- The LLM: generates the final answer.
Where RAG is used
Internal knowledge assistants, customer-support bots that read your help centre, ticket triage that pulls similar past issues, and “ask your PDFs” tools are all RAG under the hood.
Watch the full video
If this helped, watch the full walkthrough above and subscribe to Semat Cloud & AI on YouTube for more no-code explainers on cloud and AI. Have a question about RAG? Drop it in the video comments.
