# RAG (retrieval-augmented generation)

> RAG is how an AI answers from your documents: it searches them for passages that fit a question, then writes its answer from those passages.

Canonical: https://heykiko.io/glossary/rag
Last updated: 2026-11-05

## What it means

Instead of relying on what the model remembers, each question triggers a search of your knowledge. The best passages are given to the model with the question, so the answer can be current and can name its sources.

It's the technique behind almost every chatbot “trained on your website”.

## In HeyKiko

HeyKiko plans each question, searches several ways at once, ranks the results and answers from about a dozen short passages.

## Related

- [Embeddings](https://heykiko.io/glossary/embeddings)
- [Vector database](https://heykiko.io/glossary/vector-database)
- [Chunking](https://heykiko.io/glossary/chunking)
- [Hallucination](https://heykiko.io/glossary/hallucination)
- [What is RAG? In plain words](https://heykiko.io/blog/what-is-rag)
- [Full glossary](https://heykiko.io/glossary)
