Day 1: Introduction to Retrieval Augmented Generation
This is part of the series?—?10 days of Retrieval Augmented Generation
Before we start our first day, let us have a look at what lies ahead in this 10 days series:
Now, lets continue with our Day 1 - Introduction to Retrieval Augmented Generation.
Introduction to RAG
Before jumping to RAG, let’s take a look at two scenarios,
Scenario 1
Imagine there’s an open book exam. You read the question asked and search through the book to find the right answer. You adopt different strategies, like skimming through the pages, or going to a specific chapter and then looking for the answer, etc.
What if, there was a digital agent in your possession to which when you ask the question, it reads the book and fetches the best answer for you?
Scenario 2
Now Imagine you’re in a library. There are thousands of books present. Again, suppose, you have a question. But this time you don’t know which book has the answer, where the book is present, and even inside the book you don’t know where the answer would be. If you start searching, it may take you hours, or even days, to find the right answer.
领英推荐
But, if our digital assistant is present and you ask the same question to it, then all the headache of searching the answer is given to it and you just wait, have a sip of coffee, to get the answer. This digital assistant gets the right answer for you, and that too in minutes.
The digital assistant that we talk about in both the scenarios, in the field of Generative AI, is powered by the concept of Retrieval Augmented Generation (RAG). Let us understand the steps taken by RAG to give us the right answer,
RAG step by step
Important LLM Models
It must be understood that that the core of RAG is LLM models. They are responsible for generating contextual responses to the questions asked. Given below is the list of top 10 models that’s used in the industry currently.
Important Indexes
To create the knowledge repository for RAG, indexes are used. We will talk about them in more detail later but lets list some of them.
As an overview, we chunk the document and create embeddings of them. These embeddings are stored in one of the above services showed above. Then we use different similarity measures to get the answers.
This finishes our first day discussion of RAG. Tomorrow we will look at the core components of RAG. We will look at chunking and embeddings, what we mean by prompts, what are vector indexes, different LLM frameworks, etc.
Software Engineer @ EJADA
1 年Your example is great, thank you for your clarification ?
Senior Lead Software Engineer - L6 | M.Tech in Artificial Intelligence
1 年Great beginning in grasping workflow of RAG with generative models. Eagerly anticipating the upcoming sections.
NSV Mastermind | Enthusiast AI & ML | Architect Solutions AI & ML | AIOps / MLOps / DataOps | Innovator MLOps & DataOps for Web2 & Web3 Startup | NLP Aficionado | Unlocking the Power of AI for a Brighter Future??
1 年This is an impressive initiative! Looking forward to diving into the series.
Data Scientist | 8+ Years Experience | Expert in Computer Vision & Deep Learning Research and Product Development | Skilled in NLP, LLMs, VLMs & Cloud-Based AI Applications | Actively Seeking New Opportunities
1 年Good start to understand GenAI and RAG components. Looking forward to remaining parts.