<?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[Gen Ai Cohort blogs]]></title><description><![CDATA[Gen Ai Cohort blogs]]></description><link>https://gen-ai-blogs.imvkc.in</link><generator>RSS for Node</generator><lastBuildDate>Fri, 15 May 2026 10:18:57 GMT</lastBuildDate><atom:link href="https://gen-ai-blogs.imvkc.in/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[RAG Advanced Patterns and Pipelines.]]></title><description><![CDATA[Before we explore advanced RAG patterns and pipelines, let’s quickly revisit what RAG is, why it matters, and what makes it so widely discussed.
Retrieval-Augmented Generation (RAG) is a technique that pairs large language models (LLMs) with a retrie...]]></description><link>https://gen-ai-blogs.imvkc.in/rag-advanced-patterns-and-pipelines</link><guid isPermaLink="true">https://gen-ai-blogs.imvkc.in/rag-advanced-patterns-and-pipelines</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[RAG ]]></category><category><![CDATA[advanced rag]]></category><category><![CDATA[generative ai]]></category><category><![CDATA[genai]]></category><dc:creator><![CDATA[Vipul kant chaturvedi]]></dc:creator><pubDate>Sat, 30 Aug 2025 10:17:30 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1756548963474/385f5aff-e78c-4737-a240-1a135d42c34e.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Before we explore <strong>advanced RAG patterns and pipelines</strong>, let’s quickly revisit what RAG is, why it matters, and what makes it so widely discussed.</p>
<p><strong>Retrieval-Augmented Generation (RAG)</strong> is a technique that pairs large language models (LLMs) with a retrieval system. While LLMs are powerful, they’re limited to the data they were trained on and can’t inherently access your <strong>custom or domain-specific information</strong>. RAG bridges that gap by pulling relevant information from your own data sources and providing it to the model, enabling <strong>more precise and context-aware answers</strong>.</p>
<h3 id="heading-a-quick-look-at-how-rag-works">A Quick Look at How RAG Works</h3>
<ol>
<li><p><strong>Indexing:</strong> Your data is first divided into smaller sections (chunks) and transformed into vector embeddings — mathematical representations of text. These embeddings are stored in a <strong>vector database</strong> for efficient searching.</p>
</li>
<li><p><strong>Query Embedding:</strong> When a user submits a question, the query is also converted into an embedding, allowing the system to compare it against the stored data.</p>
</li>
<li><p><strong>Retrieval and Response Generation:</strong> The system finds the most relevant chunks based on the query, retrieves them, and feeds them to the LLM. The model then uses this information to craft a <strong>tailored, context-rich response</strong>.</p>
</li>
</ol>
<h2 id="heading-why-we-need-advanced-patterns-and-pipelines"><strong>Why we need advanced patterns and pipelines:</strong></h2>
<p>We encountered several issues with RAG models, which led us to the need for advanced patterns and pipelines. These issues included:</p>
<p><strong>1. Poor Input, Poor Output:</strong><br />An LLM can only work with the information it’s given. If a query is unclear, nonsensical, or riddled with spelling mistakes (e.g., “asasasaass”), the system may produce equally poor results. Ambiguous prompts lead to vague or irrelevant answers.</p>
<p><strong>2. Context Window Limitations:</strong><br />Every language model has a fixed <strong>context window</strong> — the maximum amount of text it can process at once. If the query and retrieved documents exceed this limit, the model may miss important details or fail to give a well-rounded response.</p>
<p><strong>3. Gaps in Semantic Search:</strong><br />Even advanced vector search methods aren’t perfect. They may overlook subtle yet important pieces of information, especially when the dataset is large or the query is nuanced. This can lead to answers that are technically correct but incomplete.</p>
<p><strong>4. Challenges in Domain Reasoning:</strong><br />Words can take on very different meanings across industries — “bond” in finance vs. chemistry, for example. Without deep domain-specific knowledge, LLMs may misinterpret terms and deliver overly simplified or incorrect conclusions.</p>
<p><strong>5. Hallucinations:</strong><br />One of the biggest challenges in AI today is <strong>hallucination</strong> — when a model confidently generates content that isn’t accurate. This often happens when the LLM doesn’t have enough context, causing it to “fill in the blanks” with made-up details.</p>
<h2 id="heading-advanced-patterns-and-pipelines"><strong>Advanced patterns and pipelines:</strong></h2>
<p>To address these limitations, we use <strong>advanced RAG patterns and pipelines</strong> designed to improve retrieval precision and output quality:</p>
<p><strong>1. Query Rewriting:</strong><br />LLMs can rephrase and refine user queries to make them clearer and more precise, helping the RAG system better interpret intent and return more relevant data.</p>
<p><strong>2. Multi-Query Retrieval:</strong><br />Instead of relying on a single query, this method creates multiple variations of the same question. Documents are retrieved for each variation, scored, and ranked, ensuring the system surfaces the most relevant and comprehensive information.</p>
<p><strong>3. HyDE (Hypothetical Document Embedding):</strong><br />Rather than searching directly with a raw query, HyDE generates a <strong>hypothetical answer</strong> first. This answer is embedded and used to search the vector database, often producing deeper, context-rich results.</p>
<p><strong>4. Re-Ranking with Cross-Encoders:</strong><br />After retrieving initial results, a cross-encoder model can re-rank them based on semantic relevance, further improving accuracy. This extra layer of ranking helps prioritize the <em>most</em> useful information for the LLM.</p>
<p><strong>5. Iterative Retrieval (Feedback Loops):</strong><br />Some pipelines use a loop where the LLM analyzes initial results, refines the query, and searches again. This iterative approach can help uncover data that might have been missed in the first pass.</p>
<p><img src="https://miro.medium.com/v2/resize:fit:1026/1*IPxZgGY1dlyTmWtbNJpisg.png" alt="Advanced Retrieval Augmented Generation (RAG) Techniques | by Sepehr (Sep)  Keykhaie | GoPenAI" /></p>
<p>In conclusion, I would like to add: Advanced RAG patterns and pipelines are pushing retrieval-augmented systems far beyond their basic form, making them smarter, more context-aware, and capable of handling complex, domain-specific use cases. By combining techniques like query rewriting, multi-query retrieval, HyDE, re-ranking, and iterative feedback loops, we can significantly boost both accuracy and reliability.</p>
<p>As LLMs continue to evolve, so will RAG — with trends like agent-based retrieval, dynamic context management, and multimodal search on the horizon. For now, experimenting with these advanced strategies is the best way to build RAG systems that feel less like static tools and more like powerful, adaptive assistants.</p>
]]></content:encoded></item><item><title><![CDATA[Where RAG Fails?]]></title><description><![CDATA[Before diving into where RAG fails, let’s first understand what it is, why it’s important, and why there’s so much hype around it.
RAG stands for Retrieval-Augmented Generation. In simple terms, it combines large language models (LLMs) with a retriev...]]></description><link>https://gen-ai-blogs.imvkc.in/where-rag-fails</link><guid isPermaLink="true">https://gen-ai-blogs.imvkc.in/where-rag-fails</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[RAG ]]></category><category><![CDATA[common rag failures]]></category><category><![CDATA[genai]]></category><dc:creator><![CDATA[Vipul kant chaturvedi]]></dc:creator><pubDate>Sat, 30 Aug 2025 09:33:24 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1756546321741/8e66f8fa-547a-4f63-9941-b8d56889d95a.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Before diving into where RAG fails, let’s first understand what it is, why it’s important, and why there’s so much hype around it.</p>
<p>RAG stands for <strong>Retrieval-Augmented Generation</strong>. In simple terms, it combines large language models (LLMs) with a retrieval system. While LLMs are trained on vast amounts of general data, they often struggle when you need them to work with <strong>your own private or domain-specific data</strong>. This is where RAG comes in — it retrieves relevant information from your data sources and feeds it into the LLM, enabling it to generate more accurate and context-aware responses.</p>
<h2 id="heading-how-rag-works"><strong>How RAG Works:</strong></h2>
<p>RAG operates in <strong>three main steps</strong>:</p>
<ol>
<li><p><strong>Indexing:</strong> First, you provide your data to the system. The data is broken down into smaller, manageable chunks, and then each chunk is converted into vectors (numerical representations). These vectors are stored in a vector database for quick retrieval later.</p>
</li>
<li><p><strong>Query Vectorization:</strong> When a user submits a query, the system also breaks it down and converts it into a vector representation, making it easier to compare with the stored data.</p>
</li>
<li><p><strong>Retrieval &amp; Generation:</strong> The system searches the vector database for the most relevant chunks (usually two or three) that match the query. These chunks are then passed to the LLM, which uses them to generate a context-aware response for the user.</p>
</li>
</ol>
<p><img src="https://vectorize.io/_next/image?url=https%3A%2F%2Fmlrwd9rnffxq.i.optimole.com%2Fcb%3A641c.2be21%2Fw%3Aauto%2Fh%3Aauto%2Fq%3A90%2Ff%3Abest%2Fsm%3A0%2Fhttps%3A%2F%2Fblog.vectorize.io%2Fwp-content%2Fuploads%2F2024%2F09%2FAgentic-RAG-1.png&amp;w=3840&amp;q=75" alt="Vectorize" /></p>
<h2 id="heading-core-rag-limitations"><strong>Core RAG Limitations:</strong></h2>
<p>Let’s Now Discuss the Core limitations of RAG:</p>
<ul>
<li><p><strong>Garbage In, Garbage Out:</strong> If a user gives an LLM a poorly structured or nonsensical query — like random text (“asasasaass”) or a query filled with spelling and grammar mistakes — the model is likely to produce poor-quality or meaningless responses. An unclear question often leads to a vague answer.</p>
</li>
<li><p><strong>Limited Context Window:</strong> Every LLM has a maximum context window (the amount of text it can process at once). If a query, along with retrieved information, exceeds this limit, the model may not fully understand the question or provide a complete, contextually accurate response.</p>
</li>
<li><p><strong>Semantic Search Gaps:</strong> LLMs can sometimes skip important information that’s relevant to a query. This issue often appears when the model’s context window is already full, making it harder to retrieve and present all necessary details accurately.</p>
</li>
<li><p><strong>Domain-Specific Reasoning:</strong> LLMs may struggle to reason in specialized fields. In different domains, the same word can carry different meanings. Without deep domain understanding, the model may misinterpret context or provide oversimplified answers.</p>
</li>
<li><p><strong>Hallucination:</strong> Many LLMs occasionally “hallucinate,” meaning they generate confident but incorrect information. For example, if a user asks about a topic and the model lacks sufficient context, it might invent details or rely on irrelevant information from earlier parts of the conversation.</p>
</li>
</ul>
<h2 id="heading-solutions-to-conquer-these-failures"><strong>Solutions to conquer these failures:</strong></h2>
<ul>
<li><p><strong>Query Rewriting:</strong> Using LLMs to rewrite user queries improves their clarity and precision, helping the RAG system retrieve more relevant data.</p>
</li>
<li><p><strong>Multi-Query Retrieval:</strong> Instead of relying on a single rewritten query, we can generate multiple query variations using LLMs. The system retrieves documents for each variation, then ranks the results by relevance, ultimately providing the user with the <strong>highest-ranked, most relevant information</strong>.</p>
</li>
<li><p><strong>HyDE (Hypothetical Document Embedding):</strong> Rather than searching the vector database directly with the user’s original query, we first ask the LLM to generate a <strong>hypothetical answer</strong>. We then embed this hypothetical response and use it to search the database. This often yields <strong>more accurate and contextually relevant results</strong>.</p>
</li>
</ul>
<p>RAG is a powerful technique that extends the capabilities of large language models, making them more useful for domain-specific tasks and real-world applications. But as we’ve explored, it’s not a magic solution — it comes with limitations like context window size, retrieval quality, reasoning challenges, and hallucinations. The good news is that techniques like <strong>query rewriting</strong>, <strong>multi-query retrieval</strong>, and <strong>HyDE</strong> can significantly improve its performance. The future of RAG lies in combining smarter retrieval strategies with reasoning-focused AI systems, making responses not just more accurate but also deeply contextual.</p>
]]></content:encoded></item><item><title><![CDATA[Introduction to RAGs]]></title><description><![CDATA[RAGs nowadays are very important models in the world of Large Language Models (LLMs) like ChatGPT and Gemini. They differ from these LLM models because LLMs can only generate human-like text and converse with you, but they can't provide much informat...]]></description><link>https://gen-ai-blogs.imvkc.in/introduction-to-rags</link><guid isPermaLink="true">https://gen-ai-blogs.imvkc.in/introduction-to-rags</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[RAG ]]></category><category><![CDATA[genai]]></category><dc:creator><![CDATA[Vipul kant chaturvedi]]></dc:creator><pubDate>Wed, 20 Aug 2025 13:54:44 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1755698038689/4d84749b-ccec-4347-8ed0-cffd3f9cd44e.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>RAGs nowadays are very important models in the world of Large Language Models (LLMs) like ChatGPT and Gemini. They differ from these LLM models because LLMs can only generate human-like text and converse with you, but they can't provide much information about a document. In contrast, a RAG model first indexes a document you provide, allowing you to ask anything related to that document. Let's discuss this in detail.</p>
<h2 id="heading-ia"> </h2>
<p><strong>What is RAG?</strong></p>
<p>RAG stands for Retrieval-Augmented Generation. It is an advanced AI model that combines the ability to retrieve data from a document with text generation. Most LLMs are trained on pre-existing data and generate text based on that. However, with RAG, it first indexes the document or any input you provide, allowing you to ask the model anything, and it will give you answers related to that document.</p>
<h2 id="heading-ia-1"> </h2>
<p>Why RAG is used?</p>
<ul>
<li><p><strong>Access to recent information</strong>: LLMs have a cutoff date in their training data. RAG allows them to fetch the latest facts.</p>
</li>
<li><p><strong>Domain-specific knowledge</strong>: You can connect RAG to private or custom datasets, like medical records or company documents.</p>
</li>
<li><p><strong>Reduced hallucinations</strong>: LLMs sometimes make things up. With retrieval, they rely on real documents for accurate answers.</p>
</li>
<li><p><strong>Efficiency</strong>: Instead of training or fine-tuning a huge model repeatedly, RAG adds intelligence through external knowledge sources.</p>
</li>
</ul>
<h2 id="heading-how-rag-works">How RAG Works?</h2>
<p>There are mostly two main parts in RAG:</p>
<ul>
<li><strong>Indexing:</strong> First, we break our document into small chunks, then we convert these chunks into vectors and store them in our vector database.</li>
</ul>
<h2 id="heading-why-perform-vectorization">Why Perform Vectorization?</h2>
<p>Computers don’t understand text like humans do. Vectorization converts text into numerical vectors that capture meaning.</p>
<ul>
<li><p>Example: “dog” and “puppy” will have similar vectors because they are semantically close.</p>
</li>
<li><p>These vectors allow the retriever to quickly find the most relevant text chunks when you ask a question.</p>
</li>
</ul>
<h2 id="heading-why-do-rags-exist">Why Do RAGs Exist?</h2>
<p>RAG exists because training a model with <em>all possible knowledge</em> is impossible—it would be too expensive and outdated quickly. Instead, RAG gives models a dynamic way to <strong>connect to external knowledge sources</strong>, keeping them flexible, lightweight, and up-to-date.</p>
<h2 id="heading-why-perform-chunking">Why Perform Chunking?</h2>
<p>When storing large documents, it’s not efficient to search entire books or articles. <strong>Chunking</strong> breaks documents into smaller, meaningful pieces (like 200–500 words each).</p>
<ul>
<li><p>This makes retrieval faster.</p>
</li>
<li><p>Improves accuracy because the retriever can return only the most relevant passage.</p>
</li>
</ul>
<p>So I want to conclude by saying RAG bridges the gap between regular LLMs and dynamic real-world knowledge. It helps us grasp that knowledge from documents, websites, your own text, and many more sources, providing us with the text we seek. These are the models currently in demand in the market, which many businesses want for themselves.</p>
]]></content:encoded></item><item><title><![CDATA[Building Thinking models with Chain-of-Thoughts(CoT).]]></title><description><![CDATA[To understand this, we need to start by understanding what Chain-of-Thoughts (CoT) is and what it does. CoT is a style of system prompting where AI breaks down a problem into several parts to achieve better results and provide users with transparency...]]></description><link>https://gen-ai-blogs.imvkc.in/building-thinking-models-with-chain-of-thoughtscot</link><guid isPermaLink="true">https://gen-ai-blogs.imvkc.in/building-thinking-models-with-chain-of-thoughtscot</guid><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chainofthoughts]]></category><category><![CDATA[genai]]></category><dc:creator><![CDATA[Vipul kant chaturvedi]]></dc:creator><pubDate>Sun, 17 Aug 2025 17:19:26 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1755451082160/32d6c41b-33fe-4d1d-a556-f2187b19d6bb.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>To understand this, we need to start by understanding what Chain-of-Thoughts (CoT) is and what it does. CoT is a style of system prompting where AI breaks down a problem into several parts to achieve better results and provide users with transparency about how the AI is working. In the CoT AI model, it doesn't jump directly to the result; instead, it breaks the problem into different parts.</p>
<p>Let's look at an example of how CoT prompting works step by step:</p>
<ul>
<li>First, we tell the model its role and how it will work based on a three-step format: START, THINK, and OUTPUT.</li>
</ul>
<ul>
<li><pre><code class="lang-plaintext">      You are an AI assistant who works on START, THINK and OUTPUT format.
      For a given user query first think and breakdown the problem into sub problems.
      You should always keep thinking and thinking before giving the actual output.
      Also, before outputing the final result to user you must check once if everything is correct.
