EnableYourData.com

Glossary

What is RAG (retrieval-augmented generation)?

RAG is a technique in which an AI system looks up relevant text passages in your own documents and passes them to a language model. The model bases its answer on those passages and can refer to the source.

RAG (retrieval-augmented generation) explained

With RAG, documents are first split into chunks and converted into embeddings: series of numbers that capture the meaning of a piece of text. These go into a vector database. When someone asks a question, the system finds the chunks that are most similar in meaning and passes them to the language model along with the question.

RAG works well for questions about policies, manuals, contracts or knowledge bases. It works poorly for questions that require calculation, such as totals or averages, because the model then has to calculate from a few passages instead of all the rows.

With RAG, mind permissions: if someone may not read a document, an answer should not be based on it either. And check the source references, because a model can draw the wrong conclusion even from good passages.

Example

Acme Groothandel could use RAG for staff questions about the employee handbook, such as "how many days of annual leave do I get after five years?". The system then finds the right passage and the answer refers to the relevant chapter.

RAG (retrieval-augmented generation) in ENABLE

RAG and AI chat on documents are not part of ENABLE. ENABLE uses AI for text-to-SQL in the SQL Explorer: the model writes a query on the data warehouse and the database supplies the figures.

FAQ

Frequently asked questions

What is the difference between RAG and text-to-SQL?

RAG looks up text passages in documents and has a language model build an answer from them. Text-to-SQL has a model write a database query, after which the database does the calculation. RAG suits text; text-to-SQL suits figures.

What is a vector database?

A vector database stores embeddings, series of numbers that capture the meaning of text, and quickly finds the chunks that resemble a question. It is the search engine behind most RAG systems.

Does RAG prevent hallucinations?

RAG reduces hallucinations because the model relies on real sources, but it does not eliminate them. Always check the source references.

Use AI on your own data. Securely, and without the headache.

In an online demo we show how ENABLE makes your data securely available and how you build on it: describing an app in the AI Builder, plain-language questions, dashboards and APIs. And how we set it up and manage it for you.