An Ontology-Driven Knowledge Graph for Basketball Box Scores: Semantic Filtering and LLM-Based Querying
Abstract
1. Introduction
2. Related Work
2.1. Basketball Analytics
2.2. Basketball KGs and Applications
2.3. Application of Semantic Filters and Text-to-SPARQL
2.4. Comparison and Positioning
3. An Ontology-Based Knowledge Graph for Basketball Box Scores
3.1. Use Cases and Competency Questions of a Basketball KG
3.2. The BBall Ontology
3.3. Validation and Publication of the BBall Ontology
3.4. Domain-Specific Ontological Modeling Challenges
3.5. Constructing a Basketball KG—Case Study for EuroLeague
3.6. Advantages of the Knowledge Graph Approach

4. Applications Using the Ontology-Based RDF Basketball KG
4.1. EuroLens: A Filter-Based Application Using SPARQL Templates
4.1.1. Functionality of EuroLens
4.1.2. How EuroLens Works


4.2. HoopProphets: A Text-to-SPARQL Application Using LLMs
4.2.1. Functionality of HoopProphets
4.2.2. How HoopProphets Works
4.3. EuroLens-Chat: A Dialogue-Based Text-to-SPARQL Application Using an LLM
4.3.1. Functionality of EuroLens-Chat
4.3.2. How EuroLens-Chat Works


4.4. Comparison of the Applications
5. Experimental Evaluation
5.1. Statistics of the KG (From 2000 to 2025)
5.2. SPARQL Queries for the Competency Questions
5.3. Text-to-SPARQL Evaluation and Analysis
5.4. Efficiency Experiments
5.5. EuroLeague Historical Analysis
Statistical Validation of Observed Trends
6. Concluding Remarks
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Appendix A. SPARQL and SQL Query Comparison


