<?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[BTS of AI]]></title><description><![CDATA[BTS of AI]]></description><link>https://btsofai.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 20 Nov 2026 17:53:14 GMT</lastBuildDate><atom:link href="https://btsofai.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[RAG's]]></title><description><![CDATA[LLM's are trained on large amounts of data which allows them to answer questions, write code, summarize documents and more such tasks. However, once LLM is…]]></description><link>https://btsofai.hashnode.dev/rag-s</link><guid isPermaLink="true">https://btsofai.hashnode.dev/rag-s</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[genai]]></category><category><![CDATA[RAG ]]></category><dc:creator><![CDATA[Suman]]></dc:creator><pubDate>Mon, 13 Jul 2026 06:26:27 GMT</pubDate><content:encoded><![CDATA[<h2>Why was RAG introduced</h2>
<p>LLM's are trained on large amounts of data which allows them to answer questions, write code, summarize documents and more such tasks. However, once LLM is trained it's knowledge becomes fixed. If new information becomes available such as updated company policies, the latest product documentation, or today's news the model doesn't automatically know it.</p>
<p>This is where <strong>RAG's</strong> was introduced. Rather than training LLM again <strong>Retrieval-Augmented Generation (RAG)</strong> is used where additional information is passed and used to generate the relevant answers about the additional information passed.</p>
<h2>RAG Pipeline</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a44f0fb4aa818699e7bb5ae/c1b8750a-4e55-4bdd-9660-afbc887ee58b.png" alt="" style="display:block;margin:0 auto" />

<h3>1. Data Ingestion</h3>
<p>Firstly, raw data which might be in form of pdf, text files, csv ,outlook ,emails and more is ingested to the RAG system.</p>
<h3>2. Data pre-processing</h3>
<p>Once data is loaded ,the large data is transformed into small parts using techniques like text-splitting, chunking and others.</p>
<h3>3. Generating vector embeddings</h3>
<p>The pre-processed data is then used to generate vector embeddings, which represents the data in a numerical format.</p>
<h3>4. Storing embeddings in Vector Databases</h3>
<p>The processed data and generated embeddings are stored in specialized databases known as vector databases. These databases are optimized to handle vectorized data, enabling rapid search and retrieval operations.</p>
<h3>5.LLMs</h3>
<p>LLMs are used to generate fully formed responses based on the user query and contextual information retrieved from the vector DBs during user queries.</p>
<h3>6. User Query</h3>
<p>When a user submits a query, the RAG system uses the indexed data and vectors. The system identifies relevant information by comparing the query vector with the stored vectors in the vector DB . The LLMs then use the retrieved data to answer the query.</p>
<h2>Scenarios where RAG works well</h2>
<ul>
<li><p><strong>Chatbots:</strong> Many companies already use AI chatbots to interact with customers ion their websites. With RAG, companies can build a chat experience that’s highly specific to their product. For example, questions about product specifications could easily be answered.</p>
</li>
<li><p><strong>Customer service:</strong> Companies can empower live service representatives to easily answer customer questions with precise and latest information.</p>
</li>
<li><p><strong>Enterprise search:</strong> Businesses have a wealth of knowledge across the organization, including technical documentation, company policies, IT support articles, and code repositories. Employees could query an internal search engine to retrieve information faster and more efficiently.</p>
</li>
</ul>
<h2>Why RAG Sometimes Gives Incorrect Answers</h2>
<p>Feeding data to <strong>RAG</strong> improves the chances of a correct answer, but it doesn't guarantee one.</p>
<p>LLM knows and answers only from the data it is received. It fails to answer properly and gives incorrect answers when the retrieved information is incomplete or irrelevant.</p>
<p>The quality of answer not only depends on LLM but also on the every stage of the RAG pipeline</p>
<h3>Example</h3>
<p>Imagine asking:</p>
<blockquote>
<p>"What is the company's maternity leave policy?"</p>
</blockquote>
<p>If the retriever finds the <strong>Employee Benefits</strong> document instead of the <strong>Leave Policy</strong> document, the LLM will answer using incomplete information.</p>
<p>Even though the LLM is working correctly, the retrieval stage failed.</p>
<p><strong>This shows that the retrieval stage plays a critical role in the overall quality of a RAG system.</strong></p>
<h2>Poor Retrieval and Missing Context</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a44f0fb4aa818699e7bb5ae/737fb0ff-996b-437e-a5cb-22e4a8ab3975.png" alt="" style="display:block;margin:0 auto" />

