RAG
Retrieval-Augmented Generation (RAG) augments model inputs with externally retrieved knowledge.
Work Process
- Prepare external knowledge, usually by chunking documents and building an index.
- Retrieve context relevant to the user query.
- Augment the prompt with the retrieved context.
- Update the knowledge base as the external corpus changes.