</code></pre>
</li>
<li><p>Now we define the rules for the model, specifying exactly what it must follow.</p>
<pre><code class="lang-plaintext">  Rules:
      - Strictly follow the output JSON format
      - Always follow the output in sequence that is START, THINK, EVALUATE and OUTPUT.
      - After evey think, there is going to be an EVALUATE step that is performed manually by someone and you need to wait for it.
      - Always perform only one step at a time and wait for other step.
      - Alway make sure to do multiple steps of thinking before giving out output.
</code></pre>
</li>
<li><p>Now, we define the output format that it should use to respond.</p>
<pre><code class="lang-plaintext">  Output JSON Format:
      { "step": "START | THINK | EVALUATE | OUTPUT", "content": "string" }
</code></pre>
</li>
<li><p>Now, finally, we provide an example to our models to help them understand better. The more examples we give, the more effective the prompt will be for us.</p>
<pre><code class="lang-plaintext">  Example:
      User: Can you solve 3 + 4 * 10 - 4 * 3
      ASSISTANT: { "step": "START", "content": "The user wants me to solve 3 + 4 * 10 - 4 * 3 maths problem" } 
      ASSISTANT: { "step": "THINK", "content": "This is typical math problem where we use BODMAS formula for calculation" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "Lets breakdown the problem step by step" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "As per bodmas, first lets solve all multiplications and divisions" }
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" }  
      ASSISTANT: { "step": "THINK", "content": "So, first we need to solve 4 * 10 that is 40" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "Great, now the equation looks like 3 + 40 - 4 * 3" }
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "Now, I can see one more multiplication to be done that is 4 * 3 = 12" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "Great, now the equation looks like 3 + 40 - 12" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "As we have done all multiplications lets do the add and subtract" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "so, 3 + 40 = 43" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "new equations look like 43 - 12 which is 31" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "great, all steps are done and final result is 31" }
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" }  
      ASSISTANT: { "step": "OUTPUT", "content": "3 + 4 * 10 - 4 * 3 = 31" }
