From the course: RAG and Fine-Tuning Explained
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
The RAG flow
From the course: RAG and Fine-Tuning Explained
The RAG flow
- As a flow chart, this is how a RAG system works. When a request comes in, an LLM is used to parse the meaning of the request and transform it into a query for whatever data source and knowledge-based it's attached to. That could be a standard database accessed via an API or an array of embeddings or a vector database, or even a cookbook, and we refer to it as the grounded truth. The LLM functions as a translator, turning the natural language request into a software query. Then the grounded truth data source processes the request and returns the data to the LLM. Now the LLM combines the original request with the newly retrieved data and produces an answer. This process should produce an accurate answer, but because LLMs are probabilistic and non-deterministic, the accuracy can be off. To reduce this risk, it's become fairly standard to add an additional verification loop here by returning the generated response along with the retrieved data to the LLM and asking it to make sure the…
Contents
-
-
-
How LLMs work2m 8s
-
(Locked)
Context makes all the difference1m 21s
-
(Locked)
RAG: Retrieval Augmented Generation1m 46s
-
(Locked)
The RAG flow1m 30s
-
(Locked)
Embeddings: Helping AI understand data3m 9s
-
(Locked)
Knowledge graphs3m 16s
-
(Locked)
Fine-tuning1m 31s
-
(Locked)
RAFT: RAG with fine-tuning2m 4s
-
-