<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Gokul Kannan</title>
    <description>The latest articles on Forem by Gokul Kannan (@gokul_kannan_1011).</description>
    <link>https://forem.com/gokul_kannan_1011</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3904495%2F19204239-5958-4316-9813-7e25e813c347.png</url>
      <title>Forem: Gokul Kannan</title>
      <link>https://forem.com/gokul_kannan_1011</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/gokul_kannan_1011"/>
    <language>en</language>
    <item>
      <title>Vector Databases in RAG - Day 2</title>
      <dc:creator>Gokul Kannan</dc:creator>
      <pubDate>Sun, 03 May 2026 10:43:27 +0000</pubDate>
      <link>https://forem.com/gokul_kannan_1011/vector-databases-in-rag-day-2-18m4</link>
      <guid>https://forem.com/gokul_kannan_1011/vector-databases-in-rag-day-2-18m4</guid>
      <description>&lt;p&gt;In Day-1, we understood about the overview of a RAG system and what are its components and how it helps the LLM to generate more accurate and contextual responses. Now, lets see about the storage of the data using Vector Databases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Vector Database
&lt;/h2&gt;

&lt;p&gt;Lets assume that we have a PDF with us and this would be considered as our private data. Now I want my LLM to have the context about this PDF, So that I could ask any query related to that PDF and get the response. &lt;/p&gt;

&lt;p&gt;Now, we need to store this PDF data in a format with which the LLM could fetch the data and give us a relevant responses.&lt;br&gt;
Here in this case, Vector Database helps us to store the PDF data in a Numerical format which can be used by the LLM to fetch the relevant data.&lt;/p&gt;

&lt;p&gt;A vector database stores data in the form of vectors (arrays of numbers).&lt;/p&gt;

&lt;p&gt;A vector database is a specialized database designed to store and search vector embeddings (numerical representations of data). Unlike traditional RDBMS systems that use exact matching (like SQL queries), vector databases are optimized for similarity search. Examples include ChromaDB, Pinecone, FAISS, and Qdrant.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;Text =&amp;gt; converted into numbers using embeddings&lt;br&gt;
Image =&amp;gt; converted into numbers&lt;br&gt;
Audio =&amp;gt; converted into numbers&lt;/p&gt;

&lt;p&gt;These numbers capture meaning, not just raw data.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does mean by Numerical Format?
&lt;/h2&gt;

&lt;p&gt;It means the any kind of Data (Text, Image or Audio) is converted into a numerical format using any kind of encoding algorithms and gets saved into DB.&lt;/p&gt;

&lt;p&gt;Here, first we would break down the PDF data as chunks of data where each chunk would have n number of characters. Then each chunks would be converted into a vector points with n-number of dimensions. To have clear understanding, Lets see the below example :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Today is Wednesday&lt;/li&gt;
&lt;li&gt;Tomorrow is Thursday&lt;/li&gt;
&lt;li&gt;I am travelling today&lt;/li&gt;
&lt;li&gt;Wednesday is a nice series&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now I need this data to be converted into some sort of numerical format - as vectors. Here lets consider a simple One Hot Encoding.&lt;/p&gt;

&lt;p&gt;First lets just find all the unique words and list it down as an array.&lt;/p&gt;

&lt;p&gt;[Today, is, Wednesday, Tomorrow, Thursday, I, am, Travelling, a, nice, series]&lt;/p&gt;

&lt;p&gt;Now lets assign the values 1 and 0 for each words in the same array format. We would give 1 if it occurs in the sentence, if not 0.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;1 1 1 0 0 0 0 0 0 0 0 &lt;/li&gt;
&lt;li&gt;0 1 0 1 1 0 0 0 0 0 0&lt;/li&gt;
&lt;li&gt;1 0 0 0 0 1 1 1 0 0 0&lt;/li&gt;
&lt;li&gt;0 1 1 0 0 0 0 0 1 1 1&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As you can see, now we have converted each sentence into a numerical format. This is a very basic encoding algorithm which can be used for a meaningful conversion.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do we do this conversion?
&lt;/h2&gt;

&lt;p&gt;Now we understood that why we need to convert the data in a numerical format and we would use different kinds of encoding algorithms to do that conversion.&lt;/p&gt;

&lt;p&gt;So, how do we convert our data into a format which can be stored in a vector database? The answer is Embedding Models.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is this Embedding Model?
&lt;/h2&gt;

&lt;p&gt;Embedding Model helps us to convert our data into vectors which can then be stored into a vector DB.&lt;/p&gt;

