BooleanIQ / Learn

AI from the ground up / Level 100 / LESSON 107

The one idea behind ChatGPT: predict the next word

A language model continues text; tokens and the context window in one line each

KnowCore path

About 10 min read · Hindi and English

The video is not out yet. You can read this lesson now.

Your keyboard's next word

Above your keyboard, tap the middle suggested word ten times. Something like a sentence appears. A chatbot, the AI you talk to by typing, does this too: it guesses the next word. Guessing, and still so many right answers? So where does a chatbot's answer really come from?

हिन्दी में पढ़ें

कीबोर्ड के ऊपर, बीच वाला सुझाव दस बार दबाइए। वाक्य जैसा कुछ बन जाता है। चैटबॉट, यानी लिखकर बात करने वाला ए आई, भी यही करता है: अगले शब्द का अंदाज़ा। अंदाज़े से इतने सही जवाब? तो चैटबॉट का जवाब, असल में आता कहाँ से है?

Know all this? Stay: how many more pieces Hindi gets cut into, too. By the end you will be able to say where a chatbot's answer comes from, and why it seems so smart.

हिन्दी में पढ़ें

ये पता है? रुकिए: हिंदी कितने ज़्यादा टुकड़ों में कटती है, वो भी। अंत तक आप बता पाएँगे: जवाब कहाँ से आता है, और समझदार क्यों लगता है।

Does a chatbot look up its answers?

I am BSK, and I build products with AI. Where every fact comes from will be on screen. Many people believe there is a huge book of answers behind it. A question comes in, it finds the answer and reads it out. It sounds right. Where else would so many right answers come from?

हिन्दी में पढ़ें

मैं बी एस के, ए आई से प्रोडक्ट्स बनाता हूँ। हर बात कहाँ से ली, स्क्रीन पे दिखेगा। बहुत लोग मानते हैं: इसके पीछे जवाबों की एक बहुत बड़ी किताब है। सवाल आया, जवाब ढूँढा, पढ़ दिया। सुनने में ठीक लगता है। इतने सारे सही जवाब, और कहाँ से आएँगे?

So, a hint. Ask the same question twice. An answer read from a book should come out the same every time. But a company that makes a chatbot writes that one question can get different answers at different times. And that company says its machine keeps no copies of the things it learned from.

हिन्दी में पढ़ें

तो एक इशारा। एक ही सवाल दो बार पूछिए। किताब से पढ़ा जवाब, तो हर बार वही आना चाहिए। पर चैटबॉट बनाने वाली एक कंपनी खुद लिखती है: एक ही सवाल पे, अलग-अलग बार, अलग जवाब आ सकते हैं। और उस कंपनी का कहना है, कि उसकी मशीन, जिन चीज़ों से सीखी, उनकी कॉपी अपने अंदर नहीं रखती।

Now you will say: but my chatbot shows links too. Yes, at least one big chatbot now searches the internet as well. Then the pages it finds are put in front of it. But the words of the answer are still written by guessing. So, no book. But how much bigger than your keyboard is a chatbot? That number comes in a few minutes.

हिन्दी में पढ़ें

अब आप कहेंगे: मेरा चैटबॉट तो लिंक भी दिखाता है। हाँ, कम से कम एक बड़ा चैटबॉट, अब इंटरनेट पे खोज भी करता है। तब खोज के पन्ने उसके सामने रखे जाते हैं। पर जवाब के शब्द, फिर भी अंदाज़े से ही लिखे जाते हैं। तो कोई किताब नहीं। पर चैटबॉट, आपके कीबोर्ड से कितना बड़ा है? वो नंबर, कुछ मिनट में।

Three parts: how the guess is made, the pieces of words and the working desk, and why it seems to know things.

हिन्दी में पढ़ें

तीन हिस्से: अंदाज़ा कैसे लगता है, शब्दों के टुकड़े और काम की मेज़, और ये जानकार क्यों लगता है।

What a language model is

Two things first. One: a machine learns from examples. At every mistake it turns its inner numbers a little, like the knobs on a DJ's mixing board. Two: AI can make a new thing that is like what it learned. That is called generative AI. Each has its own episode: how a machine learns from examples, and how AI makes something new. Not seen them? You can still follow.

