BACK TO GLOSSARY
AI & LLM Glossary

What is RAG (Retrieval-Augmented Generation)?

RAG (Retrieval-Augmented Generation)A technique that enhances AI responses by retrieving relevant information from an external knowledge base before generating a response.

Definition & Explanation

Retrieval-Augmented Generation (RAG) combines the power of LLMs with the ability to search and retrieve relevant information from external databases or documents. Instead of relying solely on training data, RAG systems first search a knowledge base for relevant context, then feed that context to the LLM alongside the user query. In AI coding tools, RAG is used to search codebases, documentation, and internal knowledge bases to give the AI relevant context for coding tasks.

AI Tools Using RAG (Retrieval-Augmented Generation)

Frequently Asked Questions

What is RAG in AI?

RAG (Retrieval-Augmented Generation) is a technique that gives AI models access to an external knowledge base at query time, allowing them to retrieve relevant information before generating responses.

How do AI coding tools use RAG?

AI coding tools like Cursor and GitHub Copilot use RAG to search your codebase and documentation, giving the AI model relevant context about your specific project before generating code suggestions.

Related Terms

EXPLORE MORE

Browse All AI & LLM Terms

Explore our complete glossary of AI, LLM, and system prompt terminology.

View Full Glossary