Glossary · AI & ML

RAG

Retrieval-Augmented Generation–an AI technique that enhances LLM responses by retrieving relevant context from external data sources.

Retrieval-Augmented Generation (RAG) is an AI architecture that combines the generative capabilities of large language models with information retrieval systems. Instead of relying solely on the model's training data, RAG retrieves relevant documents, data, or context from external sources and includes them in the prompt, enabling the model to produce more accurate, up-to-date, and grounded responses. For database applications, RAG can retrieve relevant schema documentation, previous query patterns, business glossaries, and data dictionaries to improve text-to-SQL accuracy. RAG reduces hallucinations and keeps responses grounded in actual data.

In practice

How AI for Database applies it

AI for Database uses RAG techniques to augment queries with your specific schema context, table descriptions, and business terminology.
AI & ML · aifordatabase glossaryRead-only ✓

Fig — every answer ships with the tables, rows and SQL behind it.

See it on your own database

Connect read-only in minutes. Free models included.

Start free