हिन्दी में पढ़ें

पहले दो बातें। एक: मशीन उदाहरणों से सीखती है। हर गलती पे, अंदर के नंबर थोड़े घुमाती है, जैसे डी जे के मिक्सिंग बोर्ड के नॉब, यानी घुंडियाँ। दो: ए आई, जो सीखा, उसी जैसी एक नई चीज़ बना सकता है। इसे कहते हैं जनरेटिव ए आई। दोनों के अपने एपिसोड हैं: मशीन उदाहरणों से कैसे सीखती है, और ए आई नया कैसे बनाता है। न देखे हों, तो भी चलेगा।

Now back to your keyboard. In a strip above it, a few words are suggested. A company that makes a keyboard wrote in 2018 that the middle word was the likeliest one. Whether every keyboard today does the same, I could not confirm. Where does that guess come from? It learned what people usually type after the words so far.

हिन्दी में पढ़ें

अब वापस आपके कीबोर्ड पे। ऊपर एक पट्टी में, कुछ शब्द सुझाए होते हैं। कीबोर्ड बनाने वाली एक कंपनी ने, दो हज़ार अठारह में लिखा: बीच वाला शब्द, सबसे ज़्यादा चांस वाला था। आज के हर कीबोर्ड पे भी, ये मैं पक्का नहीं कर पाया। ये अंदाज़ा आया कहाँ से? उसने सीखा, कि पिछले शब्दों के बाद, लोग अक्सर क्या लिखते हैं।

In other words, a machine that reads the text so far and guesses what comes next. A machine like that is called a language model: a trained machine that guesses the next bit of language. A company that makes phones used exactly that phrase for its own keyboard: language model.

हिन्दी में पढ़ें

मतलब, एक ऐसी मशीन, जो अब तक का लिखा पढ़कर, आगे क्या आएगा उसका अंदाज़ा लगाए। ऐसी मशीन को कहते हैं लैंग्वेज मॉडल। यानी भाषा का अगला हिस्सा भाँपने वाली, सीखी हुई मशीन। एक फ़ोन बनाने वाली कंपनी ने, अपने कीबोर्ड के लिए, ठीक यही शब्द लिखा: लैंग्वेज मॉडल।

Put precisely, it gives every possible next word a number: the percentage chance that this one comes next. So your keyboard is a small language model. Is a chatbot's answer made the same way? Watch it on one sentence.

हिन्दी में पढ़ें

और ठीक-ठीक कहें, तो ये हर मुमकिन अगले शब्द को एक नंबर देता है: कितने परसेंट चांस है कि यही आए। तो आपका कीबोर्ड, एक छोटा लैंग्वेज मॉडल है। क्या चैटबॉट का जवाब भी ऐसे ही बनता है? एक वाक्य पे देखिए।

One word at a time

This sentence is that chatbot company's own example: instead of turning left, she turned... At the start of training, the machine puts almost anything here. A shot in the dark. After learning from heaps of sentences, the knobs have turned. Now the strip shows: right, around, back.

हिन्दी में पढ़ें

ये वाक्य, चैटबॉट बनाने वाली उसी कंपनी की अपनी मिसाल है: बाएँ मुड़ने की बजाय, वो... सीखने की शुरुआत में, मशीन यहाँ लगभग कुछ भी लगा देती है। तुक्का। ढेरों वाक्यों से सीखने के बाद, नॉब घूम चुके हैं। अब पट्टी में आते हैं: दाएँ, पलटकर, वापस।

Now you think. Will the machine always write the likeliest word, fixed like a book? Or sometimes another one? Sometimes another. By the company's account, there is a bit of chance in how it answers. That is why one question can get different answers. Say it writes: right. That word joins the sentence, and the whole sentence goes back into the machine for the next guess.

हिन्दी में पढ़ें

