Member-only story
RAG 101: Retrieval Augmented Generation
Hey there! I’m writing a blog series to help me document my journey learning in-depth about RAG and a maybe a lot of unrelated things alongside. Again, this is not a learning resource, it’s just me documenting my learning journey but you might find this useful, so feel free to follow along.
Introduction
Any LLM (Large Language Model) you use is trained on some (large) amount of data and their knowledge is limited to this training data. RAG is a technique in AI (Artificial Intelligence) that improves text generation by combining two steps: retrieval and generation. Instead of relying only on pre-trained knowledge, RAG first searches for relevant information from an external database, documents, or knowledge source (retrieval) and then uses that information to generate a more accurate and context-aware response (generation). This approach makes AI more reliable, dynamic, and capable of providing up-to-date answers, even beyond its original training data.
Or think of it this way — Imagine you’re taking a test, you have two options:
- Try to remember everything from your brain (like a normal LLM)
- Look up the correct answer in a book and then explain it in your own words.