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)

The data problem: a new ticket is logged and someone has to search Jira and Confluence by keyword
The data problem: a new ticket is logged and someone has to search Jira and Confluence by keyword

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:

2. Introduction to RAG: an open-book test (2:08)

RAG as an open-book test: the user talks to an app, which talks to the LLM
RAG as an open-book test: the user talks to an app, which talks to the LLM

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

Data sources such as Jira, Confluence and Google Drive, in formats like images, PDF, text, Excel, CSV and TXT
Data sources such as Jira, Confluence and Google Drive, in formats like images, PDF, text, Excel, CSV and TXT

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

Documents are chunked and embedded, then stored in a vector database
Documents are chunked and embedded, then stored in a vector database

That searchable place is a vector database. To get documents into it, two things happen:

The vectors, along with the original text, are stored in the vector database.

5. Chunking strategies (4:03)

Chunking strategies: fixed size (smaller or larger), overlap, semantic and hierarchical
Chunking strategies: fixed size (smaller or larger), overlap, semantic and hierarchical

How you chunk has a big effect on answer quality. The main options covered in the video:

There’s no single best choice; it depends on your documents and the questions people ask.

6. The RAG workflow (7:25)

The RAG workflow: question, semantic search, retrieved chunks, question plus chunks to the LLM, summary back to the user
The RAG workflow: question, semantic search, retrieved chunks, question plus chunks to the LLM, summary back to the user

Once your data is in the vector database, every question follows the same loop:

  1. Question: the user asks something in the app.
  2. Search (semantic): the app embeds the question and searches the vector database for chunks with similar meaning, not just matching keywords.
  3. Chunks: the most relevant chunks come back.
  4. Question + retrieved chunks: the app sends both to the LLM.
  5. 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)

Semantic search in the vector database uses techniques like KNN and cosine similarity
Semantic search in the vector database uses techniques like KNN and cosine similarity

Putting it all together, a RAG system is made of:

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.

Leave a Reply

Your email address will not be published. Required fields are marked *