&lt;p&gt;There are different sets of embedding models available. One such model is nomic-embed which has a 768 Dimensions, it means each chunk of data is represented as a vector of 768 Dimensions.&lt;/p&gt;

&lt;p&gt;Data &lt;br&gt;
↓&lt;br&gt;
[nomic-embed -Embedding Model]&lt;br&gt;
↓&lt;br&gt;
768D[] vectors &lt;br&gt;
↓&lt;br&gt;
VectorDB&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we need to save as Numerical Format?
&lt;/h2&gt;

&lt;p&gt;We may have a question that why can't we just store the same text data into the DB and do a normal text search. In this case, what happens is, we would be able to save those as isolated words and we can't really extract the context or semantic meaning out of this.&lt;/p&gt;

&lt;p&gt;Vector DB helps us to find a similar meaning data by doing a Similarity or Semantic Search. &lt;/p&gt;

&lt;p&gt;Now lets understand the whole flow where this Vector DB gets used:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Your data (PDF, docs, DB) → converted into embeddings&lt;/li&gt;
&lt;li&gt;Stored in a vector DB&lt;/li&gt;
&lt;li&gt;When user asks a question → it is also converted into a vector&lt;/li&gt;
&lt;li&gt;Vector DB finds similar content&lt;/li&gt;
&lt;li&gt;That content is sent to the LLM for answer generation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Lets understand with an example.&lt;/p&gt;

&lt;p&gt;Imagine a company has:&lt;/p&gt;

&lt;p&gt;1000 PDFs (policies, FAQs, manuals)&lt;br&gt;
They want a chatbot to answer questions based on these documents&lt;/p&gt;

&lt;p&gt;Step 1: Convert documents into vectors&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Each paragraph is converted into numbers (embeddings) using an Embedding Model&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 2: Store in Vector Database&lt;/p&gt;

&lt;p&gt;Step 3: User asks a question&lt;/p&gt;

&lt;p&gt;Step 4: Convert question into vector&lt;/p&gt;

&lt;p&gt;Step 5: Similarity Search&lt;/p&gt;

&lt;p&gt;Vector DB compares:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Question vector&lt;/li&gt;
&lt;li&gt;Stored document vectors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It finds the closest match (similar meaning)&lt;/p&gt;

&lt;h2&gt;
  
  
  How does a vector DB finds the similar meaning?
&lt;/h2&gt;

&lt;p&gt;A Vector Database is a type of database designed to store data as numerical vectors (embeddings) and efficiently retrieve similar data by performing similarity searches using metrics like cosine similarity.&lt;/p&gt;

&lt;p&gt;Let’s imagine we reduce everything to 2D (real systems use 100s–1000s of dimensions).&lt;/p&gt;

&lt;p&gt;We take 5 words:&lt;/p&gt;

&lt;p&gt;Cat&lt;br&gt;
Dog&lt;br&gt;
Tiger&lt;br&gt;
Car&lt;br&gt;
Bus&lt;/p&gt;

&lt;p&gt;Now imagine they are plotted like this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    ↑ Y-axis
    |
    |        Tiger .(0.8, 0.9)
    |
    |   Cat .(0.6, 0.7)
    |   Dog .(0.65, 0.6)
    |
    |
    |
    |                    Car .(0.1, 0.2)
    |                    Bus .(0.15, 0.25)
    |
    +--------------------------------→ X-axis
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Cat, Dog, Tiger are close → similar meaning ()&lt;br&gt;
Car, Bus are close → similar meaning &lt;br&gt;
Animals are far from vehicles → very different&lt;/p&gt;

&lt;p&gt;Step 1: User query&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let’s say user searches: "Lion"&lt;/li&gt;
&lt;li&gt;We convert "Lion" into a vector: Lion → (0.75, 0.85)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 2: Compare with existing points&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now the Vector DB calculates similarity using something like:

&lt;ul&gt;
&lt;li&gt;Cosine similarity - This measures the angle between two vectors, not just distance&lt;/li&gt;
&lt;li&gt;OR Euclidean distance&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Step 3: Find nearest neighbors&lt;/p&gt;

&lt;p&gt;Finally,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vector DB returns: Tiger, Cat (top matches)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In reality:&lt;/p&gt;

&lt;p&gt;The Embedding models would not have 2D instead it would have 768D, 1536D, etc.&lt;/p&gt;

