Diagram
A left-to-right process flow showing user query to query embedding, similarity search against a knowledge base, retrieval, generation, and grounding check returning a grounded response.
Grounding Responses with Retrieval-Augmented Generation
Grounding is the process of connecting model output to specific, verifiable sources such as internal documentation, project data, or communication records. Retrieval-augmented generation (RAG) is a common grounding technique that retrieves relevant external information and gives it to the model before generation. The grounding source sends verified facts to the model, and the model generates a response based on those facts, which reduces hallucinations and makes statements traceable to source data.
RAG depends on embeddings and vector search. Embeddings map data into a continuous vector space where closer proximity reflects similar meanings, and they are created by converting text, images, and video into arrays of floating point numbers called vectors. When a query arrives, the query is converted into an embedding, that embedding is compared to document embeddings through similarity search, and a search engine using an index embedded with semantic meanings retrieves the most relevant information. The ordered flow runs from user to knowledge base to model and back to the user:
Domain 1 of 3
103 practice questions
Practice this DomainLast updated