अब आप सोचिए। मशीन हर बार, सबसे ज़्यादा चांस वाला ही शब्द लिखेगी, किताब की तरह पक्का? या कभी-कभी कोई दूसरा भी? कभी-कभी दूसरा भी। कंपनी के मुताबिक, इसके जवाब में थोड़ा किस्मत का खेल रहता है। इसीलिए एक सवाल पे, अलग-अलग जवाब आ सकते हैं। मान लीजिए उसने लिखा: दाएँ। अब ये शब्द जुड़कर, पूरा वाक्य फिर से मशीन में जाता है, अगले अंदाज़े के लिए।

Guess, add, guess again. One word at a time, until the answer is done. That is just what your ten taps were. You added a word, the strip guessed again. In a chatbot, the machine does the tapping itself. But is language really that guessable? In 1951 a scientist named Shannon measured it with a game.

हिन्दी में पढ़ें

अंदाज़ा, जोड़ना, फिर अंदाज़ा। एक-एक शब्द, जब तक जवाब पूरा न हो जाए। यही तो आपके दस टैप थे। आप शब्द जोड़ते, पट्टी फिर अंदाज़ा लगाती। चैटबॉट में ये टैप, मशीन खुद करती है। पर क्या भाषा सच में इतनी अंदाज़े लायक है? उन्नीस सौ इक्यावन में, शैनन नाम के एक वैज्ञानिक ने, इसे एक खेल से नापा।

A person was shown a passage one letter at a time, and each time had to guess the next letter. Not the word, the letter. In one printed example: about seventy percent of the letters, right on the very first try. Your keyboard game is like that game. Only now a machine does the guessing, and of words, not letters.

हिन्दी में पढ़ें

एक इंसान को एक लेख, अक्षर-अक्षर करके दिखाया गया। हर बार उसे अगला अक्षर बताना था। शब्द नहीं, अक्षर। छपी हुई एक मिसाल में: करीब सत्तर परसेंट अक्षर, पहली ही बार में सही। आपके कीबोर्ड का खेल, उसी खेल जैसा है। बस अब अंदाज़ा मशीन लगाती है, और अक्षर का नहीं, शब्द का।

How much bigger than your keyboard

So, that number. How much bigger is a chatbot's machine than your keyboard's? That keyboard model from the research had about one point four million knobs. Small enough to sit easily on a phone. What do you think: how many knobs did a big language model from 2020 have?

हिन्दी में पढ़ें

तो अब वो नंबर। चैटबॉट वाली मशीन, आपके कीबोर्ड वाली मशीन से, कितनी बड़ी है? उस रिसर्च वाले कीबोर्ड मॉडल में, करीब चौदह लाख नॉब थे। इतना छोटा, कि फ़ोन में आराम से समा जाए। आपको क्या लगता है, दो हज़ार बीस के एक बड़े लैंग्वेज मॉडल में, कितने नॉब थे?

About one hundred and seventy five billion. That is about a hundred and twenty five thousand times the knobs of that keyboard model. The same guess, on a machine that much bigger. And the reading? Going by one 2024 model's figure: one word a second, nonstop, would take about three hundred and fifty thousand years.

हिन्दी में पढ़ें

करीब पौने दो लाख करोड़। यानी उस कीबोर्ड मॉडल से, करीब सवा लाख गुना ज़्यादा नॉब। अंदाज़ा वही, मशीन सवा लाख गुना बड़ी। और पढ़ाई? दो हज़ार चौबीस के एक मॉडल के आँकड़े से: हर सेकंड एक शब्द पढ़ें, बिना रुके, तो करीब साढ़े तीन लाख साल।

But it is not the whole internet. For example, the makers of that 2020 model filtered the pile they gathered from the web down to a small part. So the guess is the same as your keyboard's. The difference? Far more knobs, far more reading. And there is one more difference, near the end.

हिन्दी में पढ़ें

पर ये पूरा इंटरनेट नहीं होता। मिसाल के लिए, दो हज़ार बीस वाले मॉडल के बनाने वालों ने, वेब से जुटाए ढेर में से, एक छोटा हिस्सा ही छाँटकर रखा। तो अंदाज़ा वही, जो आपके कीबोर्ड का। फ़र्क़? नॉब कहीं ज़्यादा, पढ़ाई कहीं ज़्यादा। और एक फ़र्क़ और है, वो आख़िर में।

