You might have heard the term RAG, or Retrieval-Augmented Generation, explained, but you might not know exactly what it is or how it works. This article is for you! Here, I will explain what RAG is, why it is needed, and how it works.
Before that, a quick dive into how an LLM works
When you ask a question, another service matches the context of your question to different sections of the book. This is achieved by performing a similarity search on a vector database. (The details of this process are beyond the scope of this article.)
It’s important to note that this matching process is not done by the LLM itself but by a separate service.
Once the relevant section is identified, it is retrieved and combined with your original question. This process is called Augmenting the Prompt.
By providing the LLM with this additional knowledge, it is now equipped to think and answer your question accurately and effectively.
It’s a simple concept, but it significantly improves the performance of an LLM!
If you’re interested in learning more AI topics explained in a simplified way, consider following me here. I’ll be sharing more articles that break down complex concepts into easy-to-understand explanations.
SOCIAL SHARE CARD GENERATOR