&lt;p&gt;Uses optimized algorithms like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ANN (Approximate Nearest Neighbor)&lt;/li&gt;
&lt;li&gt;KNN (K Nearest Neighbor)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Is Vector DB mandatory for RAG?
&lt;/h2&gt;

&lt;p&gt;RAG (Retrieval-Augmented Generation) is an approach/architecture. In one of the approach we use the Vector DB to retrieve the relevant Data. &lt;/p&gt;

&lt;p&gt;Here Vector DB used in the retriever layer to perform semantic search.&lt;/p&gt;

&lt;p&gt;Instead of Vector DB, RAG can also use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keyword search (like SQL LIKE)&lt;/li&gt;
&lt;li&gt;APIs or databases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So to have clear understanding,&lt;/p&gt;

&lt;p&gt;RAG is not just a LLM + Vector DB&lt;br&gt;
Instead,&lt;br&gt;
RAG is LLM + Retrieval (Vector DB is one way to do retrieval)&lt;/p&gt;

&lt;p&gt;So, RAG is an approach where an LLM retrieves relevant external data (often using a vector database) and uses it to generate more accurate, context-aware responses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;A Vector Database performs similarity search by representing data (such as text, images, or audio as chunks) as high dimensional vectors. If we consider that as a multi dimensional space, each item is stored as a point in this space. &lt;br&gt;
When a query is given, it is also converted into a vector, and the database uses similarity metrics such as cosine similarity to measure how close the query vector is to other vectors. &lt;br&gt;
Based on this, it retrieves the most relevant results by selecting the vectors that are closest in terms of semantic meaning.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
      <category>beginners</category>
      <category>vectordatabase</category>
    </item>
    <item>
      <title>Hello World of RAG - Day 1</title>
      <dc:creator>Gokul Kannan</dc:creator>
      <pubDate>Sat, 02 May 2026 11:11:22 +0000</pubDate>
      <link>https://forem.com/gokul_kannan_1011/hello-world-of-rag-day-1-15l9</link>
      <guid>https://forem.com/gokul_kannan_1011/hello-world-of-rag-day-1-15l9</guid>
      <description>&lt;p&gt;As a beginner in understanding LLMs, when I heard the term RAG-Retrieval Augmented Generation, I assumed it was a technique used within LLMs. However, from this session, I learned that RAG is all about use of our own custom or private data along with an LLM to generate more relevant responses.&lt;/p&gt;

&lt;p&gt;Before understanding RAG, we need to have clarity on what exactly these LLMs are? &lt;/p&gt;

&lt;h2&gt;
  
  
  What does a Model mean?
&lt;/h2&gt;

&lt;p&gt;A model means an equation. Let's say now we have this equation &lt;br&gt;
y = mx + c &lt;br&gt;
This is a straight line equation.&lt;br&gt;
If the values of x and y are provided, then the system just tweak the values of m and c to come up with best fits. &lt;br&gt;
Here lets say x = 1  &amp;amp; y = 2, now I can have m=1 &amp;amp; c=1 or m=0 &amp;amp; c=2, etc., Here it learns different patterns. This process is called as learning. &lt;/p&gt;

&lt;h2&gt;
  
  
  Parameters and Weights
&lt;/h2&gt;

&lt;p&gt;Similarly in an AI model, the equation would be much more larger with the billions of parameters. The more complex the equation, the more patterns the model can learn and so the relevance and accuracy improves. Based on the Data exposed to train a model , its prediction varies.&lt;br&gt;
This is the reason why bigger models often perform better. That's why AI companies like OpenAI, Gemini and Claude come up with their model containing billions of parameters which helps to learn complex relationships.&lt;/p&gt;

&lt;p&gt;And along with these parameters, we have something called as weights.&lt;br&gt;
For Example : m1x^2 + m2x^3&lt;br&gt;
Here the m1 and m2 are called as weights. These are the things that comes from the data. These are the values learned during the training which act as deciding factors.&lt;br&gt;
For Example : &lt;br&gt;
When a model learns about animals,&lt;br&gt;
"Cat" gets one weight&lt;br&gt;
"Dog" gets another&lt;br&gt;
"Lion" gets another&lt;/p&gt;

&lt;p&gt;Based on the weights, the relevance changes. And using this the model could prioritize the importance of one over the other.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does an LLM do?
&lt;/h2&gt;

&lt;p&gt;Now we understood about the model. So, what does an LLM actually do?&lt;br&gt;
The answer is "It just predict the next word."&lt;/p&gt;

