โ AI Product Building learning pathAI Product Building ยท Module 4 of 10
Retrieval-augmented generation (RAG)
RAG lets a model answer from your own documents.
๐ Key ideas
- Split documents into chunks and create embeddings (number vectors) for each.
- Store embeddings in a vector database or search index.
- At question time, retrieve the most relevant chunks.
- Send those chunks with the question so the model answers from them.
- Show sources so users can check the answer.
๐ก Real-life example: Like an open-book exam: the student first finds the right pages, then writes the answer from them.
EmbeddingNumbers that capture the meaning of text
Vector databaseStores and searches embeddings
ChunkA small piece of a document
GroundingAnswering from provided sources