What tokens are, and why Hindi needs more

Now a correction. A chatbot's answer is not, in fact, always built from whole words. It cuts the text into small pieces. One piece is a whole word, another part of a word, another just a mark, like a comma. Think of them as tiles, like tiles laid in a row on a floor. Each tile carries one piece.

हिन्दी में पढ़ें

अब एक सुधार। चैटबॉट का जवाब, असल में हमेशा पूरे शब्दों से नहीं बनता। ये लिखे हुए को छोटे टुकड़ों में काटती है। कोई टुकड़ा पूरा शब्द, कोई आधा शब्द, कोई बस एक निशान, जैसे कॉमा। इन्हें टाइलों की तरह सोचिए, जैसे फ़र्श पे एक कतार में बिछी टाइलें। हर टाइल पे, एक टुकड़ा।

For example, the English word unwatched, meaning not yet seen. It can become three tiles. These pieces are called tokens. What the machine really guesses is not the next word but the next token. For English, a rough rule: a hundred tokens is about seventy five words.

हिन्दी में पढ़ें

जैसे अंग्रेज़ी का एक शब्द, अनवॉच्ड, यानी जो देखा न गया हो। ये तीन टाइलें बन सकता है। इन टुकड़ों को कहते हैं टोकन। मशीन असल में, अगले शब्द का नहीं, अगले टोकन का अंदाज़ा लगाती है। अंग्रेज़ी में मोटा हिसाब: सौ टोकन, करीब पचहत्तर शब्द।

And in Hindi? What do you think: the same number of pieces, or more? One short greeting, cut the older way, took more than three times as many tiles in Hindi as in English. The newer way shrank the gap a lot. Even so, in that same example, Hindi still took more pieces.

हिन्दी में पढ़ें

और हिंदी में? आपको क्या लगता है, उतने ही टुकड़े, या ज़्यादा? एक ही छोटा सा नमस्ते वाला संदेश, पुराने तरीके से कटा, तो हिंदी में, अंग्रेज़ी से तीन गुना से भी ज़्यादा टाइलें बनीं। नए तरीके में ये फ़र्क़ काफ़ी घटा है। फिर भी उसी मिसाल में, हिंदी के टुकड़े ज़्यादा ही रहे।

And why are tiles worth counting? Because the machine has a desk, and only so many tiles fit on it.

हिन्दी में पढ़ें

और टाइलें गिनने लायक क्यों हैं? क्योंकि मशीन की एक मेज़ होती है, जिस पे सीमित टाइलें ही आती हैं।

What the context window is

Picture a working desk. Whatever is on the desk is all the machine can look at while it writes. On the desk are your question, the conversation so far, and its own answer too, growing as it writes. Why does that matter? In that sentence, the guess right came from instead of turning left, written further back.

हिन्दी में पढ़ें

इसे काम की एक मेज़ सोचिए। जो कुछ मेज़ पे है, लिखते वक़्त मशीन बस उसी को देख सकती है। मेज़ पे आपका सवाल है, अब तक की बातचीत है, और उसका अपना जवाब भी, जो लिखते-लिखते बढ़ रहा है। ये क्यों ज़रूरी है? उस वाक्य में, दाएँ का अंदाज़ा, पीछे लिखे, बाएँ मुड़ने की बजाय, से आया था।

Whatever is off the desk, the machine simply cannot see. The next guess is made without it. How many tiles fit on the desk is called the context window. That same 2020 model had a desk of only about two thousand tokens.

हिन्दी में पढ़ें

जो मेज़ से हट गया, वो मशीन को दिखता ही नहीं। अगला अंदाज़ा, उसके बिना लगता है। मेज़ पे कितनी टाइलें आ सकती हैं, उसे कहते हैं कॉन्टेक्स्ट विंडो। दो हज़ार बीस वाले उसी मॉडल की मेज़ पे, करीब दो हज़ार टोकन ही आते थे।