<p>Retrieval is not about finding the correct answer but its about finding the documents that may contain the correct answer and passing it to the LLM.</p>
<p>Retrieval plays a huge role in answering the write answer. If retrieval selects the wrong chunks important and required information will be missed, unrelated information will be added and LLM has to make assumptions</p>
<h2>Poor Chunking and Its Impact</h2>
<p>Lets understand the impact of poor chunking with an example.</p>
<p>Imagine this document:</p>
<pre><code class="language-plaintext">Refunds are available within 30 days.

Products must be unused.

Digital products cannot be refunded.
</code></pre>
<p>Now suppose chunking splits it into:</p>
<p>Chunk 1</p>
<pre><code class="language-plaintext">Refunds are available
</code></pre>
<p>Chunk 2</p>
<pre><code class="language-plaintext">within 30 days.
Products...
</code></pre>
<p>The sentence is broken.</p>
<p>When retrieval returns Chunk 1, the LLM only sees:</p>
<blockquote>
<p>Refunds are available</p>
</blockquote>
<p>It never sees</p>
<blockquote>
<p>within 30 days.</p>
</blockquote>
<p>The answer becomes incomplete.</p>
<p>Now compare it with proper chunking:</p>
<pre><code class="language-plaintext">Chunk 1

Refunds are available within 30 days.
Products must be unused.
</code></pre>
<p>The meaning stays intact.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a44f0fb4aa818699e7bb5ae/ba8ab55d-8b73-4c84-ab6a-97566a931b40.png" alt="" style="display:block;margin:0 auto" />

<h2>Context window limitations</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a44f0fb4aa818699e7bb5ae/91a8fb2a-33ee-49d5-a49b-bbffa3d0846a.png" alt="" style="display:block;margin:0 auto" />

<p>Even after retrieving relevant documents, the LLM cannot process unlimited information.</p>
<p>Every model has a <strong>context window</strong>, which determines how much text it can consider while generating a response.</p>
<p>Imagine trying to study using ten textbooks while your desk only has space for three. Even though all ten books contain useful information, you can only keep a few open at once.</p>
<p>Similarly, if too many document chunks are retrieved, some may need to be discarded before reaching the model. If the omitted chunks contain critical details, the quality of the final answer may suffer.</p>
<h2>Hallucinations even with RAG</h2>
<p>A RAG system is only as useful as the information stored in its knowledge base.</p>
<p>If documents become outdated, are removed, or are never indexed, the retriever cannot provide accurate context. Consequently, the LLM will generate responses based on outdated or incomplete information.</p>
<p>Maintaining an up-to-date knowledge base through regular indexing and document management is therefore an essential part of any production RAG system.</p>
<h2>When RAG is not the right solution</h2>
<p>Although RAG is powerful, it is not the answer to every AI problem.</p>
<p>Tasks such as basic arithmetic, language translation, creative writing, or general reasoning typically do not require retrieving external documents. In these situations, the LLM's existing knowledge is often sufficient.</p>
<p>RAG is most valuable when answers depend on information that is private, frequently changing, or too specialized to have been included during the model's original training.</p>
]]></content:encoded></item><item><title><![CDATA[
What Really Happens After You Press Enter in ChatGPT?
]]></title><description><![CDATA[Every day we ask many questions to ChatGPT , Gemini, Claude, and other AI tools. We type our question ,press enter and we get our answer in seconds. Ever…]]></description><link>https://btsofai.hashnode.dev/what-really-happens-after-you-press-enter-in-chatgpt</link><guid isPermaLink="true">https://btsofai.hashnode.dev/what-really-happens-after-you-press-enter-in-chatgpt</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[genai]]></category><category><![CDATA[llm]]></category><dc:creator><![CDATA[Suman]]></dc:creator><pubDate>Wed, 01 Jul 2026 14:04:48 GMT</pubDate><content:encoded><![CDATA[<p>Every day we ask many questions to ChatGPT , Gemini, Claude, and other AI tools. We type our question ,press enter and we get our answer in seconds. Ever wondered what happens after you press enter?</p>
<p>By the end of this article you'll get the answer</p>
<h2>1.What is an LLM?</h2>
<p>That smart kid of class who have knowledge of everything.</p>
<p>You ask him a question instead of finding the answer from books he uses his knowledge to answer it .</p>
<p>That smart kid is LLM.</p>
<p>LLM stands for Large Language model .</p>
<p>Large → huge amount of data used for training</p>
<p>Language → understands human language</p>
<p>Model → a mathematical system that predicts the next token</p>
<h2>What problems LLMs solve</h2>
<p>LLMs help automate language-related tasks, such as:</p>
<ul>
<li><p>Answering questions</p>
</li>
<li><p>Writing content (emails, blogs, reports)</p>
</li>
<li><p>Summarizing text</p>
</li>
<li><p>Translating languages</p>
</li>
<li><p>Generating and explaining code</p>
</li>
<li><p>Powering AI chatbots</p>
</li>
</ul>
<h2>Popular Examples of LLMs</h2>
<p>Some well-known LLMs include:</p>
<ul>
<li><p>GPT-5.5 (OpenAI)</p>
</li>
<li><p>Gemini (Google)</p>
</li>
<li><p>Claude (Anthropic)</p>
</li>
<li><p>Llama (Meta)</p>
</li>
<li><p>DeepSeek</p>
</li>
</ul>
<h2>Common Applications in Daily Life</h2>
<p>LLMs are used for:</p>
<ul>
<li><p>AI chatbots like ChatGPT</p>
</li>
<li><p>Writing and editing content</p>
</li>
<li><p>Coding assistance</p>
</li>
<li><p>Learning and research</p>
</li>
<li><p>Language translation</p>
</li>
</ul>
<hr />
<h2>2.What Happens When You Send a Message to ChatGPT?</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a44f0fb4aa818699e7bb5ae/eecff5c3-76c3-49e3-b557-9e65bbcba7af.png" alt="" style="display:block;margin:0 auto" />