&lt;p&gt;If you ask a question to an AI, it does not understand like how we do. Instead it uses the question or prompt as an input and it predicts the next word and uses the predicted word again as an input to predict the next. This gets repeated until it generates the complete response. And this is the reason, why it always streams the response and does not just give a whole response at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  But how does it predict the next word?
&lt;/h2&gt;

&lt;p&gt;It uses the weights which the pretrained model already has for all data which it had trained on. What if we ask about a word, which the model didn't get trained on? Will it say "I don't know"?&lt;br&gt;
No, it just Hallucinates. &lt;/p&gt;

&lt;p&gt;For example, the model is trained only on:&lt;br&gt;
Cats&lt;br&gt;
Dogs&lt;br&gt;
and if we ask about:&lt;br&gt;
Lions&lt;/p&gt;

&lt;p&gt;The model was never exposed to data related to "Lions".&lt;br&gt;
Instead of saying:&lt;br&gt;
“I don’t know”&lt;br&gt;
the model answers a wrong answer confidently. This is called Hallucination.&lt;/p&gt;

&lt;p&gt;This is why RAG becomes necessary. Here we would give it a context by providing our private data, so that it doesn't hallucinate when we ask anything related to our data, instead it uses this private data and then generate the response rather than just using the pretrained data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Temperature
&lt;/h2&gt;

&lt;p&gt;Temperature controls the creativity of the model.&lt;br&gt;
It usually ranges from 0 to 1:&lt;/p&gt;

&lt;p&gt;Low Temperature (0.1)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More factual&lt;/li&gt;
&lt;li&gt;More stable&lt;/li&gt;
&lt;li&gt;Less creative&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Medium Temperature (0.5)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Balanced output&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;High Temperature (0.9)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More creative&lt;/li&gt;
&lt;li&gt;More imaginative&lt;/li&gt;
&lt;li&gt;Higher chance of hallucination
Temperature does not directly control truth.
It controls randomness.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  LLM and SLM
&lt;/h2&gt;

&lt;p&gt;We don't always need a bigger model which knows everything when we actually just need it for our specific use cases. In this situation, we may need a specialized model. Here SLM helps.&lt;/p&gt;

&lt;p&gt;SLM - Smaller Language Model&lt;br&gt;
This helps us with specific use cases. For example: ChatBots, Any Domain-Specific Tasks, Voice Assistants.&lt;br&gt;
These models may have millions of parameters instead of billions.&lt;/p&gt;

&lt;p&gt;It is much more cheaper, smaller than a LLM&lt;/p&gt;

&lt;p&gt;LLM - Large Language Model&lt;br&gt;
It is a Generalized model which has knowledge from different domains. It has billions of parameters. Example : Claude, Gemini and ChatGPT.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we need RAG?
&lt;/h2&gt;

&lt;p&gt;All these LLMs have few major limitations like&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Outdated Knowledge- They may not now about recent events. They only know about the data with which it had been trained on.&lt;/li&gt;
&lt;li&gt;Hallucination - Outcome of first limitation is when we ask about something it doesn't know, it hallucinates.&lt;/li&gt;
&lt;li&gt;They doesn't have any knowledge about a private data which they cannot access. Example : Private Business Data, HR Documents, Finance Documents, Project Reports , Project Management Tool Data, etc.,&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is where the RAG comes into picture.&lt;/p&gt;

&lt;h2&gt;
  
  
  RAG - Retrieval Augmented Generation
&lt;/h2&gt;

&lt;p&gt;This is self Explanatory. &lt;/p&gt;