Today many of one company's models have a desk of a million tokens or more. By its count, a million is about eight English novels. And Hindi takes more tiles. So the same desk holds less written Hindi. Pause for a moment. If a conversation gets very long, what can happen to its beginning? Answer it in your head.

हिन्दी में पढ़ें

आज एक कंपनी के कई मॉडल्स की मेज़ पे, दस लाख या उससे ज़्यादा टोकन आते हैं। उसके हिसाब से, दस लाख यानी करीब आठ अंग्रेज़ी नॉवेल। और हिंदी को ज़्यादा टाइलें लगती हैं। तो उसी मेज़ पे, हिंदी का लिखा कम समाता है। एक पल रुकिए। बातचीत बहुत लंबी हो जाए, तो उसकी शुरुआत का क्या हो सकता है? मन में जवाब दीजिए।

Depending on the app, it can fall off the desk. Then what you said at the start is out of the machine's sight.

हिन्दी में पढ़ें

ऐप के हिसाब से, वो मेज़ से हट सकती है। फिर आपकी शुरू की बात, मशीन को दिखती ही नहीं।

Why prediction looks like knowledge

But if all it does is guess the next token, then how does it seem to know so much? Fill in this blank: the capital of India is... New Delhi. But to guess that right, the machine must have picked up that information somewhere.

हिन्दी में पढ़ें

पर अगर ये बस अगले टोकन का अंदाज़ा लगाता है, तो फिर इतना जानकार कैसे लगता है? ये खाली जगह भरिए: भारत की राजधानी है... नई दिल्ली। पर ये अंदाज़ा सही लगाने के लिए, मशीन ने ये जानकारी कहीं से पकड़ी होगी।

A 2019 study found just this: models that fill in blanks can hold this kind of information inside them. And grammar too. Models like these, that fill in a hidden word, picked up much of how sentences are built without anyone teaching them. Two leading professors of language write it too: just by learning to guess upcoming words, these models learn a great deal about language.

हिन्दी में पढ़ें

दो हज़ार उन्नीस की एक रिसर्च में यही दिखा: खाली जगह भरने वाले मॉडल्स के अंदर, ऐसी जानकारी बैठी हो सकती है। और ग्रामर भी। खाली शब्द भरने वाले ऐसे ही मॉडल्स ने, बिना किसी के सिखाए, वाक्य की बनावट का बड़ा हिस्सा पकड़ लिया। भाषा पढ़ाने वाले दो बड़े प्रोफ़ेसर भी लिखते हैं: सिर्फ़ आगे के शब्द भाँपना सीखकर, ये मॉडल भाषा के बारे में बहुत कुछ सीख जाते हैं।

And one twist. Does this machine really think only one word ahead? One AI company looked inside its own model. It gave the first line of a rhyme and had the model write a rhyming second line. And found that before writing the second line, the model had already settled on the rhyming word for its end. Then it wrote the line to reach it.

हिन्दी में पढ़ें

और एक मोड़। क्या ये मशीन, सच में बस एक शब्द आगे की सोचती है? एक ए आई कंपनी ने, अपने ही मॉडल के अंदर झाँककर देखा। तुकबंदी की पहली लाइन देकर, तुक मिलाती दूसरी लाइन लिखवाई। और पाया: दूसरी लाइन लिखने से पहले ही, मॉडल ने आख़िर वाला तुक का शब्द सोच लिया था। फिर लाइन उसी तक पहुँचाई।

The company itself says this is only a partial glimpse of what goes on inside. But it gives a hint: it writes one word at a time, and its thinking may reach further ahead. So while learning to guess well, the machine picks up grammar and information along the way. That is why its guessing looks like knowledge.

हिन्दी में पढ़ें

कंपनी खुद कहती है, ये अंदर की बस अधूरी झलक है। पर इशारा मिलता है: लिखता एक-एक शब्द है, सोच शायद आगे तक की। यानी अच्छा अंदाज़ा लगाते-लगाते, मशीन रास्ते में ग्रामर और जानकारी उठा लेती है। इसीलिए अंदाज़ा, ज्ञान जैसा दिखता है।

Is a chatbot just autocomplete?

