<?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: Sanjay Kj</title>
    <description>The latest articles on DEV Community by Sanjay Kj (@sanjay_kj_00362a63febb086).</description>
    <link>https://dev.to/sanjay_kj_00362a63febb086</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%2F4137105%2Fff0b559a-8f7c-4a47-a7b4-acc7287b3fec.png</url>
      <title>DEV Community: Sanjay Kj</title>
      <link>https://dev.to/sanjay_kj_00362a63febb086</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sanjay_kj_00362a63febb086"/>
    <language>en</language>
    <item>
      <title>Building a Simple RAG System with Python, ChromaDB and Gemini</title>
      <dc:creator>Sanjay Kj</dc:creator>
      <pubDate>Tue, 22 Sep 2026 08:28:58 +0000</pubDate>
      <link>https://dev.to/sanjay_kj_00362a63febb086/building-a-simple-rag-system-with-python-chromadb-and-gemini-3lh9</link>
      <guid>https://dev.to/sanjay_kj_00362a63febb086/building-a-simple-rag-system-with-python-chromadb-and-gemini-3lh9</guid>
      <description>&lt;p&gt;Large Language Models are impressively fluent, but they have a blind spot: they can only answer from what they learned during training.&lt;/p&gt;

&lt;p&gt;Ask one a question about a specific PDF, a company's internal handbook, or a niche textbook, and it may guess, generalize, or simply admit it doesn't know.&lt;/p&gt;

&lt;p&gt;Retrieval-Augmented Generation (RAG) closes this gap by giving an LLM a way to look things up before it answers — turning a closed-book exam into an open-book one.&lt;/p&gt;

&lt;p&gt;During my AI internship at &lt;strong&gt;Valentius Kryptix&lt;/strong&gt;, I built a lightweight RAG system to explore exactly this idea, using a Data Structures and Algorithms PDF as the test document.&lt;/p&gt;

&lt;p&gt;Rather than treating RAG as a black box, the goal was to understand &lt;em&gt;why&lt;/em&gt; each stage of the pipeline exists — not just how to wire it together.&lt;/p&gt;

&lt;p&gt;🔍 The core insight: retrieval only works if "relevance" is defined semantically, not literally.&lt;/p&gt;

&lt;p&gt;A keyword search for "queue operations" could fail if the document phrases the same concepts as "Enqueue and Dequeue functions."&lt;/p&gt;

&lt;p&gt;This is where embeddings come in. Using &lt;code&gt;all-MiniLM-L6-v2&lt;/code&gt; via Sentence Transformers, the system converts both the document and the user's question into vectors that capture meaning rather than exact wording.&lt;/p&gt;

&lt;p&gt;Storing these vectors in &lt;strong&gt;ChromaDB&lt;/strong&gt; makes it possible to find conceptually related content even when the exact words don't match.&lt;/p&gt;

&lt;p&gt;The most instructive part of the project wasn't the pipeline itself, but comparing the model's behavior &lt;strong&gt;with and without retrieval&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Asked:&lt;/p&gt;

&lt;p&gt;"What are the operations performed on a queue?"&lt;/p&gt;

&lt;p&gt;Without RAG, Gemini answered from general training knowledge — correct in spirit, but disconnected from the actual source material.&lt;/p&gt;

&lt;p&gt;With RAG, the same question returned an answer grounded in the specific document, correctly surfacing:&lt;/p&gt;

&lt;p&gt;• Enqueue&lt;br&gt;
• Dequeue&lt;br&gt;
• Peek/Front&lt;br&gt;
• Rear&lt;br&gt;
• &lt;code&gt;isFull&lt;/code&gt;&lt;br&gt;
• &lt;code&gt;isEmpty&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;That side-by-side comparison made the value of retrieval tangible in a way that reading about RAG never quite does.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;The bigger takeaway:&lt;/strong&gt; a RAG system is really a bridge between two very different technologies — a vector database good at &lt;em&gt;finding&lt;/em&gt; information, and a language model good at &lt;em&gt;explaining&lt;/em&gt; it.&lt;/p&gt;

&lt;p&gt;Neither one alone solves document-based Q&amp;amp;A well; together, they compensate for each other's weaknesses.&lt;/p&gt;

&lt;p&gt;This piece is a shorter reflection on that design insight. The full build — including the complete five-step workflow, code, and implementation details — is covered in the original article.&lt;/p&gt;

&lt;p&gt;📖 Read the full article:&lt;br&gt;
&lt;a href="https://valentiuskryptix.com/how-to-build-a-retrieval-augmented-generation-rag-system-in-just-5-steps/" rel="noopener noreferrer"&gt;https://valentiuskryptix.com/how-to-build-a-retrieval-augmented-generation-rag-system-in-just-5-steps/&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  RAG #RetrievalAugmentedGeneration #GenerativeAI #ArtificialIntelligence #MachineLearning #LLM #ChromaDB #Python #AIInternship #ValentiusKryptix
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>rag</category>
    </item>
  </channel>
</rss>
