I Built an IPL Quiz With AI — And It Knows More About Cricket Than I Do

Quick — Chennai Super Kings are 75/1 in 8.1 overs at Chepauk. Dwayne Smith just got out. Who walks in at number three?

Hold that thought.

The Idea

I wanted to build a cricket quiz. Not the boring "who won IPL 2016" kind — I wanted something that puts you inside the match. You see the scorecard. You see the fall of wickets. You see the bowling figures. And then you have to figure out what happened next.

The problem? Creating that kind of detailed scenario data by hand would take forever. One match alone has batting scorecards, bowling figures, fall of wickets, match context — we're talking dozens of data points per question.

So I did what any reasonable person would do in 2026. I asked AI to do it.

The Data: 16,000 Scenarios From One Prompt

Here's where it gets fun. Using ball-by-ball IPL data as the source, I used AI to generate match scenarios — real moments from real matches, frozen at a specific point, turned into questions.

The prompt engineering was the interesting part. I didn't just say "make me quiz questions." I had to think about:

  • What makes a good scenario? A wicket falls at a crucial moment. The chase is tight. A legend walks in under pressure.
  • What data should the player see? Full batting scorecard up to that point. Bowling figures. Fall of wickets. Enough to reason through the answer.
  • How do you grade difficulty? Easy means the answer is a superstar everyone knows. Expert means it's a tight finish where any of the four options could be right.

The result? 16,564 unique scenarios across five difficulty levels:

| Difficulty | Scenarios | What it tests | |-----------|-----------|---------------| | Easy | 5,815 | Superstar players — you know these names | | Medium | 3,708 | Well-known players, trickier situations | | Hard | 2,370 | Less obvious picks, need to read the scorecard | | Very Hard | 970 | Unexpected choices, deep IPL knowledge | | Expert | 611 | Ultra-close finishes, could go either way |

Each scenario comes with the full scorecard, bowling figures, and fall of wickets. The AI didn't just generate questions — it generated an entire cricket broadcast's worth of data for every single one.

What Would Legend Do?

Then I thought — what if instead of random matches, you play as a specific legend?

That became the second quiz: What Would Legend Do? Pick Dhoni, Rohit, or Virat, and you get scenarios from their actual matches. The question is always about what they did — but you're seeing the match situation through the scorecard, and you have to figure out the legend's move.

  • Dhoni: 1,299 scenarios — the finisher, the captain cool moments
  • Rohit: 1,087 scenarios — the hitman's big-game decisions
  • Virat: 704 scenarios — the chase master under pressure

Same detailed scorecards. Same bowling figures. But now it's personal — you're trying to think like your favorite player.

The UI: Making Data Feel Like a Match

Having 16,000 JSON objects is cool. Making them feel like cricket is the actual challenge.

The UI shows you a live-looking scorecard — team logos, color-coded by franchise, batting order with runs and balls faced, bowling figures, fall of wickets. It looks like you're watching the match on Cricbuzz and someone paused it at the crucial moment.

The difficulty selector uses IPL team colors. The stats dashboard tracks your accuracy per difficulty level. There's a "seen" tracker so you never get the same scenario twice (good luck running out of 5,815 easy questions).

Small details matter — the scorecard highlights the batter who just got out, the bowling figures show who's been expensive, the fall of wickets tells the story of the innings. All of this helps you reason through the answer instead of just guessing.

What I Learned

AI is ridiculously good at structured data generation. Give it a clear schema, real source data, and specific rules about what makes a good scenario — and it'll produce thousands of high-quality entries that would take a human team weeks.

Prompt engineering is basically product design. The hardest part wasn't the code or the UI. It was figuring out what makes a cricket scenario interesting. That's a product question, not a technical one. The AI just executes your taste.

The UI is what makes data come alive. 16,000 JSON objects sitting in a file are worthless. Put them behind a scorecard that looks like a real match, add team logos and colors, track stats — suddenly it's a game people actually want to play.

So, Who Walked In?

Remember that question from the top? Chennai Super Kings, 75/1 at Chepauk, 8.1 overs, Dwayne Smith out.

The answer is Suresh Raina. Of course it is. It's always Raina at three for CSK.

But you knew that — because you read the scorecard, saw it was 2015, knew the batting order, and figured it out. That's exactly what makes these quizzes fun. You're not memorizing trivia. You're reading the game.

Try the IPL Quiz → | Try What Would Legend Do →