Text-to-SQL sports chatbots
Built two chatbots, one for cricket and one for kabaddi.
How I built it
yes, the chatbot knows kabaddi.
- The kabaddi pipeline checks whether a question fits the data and whether it follows up on an earlier question. It then analyses the question, generates SQL, runs 10 static checks, and turns the result into a plain-language answer.
- The hard part was getting numbers and rankings right. I worked on entity resolution, multi-season queries, when to use RANK() rather than LIMIT, and deterministic calculations. An answer verifier checks for invented numbers.
- The cricket bot uses match and ball-by-ball data from the Cricinfo API, normalised into two tables with over 43 columns. I moved it from Streamlit and SQLite to Next.js and PostgreSQL, with a five-message context window.
- The kabaddi bot covers 12 seasons in English, Hindi, Hinglish, Gujarati and Marathi. The cricket bot covers men's and women's T20 data from 2007 onwards.