Now an honest point. People say it is just autocomplete, the keyboard's kind of guessing. As for how it works, yes, that is right. A big tech company's own course calls it autocomplete too. But calling it just autocomplete makes the result sound smaller than it is. You just saw how much it picks up while learning to guess.

हिन्दी में पढ़ें

अब एक ईमानदार बात। लोग कहते हैं, ये तो बस ऑटोकम्प्लीट है, यानी कीबोर्ड वाला अंदाज़ा। तरीके की बात करें, तो हाँ, ये सही है। एक बड़ी टेक कंपनी का अपना कोर्स भी, इसे ऑटोकम्प्लीट ही कहता है। पर बस ऑटोकम्प्लीट कहना, नतीजे को छोटा करके बताना है। आपने अभी देखा, अंदाज़ा लगाते-लगाते ये क्या-क्या उठा लेता है।

And researchers argue about this. Some say it is a parrot stitching together pieces it has seen, without any grasp of meaning. Other researchers claim it can do more than that. That company's course admits researchers are split on such claims. And remember, one more difference from your keyboard was still left?

हिन्दी में पढ़ें

और रिसर्चर्स में इस पे बहस है। कुछ कहते हैं, ये देखे हुए टुकड़े जोड़ने वाला तोता है, मतलब समझे बिना। दूसरे रिसर्चर्स ऐसे दावे करते हैं, कि ये उससे ज़्यादा कर लेता है। उसी कंपनी का कोर्स भी मानता है, कि इन दावों पे रिसर्चर्स बँटे हुए हैं। और याद है, कीबोर्ड से एक फ़र्क़ और बाकी था?

One company writes of its chatbot that after learning the next word, it was separately trained to talk like a helpful assistant. And one more thing: exactly how much today's biggest chatbots read, I found no firm figure for. So the method is autocomplete. But calling the result only autocomplete falls short.

हिन्दी में पढ़ें

एक कंपनी अपने चैटबॉट के बारे में लिखती है: अगला शब्द सीखने के बाद, उसे अलग से, मददगार की तरह बात करना सिखाया गया। और एक बात: आज के सबसे बड़े चैटबॉट्स ने ठीक कितना पढ़ा, इसका पक्का आँकड़ा मुझे नहीं मिला। तो तरीका ऑटोकम्प्लीट का है। पर नतीजे को सिर्फ़ ऑटोकम्प्लीट कहना, कम पड़ता है।

Try it: the keyboard game

Now, a keyboard game. Open any message and type just a word or two. Then tap the middle word in the strip above, ten times. Watch the sentence grow. No suggestions? Turn on next-word suggestions in your keyboard's settings. Not every language gets them.

हिन्दी में पढ़ें

अब कीबोर्ड का एक खेल। कोई भी मैसेज खोलिए, और बस एक-दो शब्द लिखिए। फिर ऊपर वाली पट्टी में, बीच वाला शब्द, दस बार दबाइए। वाक्य को बढ़ता देखिए। सुझाव न दिखें, तो कीबोर्ड की सेटिंग में, अगले शब्द वाले सुझाव चालू कीजिए। हर भाषा में ये आते भी नहीं।

One caution: many keyboards learn your typing habits, so the sentence may hold personal words. Read it before you share it. Then send those same first words to a chatbot, with nothing else added. Watch: does it carry on your sentence? Or does it start talking to you?

हिन्दी में पढ़ें

ध्यान रहे: कई कीबोर्ड आपकी लिखने की आदतें सीखते हैं, तो वाक्य में निजी शब्द आ सकते हैं। भेजने से पहले पढ़ लीजिए। फिर वही शुरू के एक-दो शब्द, बिना कुछ और लिखे, किसी चैटबॉट को भेजिए। देखिए: वो आपका वाक्य आगे बढ़ाता है? या आपसे बात करने लगता है?

If it starts answering you, you know why: it was separately trained to talk like an assistant.

हिन्दी में पढ़ें

अगर वो जवाब देने लगे, तो वजह आप जानते हैं: उसे मददगार की तरह बात करना, अलग से सिखाया गया है।

