From Hallucinations to Handicapping: How We Built TrackSmart AI 5th Generation With the Help of Google Gemini
- David Lowry

- Apr 3
- 4 min read

Horse racing is the ultimate data puzzle. It’s a chaotic, beautiful collision of mathematics, physics, biology, and human intent. For decades, handicappers have stared at the tiny print of Past Performances (PPs), trying to synthesize hundreds of data points into a single winning ticket. When the AI revolution arrived, we knew we wanted to build the ultimate digital handicapper. Thus, TrackSmart AI was born. But getting here wasn't a straight line. It was a brutal, fascinating journey of trial, error, and evolution. Today, we are proud to pull back the curtain on how we developed the 5th Generation of TrackSmart AI, the 40,000+-token prompts that drive it, and the underlying engine that makes it all possible: Google Gemini.
The Early Days: Hitting the "Page 2 Cliff"
If you tried to feed raw Past Performances into early AI models, you know exactly what happened: absolute chaos. Early large language models (LLMs) were notoriously bad at reading dense, tabular data. We would feed an AI a race program, and it would do fine on the #1 horse. By the time it got to the #5 horse on Page 2, it would suffer from "context collapse." It would start hallucinating wildly—inventing speed figures, swapping jockey names, and making up races that never happened. We were trying to teach a machine to read the Matrix, but its memory kept wiping clean every 30 seconds. To handicap a race, an AI doesn't just need to read the data; it needs to hold the entire field in its memory simultaneously to compare pace dynamics, class drops, and form cycles. We needed a bigger, smarter engine.
The Game Changer: Enter Google Gemini
We have to give a massive shoutout where it is due. The leap from a struggling prototype to TrackSmart AI 5th generation happened because of Google Gemini. When Gemini unlocked its massive context window and advanced reasoning capabilities, the chains came off. Suddenly, the AI wasn’t just reading the data; it was understanding it. We immediately pushed the limits. Today, the TrackSmart AI engine operates on a complex system instruction prompt that is over 40,000 tokens long. This isn't just a simple "pick the winner" prompt. It is a codified encyclopedia of advanced handicapping theory.
Because of Gemini’s unparalleled ability to process massive amounts of data without losing the plot, we can now feed the AI hundreds and hundreds of data points per horse:
Granular fractional pace times (E1, E2, Late Pace).
Detailed form cycles, layoff gaps, and workout patterns.
Track biases, post-position physics, and pedigree stats.
Trainer micro-stats and jockey-switching intent.
Gemini ingests it all, organizes it, and applies our 40K-token rulebook with flawless precision.
Reverse Engineering the Engine: The 1,000+ Revisions
So, how did we build that 40,000-token brain? By losing. The evolution of TrackSmart AI into its 5th Generation was driven by a relentless process of reverse-engineering missed winners. After a day of racing, we would look at the horses the AI missed—specifically the 20/1 or 30/1 long shots that blew up the tote board.
We would ask: Why did the AI miss this horse?
Was it a 3-year-old stretching out to a route for the first time? We wrote the "Blue Sky Stretch-Out" protocol.
Was it a front-runner who looked slow on paper, but caught a speed-biased track on the rail? We built the "Track Bias Circuit Breaker."
Did the horse have a terrible last-out speed figure, but the trainer was a 30% winner off a layoff? We encoded the "Hyper-Elite Trainer Mandate."
Every missed winner was a lesson. We adjusted the algorithm, tweaked the TPN (TrackSmart Power Number) weighting, and ran it again. We did this over 1,000 times. Through this massive iterative process, we transformed TrackSmart AI from a machine that relied on raw, exposed speed figures into a forensic tool that hunts for hidden potential, pace meltdowns, and market inefficiencies.
The Result: Supercomputer Speed
What used to take a seasoned human handicapper hours of agonizing over the past performances is now done in the blink of an eye. Thanks to the optimization of our 5th-generation prompts and the sheer processing power of Google Gemini, TrackSmart AI can now ingest, analyze, cross-reference, and generate a highly detailed, deeply reasoned handicapping report for an entire 12-race card in just 3 to 4 minutes.
It doesn't just spit out numbers. It tells you why a pace meltdown will happen, why an 80/1 shot is a live exotic threat, and why a heavy favorite is mathematically vulnerable.
A Thank You to the Innovators
To our users and readers, thank you for coming on this ride with us as we continue to push the boundaries of what is possible in racing analytics. And to the team at Google and the developers behind Gemini: Thank you. You built the engine that allowed us to build the ultimate handicapping machine. You gave us the context window to dream bigger, and the processing power to turn 1,000 revisions into a reality.
Welcome to the future of handicapping. Welcome to TrackSmart AI 5.0.









Comments