How We Built a Self-Checking AI Agent for Sports Data
How RAG, a SQL agent and a reviewer agent turned plain-language questions into verified player stats and shareable chart reports
The challenge
Reap Analytics is a sports analytics company sitting on a large database of player performance data. The data was valuable, but getting answers out of it was slow. Coaches and analysts with simple questions had to ask someone technical to write a query, wait for the numbers, and then build a report by hand.
Putting an AI chat on top of the data sounds easy, but three things made it hard:
- Wrong numbers are worse than no numbers. If an AI confidently reports the wrong stat, a coach could make a bad decision based on it.
- Questions need two kinds of information. “Who improved most?” needs exact numbers from the database, but also context, such as what a metric means or what happened in a match.
- An answer in chat isn’t the end. Analysts needed something they could hand to a coach or stakeholder, not just a chat message.
What we built

A multi-agent system with a chat interface on top of Reap’s player data:
- Plain-language questions. Users ask about players, matches and trends in everyday language.
- Hybrid retrieval. Two agents work in parallel. A SQL agent pulls exact numbers from the stats database, while a RAG agent retrieves supporting context such as player profiles, match notes and metric definitions.
- Reviewer agent. A dedicated agent checks the combined result before anything is returned: do the numbers match the database, is the context relevant, and does it actually answer the question?
- Shareable chart reports. Approved results are rendered as charts from standard templates, saved to AWS S3, and shared through a link that can go straight to a coach.
Key design decisions
A reviewer before every answer. Rather than trusting the first answer an agent produces, a separate reviewer makes the final call. This is what keeps wrong numbers from reaching users.
SQL and RAG together, not either-or. SQL alone gives numbers without meaning, and RAG alone gives context without precision. Combining them lets the system answer the questions analysts actually ask.
Templates for consistent reports. Fixed chart templates mean every report looks professional and consistent, and the AI only has to fill in the data, not design the chart.
Results
- 90%+ accuracy in internal testing
- ~0.5 s average response time
- Reports in one step: from question to a shareable chart report, with no manual work
What we learned
Agents become trustworthy when they check each other. A system that retrieves, reviews and then answers is slower to build than a single chatbot, but it’s the difference between a demo and a tool people rely on.
Stack: LLMs, RAG, SQL agent, multi-agent review, AWS S3, Python
Want to let your team talk to your data? Book a call