Where a chatbot's answer comes from

So in your ten taps, the keyboard did what a chatbot does: guess, add, guess again. So where does a chatbot's answer really come from? Not from a book of answers. From what it learned, and what is on its desk, it builds the answer itself, guessing one token at a time.

हिन्दी में पढ़ें

तो आपके दस टैप में, कीबोर्ड ने वही किया, जो चैटबॉट करता है: अंदाज़ा, जोड़ना, फिर अंदाज़ा। तो चैटबॉट का जवाब, असल में आता कहाँ से है? किसी जवाबों की किताब से नहीं। जो सीखा, और जो मेज़ पे है, उसे देखकर, वो जवाब खुद बनाता है, एक-एक टोकन का अंदाज़ा लगाकर।

So what is a token? In five words of your own, write it in the comments. The next question: how do you write to a chatbot so the answer is truly useful, not dull? The next episode is on that question. For the whole course in order, subscribe to BooleanIQ.

हिन्दी में पढ़ें

टोकन आख़िर किसे कहते हैं? अपने ही पाँच शब्दों में, नीचे कमेंट में लिखिए। अगला सवाल: चैटबॉट को कैसे लिखें, कि जवाब फीका नहीं, सच में काम का आए? अगला एपिसोड इसी सवाल पे है। पूरा कोर्स क्रम से चाहिए, तो बूलियन आईक्यू को सब्सक्राइब कीजिए।

Ideas to keep

Language model
A machine like that is called a language model: a trained machine that guesses the next bit of language.
Token
It cuts the text into small pieces. One piece is a whole word, another part of a word, another just a mark, like a comma. Think of them as tiles, like tiles laid in a row on a floor. Each tile carries one piece. For example, the English word unwatched, meaning not yet seen. It can become three tiles. These pieces are called tokens. What the machine really guesses is not the next word but the next token.

THE WORKED CASE

Follow the example

This sentence is that chatbot company's own example: instead of turning left, she turned... At the start of training, the machine puts almost anything here. A shot in the dark. After learning from heaps of sentences, the knobs have turned. Now the strip shows: right, around, back. Now you think. Will the machine always write the likeliest word, fixed like a book? Or sometimes another one? Sometimes another. By the company's account, there is a bit of chance in how it answers. That is why one question can get different answers. Say it writes: right. That word joins the sentence, and the whole sentence goes back into the machine for the next guess. Guess, add, guess again. One word at a time, until the answer is done. That is just what your ten taps were. You added a word, the strip guessed again. In a chatbot, the machine does the tapping itself.

Check your understanding

"Instead of turning left, she turned ___". Does a chatbot always fill this with the same word?
Answer and why

No: it can pick another likely word, so answers can differ

A language model gives each possible next word a chance and then picks one; its maker says there is "an inherent element of randomness", so "the same question may yield different answers". The candidates in the maker's own example are right, around and back. It does not look answers up: the maker says its models "do not store or retain copies" of their training data. (OpenAI Help Center, "How ChatGPT and our foundation models are developed", read 24 Nov 2026.)

A chat gets very long. Why might the chatbot lose track of what you said at the start?
Answer and why

Its desk, the context window, holds only so many tokens

A model can only look at the text inside its context window, measured in tokens, and its own growing answer takes room there too. Windows have grown from about 2,000 tokens in a 2020 model to a million or more today, but they are still a limit; how each app handles a full window differs. (Google Machine Learning Glossary, "context window"; Anthropic, "Context windows"; Brown et al., 2020.)

TRY IT YOURSELF

Put the idea to work

Now, a keyboard game. Open any message and type just a word or two. Then tap the middle word in the strip above, ten times. Watch the sentence grow. No suggestions? Turn on next-word suggestions in your keyboard's settings. Not every language gets them. One caution: many keyboards learn your typing habits, so the sentence may hold personal words. Read it before you share it. Then send those same first words to a chatbot, with nothing else added. Watch: does it carry on your sentence? Or does it start talking to you? If it starts answering you, you know why: it was separately trained to talk like an assistant.

Go to the source

Kept in this browser only.