<?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>DEV Community: Karthik DASARI</title>
    <description>The latest articles on DEV Community by Karthik DASARI (@karthikdasari).</description>
    <link>https://dev.to/karthikdasari</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4226302%2F57322f9d-9f8f-48ad-ace6-304ca1ef8f42.png</url>
      <title>DEV Community: Karthik DASARI</title>
      <link>https://dev.to/karthikdasari</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karthikdasari"/>
    <language>en</language>
    <item>
      <title>Why Can't I Just Use ChatGPT to Understand My Project? An Introduction to RAG</title>
      <dc:creator>Karthik DASARI</dc:creator>
      <pubDate>Wed, 04 Nov 2026 13:24:17 +0000</pubDate>
      <link>https://dev.to/karthikdasari/why-cant-i-just-use-chatgpt-to-understand-my-project-an-introduction-to-rag-2odn</link>
      <guid>https://dev.to/karthikdasari/why-cant-i-just-use-chatgpt-to-understand-my-project-an-introduction-to-rag-2odn</guid>
      <description>&lt;p&gt;I recently joined a software project that had been running for almost 12 years.&lt;/p&gt;

&lt;p&gt;As part of the onboarding process, the team shared a lot of documentation with me: architecture documents, technical specifications, workflows, and other project-related information.&lt;/p&gt;

&lt;p&gt;I started going through them. Honestly, it was overwhelming. There was so much information to read, and manually going through document after document wasn't exactly an exciting experience.&lt;/p&gt;

&lt;p&gt;One day, I was having a conversation with one of the senior developers on the team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Senior Developer:&lt;/strong&gt; "Have you gone through the documentation and got a good understanding of the project?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "I'm still going through it."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Senior Developer:&lt;/strong&gt; "How are you reading all these documents?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "Manually, one by one."&lt;/p&gt;

&lt;p&gt;He then mentioned that the team was building an AI assistant to make the onboarding process smoother for new joiners.&lt;/p&gt;

&lt;p&gt;That immediately caught my attention.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Me:&lt;/strong&gt; "So, can't I just use ChatGPT or Gemini for this?"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Senior Developer:&lt;/strong&gt; "Not exactly. ChatGPT is a general-purpose LLM. It doesn't automatically know the internal details of our project. This is where RAG comes into play."&lt;/p&gt;

&lt;p&gt;That conversation introduced me to a concept I wanted to understand better: &lt;strong&gt;Retrieval-Augmented Generation (RAG).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But why isn't a general-purpose LLM enough?&lt;/p&gt;

&lt;h2&gt;
  
  
  Why can't I just use ChatGPT?
&lt;/h2&gt;

&lt;p&gt;Let's say I ask ChatGPT:&lt;/p&gt;

&lt;p&gt;"How does authentication work in a Java application?"&lt;/p&gt;

&lt;p&gt;It can explain authentication concepts, common approaches, and implementation patterns.&lt;/p&gt;

&lt;p&gt;Now consider a different question:&lt;/p&gt;

&lt;p&gt;"Where is authentication implemented in our project?"&lt;/p&gt;

&lt;p&gt;The answer depends on our actual source code and internal documentation.&lt;/p&gt;

&lt;p&gt;An LLM may understand authentication very well, but that doesn't mean it knows how authentication is implemented in our project. It doesn't automatically have access to our private project information.&lt;/p&gt;

&lt;p&gt;Of course, we can upload documents or paste information into ChatGPT. But imagine doing that for a project with thousands of files and hundreds of documents.&lt;/p&gt;

&lt;p&gt;We need a better approach: &lt;strong&gt;retrieve only the information relevant to the question and provide it to the LLM.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's the fundamental idea behind RAG.&lt;/p&gt;

&lt;h2&gt;
  
  
  What exactly is RAG?
&lt;/h2&gt;

&lt;p&gt;RAG stands for &lt;strong&gt;Retrieval-Augmented Generation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let's break it down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Retrieval:&lt;/strong&gt; Finding relevant information from an external knowledge source.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Augmented:&lt;/strong&gt; Providing that information along with the user's question.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generation:&lt;/strong&gt; Using an LLM to generate an answer based on the provided information.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In simple terms, RAG connects an LLM with external knowledge so it can answer questions using information that isn't necessarily part of its training data.&lt;/p&gt;

