<?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[GenAi: Decoding AI Jargons with chai]]></title><description><![CDATA[GenAi: Decoding AI Jargons with chai]]></description><link>https://gpt-ai-terms.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 15:48:37 GMT</lastBuildDate><atom:link href="https://gpt-ai-terms.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Decoding AI Jargons Over Chai ☕ – A Simple Guide to How GPT Works]]></title><description><![CDATA[Tagline: Ever wondered how GPT(Generative Pretrained Transformer) understands and responds like a human? Let’s break down the buzzwords over a cup of chai.
What is GPT?

GPT (Generative Pre-trained Transformer) is a type of AI that can generate human...]]></description><link>https://gpt-ai-terms.hashnode.dev/decoding-ai-jargons-over-chai-a-simple-guide-to-how-gpt-works</link><guid isPermaLink="true">https://gpt-ai-terms.hashnode.dev/decoding-ai-jargons-over-chai-a-simple-guide-to-how-gpt-works</guid><category><![CDATA[genai]]></category><category><![CDATA[gpt]]></category><category><![CDATA[gpt4.0]]></category><category><![CDATA[encoding]]></category><category><![CDATA[decoding]]></category><category><![CDATA[positional encoding]]></category><category><![CDATA[Tokenization]]></category><category><![CDATA[self-attention]]></category><category><![CDATA[multi head attention]]></category><category><![CDATA[softmax]]></category><category><![CDATA[temperature]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[ajay]]></dc:creator><pubDate>Tue, 08 Apr 2025 15:50:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1744129578656/7bac9635-7e51-4620-bf0e-02231fb72e40.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong><em>Tagline:</em></strong> Ever wondered how GPT(Generative Pretrained Transformer) understands and responds like a human? Let’s break down the buzzwords over a cup of chai.</p>
<h2 id="heading-what-is-gpt">What is GPT?</h2>
<ul>
<li><p><strong>GPT (Generative Pre-trained Transformer)</strong> is a type of AI that can generate human-like text.</p>
</li>
<li><p>It's trained on tons of text from the internet to understand and generate natural language.</p>
</li>
<li><p>It’s based on the <strong>Transformer model</strong> — a breakthrough AI architecture introduced by Google in 2017.</p>
</li>
</ul>
<h3 id="heading-big-picture-flow-of-gpt"><strong>Big Picture Flow of GPT:</strong></h3>
<ol>
<li><p><strong>Text → Tokenize (split into pieces)</strong></p>
</li>
<li><p><strong>Tokens → Vectors (number representation)</strong></p>
</li>
<li><p><strong>Vectors → Transformer Layers</strong></p>
</li>
<li><p><strong>Transformer uses Attention to understand</strong></p>
</li>
<li><p><strong>Generates next word (token)</strong></p>
</li>
<li><p><strong>Repeats until done!</strong></p>
</li>
</ol>
<h2 id="heading-what-is-a-transformer"><strong>What is a Transformer?</strong></h2>
<ul>
<li><p>A <strong>Transformer</strong> is the brain behind GPT.</p>
</li>
<li><p>It reads input, understands relationships between words, and generates meaningful output.</p>
</li>
<li><p>Invented in 2017 (by Google), it's faster and more powerful than older models like RNNs or LSTMs.</p>
</li>
<li><p>The Transformer architecture was originally designed for <strong>machine translation</strong> (like Google Translate), and is now the core foundation of models like GPT.</p>
</li>
<li><p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1744122727218/16b689aa-4914-4ed9-a339-09db2363058c.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
<h2 id="heading-encoder-turning-words-into-meaningful-numbers"><strong>Encoder – Turning Words into Meaningful Numbers</strong></h2>
<p>An <strong>Encoder</strong> is the first part of a Transformer model (used in tasks like translation or search). Its job is to <strong>take a sentence as input and convert each word into a numerical representation</strong> — also called <strong>vectors</strong> or <strong>embeddings</strong>.</p>
<p>These vectors capture the <strong>meaning, position, and context</strong> of words in a sentence, making it easier for the model to understand relationships between them.</p>
<p><strong>Example:</strong><br /><code>Let’s take the sentence: “The cat sat on the mat”</code></p>
<p><code>In a model like GPT-4.o, this sentence might get encoded into token IDs like: [976, 9059, 10139, 402, 290, 2450]</code></p>
<h2 id="heading-decoder-generating-text-from-understanding"><strong>Decoder – Generating Text from Understanding</strong></h2>
<p>The <strong>Decoder</strong> is the part of a Transformer that <strong>takes the encoded information</strong> (vectors from the encoder) and <strong>generates new text, one token at a time</strong>.</p>
<p>In models like <strong>GPT</strong>, which are built specifically for <strong>text generation</strong>, the decoder is used <strong>without the encoder</strong> — because GPT doesn't translate between languages, it just <strong>predicts the next word/token</strong> based on everything it has seen so far.</p>
<p><strong>Example</strong>: <code>Input: “The cat sat on the”</code></p>
<p><code>The decoder predicts: mat” (based on training data and attention patterns)</code></p>
<p><code>Output: “The cat sat on the mat”</code></p>
<h2 id="heading-vector-the-numeric-form-of-language"><strong>Vector – The Numeric Form of Language</strong></h2>
<p>A <strong>vector</strong> is just a list of numbers that represents a word, phrase, or token in a way a computer can understand.</p>
<p>Since machines don’t understand human language, every word we give to a model like GPT is <strong>converted into a vector of numbers</strong> — like turning "cat" into something like: [0.12, 0.88, -0.45, 0.22, ...]</p>
<h2 id="heading-vector-embedding-adding-meaning-to-numbers"><strong>Vector Embedding – Adding Meaning to Numbers</strong></h2>
<p>A <strong>vector embedding</strong> is a specially trained vector that captures the <strong>meaning</strong> and <strong>relationships</strong> of a word with others.</p>
<p><strong>In vector space:</strong></p>
<ul>
<li><p>Words that have similar meanings or usage are <strong>close together</strong>.</p>
</li>
<li><p>Words that are unrelated are <strong>far apart</strong>.</p>
</li>
</ul>
<p>For example:</p>
<ul>
<li><p><code>The vectors for "king", "queen", and "royalty" will be close together in the vector space.</code></p>
</li>
<li><p><code>But "cat" and "laptop" will be far apart — because they mean totally different things.</code></p>
</li>
<li><p><code>Just like "man" relates to "woman", GPT learns that "boy" relates to "girl", so given "Men - Women, Boy - ?", it predicts "Girl".</code></p>
</li>
</ul>
<h2 id="heading-what-is-vocabulary-size-vocab-size"><strong>What is Vocabulary Size (Vocab Size)?</strong></h2>
<ul>
<li><p>Vocab size = how many <strong>unique tokens</strong> GPT understands.</p>
</li>
<li><p><strong>GPT-4.o</strong> has a <strong>vocab size of ~200,000</strong> tokens!</p>
</li>
</ul>
<p>It means it can recognize up to 200k pieces of language – full words, subwords, symbols, emojis, etc.</p>
<h2 id="heading-tokenization-breaking-text-into-pieces"><strong>Tokenization – Breaking Text into Pieces</strong></h2>
<p>GPT breaks every sentence into smaller chunks called <strong>tokens</strong>.</p>
<p><code>Example Text: "This is GPT-4.o example"</code></p>
<p><code>Token count: 18   Tokens: [200264, 17360, 200266, 851, 382, 329, 555, 19, 21465, 4994, 200265, 200264, 1428, 200266, 200265, 200264, 173781, 200266]</code></p>
<p><a target="_blank" href="https://tiktokenizer.vercel.app/">Check tokenization here</a></p>
<h2 id="heading-positional-encoding-knowing-word-order-in-a-sentence"><strong>Positional Encoding – Knowing Word Order in a Sentence</strong></h2>
<p>Transformers (like GPT) process all words <strong>at once</strong> — not in order like humans read (left to right).<br />But <strong>word order matters</strong>!<br />For example:</p>
<ul>
<li><p><code>“The dog chased the cat” is not the same as</code></p>
</li>
<li><p><code>“The cat chased the dog”</code></p>
</li>
</ul>
<p>This is where <strong>Positional Encoding</strong> comes in — it helps the model understand <strong>which word came first, second, third</strong>, etc., by <strong>adding position-based values</strong> to the word vectors.</p>
<h2 id="heading-semantic-meaning-understanding-the-meaning-not-just-the-words"><strong>Semantic Meaning – Understanding the <em>Meaning</em>, Not Just the Words</strong></h2>
<p><strong>Semantic meaning</strong> is about <strong>what words mean</strong> in context — not just what they look like or how they’re spelled.</p>
<p>GPT doesn’t just read words; it tries to <strong>understand the meaning behind them</strong> using <strong>vector embeddings, context, and relationships</strong>.</p>
<p><code>For example: “ICICI BANK” &amp; “RIVER BANK”, both have same word “BANK” but have different meanings.</code></p>
<h2 id="heading-self-attention-how-gpt-focuses-on-important-words"><strong>Self-Attention – How GPT Focuses on Important Words</strong></h2>
<p><strong>Self-Attention</strong> allows GPT to <strong>look at all the words in a sentence and figure out which ones are most important to each other</strong> — no matter where they appear.</p>
<h3 id="heading-how-it-works-simplified">How it works (Simplified):</h3>
<ul>
<li><p>For each word, the model asks:<br />  “Which other words do I need to look at to understand this one?”</p>
</li>
<li><p>It gives each word a <strong>weight</strong> (importance score) — higher weight = more attention.</p>
</li>
<li><p><strong>Self-Attention</strong> lets the model decide <strong>which words matter most to each word</strong>.</p>
</li>
<li><p>It helps GPT understand <strong>long sentences</strong>, <strong>context</strong>, and <strong>word relationships</strong> — even across many words.</p>
</li>
<li><p>It’s the <strong>heart of the Transformer</strong>, making it smarter than older models.</p>
</li>
</ul>
<h2 id="heading-multi-head-attention-looking-at-everything-from-different-angles"><strong>Multi-Head Attention – Looking at Everything, From Different Angles</strong></h2>
<p>While <strong>Self-Attention</strong> helps GPT focus on the most relevant words in a sentence,<br /><strong>Multi-Head Attention</strong> takes it a step further — it lets the model look at the same sentence in <strong>multiple ways at the same time</strong>.</p>
<p>Each “head” learns to focus on a <strong>different relationship</strong> between words — like grammar, meaning, or emotion.</p>
<p><code>Example:</code></p>
<p><code>Sentence: “The doctor who treated the patient was very kind.”</code></p>
<ul>
<li><p><code>One attention head might focus on:   "doctor" ↔ "treated" (subject-action)</code></p>
</li>
<li><p><code>Another head might focus on:   "patient" ↔ "treated" (object-action)</code></p>
</li>
<li><p><code>Another might focus on:   "doctor" ↔ "kind" (who was kind)</code></p>
</li>
</ul>
<p>By combining all these heads, GPT gets a <strong>richer understanding</strong> of the sentence!</p>
<h2 id="heading-softmax-turning-scores-into-probabilities"><strong>Softmax – Turning Scores into Probabilities</strong></h2>
<p>When GPT is choosing the next word to generate, it uses <strong>Softmax</strong> to decide <strong>how likely each word is</strong> based on the context.</p>
<p>Softmax turns raw numbers (called logits) into <strong>probabilities that add up to 100%</strong> — so GPT can <strong>pick the best next word</strong>, but also have a chance to pick creative alternatives. It’s what makes GPT both <strong>smart and slightly creative</strong>.</p>
<h2 id="heading-temperature-controlling-how-creative-gpt-gets"><strong>Temperature – Controlling How Creative GPT Gets</strong></h2>
<p><strong>Temperature</strong> is a setting that controls how <strong>random or predictable</strong> GPT’s responses are when choosing the next word.</p>
<ul>
<li><p>Low temperature → more <strong>focused, logical, and predictable</strong> answers.</p>
</li>
<li><p>High temperature → more <strong>creative, diverse, and surprising</strong> responses.</p>
</li>
</ul>
<h2 id="heading-knowledge-cutoff"><strong>Knowledge Cutoff</strong></h2>
<p>GPT doesn’t learn continuously. It has a <strong>training data cutoff</strong>.</p>
<p>📌 GPT-4.o may only know up to <strong>April 2023</strong><br />So it may not know about <strong>events after that</strong>.</p>
<p>🚀 Explore my hands-on GenAI experiments with tokenization, vector embeddings, and more:<br />👉<a target="_blank" href="https://github.com/Ajay-Goswami/GenAI">https://github.com/Ajay-Goswami/GenAI</a></p>
]]></content:encoded></item></channel></rss>