<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Kshitij Nehete]]></title><description><![CDATA[Kshitij Nehete]]></description><link>https://kshitijnehete.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>Kshitij Nehete</title><link>https://kshitijnehete.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 10:21:14 GMT</lastBuildDate><atom:link href="https://kshitijnehete.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Understanding RAG: Benefits, Limitations, and When to Use It]]></title><description><![CDATA[Have you ever asked an AI a question and received an answer that sounded confident but was completely wrong? This happens because Large Language Models (LLMs) only know the information they learned du]]></description><link>https://kshitijnehete.hashnode.dev/understanding-rag-benefits-limitations-and-when-to-use-it</link><guid isPermaLink="true">https://kshitijnehete.hashnode.dev/understanding-rag-benefits-limitations-and-when-to-use-it</guid><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[#chaicode #genai ]]></category><dc:creator><![CDATA[Kshitij Nehete]]></dc:creator><pubDate>Sat, 11 Jul 2026 11:56:52 GMT</pubDate><content:encoded><![CDATA[<p>Have you ever asked an AI a question and received an answer that sounded confident but was completely wrong? This happens because Large Language Models (LLMs) only know the information they learned during training. They cannot automatically access your company's latest documents, recent policies, or newly published content.</p>
<p>This is where <strong>Retrieval-Augmented Generation (RAG)</strong> comes in. Instead of answering directly, a RAG system first searches a knowledge base for relevant information. It then provides that information to the LLM, allowing it to generate a response based on the retrieved context instead of relying only on its training data.</p>
<p>A basic RAG pipeline is easy to understand. A user asks a question, the system searches for the most relevant documents, and the LLM uses those documents to create the final answer.</p>
<p>RAG is useful in many real-world applications. Customer support bots, company knowledge portals, and document search systems all benefit from it. For example, if an employee asks about the latest work-from-home policy, RAG can retrieve the newest policy document before the AI responds.</p>
<p>However, RAG is not a guarantee of correct answers. If the retrieval step finds the wrong document or misses important information, the response can still be inaccurate. Poor chunking is another common issue. When related information is split into different chunks, the model may not understand the complete context. Context window limitations also matter because the model can only process a limited amount of retrieved information at once.</p>
<p>Even with good retrieval, LLMs may still hallucinate and generate details that are not present in the provided documents. Another challenge is keeping the knowledge base updated, since outdated information will lead to outdated answers.</p>
<p>RAG is a great choice when an application depends on external knowledge. However, if a task does not require document retrieval, using a standard LLM is often simpler.</p>
<p>RAG makes AI responses more relevant and useful, but its success depends on good retrieval, proper chunking, updated knowledge, and careful system design.</p>
]]></content:encoded></item><item><title><![CDATA[How ChatGPT Understands Your Questions]]></title><description><![CDATA[Yesterday, we completed the first class of the GenAI with JavaScript Cohort by Chai Code.
The session served as an introduction to some of the core concepts behind modern AI, including Large Language ]]></description><link>https://kshitijnehete.hashnode.dev/how-chatgpt-understands-your-questions</link><guid isPermaLink="true">https://kshitijnehete.hashnode.dev/how-chatgpt-understands-your-questions</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[#chaicode #genai ]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[GenAI Cohort]]></category><dc:creator><![CDATA[Kshitij Nehete]]></dc:creator><pubDate>Tue, 30 Jun 2026 15:39:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a42ae7b3de239ae9a555c50/1273bb5e-52d0-48ae-8394-af254623d711.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Yesterday, we completed the first class of the <strong>GenAI with JavaScript Cohort</strong> by <strong>Chai Code</strong>.</p>
<p>The session served as an introduction to some of the core concepts behind modern AI, including <strong>Large Language Models (LLMs), tokenization, Transformers</strong>, and how ChatGPT generates responses.</p>
<h2>What is an LLM?</h2>
<p>Let's start with the most important concept: <strong>LLM</strong>, which stands for <strong>Large Language Model</strong>.</p>
<p>An LLM is an AI model trained on an enormous amount of text from books, articles, websites, documentation, and many other publicly available sources. Instead of memorizing every sentence, it learns the patterns and relationships between words so it can generate human-like text.</p>
<p>The primary job of an LLM is surprisingly simple:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a42ae7b3de239ae9a555c50/b6c52865-d8c1-476b-b001-7fd06e647737.png" alt="" style="display:block;margin:0 auto" />

<blockquote>
<p><strong>Predict the next most likely word (or token) based on the context it has already seen.</strong></p>
</blockquote>
<p>Although this sounds simple, repeatedly predicting the next token allows an LLM to generate paragraphs, solve problems, write code, and answer questions.</p>
<h3>Problems LLMs Can Solve</h3>
<ul>
<li><p>Answering questions</p>
</li>
<li><p>Writing articles and emails</p>
</li>
<li><p>Summarizing long documents</p>
</li>
<li><p>Translating between languages</p>
</li>
<li><p>Assisting with programming</p>
</li>
<li><p>Brainstorming ideas</p>
</li>
</ul>
<p>Some of the most popular LLMs available today include <strong>ChatGPT</strong>, <strong>Gemini</strong>, <strong>Claude</strong>, <strong>Llama</strong>, and <strong>DeepSeek</strong>.</p>
<hr />
<h2>What Happens When You Send a Message to ChatGPT?</h2>
<p>Now let's understand what actually happens when you send a prompt to ChatGPT.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a42ae7b3de239ae9a555c50/7d660240-25ab-4e47-865d-a9aa1418df25.png" alt="" style="display:block;margin:0 auto" />