| 1 | https://sportschema.org/ontologies/basketball (accessed on 18 March 2026). |
| 2 | https://users.ics.forth.gr/~mountant/bball.html (accessed on 18 March 2026). |
| 3 | https://api-live.EuroLeague.net/swagger/ (accessed on 18 March 2026). |
| 4 | https://github.com/mountanton/BasketballQA (accessed on 18 March 2026). |
References
- Hogan, A.; Blomqvist, E.; Cochez, M.; d’Amato, C.; De Melo, G.; Gutierrez, C.; Kirrane, S.; Gayo, J.E.L.; Navigli, R.; Neumaier, S.; et al. Knowledge Graphs. ACM Comput. Surv. 2021, 54, 1–37. [Google Scholar] [CrossRef] [Scilit]
- Mountantonakis, M.; Tzitzikas, Y. Large-Scale Semantic Integration of Linked Data: A Survey. ACM Comput. Surv. 2019, 52, 1–40. [Google Scholar] [CrossRef] [Scilit]
- Michel, F.; Gandon, F.; Ah-Kane, V.; Bobasheva, A.; Cabrio, E.; Corby, O.; Gazzotti, R.; Giboin, A.; Marro, S.; Mayer, T.; et al. Covid-on-the-Web: Knowledge Graph and Services to Advance COVID-19 Research. In Proceedings of the International Semantic Web Conference; Springer: Cham, Switzerland, 2020; pp. 294–310. [Google Scholar]
- Marketakis, Y.; Tzitzikas, Y.; Gentile, A.; Ellenbroek, A.; Taconet, M. Building a Global Aquatic Resource Knowledge Base for Fisheries. Proceedings 2025, 117, 4. [Google Scholar] [CrossRef] [Scilit]
- Liu, Y.; Ding, J.; Fu, Y.; Li, Y. UrbanKG: An Urban Knowledge Graph System. ACM Trans. Intell. Syst. Technol. 2023, 14, 1–25. [Google Scholar] [CrossRef] [Scilit]
- Singh, N. Sport Analytics: A Review. Int. Technol. Manag. Rev. 2020, 9, 64–69. [Google Scholar] [CrossRef] [Scilit]
- Ghosh, I.; Ramamurthy, S.R.; Chakma, A.; Roy, N. Sports Analytics Review: Artificial Intelligence Applications, Emerging Technologies, and Algorithmic Perspective. WIREs Data Min. Knowl. Discov. 2023, 13, e1496. [Google Scholar] [CrossRef] [Scilit]
- Weikum, G. Knowledge Graphs 2021: A Data Odyssey. Proc. VLDB Endow. 2021, 14, 3233–3238. [Google Scholar] [CrossRef] [Scilit]
- DuCharme, B. Learning SPARQL: Querying and Updating with SPARQL 1.1; O’Reilly Media, Inc.: Sebastopol, CA, USA, 2013. [Google Scholar]
- Mandić, R.; Jakovljević, S.; Erčulj, F.; Štrumbelj, E. Trends in NBA and EuroLeague Basketball: Analysis and Comparison of Statistical Data from 2000 to 2017. PLoS ONE 2019, 14, e0223524. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Foteinakis, P.F.; Pavlidou, S.P. A Decade of Evolution: Comparative Analysis of Shooting Trends and Offensive Efficiency in the NBA and EuroLeague. Monten. J. Sports Sci. Med. 2025, 14, 13–19. [Google Scholar] [CrossRef] [Scilit]
- Lampis, T.; Ntzoufras, I.; Vassalos, V.; Dimitriou, S. Predictions of European Basketball Match Results with Machine Learning Algorithms. J. Sport. Anal. 2023, 9, 171–190. [Google Scholar] [CrossRef] [Scilit]
- Thabtah, F.; Zhang, L.; Abdelhamid, N. NBA Game Result Prediction Using Feature Analysis and Machine Learning. Ann. Data Sci. 2019, 6, 103–116. [Google Scholar] [CrossRef] [Scilit]
- Katris, C. Exploring EuroLeague History Using Basic Statistics. arXiv 2023, arXiv:2301.02443. [Google Scholar] [CrossRef] [Scilit]
- Kamitsis, A.; Politis, K. Performance Indicators for Qualification to the Playoffs and the Final Four in EuroLeague 2000–2022. J. Sport. Anal. 2025, 11, 22150218251365222. [Google Scholar] [CrossRef] [Scilit]
- Hu, Y.; Song, K.; Cho, S.; Wang, X.; Foroosh, H.; Yu, D.; Liu, F. SportsMetrics: Blending Text and Numerical Data to Understand Information Fusion in LLMs. arXiv 2024, arXiv:2402.10979. [Google Scholar] [CrossRef] [Scilit]
- Sarlis, V.; Papageorgiou, G.; Tjortjis, C. Leveraging Sports Analytics and Association Rule Mining to Uncover Recovery and Economic Impacts in NBA Basketball. Data 2024, 9, 83. [Google Scholar] [CrossRef] [Scilit]
- Mountantonakis, M. Efficient Statistical Computation for K-Player Basketball Lineups Using Semilattice Structures. Electronics 2025, 14, 2104. [Google Scholar] [CrossRef] [Scilit]
- Vázquez-Estévez, C.; Prieto-Lage, I.; Reguera-López-de-la-Osa, X.; Gutiérrez-Santiago, J.A.; Toledo-González, M.; Gutiérrez-Santiago, A. Offensive Patterns and Performance Analysis in One-Possession Scenarios During the Last Minute and Overtime in the EuroLeague. Appl. Sci. 2025, 15, 1928. [Google Scholar] [CrossRef] [Scilit]
- Li, A.; Li, X.; Zhu, B.; Li, G. Knowledge-Graph-Driven Question-Answer System for Basketball. In Proceedings of the 5th International RICAI Conference; IEEE: Piscataway, NJ, USA, 2023; pp. 757–761. [Google Scholar]
- Li, Y.; Cao, J.; Wang, Y. Implementation of Intelligent Question Answering System Based on Basketball Knowledge Graph. In Proceedings of the 4th IAEAC; IEEE: Piscataway, NJ, USA, 2019; pp. 2601–2604. [Google Scholar]
- Xi, Z.; Shi, G.; Li, X.; Yan, J.; Li, Z.; Wu, L.; Liu, Z.; Wang, L. A Simple yet Effective Knowledge-Guided Method for Entity-Aware Video Captioning on a Basketball Benchmark. Neurocomputing 2025, 619, 129177. [Google Scholar] [CrossRef] [Scilit]
- Onofre, E.B.; Moraes, L.M.P.; Aguiar, C.D. AskSport: Web Application for Sports Question-Answering. arXiv 2025, arXiv:2503.21067. [Google Scholar] [CrossRef] [Scilit]
- Xia, H.; Yang, Z.; Wang, Y.; Tracy, R.; Zhao, Y.; Huang, D.; Chen, Z.; Zhu, Y.; Wang, Y.; Shen, W. SportQA: A Benchmark for Sports Understanding in Large Language Models. arXiv 2024, arXiv:2402.15862. [Google Scholar] [CrossRef] [Scilit]
- Ferré, S. Sparklis: An Expressive Query Builder for SPARQL Endpoints with Guidance in Natural Language. Semant. Web 2016, 8, 405–418. [Google Scholar] [CrossRef] [Scilit]
- Vargas, H.; Buil-Aranda, C.; Hogan, A.; López, C. RDF Explorer: A Visual SPARQL Query Builder. In Proceedings of the International Semantic Web Conference; Springer: Cham, Switzerland, 2019; pp. 647–663. [Google Scholar]
- Mountantonakis, M.; Tzitzikas, Y. Generating SPARQL Queries over CIDOC-CRM Using a Two-Stage Ontology Path Patterns Method in LLM Prompts. ACM J. Comput. Cult. Herit. 2025, 18, 1–20. [Google Scholar] [CrossRef] [Scilit]
- Pan, X.; de Boer, V.; van Ossenbruggen, J. FIRESPARQL: A LLM-Based Framework for SPARQL Query Generation over Scholarly Knowledge Graphs. arXiv 2025, arXiv:2508.10467. [Google Scholar] [CrossRef] [Scilit]
- Doulaverakis, C.; Vassiliou, G.; Batsakis, S.; Papadakis, N.; Trouli, G.E.; Antoniou, G. SPARQL Query Generation Using LLMs for Medical Information Retrieval. In Proceedings of the European Semantic Web Conference; Springer: Cham, Switzerland, 2025; pp. 40–44. [Google Scholar]
- Poveda-Villalón, M.; Gómez-Pérez, A.; Suárez-Figueroa, M.C. OOPS! (OntOlogy Pitfall Scanner!): An On-Line Tool for Ontology Evaluation. Int. J. Semant. Web Inf. Syst. 2014, 10, 7–34. [Google Scholar] [CrossRef] [Scilit]
- Garijo, D. WIDOCO: A Wizard for Documenting Ontologies. In ISWC Proceedings, Part II 16; Springer: Cham, Switzerland, 2017; pp. 94–102. [Google Scholar]
- Lohmann, S.; Link, V.; Marbach, E.; Negru, S. WebVOWL: Web-Based Visualization of Ontologies. In Proceedings of the International Conference on Knowledge Engineering and Knowledge Management; Springer: Cham, Switzerland, 2014; pp. 154–158. [Google Scholar]
- Mountantonakis, M.; Papadopoulos, D.; Tzitzikas, Y. Basketball Question Answering Using Knowledge Graphs and Large Language Models. In Proceedings of the IJCKG 2025, Heraklion, Crete, Greece, 15–17 October 2025. [Google Scholar]


























