AI-Assisted Football Referee
Answering questions on fouls from the text of Law 12, not from the model's memory By Irfan Alghani Khalid Project page: https://towardsdatascience.com/ai-assisted-football-referee/ ShipAI is a Towards Data Science project. Watch all the videos here: https://towardsdatascience.com/videos/ Key takeaways. 1. ChromaDB finds the closest passage of Law 12, and Gemini rewrites it in plain English, with the passage shown below. 2. Parent-child chunking keeps each bulleted list with the sentence that introduces it, so a rule is retrieved whole. 3. PyMuPDF's dictionary output carries each span's font and size, so page headers are filtered out of the chunks. Chapters: 0:00 The shirt celebration question 1:36 Why ground the answers 2:58 The architecture 5:12 Reading Law 12 with PyMuPDF 7:45 Filtering out headers by font 8:19 Parent-child chunking 10:24 The Streamlit dashboard 11:31 Play on after a foul