← Back to glossary

RAG (Retrieval-Augmented Generation)

A technique that retrieves information from your documents and hands it to the LLM along with the question, so it answers based on real, up-to-date data, reducing hallucinations.

RAG (Retrieval-Augmented Generation) is the technique that connects an LLM to your own knowledge base. Instead of the model answering only from its training data, the system first retrieves the most relevant passages from your documents and includes them in the prompt; the model then generates the answer grounded in that context.

The typical flow: documents are split into chunks and converted into embeddings (numeric vectors that capture meaning), stored in a vector database (such as Pinecone). When a question arrives, it is also turned into an embedding, the system finds the most similar chunks and assembles the prompt with them. The result: answers anchored in sources, with the ability to cite where each piece of information came from.

When to use it: whenever the LLM must answer about content it does not know (internal documentation, catalogs, contracts, recent data) without the cost of fine-tuning. A concrete example: a support chatbot with RAG over the product manual answers "how do I reset my password?" by quoting the exact steps from the current version of the manual, instead of inventing a generic procedure.

Pinecone logo

Data & Analytics

Pinecone

Search through billions of items for similar matches to any object, in milliseconds. It’s the next generation of search, an API call away.

Not available
DocsBot AI logo

Customer Service

DocsBot AI

Build AI agents that combine trusted knowledge with real actions for customers and teams across your business tools and workflows.

Not available
Chatbase logo

Customer Service

Chatbase

Chatbase is the AI customer experience platform. Its AI agents resolve complex queries and reduce ticket volume in every channel for over 10,000 businesses.

Not available

Categories

See also