What is RAG?
RAG (retrieval-augmented generation) is an approach in which AI, before answering, looks up relevant information in your documents and answers from it. It reduces the risk of making things up.
Explanation
A language model knows only what it was trained on. It does not know your price list, internal policies or the current stock level. RAG solves this by first looking up the relevant parts of company documents for a question and inserting them into the model's prompt. The model then answers from these materials, not from memory.
A typical RAG has two parts. In preparation, documents are split into smaller parts, converted into embeddings and stored in a vector database. When a question comes in, the system finds the parts with the most similar meaning, hands them to the model, and the model composes the answer, ideally with a link to the source.
RAG is cheaper and more flexible than fine-tuning a model: you only need to update the documents and the answers change. The quality, however, depends on the materials. Outdated or contradictory documents lead to bad answers, so you need to decide who maintains them.
Example from a company
A service company's chatbot answers technicians' questions about setting up equipment. It looks for the answers in the manuals and for each one states which document and chapter it comes from.
Related AICO service
AI chatbot for business: An AI chatbot for business answers from your own materials and hands tricky questions to a person. From €790 + €49/month excl. VAT, labelled as AI.
Not sure where to start? Order a free AI Discovery: our person goes through your company with you, and within 24 hours you have an opportunity map.