&lt;p&gt;But how does it actually work?&lt;/p&gt;

&lt;h2&gt;
  
  
  How does RAG work?
&lt;/h2&gt;

&lt;p&gt;A basic RAG application has two major workflows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Preparing the knowledge.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Retrieving information and generating an answer.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  1. Preparing the knowledge
&lt;/h3&gt;

&lt;p&gt;Before our AI assistant can answer questions about the project, it needs access to the project's information.&lt;/p&gt;

&lt;p&gt;This could include architecture documents, technical specifications, API documentation, and other internal resources.&lt;/p&gt;

&lt;p&gt;We need to prepare this information so that it can be searched efficiently. This process is called &lt;strong&gt;data ingestion&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;There are four important concepts involved:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Document loading&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First, we collect and load information from different sources into the system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Chunking&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine an architecture document containing 100 pages. We don't need to retrieve the entire document whenever someone asks a question.&lt;/p&gt;

&lt;p&gt;Instead, we divide it into smaller, manageable pieces called &lt;em&gt;chunks&lt;/em&gt;. This makes it easier to find specific information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Embeddings&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;How can a system find information based on meaning rather than just matching exact words?&lt;/p&gt;

&lt;p&gt;This is where embeddings come in.&lt;/p&gt;

&lt;p&gt;An embedding is a numerical representation of text that captures aspects of its meaning. It helps a system identify semantically similar pieces of information, even when they use different words.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vector database&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once we convert the chunks into embeddings, we need to store them somewhere searchable.&lt;/p&gt;

&lt;p&gt;A vector database stores these embeddings along with their associated information, such as the original text and metadata.&lt;/p&gt;

&lt;p&gt;Now our project knowledge is prepared and ready to be searched.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Retrieving information and generating an answer
&lt;/h3&gt;

&lt;p&gt;Let's say I ask our AI assistant:&lt;/p&gt;

&lt;p&gt;"Where is authentication handled in our project?"&lt;/p&gt;

&lt;p&gt;What happens next?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Convert the question into an embedding&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The user's question is converted into a numerical representation, just like the document chunks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Retrieve relevant information&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The system searches the vector database to find chunks that are semantically similar to the question.&lt;/p&gt;

&lt;p&gt;For example, it might retrieve relevant information from authentication documentation, login API documentation, or security configuration documents.&lt;/p&gt;

&lt;p&gt;This is called &lt;strong&gt;retrieval&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Provide context to the LLM&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The RAG application combines two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The original question.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The relevant information retrieved from the knowledge base.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It sends both to the LLM.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Generate the answer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The LLM uses the question and retrieved information as context to generate a response.&lt;/p&gt;

&lt;p&gt;Instead of relying only on its general training knowledge, it now has access to information about our specific project.&lt;/p&gt;

&lt;p&gt;And that's the basic RAG workflow!&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting it all together
&lt;/h2&gt;

&lt;p&gt;Let's look at the complete process:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Knowledge preparation (before users ask questions):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Project documents → Document loading → Chunking → Embeddings → Vector database&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Question answering (when a user asks a question):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;User question → Question embedding → Retrieve relevant chunks → Combine question and retrieved context → LLM → Generated answer&lt;/p&gt;

&lt;p&gt;The important distinction is that knowledge preparation happens beforehand. We don't need to process all the project documents from scratch every time someone asks a question.&lt;/p&gt;

&lt;p&gt;When new documentation is added or existing information changes, the knowledge base can be updated through the ingestion process.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;We now understand the basic idea behind RAG: retrieving relevant external information and providing it to an LLM to generate an answer.&lt;/p&gt;

&lt;p&gt;But does this mean every answer generated by a RAG application will be correct?&lt;/p&gt;

&lt;p&gt;Not necessarily.&lt;/p&gt;

&lt;p&gt;What happens when the system retrieves irrelevant information? Why do LLMs sometimes generate answers that aren't supported by the provided context? How can we make the system more reliable?&lt;/p&gt;

&lt;p&gt;In the next article, we'll explore these challenges through concepts such as &lt;strong&gt;hallucinations, prompt engineering, context management, hybrid search, and reranking&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That's where we move beyond understanding RAG to understanding how to build more reliable RAG applications.&lt;/p&gt;

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