<h3>1.Typing a Prompt</h3>
<p>Everything starts with a prompt -the question you type. The clearer your prompt, the better the response is going to be.</p>
<h3>2.Processing Your Message</h3>
<p>ChatGPT breaks your prompt into smaller pieces called tokens and analyzes the context using a Large Language Model (LLM) to understand what you're asking.</p>
<h3>3.Generating a Response</h3>
<p>The model predicts the most likely next token one at a time until it forms a complete, natural-sounding response.</p>
<h3>4.Why Responses Are Not Copied from the Internet</h3>
<p>ChatGPT does not search the internet or copy answers word for word. Instead, it generates a new response based on patterns it learned during training, making each answer unique and tailored to your prompt.</p>
<hr />
<h2>3.Why Computers Don't Understand Human Language</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a44f0fb4aa818699e7bb5ae/9f6e2bfa-4b4a-4a79-b67c-0364dc0f6935.png" alt="" style="display:block;margin:0 auto" />

<h3>1.Text vs Numbers</h3>
<p>Humans understand words and their meanings, but computers only understand numbers. They cannot directly understand text like "Hello" or "How are you?"</p>
<h3>2.Why Computers Convert Text into Numbers</h3>
<p>Before an AI model can process your message, every word or part of a word is converted into numerical values. These numbers allow the model to perform mathematical calculations and identify patterns in language.</p>
<h3>3.Introduction to Tokens</h3>
<p>Instead of reading entire sentences at once, LLMs break text into smaller units called tokens. A token can be a word, part of a word, punctuation, or even a single character. The model processes these tokens one by one to understand your prompt and generate a response.</p>
<hr />
<h2>4.Tokenization</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a44f0fb4aa818699e7bb5ae/1d015770-c5dc-4397-a9a0-65c0a8985495.png" alt="" style="display:block;margin:0 auto" />

<h3>What Are Tokens?</h3>
<p>Tokens are small pieces of text that an AI model processes. A token can be a word, part of a word, punctuation, or even a single character.</p>
<h3>Why Is Tokenization Needed?</h3>
<p>Computers cannot understand raw text directly. Tokenization breaks text into smaller units that can be converted into numbers and processed by the model.</p>
<h3>Words vs Tokens</h3>
<p>A word is not always a single token. Long or uncommon words may be split into multiple tokens.</p>
<p>Example:</p>
<ul>
<li><p><code>"Hello, world!"</code> → <code>["Hello", ",", "world", "!"]</code></p>
</li>
<li><p><code>"unbelievable"</code> → <code>["un", "believable"]</code> <em>(one possible tokenization)</em></p>
</li>
</ul>
<hr />
<h2>5.Transformers</h2>
<img src="https://cdn.hashnode.com/uploads/covers/6a44f0fb4aa818699e7bb5ae/2f1c1eaa-88a9-43ef-807a-075e6dcb9ed7.png" alt="" style="display:block;margin:0 auto" />