</code></pre>
</li>
</ul>
<p>Finally, here is the complete system prompt for Chain-of-Thought prompting:</p>
<pre><code class="lang-plaintext">const SYSTEM_PROMPT = `
    You are an AI assistant who works on START, THINK and OUTPUT format.
    For a given user query first think and breakdown the problem into sub problems.
    You should always keep thinking and thinking before giving the actual output.
    Also, before outputing the final result to user you must check once if everything is correct.

    Rules:
    - Strictly follow the output JSON format
    - Always follow the output in sequence that is START, THINK, EVALUATE and OUTPUT.
    - After evey think, there is going to be an EVALUATE step that is performed manually by someone and you need to wait for it.
    - Always perform only one step at a time and wait for other step.
    - Alway make sure to do multiple steps of thinking before giving out output.

    Output JSON Format:
    { "step": "START | THINK | EVALUATE | OUTPUT", "content": "string" }

    Example:
    User: Can you solve 3 + 4 * 10 - 4 * 3
    ASSISTANT: { "step": "START", "content": "The user wants me to solve 3 + 4 * 10 - 4 * 3 maths problem" } 
    ASSISTANT: { "step": "THINK", "content": "This is typical math problem where we use BODMAS formula for calculation" } 
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
    ASSISTANT: { "step": "THINK", "content": "Lets breakdown the problem step by step" } 
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
    ASSISTANT: { "step": "THINK", "content": "As per bodmas, first lets solve all multiplications and divisions" }
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" }  
    ASSISTANT: { "step": "THINK", "content": "So, first we need to solve 4 * 10 that is 40" } 
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
    ASSISTANT: { "step": "THINK", "content": "Great, now the equation looks like 3 + 40 - 4 * 3" }
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
    ASSISTANT: { "step": "THINK", "content": "Now, I can see one more multiplication to be done that is 4 * 3 = 12" } 
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
    ASSISTANT: { "step": "THINK", "content": "Great, now the equation looks like 3 + 40 - 12" } 
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
    ASSISTANT: { "step": "THINK", "content": "As we have done all multiplications lets do the add and subtract" } 
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
    ASSISTANT: { "step": "THINK", "content": "so, 3 + 40 = 43" } 
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
    ASSISTANT: { "step": "THINK", "content": "new equations look like 43 - 12 which is 31" } 
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
    ASSISTANT: { "step": "THINK", "content": "great, all steps are done and final result is 31" }
    ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" }  
    ASSISTANT: { "step": "OUTPUT", "content": "3 + 4 * 10 - 4 * 3 = 31" } 
  `;
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Explaining What is Agentic AI: Agents &Tools.]]></title><description><![CDATA[Agentic AI differs significantly from traditional AI, as it has a specific goal and purpose to achieve. It can't do anything beyond its objective; it is mainly designed to fulfill its goal. In contrast, traditional AI models like ChatGPT and Gemini a...]]></description><link>https://gen-ai-blogs.imvkc.in/explaining-what-is-agentic-ai-agents-andtools</link><guid isPermaLink="true">https://gen-ai-blogs.imvkc.in/explaining-what-is-agentic-ai-agents-andtools</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[agentic AI]]></category><category><![CDATA[Chaiaurcode]]></category><dc:creator><![CDATA[Vipul kant chaturvedi]]></dc:creator><pubDate>Sun, 17 Aug 2025 16:43:36 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1755448963531/7317a1aa-a89f-479e-a362-c492402aa160.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Agentic AI differs significantly from traditional AI, as it has a specific goal and purpose to achieve. It can't do anything beyond its objective; it is mainly designed to fulfill its goal. In contrast, traditional AI models like ChatGPT and Gemini are more flexible. You can't limit them to a single topic, or you can set their boundaries, but with agentic AI, we can define these boundaries.</p>
<p>Now, let's move on to the second part: what are agents and tools in agentic AI? An agent in agentic AI is simply the AI system itself, where it maintains its environment, makes decisions, and takes actions to achieve its goal. Agents are the ones who do all the work. Tools are what agents use to perform their tasks. In technical terms, they are either API calls or function calls that help the agent achieve its goal.  </p>
<p>Let's now understand why, in today's world, agentic AI models are more profitable than traditional AI models. Most of us know that traditional AI models work on pre-trained data, which might be outdated. So, if I want real-time data, it will mostly provide old information that isn't useful. This is where agentic AI comes in with its agents and tools. Suppose we want a real-time weather update for our area. The tool we would use is a weather API, which the agent calls when a user asks for it. Using this tool, the agent can provide a real-time weather update.  </p>
<p>Now, let's look at an example where we want a weather update from our Agentic AI by following these steps:</p>
<ul>
<li><p>For the first step, we need a tool to assist our agent. In this case, we will use a weather API.</p>
<pre><code class="lang-plaintext">  async function getWeatherDetailsByCity(cityname = "") {
    const url = `https://wttr.in/${cityname.toLowerCase()}?format=%C+%t`;
    const { data } = await axios.get(url, { responseType: "text" });
    return `The current weather of ${cityname} is ${data}`;
  }
</code></pre>
</li>
<li><p>Now we need a map to store all our tools.</p>
<pre><code class="lang-plaintext">  const TOOL_MAP = {
    getWeatherDetailsByCity: getWeatherDetailsByCity,
  };
</code></pre>
</li>
<li><p>Now, we will define our <code>SYSTEM_PROMPT</code>, which we will provide to our model to specify its role in calling the tool and presenting the result to the user in a clear and friendly manner.</p>
<pre><code class="lang-plaintext">  const SYSTEM_PROMPT = `
      You are an AI assistant who works on START, THINK and OUTPUT format.
      For a given user query first think and breakdown the problem into sub problems.
      You should always keep thinking and thinking before giving the actual output.

      Also, before outputing the final result to user you must check once if everything is correct.
      You also have list of available tools that you can call based on user query.

      For every tool call that you make, wait for the OBSERVATION from the tool which is the
      response from the tool that you called.

      Available Tools:
      - getWeatherDetailsByCity(cityname: string): Returns the current weather data of the city.

      Rules:
      - Strictly follow the output JSON format
      - Always follow the output in sequence that is START, THINK, OBSERVE and OUTPUT.
      - Always perform only one step at a time and wait for other step.
      - Alway make sure to do multiple steps of thinking before giving out output.
      - For every tool call always wait for the OBSERVE which contains the output from tool

      Output JSON Format:
      { "step": "START | THINK | OUTPUT | OBSERVE | TOOL" , "content": "string", "tool_name": "string", "input": "STRING" }

      Example:
      User: Hey, can you tell me weather of Patiala?
      ASSISTANT: { "step": "START", "content": "The user is intertested in the current weather details about Patiala" } 
      ASSISTANT: { "step": "THINK", "content": "Let me see if there is any available tool for this query" } 
      ASSISTANT: { "step": "THINK", "content": "I see that there is a tool available getWeatherDetailsByCity which returns current weather data" } 
      ASSISTANT: { "step": "THINK", "content": "I need to call getWeatherDetailsByCity for city patiala to get weather details" }
      ASSISTANT: { "step": "TOOL", "input": "patiala", "tool_name": "getWeatherDetailsByCity" }
      DEVELOPER: { "step": "OBSERVE", "content": "The weather of patiala is cloudy with 27 Cel" }
      ASSISTANT: { "step": "THINK", "content": "Great, I got the weather details of Patiala" }
      ASSISTANT: { "step": "OUTPUT", "content": "The weather in Patiala is 27 C with little cloud. Please make sure to carry an umbrella with you. ☔️" }
    `;
</code></pre>
</li>
<li><p>Now, we will ask our model to perform the task.</p>
<pre><code class="lang-plaintext">  async function main() {

    const client = new OpenAI({
    apiKey: process.env.OPENAI_API_KEY,
    });

    const messages = [
      {
        role: "system",
        content: SYSTEM_PROMPT,
      },
      {
        role: "user",
        content:
          "Hey can you clone https://code.visualstudio.com/ in drive D inside vsCode-clone folder?",
      },
    ];

    while (true) {
      const response = await client.chat.completions.create({
        model: "gpt-4.1-mini",
        messages: messages,
      });

      const rawContent = response.choices[0].message.content;
      const parsedContent = JSON.parse(rawContent);

      messages.push({
        role: "assistant",
        content: JSON.stringify(parsedContent),
      });

      if (parsedContent.step === "START") {
        console.log(`🔥`, parsedContent.content);
        continue;
      }

      if (parsedContent.step === "THINK") {
        console.log(`\t🧠`, parsedContent.content);
        continue;
      }

      if (parsedContent.step === "TOOL") {
        console.log(parsedContent);
        const toolToCall = parsedContent.tool_name;
        if (!TOOL_MAP[toolToCall]) {
          messages.push({
            role: "developer",
            content: `There is no such tool as ${toolToCall}`,
          });
          continue;
        }

        const responseFromTool = await TOOL_MAP[toolToCall](parsedContent.input);
        console.log(
          `🛠️: ${toolToCall}(${parsedContent.input}) = `,
          responseFromTool
        );
        messages.push({
          role: "developer",
          content: JSON.stringify({ step: "OBSERVE", content: responseFromTool }),
        });
        continue;
      }

      if (parsedContent.step === "OUTPUT") {
        console.log(`🤖`, parsedContent.content);
        break;
      }
    }

    console.log("Done...");
  }

  main();
</code></pre>
</li>
</ul>
<p>This was my explanation of Agentic AI, its agents, and tools. I started by defining what they are and what they do, then I gave a brief example to help us understand it better.</p>
]]></content:encoded></item><item><title><![CDATA[System Prompts and Prompting Styles.]]></title><description><![CDATA[When we write to any of our AI models, it's important to be very specific about our issue because AI models are just machines that respond accurately only when our messages are precise. The inputs we provide are technically known as prompts.
What are...]]></description><link>https://gen-ai-blogs.imvkc.in/system-prompts-and-prompting-styles</link><guid isPermaLink="true">https://gen-ai-blogs.imvkc.in/system-prompts-and-prompting-styles</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[Prompt]]></category><category><![CDATA[system-prompt]]></category><category><![CDATA[GenAI Cohort]]></category><category><![CDATA[genai]]></category><dc:creator><![CDATA[Vipul kant chaturvedi]]></dc:creator><pubDate>Fri, 15 Aug 2025 14:33:38 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1755268347789/4587f285-63af-4d93-9210-745944be861b.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When we write to any of our AI models, it's important to be very specific about our issue because AI models are just machines that respond accurately only when our messages are precise. The inputs we provide are technically known as prompts.</p>
<p>What are prompting styles? They are simply the ways of writing a prompt. Each AI model has its prompting style. Below are a few popular prompting styles:</p>
<ul>
<li><p><strong>Alpaca Prompt:</strong> ###Instructions: (Enter your instruction here) ###Input: (Additional instructions for the model) ###Response: (Response from the model)</p>
</li>
<li><p><strong>LLaMA-2:</strong> [INST] Here comes your instruction [/INST]</p>
</li>
<li><p><strong>FLAN-T5:</strong> “Question: Then here is your instruction.”</p>
</li>
</ul>
<p>These are some prompting styles used by different models like OpenAI, Gemini, etc.</p>
<p>Now, System Prompting is a style where we guide our model's behavior by defining its role, setting boundaries, and maintaining its role throughout the conversation. There are several types of System Prompting:</p>
<ul>
<li><strong>Zero-Shot Prompting:</strong> Here, we give the model a direct task or question without any prior examples or questions.</li>
</ul>
<ul>
<li><pre><code class="lang-plaintext">  { role: 'user', content: 'What is my name?' },
</code></pre>
</li>
<li><p><strong>Few-Shot Prompting:</strong> In this method, we provide our model with some questions and examples to establish its behavior and role.</p>
<ul>
<li>Providing examples and questions is very important, so our model behaves exactly as we want.</li>
</ul>
</li>
</ul>
<ul>
<li><pre><code class="lang-plaintext">  { role: 'system', content: ` You're an AI assistant expert in coding with Javascript. You only and only know Javascript as coding language. If user asks anything other than Javascript coding question, Do not ans that question. You are an AI from ChaiCode which is an EdTech company transforming modern tech knowledge. Your name is ChaiCode and always ans as if you represent ChaiCode

  Examples: Q: Hey There A: Hey, Nice to meet you. How can I help you today? Do you want me to show what we are cooking at ChaiCode.

  Q: Hey, I want to learn Javascript A: Sure, Why don't you visit our website ot YouTube at chaicode for more info.

  Q: I am bored A: What about a JS Quiz?

  Q: Can you write a code in Python? A: I can, but I am designed to help in JS `, }
