<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rith Banerjee</title>
    <description>The latest articles on DEV Community by Rith Banerjee (@rithb898).</description>
    <link>https://dev.to/rithb898</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3283225%2F1a5fe1a6-c5f2-46f1-90ef-c03e3945f382.jpeg</url>
      <title>DEV Community: Rith Banerjee</title>
      <link>https://dev.to/rithb898</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rithb898"/>
    <language>en</language>
    <item>
      <title>Tokenization Made Simple: How AI Turns Words into Numbers</title>
      <dc:creator>Rith Banerjee</dc:creator>
      <pubDate>Wed, 13 Aug 2025 11:36:57 +0000</pubDate>
      <link>https://dev.to/rithb898/tokenization-made-simple-how-ai-turns-words-into-numbers-607</link>
      <guid>https://dev.to/rithb898/tokenization-made-simple-how-ai-turns-words-into-numbers-607</guid>
      <description>&lt;p&gt;If you’re starting out in &lt;strong&gt;AI&lt;/strong&gt;, &lt;strong&gt;Natural Language Processing (NLP)&lt;/strong&gt;, or just curious about how tools like ChatGPT understand text, you’ll run into a strange but important word: &lt;strong&gt;tokenization&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It might sound like some secret coding spell but really, it’s just the AI version of &lt;strong&gt;chopping vegetables before cooking&lt;/strong&gt;. Let’s break it down.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Tokenization?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Tokenization&lt;/strong&gt; is the process of &lt;strong&gt;splitting text into smaller, meaningful pieces called tokens&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These tokens can be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Whole words&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Parts of words (sub-words)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Even punctuation marks or symbols&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The point? AI can’t work directly with raw sentences. Tokens are the &lt;strong&gt;prepped ingredients&lt;/strong&gt; that models actually understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Do We Need Tokenization?
&lt;/h2&gt;

&lt;p&gt;Computers don’t “read” like humans. They understand &lt;strong&gt;numbers&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Tokenization is the bridge:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Break text into tokens.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Assign each token a unique ID (a number).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Feed those IDs into the model.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Without tokenization, a sentence like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I love coding&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;is just a messy blob of characters to a computer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick Example
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Text:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;I&lt;/span&gt; &lt;span class="nx"&gt;love&lt;/span&gt; &lt;span class="nx"&gt;coding&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Tokens:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;I&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;love&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;coding&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;.&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Token IDs (example):&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;302&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The exact numbers depend on the tokenizer you’re using each one has its own dictionary (also called a vocabulary).&lt;/p&gt;

&lt;h2&gt;
  
  
  Subword Tokenization (Used in GPT)
&lt;/h2&gt;

&lt;p&gt;Large models like GPT often split rare words into &lt;strong&gt;subwords&lt;/strong&gt; for flexibility.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Unbelievable&lt;/strong&gt; → &lt;code&gt;["Un", "believ", "able"]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This way, even if the model has never seen “unbelievable” as one word, it still understands it by piecing together familiar chunks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why It Matters in AI
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Token limits&lt;/strong&gt;: Models have a maximum number of tokens they can process. More tokens = higher cost and slower response.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Efficiency&lt;/strong&gt;: Breaking words into subwords lets models handle rare or made-up words without storing them all in the dictionary.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try It Yourself
&lt;/h2&gt;

&lt;p&gt;You can experiment with tokenization right now using my &lt;strong&gt;Custom Tokenizer Tool&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
🔗 &lt;a href="https://custom-tokenizer-rith.vercel.app/" rel="noopener noreferrer"&gt;https://custom-tokenizer-rith.vercel.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Type any text and see how it’s split into tokens and turned into IDs just like AI does before generating a response.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Fun Analogy
&lt;/h2&gt;

