AI glossary · Building and running AI
Retrieval-augmented generation (RAG)
Retrieval-augmented generation (RAG) makes AI answers more accurate by first looking up relevant information, then having the model answer using it.
In more detail
A RAG system searches a source, such as company documents, a help centre or the web, for passages related to your question. It adds them to the prompt, and the model writes an answer based on them, often with citations.
RAG lets a model use private or up-to-date information without retraining, and reduces hallucinations. It usually relies on embeddings and a vector database.
Example
A company chatbot answers “How many days of leave do I get?” by retrieving the HR policy and quoting the relevant section.
Related terms
GroundingGrounding means tying an AI’s answer to specific, trusted sources, such as search results or your documents, instead of relying only on what it memorised.EmbeddingAn embedding is a list of numbers that represents the meaning of a piece of text, an image or another item, so a computer can measure how similar things are.Vector databaseA vector database stores embeddings and quickly finds the ones most similar to a query, which lets AI apps search by meaning across large collections.AI hallucinationAn AI hallucination is when an AI confidently gives an answer that is false or made up, such as a fake fact, quote or source.Context engineeringContext engineering is choosing what an AI model sees for each request, such as instructions, documents, memory and tool results, so it can answer well.
Browse related tools
AI tools listed on BroUseAI in these categories.