&lt;p&gt;RAG typically involves three main steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Retrieve&lt;/strong&gt; – Relevant data is fetched from external sources like PDFs, databases, internal files, knowledge bases or documents based on the user’s query.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Augment&lt;/strong&gt; – The retrieved data is added to the prompt/context that is sent to the pre-trained LLM.&lt;br&gt;
(Important: we are not modifying or retraining the model itself, just giving it extra context.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generate&lt;/strong&gt; – The LLM uses both its pre-trained knowledge and the retrieved context to generate a more accurate and relevant response.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So instead of relying only upon its pretrained data, it just looks up on this retrieved private data and then generates the response. This way, RAG helps the LLM to overcome the above mentioned limitations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where is this private data gets stored?
&lt;/h2&gt;

&lt;p&gt;The Private Data is stored inside a Database known as a Vector Database. This vector database is a concept. &lt;/p&gt;

&lt;p&gt;For example: The private data like AzureDevOps board content, HR  Policy documents, Jira content, Internal Business Docs. &lt;br&gt;
All these are not directly fed to the LLM. Instead, they are converted and stored intelligently.&lt;/p&gt;

&lt;p&gt;How these documents are stored? &lt;br&gt;
Documents are broken into smaller parts called as Chunks.&lt;br&gt;
These chunks are always a&lt;br&gt;
Sentence Groups or Paragraph Chunks and &lt;br&gt;
not individual Words.&lt;br&gt;
This is because meaning comes from the context and not with isolated words. &lt;br&gt;
This contextual chunks helps the RAG to give a more relevant responses.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Vector?
&lt;/h2&gt;

&lt;p&gt;A vector has Magnitude and Direction.&lt;/p&gt;

&lt;p&gt;Each Chunk is converted into a numerical vector.&lt;br&gt;
Example:&lt;br&gt;
A paragraph about Lion becomes.&lt;br&gt;
P1=[...700 dimensions]&lt;br&gt;
P2=[...700 dimensions]&lt;br&gt;
P3=[...700 dimensions]&lt;br&gt;
Here P1, P2 and P3 are the points in a graph. All these points are defined with a 700 dimensions. &lt;br&gt;
For our understanding, in a 2D graph, we represent a point with x and y value. It means a point P1 can be defined as (x, y). Similarly we can define a point with any number of dimensions.&lt;br&gt;
Now the system measures the distance between the vectors and finds the relevant information.&lt;/p&gt;

&lt;p&gt;It checks which are the points which are closer to P1. It finds P2 and P3 by measuring the distance. &lt;/p&gt;

&lt;p&gt;Example :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apple&lt;/li&gt;
&lt;li&gt;Orange&lt;/li&gt;
&lt;li&gt;Pear&lt;/li&gt;
&lt;li&gt;Lemon&lt;/li&gt;
&lt;li&gt;Doctor&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here all the fruits related words stay closer and the word Doctor stays farther from these words.&lt;br&gt;
This is how the relevance works.&lt;/p&gt;

&lt;h2&gt;
  
  
  How relevant Chunks are found?
&lt;/h2&gt;

&lt;p&gt;When we say it measures the distance between each vectors, it means it involves different kinds of Algorithms.&lt;br&gt;
Examples :&lt;br&gt;
ANN - Approximate Nearest Neighbors&lt;br&gt;
KNN - K- Nearest Neighbors&lt;br&gt;
These help quickly find the most relevant chunks.&lt;br&gt;
The same idea is used in:&lt;/p&gt;

&lt;p&gt;Spotify, Netflix recommendations&lt;br&gt;
Amazon suggestions&lt;br&gt;
YouTube feed&lt;br&gt;
Social media recommendations &lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;The flow of RAG system is &lt;br&gt;
User asks a Query - Prompt&lt;br&gt;
↓&lt;br&gt;
System retrieves the chunks from this prompt&lt;br&gt;
↓&lt;br&gt;
This retrieved context goes into the LLM&lt;br&gt;
↓&lt;br&gt;
Based on the context, it retrieves all related chunks of data (Stored in a vector DB)&lt;br&gt;
↓&lt;br&gt;
LLM Generates the Answer with the retrieved relevant chunks of data&lt;br&gt;
↓&lt;br&gt;
User Receives a better response with their context.&lt;/p&gt;

&lt;p&gt;LLM- Predicts&lt;br&gt;
Vector DB - Stores your private Data as vectors&lt;br&gt;
RAG provides the context by searching the vector DB for relevant chunks. Send those to LLM.&lt;br&gt;
More contextual responses are generated.&lt;/p&gt;

&lt;p&gt;RAG is a method where an LLM retrieves relevant information (often from pre-indexed data in a vector database) and uses it to generate a more accurate answer.&lt;/p&gt;

&lt;p&gt;One simple analogy to have a clear understanding is:&lt;br&gt;
If you are getting into a project, you may need a Senior person's help to know about a particular application. &lt;br&gt;
So, RAG can be that senior person by below way:&lt;br&gt;
Here the Data means your application's documentations-files, Jira/ADO data. This is a private data.&lt;/p&gt;

&lt;p&gt;LLM &amp;lt;--&amp;gt; YOUR DATA &lt;br&gt;
 |________| &lt;br&gt;
     ↓ (Combining these two)&lt;br&gt;
   RAG (Now this acts as that Senior Person-You can interact with)&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>llm</category>
      <category>ai</category>
      <category>rag</category>
    </item>
  </channel>
</rss>