| ID | Use Case | Competency Question |
|---|---|---|
| Q1 | UC1 | I want the average number of two-point (or three-point or free-throw) shots attempted (or made) per game grouped by season (both teams) |
| Q2 | UC1 | I want the average percentage of home wins per season |
| Q3 | UC1 | I want the average minutes per game per player for the seasons 2004–05, 2014–15 and 2024–25 |
| Q4 | UC1 | I want the average number of three-point shots attempted by the teams of Zeljko Obradovic and Georgios Bartzokas per game per season |
| Q5 | UC1 | I want the average number of points per game per season (both teams) |
| Q6 | UC2 | Give me all the players based on this filter: Season 2023–24, Height < 2.00, Average PIR > 15.0 |
| Q7 | UC2 | Show me all centers in the 2024–25 season with average total rebounds > 5 and average blocks > 0.7. |
| Q8 | UC2 | Show me all coaches of the 2006–07 season whose teams allowed, on average, fewer than 73 points per game |
| Q9 | UC2 | Give me all referees of 2024–25 with at least 20 games and a home team win percentage of over 70% |
| Q10 | UC2 | Give me all Greek players that are Forwards with 2.00 ≤ height ≤ 2.10 |
| Q11 | UC3 | I want all the EuroLeague games where a Greek player of height less than 2.00 scored at least 15 points in a home game against a Russian team |
| Q12 | UC3 | Which are the top-10 teams who won the most road games that were behind in the third quarter by 5 or more points |
| Q13 | UC3 | Give me the top-5 players with the most games with at least 7 assists and 1 or 0 turnovers |
| Q14 | UC3 | Give me the winning percentage of each Greek team at home in 2020–21 through the Greek COVID lockdown dates |
| Q15 | UC3 | Give me the Guard with the most games with at least 1 point, rebound, assist, steal and block. |
| Aspect | Knowledge Graph (RDF/SPARQL) | Relational Database (SQL) |
|---|---|---|
| Multi-hop queries | Natural graph traversal via explicit relationships and path patterns | Requires multiple joins; query complexity increases with relational depth |
| Data integration | Incremental addition of triples under shared ontology; queries remain valid | Often requires schema modification, new tables, and query refactoring |
| Interoperability | Supports owl:sameAs links and federated queries via SERVICE | Requires ETL pipelines and schema mapping for cross-database integration |
| Schema evolution | Incremental ontology extension (new classes/properties) without migration | Explicit schema migrations required when adding attributes or relations |
| Natural language alignment | Ontology provides conceptual vocabulary aligned with domain semantics | Less aligned with natural language concepts (joins, foreign keys) |
| Aspect | SPARQL Query Editor (Plain) | Filter-Based Applications (EuroLens) | Text-to-SPARQL (HoopProphets and EuroLens-Chat) |
|---|---|---|---|
| Input | SPARQL queries | User interface filters (dropdowns, checkboxes, forms) | Free-text natural-language questions |
| Answer Accuracy | Very high (for experts) | Very High | Medium (depends on the LLM and prompt) |
| User Skill Required | High (SPARQL + ontology knowledge) | Low (simple UI use) | Very low (plain language) |
| User Error Risk | High (syntax + semantic mistakes) | Very Low | Medium (wrong intent interpretation) |
| Flexibility | Very high (any valid SPARQL) | Limited to combinations of filters | High (depends on LLM capabilities) |
| Question enrichment | No | No | Facts from LLMs |
| Interpretability | High | High (filters map directly to query templates) | Medium–Low (interpretation by NLP model) |
| SPARQL Security | High (heavy queries) | Low (controlled patterns) | Medium (validation of SPARQL query is needed) |
| Optimization | Hard (unpredictable patterns) | Easy (known templates) | Very hard (varied model outputs) |
| Target Users | Developers, semantic web experts | Non-technical, UI-driven users | Anyone using natural language (ideal for semantic web experts) |
| Main Use Case | UC1, UC3 | UC2 | UC1, UC3 |
| Ontology Knowledge Needed | Yes | No | Yes (for editing) |
| SPARQL Query Explainability | Yes | Can be supported | Yes |
| Setup Complexity | Low | Medium–high (UI + query template design) | High (AI model, LLM prompts) |
| Multilinguality | Limited: relies on multilingual labels in data | High: easy to localize UI; SPARQL remains the same (not supported yet) | Very high: users can ask questions in many languages with the same prompt |
| Type | Value |
|---|---|
| Number of Triples | 5,454,266 |
| Triples with Object URIs | 877,656 |
| Triples with Literals | 4,576,607 |
| Distinct URIs | 321,813 |
| Distinct Literals | 34,675 |
| Distinct Subjects | 318,614 |
| Distinct Objects | 349,245 |
| Class | URIs | Triples | Avg T/URI |
|---|---|---|---|
| Season | 26 | 6526 | 251.0 |
| Game | 6370 | 165,468 | 25.9 |
| Player | 3330 | 186,388 | 55.9 |
| Team | 89 | 38,980 | 437.9 |
| Venue | 252 | 7589 | 30.1 |
| Coach | 240 | 16,671 | 69.4 |
| Referee | 307 | 20,925 | 68.1 |
| Statline | 144,795 | 4,289,507 | 29.6 |
| Country | 98 | 7555 | 77.0 |
| Error Category | Count | Percentage |
|---|---|---|
| Filtering/Logical Errors | 10 | 47.6% |
| Aggregation and Calculation Errors | 6 | 28.6% |
| Schema/Property Errors | 3 | 14.3% |
| Semantic Misinterpretation | 2 | 9.5% |
| Total | 21 | 100% |
| Query Type | Avg (s) | Min (s) | Max (s) |
|---|---|---|---|
| SELECT | 0.302 | 0.253 | 0.807 |
| FILTER | 0.290 | 0.255 | 0.504 |
| ORDER BY | 0.272 | 0.255 | 0.426 |
| GROUP BY | 0.291 | 0.254 | 0.645 |
| NEGATION | 0.391 | 0.254 | 1.586 |
| Overall | 0.309 | 0.253 | 1.586 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Mountantonakis, M.; Dallas, C.; Makrinakis, N.; Papadopoulos, D. An Ontology-Driven Knowledge Graph for Basketball Box Scores: Semantic Filtering and LLM-Based Querying. Data 2026, 11, 65. https://doi.org/10.3390/data11030065
Mountantonakis M, Dallas C, Makrinakis N, Papadopoulos D. An Ontology-Driven Knowledge Graph for Basketball Box Scores: Semantic Filtering and LLM-Based Querying. Data. 2026; 11(3):65. https://doi.org/10.3390/data11030065
Chicago/Turabian StyleMountantonakis, Michalis, Christos Dallas, Nikolas Makrinakis, and Dimitris Papadopoulos. 2026. "An Ontology-Driven Knowledge Graph for Basketball Box Scores: Semantic Filtering and LLM-Based Querying" Data 11, no. 3: 65. https://doi.org/10.3390/data11030065
APA StyleMountantonakis, M., Dallas, C., Makrinakis, N., & Papadopoulos, D. (2026). An Ontology-Driven Knowledge Graph for Basketball Box Scores: Semantic Filtering and LLM-Based Querying. Data, 11(3), 65. https://doi.org/10.3390/data11030065