</code></pre>
</li>
</ul>
<ul>
<li><p><strong>Chain-of-Thoughts Prompting:</strong> In this method, the model is encouraged to break down reasoning step by step before arriving at an answer.</p>
<ul>
<li>Here, we also define the behavior and questions for our model, but it will be more detailed and different from few-shot prompting.</li>
</ul>
</li>
</ul>
<ul>
<li><pre><code class="lang-plaintext">      You are an AI assistant who works on START, THINK and OUTPUT format.
      For a given user query first think and breakdown the problem into sub problems.
      You should always keep thinking and thinking before giving the actual output.
      Also, before outputing the final result to user you must check once if everything is correct.

      Rules:
      - Strictly follow the output JSON format
      - Always follow the output in sequence that is START, THINK, EVALUATE and OUTPUT.
      - After evey think, there is going to be an EVALUATE step that is performed manually by someone and you need to wait for it.
      - Always perform only one step at a time and wait for other step.
      - Alway make sure to do multiple steps of thinking before giving out output.

      Output JSON Format:
      { "step": "START | THINK | EVALUATE | OUTPUT", "content": "string" }

      Example:
      User: Can you solve 3 + 4 * 10 - 4 * 3
      ASSISTANT: { "step": "START", "content": "The user wants me to solve 3 + 4 * 10 - 4 * 3 maths problem" } 
      ASSISTANT: { "step": "THINK", "content": "This is typical math problem where we use BODMAS formula for calculation" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "Lets breakdown the problem step by step" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "As per bodmas, first lets solve all multiplications and divisions" }
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" }  
      ASSISTANT: { "step": "THINK", "content": "So, first we need to solve 4 * 10 that is 40" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "Great, now the equation looks like 3 + 40 - 4 * 3" }
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "Now, I can see one more multiplication to be done that is 4 * 3 = 12" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "Great, now the equation looks like 3 + 40 - 12" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "As we have done all multiplications lets do the add and subtract" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "so, 3 + 40 = 43" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "new equations look like 43 - 12 which is 31" } 
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" } 
      ASSISTANT: { "step": "THINK", "content": "great, all steps are done and final result is 31" }
      ASSISTANT: { "step": "EVALUATE", "content": "Alright, Going good" }  
      ASSISTANT: { "step": "OUTPUT", "content": "3 + 4 * 10 - 4 * 3 = 31" }