<h3>Step 1: You Type a Prompt</h3>
<p>Everything starts with a prompt.</p>
<p>For example:</p>
<blockquote>
<p>"Explain JavaScript Promises."</p>
</blockquote>
<hr />
<h3>Step 2: Your Message Is Converted into Tokens</h3>
<p>Computers don't understand complete sentences the way humans do.</p>
<p>Instead, your text is broken into smaller pieces called <strong>tokens</strong>, which the model can process efficiently.</p>
<hr />
<h3>Step 3: The Model Processes the Tokens</h3>
<p>Once tokenized, the model looks at all the tokens together instead of reading them one by one.</p>
<p>Using the Transformer architecture, it understands the relationships between different words and keeps the conversation's context in mind before generating an answer.</p>
<hr />
<h3>Step 4: The Response Is Generated</h3>
<p>The model predicts <strong>one token at a time</strong>.</p>
<p>Each newly generated token becomes part of the context for predicting the next one. This process continues until the entire response is completed.</p>
<p>Although the response appears instantly, it is actually generated token by token behind the scenes.</p>
<h3>Why Isn't the Response Copied from the Internet?</h3>
<p>A common misconception is that ChatGPT searches Google every time you ask a question.</p>
<p>That's not how it works.</p>
<p>By default, ChatGPT does <strong>not</strong> search the web for every prompt. Instead, it generates responses using the patterns it learned during training.</p>
<p>You can think of it as an incredibly advanced autocomplete system—it predicts the next most likely token based on the context, but at a much larger scale.</p>
<hr />
<h2>Tokenization</h2>
<p>The next concept we learned was <strong>Tokenization</strong>.</p>
<p>Tokenization is the process of breaking text into smaller units called <strong>tokens</strong>.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a42ae7b3de239ae9a555c50/e2d9781b-8ecb-4546-a92d-07bbcdc42448.png" alt="" style="display:block;margin:0 auto" />

<p>A token can be:</p>
<ul>
<li><p>A complete word</p>
</li>
<li><p>Part of a word</p>
</li>
<li><p>A punctuation mark</p>
</li>
<li><p>A special character</p>
</li>
</ul>
<p>For example,</p>
<pre><code class="language-plaintext">Hello world!

↓

Hello
world
!
</code></pre>
<p>Another example:</p>
<pre><code class="language-plaintext">playing

↓

play
ing
</code></pre>
<h3>Why Do We Need Tokenization?</h3>
<p>Computers work with numbers—not natural language.</p>
<p>Before an AI model can understand your text, it must first convert it into smaller pieces that can later be represented as numbers.</p>
<p>It's also important to remember that <strong>words and tokens are not always the same thing</strong>.</p>
<p>A short word like <strong>"cat"</strong> may become a single token, while a longer word like <strong>"unbelievable"</strong> might be split into multiple tokens.</p>
<p>This is one reason why token counts are different from word counts.</p>
<hr />
<h2>Transformers</h2>
<p>The final major topic from the session was <strong>Transformers</strong>, the architecture that powers almost every modern Large Language Model.</p>
<p>Before Transformers, language models processed text mostly in sequence, making it difficult to understand long conversations or relationships between distant words.</p>
<p>Transformers changed this by allowing the model to look at the <strong>entire context</strong> at once.</p>
<p>One of the key ideas behind Transformers is <strong>Attention</strong>.</p>
<p>Instead of treating every word equally, the model learns which words are most relevant when understanding the current token.</p>
<p>For example, consider the sentence:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a42ae7b3de239ae9a555c50/82c7d0ac-95c5-4330-96b5-387838abed4d.png" alt="" style="display:block;margin:0 auto" />

<blockquote>
<p>"After Maya finished her presentation, everyone congratulated <strong>her</strong>."</p>
</blockquote>
<p>The Transformer understands that <strong>"her"</strong> refers to <strong>Maya</strong>, even though several other words appear between them.</p>
<p>Another example:</p>
<blockquote>
<p>"John placed the laptop inside the backpack because <strong>it</strong> was too heavy."</p>
</blockquote>
<p>Here, the model understands that <strong>"it"</strong> refers to the <strong>laptop</strong>, not the backpack.</p>
<p>This ability to understand relationships between words makes Transformers much better at reasoning, translation, summarization, coding, and conversation.</p>
<p>This architecture was introduced in the famous research paper:</p>
<blockquote>
<p><strong>Attention Is All You Need (2017)</strong></p>
</blockquote>
<p>Today, nearly every popular LLM—including GPT, Gemini, Claude, and Llama—is built using the Transformer architecture.</p>
<hr />
<img src="https://cdn.hashnode.com/uploads/covers/6a42ae7b3de239ae9a555c50/924d2de1-6715-40d7-9f7f-2702df6588dd.png" alt="" style="display:block;margin:0 auto" />

<h2>Conclusion</h2>
<p>In this first class, we learned that ChatGPT doesn't magically understand language the way humans do.</p>
<p>Instead, it breaks text into tokens, converts them into numerical representations, processes them using the Transformer architecture, and predicts one token at a time to generate meaningful responses.</p>
<p>Understanding these fundamentals provides a strong foundation for exploring Generative AI and building AI-powered applications in the future.</p>
<p>Thanks for reading! This article is based on my notes from the first <strong>GenAI with JavaScript</strong> cohort session by <strong>Chai Code</strong>. More learning notes and practical implementations coming soon.</p>
<p>#GenerativeAI #LLM #ChatGPT #JavaScript #AI #Transformers</p>
]]></content:encoded></item></channel></rss>