<h3>What Is a Transformer?</h3>
<p>A Transformer is a deep learning architecture designed to understand relationships between words in a sentence, even when they are far apart.</p>
<h3>Why Did It Change AI?</h3>
<p>Transformers can process text more efficiently and understand context much better than earlier models, leading to major improvements in AI.</p>
<h3>How Does It Help Understand Language?</h3>
<p>Transformers use an attention mechanism to determine which words are most important for understanding the meaning of a sentence.</p>
<h3>Why Do Modern LLMs Use Transformers?</h3>
<p>Almost all modern LLMs, including GPT, Gemini, Claude, and Llama, are built on the Transformer architecture because it delivers high accuracy, scales well to large datasets, and generates natural, context-aware responses.</p>
<hr />
<h2>Who Built All This? The People Behind an AI Applications</h2>
<h3>Imagine an AI Application as a Restaurant</h3>
<p>When you visit a restaurant, you don't think about everything happening behind the scenes. You simply place your order and enjoy your meal.</p>
<p>However, three different people make that experience possible.</p>
<h3>Application Developer – Builds the Restaurant</h3>
<p>The Application Developer creates everything the customer interacts with.</p>
<p>In a restaurant, this includes:</p>
<ul>
<li><p>The dining area</p>
</li>
<li><p>Tables and chairs</p>
</li>
<li><p>Billing system</p>
</li>
<li><p>Online ordering</p>
</li>
</ul>
<p>Similarly, in an AI application they build:</p>
<ul>
<li><p>The website or mobile app</p>
</li>
<li><p>Login system</p>
</li>
<li><p>User dashboard</p>
</li>
<li><p>Backend APIs</p>
</li>
<li><p>Database</p>
</li>
<li><p>File uploads</p>
</li>
</ul>
<p>Without the Application Developer, there would be no place for users to interact with the AI.</p>
<hr />
<h3>ML Engineer – The Master Chef</h3>
<p>Now imagine the chef.</p>
<p>The chef spends years learning recipes, practicing techniques, and improving every dish before it ever reaches the customer.</p>
<p>An ML Engineer plays a similar role.</p>
<p>Instead of learning recipes, they train AI models using enormous amounts of text data so the model learns:</p>
<ul>
<li><p>Language</p>
</li>
<li><p>Grammar</p>
</li>
<li><p>Facts</p>
</li>
<li><p>Reasoning patterns</p>
</li>
<li><p>Code generation</p>
</li>
<li><p>Problem solving</p>
</li>
</ul>
<p>The Large Language Model we discussed throughout this article is created and improved by ML Engineers.</p>
<p>Without them, the AI wouldn't be intelligent enough to answer your questions.</p>
<hr />
<h3>GenAI Engineer – The Head Waiter</h3>
<p>Now comes the bridge between the restaurant and the chef.</p>
<p>The waiter doesn't cook the food, and they didn't build the restaurant.</p>
<p>Instead, they:</p>
<ul>
<li><p>Understand the customer's order</p>
</li>
<li><p>Communicate it clearly to the chef</p>
</li>
<li><p>Bring the food back</p>
</li>
<li><p>Make sure everything is presented properly</p>
</li>
</ul>
<p>A GenAI Engineer plays a very similar role.</p>
<p>They connect AI models with real-world applications by:</p>
<ul>
<li><p>Writing effective prompts</p>
</li>
<li><p>Building RAG (Retrieval-Augmented Generation) systems</p>
</li>
<li><p>Connecting external tools and APIs</p>
</li>
<li><p>Managing conversation memory</p>
</li>
<li><p>Formatting AI responses</p>
</li>
<li><p>Building AI agents</p>
</li>
</ul>
<p>They make sure users get useful and reliable answers from the model.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a44f0fb4aa818699e7bb5ae/2e6dae54-4e9d-479a-8077-8d9de4ac04c0.png" alt="" style="display:block;margin:0 auto" />

<hr />
<h2>Conclusion</h2>
<p>The next time you ask ChatGPT a question, remember that your response isn't magically pulled from the internet. Your prompt is converted into tokens, processed by a Transformer-based Large Language Model, and transformed into a brand-new response.</p>
<p>Behind this seamless experience are Application Developers, GenAI Engineers, and ML Engineers, each playing a different but equally important role in making modern AI applications possible.</p>
]]></content:encoded></item></channel></rss>