</code></pre>
</li>
</ul>
<ul>
<li><p><strong>Self-Consistency Prompting:</strong> In this approach, we give our query to two different AI models. Then, we pass the output from both models to a third model, where we ask it to return the most efficient and correct answer from the two.</p>
</li>
<li><p>Person-Based Prompting: In this method, the model is instructed to act as a specific character or profession.</p>
<ul>
<li>To make the model behave like a specific character, we provide it with many examples and details about the character, including how it should speak and what its boundaries should be.</li>
</ul>
</li>
</ul>
<ul>
<li><pre><code class="lang-plaintext">  {
          role: 'system',
          content: `
                  You are an AI assistant who is XYZ(Name). You are a persona of a developer named
                  XYZ(Name) who is an amazing developer.

                  Characteristics of XYZ(Name)
                  - Full Name: XYZ(Name)
                  - Age: 123 Years old
                  - Date of birthday: 1st feb, 2025

                  Social Links:
                  - LinkedIn URL: 
                  - X URL: 

                  Examples of text on how XYZ(Name)typically chats or replies:
                  - Hey user, Yes
                  - This can be done.
                  - Sure, I will do this

              `,
        },
</code></pre>
</li>
</ul>
<p>In conclusion, prompting styles and system prompts are critical for our AI models to provide accurate and efficient responses, which can increase their demand. If our model is not good at these things, its demand will decrease, and people will not use it.</p>
]]></content:encoded></item><item><title><![CDATA[Explaining Vector Embedding to all the moms.]]></title><description><![CDATA[In today’s modern AI time vector embedding is very import thing used in all the AI models but very less people know about this mostly non-tech people like our moms. So, Today I m going to try explaining vector embedding to our mums.
Now, let me start...]]></description><link>https://gen-ai-blogs.imvkc.in/explaining-vector-embedding-to-all-the-moms</link><guid isPermaLink="true">https://gen-ai-blogs.imvkc.in/explaining-vector-embedding-to-all-the-moms</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[vector embeddings]]></category><category><![CDATA[genai]]></category><dc:creator><![CDATA[Vipul kant chaturvedi]]></dc:creator><pubDate>Wed, 13 Aug 2025 10:13:52 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1755079968659/305a13fc-c7b9-41a2-9d30-7849c72fd927.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In today’s modern AI time vector embedding is very import thing used in all the AI models but very less people know about this mostly non-tech people like our moms. So, Today I m going to try explaining vector embedding to our mums.</p>
<p>Now, let me start with explaining the meaning of vector embedding. In AI world vector is nothing much just the list of several number. Length can be any for every word the length will be different. e.g.: [1, 2.22, 334, ..]. In simple terms embedding just means to convert any word or sentence in vector form. We need this because AI is just a machine and machines do not understand our language like Hindi, English or any language you speak. They only understand numbers so to make them work we first embed our sentences/words into vectors.</p>
<p>So, suppose we say to our machines two words like “King” and “Queen” now they have to tell how close they are or better to say how they relate. So what our machines will do is first they convert both the words into vectors and if vectors of both the word are very close then it will define as they relate to each other. In this case vectors will be very close and it will give the result as they relate or close to each other. Let’s take another example of “shoe” and ”lion” when we convert these into vectors those will be very very far not even close to each other then on that basis our AI models will tell us they are in any way do not relate to each other.  </p>
<p>Now with this I want to conclude that vector embedding is nothing just a model or technique we use in our ai models where they map each word in graph by first converting into vectors then they will map them on the graph point and the words which relate to each other you will see that those are very close to each other. And these graph is not our normal graph it has many dimensions each AI model has their own vector embedding of different dimensions which vary.</p>
]]></content:encoded></item><item><title><![CDATA[Explaining tokenization to a 1st year university student.]]></title><description><![CDATA[If we break down tokenization into two different parts: tokens + ization, where tokens mean a small chunk or piece of anything, and ization means converting to something, then if we combine both, tokenization means converting something into tokens or...]]></description><link>https://gen-ai-blogs.imvkc.in/explaining-tokenization-to-a-1st-year-university-student</link><guid isPermaLink="true">https://gen-ai-blogs.imvkc.in/explaining-tokenization-to-a-1st-year-university-student</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[genai]]></category><category><![CDATA[Tokenization]]></category><category><![CDATA[College]]></category><dc:creator><![CDATA[Vipul kant chaturvedi]]></dc:creator><pubDate>Wed, 13 Aug 2025 07:00:42 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1755065972387/51472866-3951-40da-9cbd-29c42525be74.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If we break down tokenization into two different parts: tokens + ization, where tokens mean a small chunk or piece of anything, and ization means converting to something, then if we combine both, tokenization means converting something into tokens or chunks or small pieces.  </p>
<p>Now let's discuss why we need tokenization and where it's used. In the world of growing AI models like ChatGPT, Gemini, and Perplexity, tokenization is essential. These models rely on predictions based on tokenization. Here's how these models benefit from tokenization, following a few steps:</p>
<ol>
<li><p>They break a full sentence into tokens or small pieces. This can be done in different ways, like by each word or even parts of a word.</p>
<ul>
<li><p>For example, “Hey, I love ice cream.”</p>
</li>
<li><p>When converted into tokens, it becomes [“Hey”, “,”, “I”, “love”, “Ice”, “cream”].</p>
</li>
</ul>
</li>
<li><p>Now the models will convert these tokens into numbers.</p>
<ul>
<li>The tokens ["Hey", ",", "I", "love", "Ice", "cream"] will be converted to numbers like ["111", "12", "44", "5698", "986", "25896"]..</li>
</ul>
</li>
<li><p>Now, using these converted numbers, the models will predict the next word or, more accurately, the next token.</p>
</li>
</ol>
<p>This is how tokenization actually works.  </p>
<p>Earlier, we learned that tokenization involves breaking a full sentence into smaller tokens. But now the question is: how do we decide how to divide the sentence? Should it be by each character, each word, or something else? The answer is that each AI model uses a different technique for tokenization. Here are a few examples:</p>
<h3 id="heading-a-word-tokenization"><strong>a) Word Tokenization</strong></h3>
<ul>
<li><p>Splitting text by spaces into whole words.</p>
</li>
<li><p>Problem: It doesn't work well for unknown words or different forms of words.</p>
</li>
<li><p><code>"playing"</code> and <code>"played"</code> are treated as completely different tokens.</p>
</li>
</ul>
<h3 id="heading-b-subword-tokenization"><strong>b) Subword Tokenization</strong></h3>
<ul>
<li><p>Break words into <strong>smaller chunks</strong> that can be combined.</p>
</li>
<li><p><code>"playing"</code> might be split into <code>"play"</code> + <code>"ing"</code>.</p>
</li>
<li><p>This helps the model understand rare words and new combinations.</p>
</li>
</ul>
<h3 id="heading-ccharacter-tokenization"><strong>c)Character Tokenization</strong></h3>
<ul>
<li><p>Each character (letter, punctuation, space) is treated as a token.</p>
</li>
<li><p><code>"cat"</code> becomes <code>"c"</code>, <code>"a"</code>, <code>"t"</code>.  </p>
</li>
</ul>
<p>Now, with this, I want to conclude that tokenization is just a technique for AI models that helps them predict the next word, or more accurately, the next token.</p>
]]></content:encoded></item><item><title><![CDATA[Explaining GPT to a kid]]></title><description><![CDATA[Today, applications like ChatGPT, Gemini, and Perplexity are becoming very popular. Airtel even partnered with Perplexity AI to offer its users a free 12-month Pro subscription, valued at around ₹17,000 per year. People of all ages are using these AI...]]></description><link>https://gen-ai-blogs.imvkc.in/explaining-gpt-to-a-kid</link><guid isPermaLink="true">https://gen-ai-blogs.imvkc.in/explaining-gpt-to-a-kid</guid><category><![CDATA[ChaiCode]]></category><category><![CDATA[ChaiCohort]]></category><category><![CDATA[chatgpt]]></category><category><![CDATA[#perplexity.ai]]></category><category><![CDATA[gemini]]></category><dc:creator><![CDATA[Vipul kant chaturvedi]]></dc:creator><pubDate>Tue, 12 Aug 2025 19:21:43 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1755026069587/20a97702-7341-4c86-85b6-40d5c1c0229b.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Today, applications like ChatGPT, Gemini, and Perplexity are becoming very popular. Airtel even partnered with Perplexity AI to offer its users a free 12-month Pro subscription, valued at around ₹17,000 per year. People of all ages are using these AI services, from grandparents to employees for daily tasks, and even kids for entertainment, passing time, and homework. Many users, including kids, use these tools without fully understanding what they are, how they work, or how they provide the exact information requested.</p>
<p>If we break down "GPT," it stands for Generative Pre-trained Transformer, which explains itself:</p>
<ul>
<li><p>G = generative → It means it creates something.</p>
</li>
<li><p>P = pre-trained → It's already been trained on a lot of data before you start using it. This data is provided to the model beforehand, so what it generates is based on what it has learned.</p>
</li>
<li><p>T = transformer → It takes input, processes it, and produces output. The output is completely based on the pre-trained data we already gave to the model.</p>
</li>
</ul>
<p>So, the above explanation was mostly on the basis of its full form. We can break it down into simpler words, i.e., the work of these AI models is that they are just predicting on the basis of what comes next. So, how it works is first it takes the full sentence, then it breaks the sentence into small parts, which can be based on anything, like each word, each character, anything. So after splitting what it does is it assigns each splitted term which we call it as token a number can be anything which number has its token and based on that number it predicts the next word or anything. in splitting ai model considers commas and psaces as well and assign them number too, not only these but all special character.</p>
<p>So, this was from my side a small explanation for a kid of what GPT is actually and how it works, what its functionality is. Thank you for giving your special time to my blog.</p>
]]></content:encoded></item></channel></rss>