Explainer
What is RAG?
Why teams use RAG
A normal LLM answer comes from patterns learned during training. That can be outdated or too generic. RAG lets the system look up your docs, policies, product pages, or notes first, then answer with that context.
Simple RAG flow
1) User asks a question. 2) The system searches a document store for relevant chunks. 3) Those chunks are added to the prompt. 4) The model writes an answer using the retrieved material.
Good RAG systems also cite sources, handle cases where nothing relevant is found, and keep documents fresh.
Examples
- A company chatbot answering from internal policy docs
- A help center assistant quoting product documentation
- A research tool summarizing uploaded PDFs
Common questions
Does RAG stop hallucinations completely?
No, but it usually reduces them for document-based questions. The model can still misread retrieved text or blend it incorrectly, so citations and review still matter.
Glossary terms
Keep reading
- What is an LLM?
An LLM (large language model) is software trained on huge amounts of text so it can predict and generate language. It does not think like a person; it estimates likely next words, sentences, and answers based on patterns it has seen.
- What are tokens in AI?
In AI, a token is a chunk of text the model reads or writes. A token may be a whole word, part of a word, a space, or punctuation. Models process language as tokens, not as complete human sentences.
- What are embeddings?
Embeddings are numeric representations of content—usually lists of numbers—that place similar meanings closer together in a vector space. They let software compare text, images, or other items by meaning instead of exact keyword match.
- What is an AI agent?
An AI agent is software that uses an AI model to pursue a goal across multiple steps. Unlike a single chatbot reply, an agent can plan, call tools, check results, and continue until the task is done or it needs help.