AI & ML

RAG

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

In Depth

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.

How AI for Database Helps

AI for Database uses RAG techniques to augment queries with your specific schema context, table descriptions, and business terminology.

Related Terms

Ready to try AI for Database?

Query your database in plain English. No SQL required. Start free today.