&lt;p&gt;Imagine you’re explaining your favorite recipe to a robot chef:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;First, you chop the ingredients (&lt;strong&gt;tokenization&lt;/strong&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then, you label each ingredient (&lt;strong&gt;token IDs&lt;/strong&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally, the robot uses those labels to cook (&lt;strong&gt;model processing&lt;/strong&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No chopping = no cooking. That’s how important tokenization is in AI.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tokenization = Text → Tokens → Numbers → Model&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It’s step one in almost every NLP task.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Different tokenizers split text differently.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Subwords = flexibility, but more tokens to process.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Tokenization is how AI breaks down human language into bite-sized chunks it can understand and process.&lt;br&gt;&lt;br&gt;
It’s the &lt;strong&gt;translation step&lt;/strong&gt; between words and the numerical world of machine learning. Whether splitting into whole words, subwords, or even punctuation, tokenization makes it possible for models to handle any text from everyday phrases to rare, complex terms. Without it, AI would be staring blankly at a wall of letters.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
      <category>chaicode</category>
    </item>
    <item>
      <title>How I Explained Vector Embeddings to My Mom (And She Got It)</title>
      <dc:creator>Rith Banerjee</dc:creator>
      <pubDate>Wed, 13 Aug 2025 11:35:58 +0000</pubDate>
      <link>https://dev.to/rithb898/how-i-explained-vector-embeddings-to-my-mom-and-she-got-it-8a9</link>
      <guid>https://dev.to/rithb898/how-i-explained-vector-embeddings-to-my-mom-and-she-got-it-8a9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Mom:&lt;/strong&gt; “Beta, what is this ‘vector embedding’ you keep talking about?”&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Me:&lt;/strong&gt; “It’s not as scary as it sounds, Mom. Let me explain.”&lt;/p&gt;

&lt;p&gt;We’re in the kitchen, chai is boiling, and I decide this is the perfect time to make it easy for her to understand.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turning Ideas Into Numbers
&lt;/h2&gt;

&lt;p&gt;Think about how you’d describe someone you know.&lt;br&gt;&lt;br&gt;
If I had to describe you, Mom:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sweetness level:&lt;/strong&gt; 9 out of 10&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cooking skill:&lt;/strong&gt; 10 out of 10&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ability to find things I’ve lost:&lt;/strong&gt; 11 out of 10&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I could do the same for everyone in our family.&lt;br&gt;&lt;br&gt;
Once I’ve written down everyone’s “scores,” I can compare them. If two people have similar scores, they’re probably similar in personality.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mom:&lt;/strong&gt; “Oh, like my recipe book? Different dishes, but I can group the ones with the same spices.”&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Me:&lt;/strong&gt; “Exactly, Mom.”&lt;/p&gt;

&lt;h2&gt;
  
  
  Computers Do the Same Thing
&lt;/h2&gt;

&lt;p&gt;Before I scare you with the term &lt;strong&gt;“vector embedding,”&lt;/strong&gt; let’s start simple:&lt;br&gt;&lt;br&gt;
It’s just a list of numbers that represents the meaning of something like a word, sentence, picture, or even a song.&lt;br&gt;&lt;br&gt;
These numbers are like the &lt;strong&gt;“scores”&lt;/strong&gt; in our family example, except instead of sweetness or cooking skill, a computer’s traits might be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;How romantic it feels (like a Bollywood love song)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How technical it feels (like the washing machine manual)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How much it’s about cricket&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And when you want to sound smart at a party, you can call these lists of numbers vector embeddings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Bother?
&lt;/h2&gt;

&lt;p&gt;Because once things are turned into numbers, computers can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Find similar things&lt;/strong&gt; - “puppy” is close to “dog”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Spot differences&lt;/strong&gt; - “banana” is far from “spaceship”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Make smart recommendations&lt;/strong&gt; - like suggesting a Shah Rukh Khan movie after you watch one&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A Simple Example
&lt;/h2&gt;

&lt;p&gt;You search for &lt;strong&gt;“a story about a dog”.&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Even if the text says &lt;strong&gt;“a tale about a puppy”&lt;/strong&gt;, the computer still finds it because their embeddings are close in meaning, even if the words are different.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mom:&lt;/strong&gt; “Ohhh, so the computer isn’t just matching the exact words, it’s matching the idea?”&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Me:&lt;/strong&gt; “Exactly, Mom. You’ve cracked it.”&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping It Up
&lt;/h2&gt;

&lt;p&gt;So Mom, the next time you hear me say “embedding,” you’ll know I’m just giving the computer a recipe for understanding meaning.&lt;br&gt;&lt;br&gt;
And unlike my cooking, this recipe actually works every time.&lt;/p&gt;

</description>
      <category>chaicode</category>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
    </item>
    <item>
      <title>GPT Explained Like You're 5: The Kid-Friendly Guide to AI</title>
      <dc:creator>Rith Banerjee</dc:creator>
      <pubDate>Wed, 13 Aug 2025 11:34:59 +0000</pubDate>
      <link>https://dev.to/rithb898/gpt-explained-like-youre-5-the-kid-friendly-guide-to-ai-568d</link>
      <guid>https://dev.to/rithb898/gpt-explained-like-youre-5-the-kid-friendly-guide-to-ai-568d</guid>
      <description>&lt;h2&gt;
  
  
  What is GPT? (Explained for a 5-Year-Old)
&lt;/h2&gt;

&lt;p&gt;Have you ever talked to a computer that talks back like a person? That’s kind of what GPT is. But to understand it, let’s imagine…&lt;/p&gt;

&lt;h2&gt;
  
  
  The Magical Parrot
&lt;/h2&gt;

&lt;p&gt;Picture a talking parrot.&lt;br&gt;&lt;br&gt;
But this isn’t just any parrot, this parrot has read every storybook, comic, newspaper, and joke book in the world. It’s heard every bedtime story, every “Knock Knock” joke, and even that weird poem your uncle made up last Christmas.&lt;br&gt;&lt;br&gt;
Now, if you ask the parrot:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Tell me a story about a dinosaur who loves pizza"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;it can make one up for you on the spot, using everything it’s read before.&lt;br&gt;&lt;br&gt;
That’s basically what GPT does… except GPT is not a bird. It’s a computer brain built by very smart people. It has read millions of pages from the internet, books, and articles. Then it learned how to guess the next word in a sentence really, really well.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;Think of GPT like Lego blocks but instead of plastic blocks, it has words. When you start a sentence, GPT picks the next “word block” that fits best. Then another. And another. Until you’ve built a whole castle made of words.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;&lt;br&gt;
You say: &lt;strong&gt;“Once upon a time, there was a…”&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
GPT might finish: &lt;strong&gt;“…little dragon who loved painting rainbows.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Why? Because it’s seen lots of stories like that, and it knows dragons and rainbows often go together in stories.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Is It Called GPT?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;G – Generative:&lt;/strong&gt; It makes (generates) new text.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;P – Pre-trained:&lt;/strong&gt; It learned a ton before you even talked to it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;T – Transformer:&lt;/strong&gt; A fancy computer trick that helps it understand how words connect.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, &lt;strong&gt;GPT = “A computer that’s good at making sentences.”&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Can GPT Do?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Tell bedtime stories.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make up silly poems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Help With Homework.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Answer questions like &lt;strong&gt;“Why is the sky blue?”&lt;/strong&gt; or &lt;strong&gt;“Do cats have eyebrows?”&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(Yes, cats do have tiny eyebrow-like whiskers.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Why It Feels Like Magic
&lt;/h2&gt;

&lt;p&gt;GPT doesn’t just copy what it’s read, it mixes ideas together. Like blending chocolate cake and strawberry ice cream to make chocolate-strawberry cake!&lt;br&gt;&lt;br&gt;
So even if you ask it something it’s never seen before, it can still give you an answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Big Secret
&lt;/h2&gt;

&lt;p&gt;Even though GPT seems super smart, it doesn’t really understand things like humans do. It’s more like your friend who’s great at finishing your sentences but doesn’t actually know what you’re thinking. It’s amazing with words, but it doesn’t have feelings or thoughts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;GPT is like a magical parrot with a library for a brain, a super-talking computer that can make up stories, answer your questions, and play with words.&lt;/p&gt;

&lt;p&gt;So next time you chat with GPT, remember: it’s not magic… but it’s pretty close.&lt;/p&gt;

</description>
      <category>chaicode</category>
      <category>webdev</category>
      <category>genai</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
