CH12 Retrieval Augmented Generation (RAG)
Retrieval-Augmented Generation (RAG) is an innovative technology in the field of natural language processing (NLP), beyond the limits of existing language models Information search and Methodology incorporating creation is.
Basically, RAG contains a wealth of information Search for relevant information in large document databases And, through this, the language Create more accurate and detailed answers To do.
For example, Topics such as the latest news events or expertise in a particular field Ask about, RAG finds relevant documents and answers based on their content Configure.
RAG's 8-step process
Pre-preparation stage

process by which students pick the books they need before studying.
Text Splitter : Split loaded documents into small, processable units. It's similar to splitting large books by chapter.
Embedding : Convert each document or part of a document to vector form, quantifying the meaning of the document. This is similar to summarizing the contents of a book and expressing it as a key keyword.
Save Vector Store : Save embedded vectors to the database. This is the process of indexing the summarized keywords so that they can be found quickly later.
Runtime phase

Retriever : Given a question, search for vectors related to this in the vector database. It's similar to finding a chapter in a book that best fits your question.
Prompt : Based on the information retrieved, the language model composes the above questions. This is the process of deciding how to ask questions based on information.
LLM (Large Language Model) : The language model generates an answer using a configured prompt. In other words, it is like a student who creates assignments or reports based on the information collected.
Chain creation : Generates a chain that binds to one pipeline of all previous processes.
Last updated