Skip to main content

Command Palette

Search for a command to run...

AI Trains Like an IPL Player: Miss. Adjust. Master.

How machines progress from ‘out for 0’ to ‘scoring centuries’ in the world of GenAI?

Published
6 min read

Imagine an IPL cricket player stepping onto the field for the first time — nerves high, eyes on the ball, but often getting out for zero. It’s not just talent, but relentless practice, learning from failures, and smart adjustments that transform a rookie into a star who scores centuries.

Generative AI (GenAI) works in a very similar way.

1. What is GPT? (Featuring: Virat Kohli)

Imagine you're watching Virat Kohli walk into the IPL stadium. The crowd’s roaring, the lights are blazing — and just like that, enter GPT — not a cricketer, but a Generative Pre-trained Transformer.

So, what is GPT?

Let’s break it down — IPL style:

TermMeaningIPL Analogy
GenerativeIt generates text.Like Kohli hitting a cover drive out of nowhere — GPT produces words creatively.
Pre-trainedIt’s already trained on a massive dataset before you use it.Like Kohli hitting the nets for years before the match, GPT has already practised on billions of sentences.
TransformerA special architecture that enables it to understand context exceptionally well.Like Kohli reading the bowler’s strategy and adjusting on the spot — Transformers "read" the situation (your words) intelligently.

So in simple terms:

GPT is like the Virat Kohli of language models — prepped, trained, and ready to play shots (sentences) with elegance and power.
It reads the ball (your prompt) and decides which shot (response) to play.

Just like Kohli doesn’t need to learn cricket from scratch every match, GPT doesn’t start from zero. It’s trained beforehand and fine-tuned with every interaction.

Here’s the funny truth:

At their core, LLMs (Large Language Models) are just next-word predictors
like how Virat Kohli predicts the next ball based on the bowler's style.

2. What Are Transformers?

(The Captain Cool Strategy Behind GPT's Batting Order)

So far, we know GPT is a “next-word predictor,” trained like Kohli in the nets.
But here’s the real brain behind the operation:

Transformers — the Dhoni-style strategic captain that manages the entire team (aka your sentence) at once.

The image above shows the transformer architecture, which is the brain behind LLM models. This concept was first introduced by Google in 2017, and there is a comprehensive research paper on this topic titled "Attention is All You Need."

Transformers read all the words at once and figure out how each word relates to every other — in parallel.

That’s like Kohli analyzing the entire field and planning shots based on every fielder’s position, not just the next ball.

3. Tokenization – The Toss Before the Match Begins!

Before Kohli plays the match, the umpire needs to break the game into overs.
Similarly, before GPT can process your input, it first breaks down the text into smaller pieces. This process is called Tokenization.


What is Tokenization?

Tokenization is how we split up text into smaller units, like words or even parts of words, so the model can understand and process them.
These units are called tokens — the smallest meaningful bits of the sentence.

Why Not Use Just Words?

Good question! If GPT had to remember every word in every language, it would explode! 💥

Instead, it memorises common subword patterns, so:

  • It can understand rare or new words (e.g. “chatgptified”)

  • It reduces vocabulary size

It can handle misspellings or variations

4. What Are Vector Embeddings?

“Kohli doesn’t just see the ball. He feels the bowler’s vibe.”


This is what vector embeddings look like in high-dimensional space.

🧠 Simple Definition:

A vector embedding is just a list of numbers that represents the meaning of a word, sentence, or even an entire paragraph — in a way a computer can understand.

Words or sentences that mean similar things will have similar vectors (i.e., they'll be “close” in this high-dimensional space).


🏏 Cricket Analogy: Kohli's Game Sense

Let’s say you're watching a cricket match.

You see Kohli walk onto the pitch. He isn’t just looking at whether the bowler is fast or spin — he’s reading:

  • The field placements

  • The bowler’s body language

  • The pitch condition

  • The match situation

All of this info gets embedded into Kohli’s brain as a “mental vector” to decide:
➡️ Should he defend, drive, or hit a six?

Likewise, GPT turns text into vectors — mathematical versions of “game sense.”


📦 Real-Life Example

Let’s say we have three phrases:

  • "Kohli hits a six"

  • "Rohit smashes a boundary"

  • "Bumrah bowls a yorker"

A human knows the first two are similar (both about batting), and the third is different (about bowling).

A model doesn’t know cricket, but if it embeds these phrases into vectors, it may get:

textCopyEdit"Kohli hits a six"        → [0.98, 0.32, 0.55, ...]
"Rohit smashes a boundary" → [0.96, 0.31, 0.53, ...]
"Bumrah bowls a yorker"    → [0.12, 0.88, 0.21, ...]

You’ll notice the first two vectors are closer, just like the meanings.

Once every word, phrase, or sentence is turned into a vector embedding (just a list of numbers), the model needs to compare them to understand similarity or relevance.

And for that, it uses math — just like bowlers use strategy.

The model doesn’t guess blindly — it uses vector similarity to make an informed prediction.


5. Backpropagation: Like a Cricket Net Practice Session

Just like Virat Kohli in cricket nets, when an AI model makes a mistake, it doesn’t give up—it learns and improves. Imagine Kohli plays a bad shot and gets bowled out during practice. Instead of walking away, he carefully analyzes what went wrong — maybe his footwork was off, or he misjudged the ball’s line. He then adjusts his stance, timing, and bat angle before trying again. Similarly, an AI model makes a prediction, compares it with the correct answer (the loss), and calculates how big the error was. Through a process called backpropagation, the model works backwards through its “layers” to find which decisions caused the mistake, then slightly tweaks those decisions (weights) to improve. This cycle repeats, just like Kohli practicing shot after shot, until the model gets its predictions right and “scores centuries” of accuracy and creativity.

6. Inference: Game Day for AI

After all the training, adjustments, and practice, it’s finally time for the AI model to step onto the field and perform—this is called inference. Just like Virat Kohli uses his mastered skills during an actual cricket match to make smart shots, the AI model uses what it has learned to make predictions or generate content in real time.

Every time you chat with me, ask a question, or get a response—that’s inference happening live. The model doesn’t learn or change during these interactions; it simply applies its knowledge to give you the best answer it can. So, all our interactions right now? They’re perfect examples of AI inference in action.


7. Wrapping Up — But the Game’s Just Beginning!

Just like Virat Kohli’s journey from rookie to cricket legend is filled with stories of grit, learning, and glory, the world of Generative AI is full of exciting discoveries and breakthroughs. We’ve seen how AI trains, learns from mistakes, and finally shines during inference — but that’s only the start!

In upcoming blogs, we’ll dive deeper into how GenAI creates art, writes stories, codes software, and even helps solve real-world problems. You’ll get insider looks into the tech behind the scenes, plus tips on how you can start playing your own AI game.

So stay tuned, keep curious, and get ready to hit your own AI centuries!