{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,9,21]],"date-time":"2026-09-21T18:37:20Z","timestamp":1790015840452,"version":"4.0.1"},"reference-count":40,"publisher":"Association for Computing Machinery (ACM)","issue":"1","license":[{"start":{"date-parts":[[2025,2,17]],"date-time":"2025-02-17T00:00:00Z","timestamp":1739750400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"ECHOES","award":["101157364"],"award-info":[{"award-number":["101157364"]}]}],"content-domain":{"domain":["dl.acm.org"],"crossmark-restriction":true},"short-container-title":["J. Comput. Cult. Herit."],"published-print":{"date-parts":[[2025,3,31]]},"abstract":"<jats:p>\n            In this article, we focus on the task of exploiting the capabilities of Large Language Models (LLMs) to generate SPARQL Queries for answering natural questions over cultural Knowledge Graphs (KGs) expressed according to the ISO standard ontology CIDOC-CRM. Since CIDOC-CRM is an event-based model, usually we have to follow long paths for answering a question, thereby, the challenge is how to construct the prompt for aiding the LLM to produce the right SPARQL query. We propose and comparatively evaluate methods based on the creation of ontology\n            <jats:italic>path patterns<\/jats:italic>\n            of a configurable path\n            <jats:italic>radius<\/jats:italic>\n            (or length). Then, we construct a new dedicated benchmark that includes 100 natural questions and the corresponding SPARQL queries over two real KGs from the cultural domain describing artworks. Finally, we present comparative results about the effectiveness and efficiency over the benchmark by using ChatGPT-3.5. The most effective method follows a two-stage process that\n            <jats:italic>predicts<\/jats:italic>\n            and uses the most appropriate path patterns of\n            <jats:inline-formula content-type=\"math\/tex\">\n              <jats:tex-math notation=\"LaTeX\" version=\"MathJax\">\\(r\\leq 4\\)<\/jats:tex-math>\n            <\/jats:inline-formula>\n            . This method achieves 3.5\n            <jats:inline-formula content-type=\"math\/tex\">\n              <jats:tex-math notation=\"LaTeX\" version=\"MathJax\">\\(\\times\\)<\/jats:tex-math>\n            <\/jats:inline-formula>\n            higher accuracy than the baseline method (0.66 versus 0.19), that includes in the prompt only the list of properties and classes of the KG.\n          <\/jats:p>\n          <jats:p>\n            <jats:bold>Benchmark:<\/jats:bold>\n            <jats:ext-link xmlns:xlink=\"http:\/\/www.w3.org\/1999\/xlink\" ext-link-type=\"uri\" xlink:href=\"https:\/\/github.com\/mountanton\/CIDOC-QA-using-LLMs\">https:\/\/github.com\/mountanton\/CIDOC-QA-using-LLMs<\/jats:ext-link>\n          <\/jats:p>","DOI":"10.1145\/3708326","type":"journal-article","created":{"date-parts":[[2024,12,11]],"date-time":"2024-12-11T09:29:35Z","timestamp":1733909375000},"page":"1-20","update-policy":"https:\/\/doi.org\/10.1145\/crossmark-policy","source":"Crossref","is-referenced-by-count":9,"title":["Generating SPARQL Queries over CIDOC-CRM Using a Two-Stage Ontology Path Patterns Method in LLM Prompts"],"prefix":"10.1145","volume":"18","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-1951-0241","authenticated-orcid":false,"given":"Michalis","family":"Mountantonakis","sequence":"first","affiliation":[{"name":"Institute of Computer Science, Foundation of Research and Technology Hellas, Heraklion, Greece and Computer Science Department, University of Crete, Heraklion, Greece"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8847-2130","authenticated-orcid":false,"given":"Yannis","family":"Tzitzikas","sequence":"additional","affiliation":[{"name":"Institute of Computer Science, Foundation of Research and Technology Hellas, Heraklion, Greece and Computer Science Department, University of Crete, Heraklion, Greece"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2025,2,17]]},"reference":[{"key":"e_1_3_2_2_2","unstructured":"Kerameikos.org. 2021. Retrieved March 2024 from http:\/\/kerameikos.org\/"},{"key":"e_1_3_2_3_2","unstructured":"GraphSparqlQAChain. 2024. Retrieved March 2024 from https:\/\/python.langchain.com\/docs\/use_cases\/graph\/integrations\/graph_sparql_qa"},{"key":"e_1_3_2_4_2","doi-asserted-by":"publisher","DOI":"10.55630\/dipp.2018.8.1"},{"key":"e_1_3_2_5_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-540-76298-0_52"},{"key":"e_1_3_2_6_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSC59802.2024.00050"},{"key":"e_1_3_2_7_2","doi-asserted-by":"publisher","DOI":"10.1145\/3641289"},{"key":"e_1_3_2_8_2","unstructured":"World Wide Web Consortium. 2013. SPARQL 1.1 Overview."},{"key":"e_1_3_2_9_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-19570-0_35"},{"key":"e_1_3_2_10_2","volume-title":"Proceedings of the Dagstuhl Seminar","author":"Doerr Martin","year":"2005","unstructured":"Martin Doerr. 2005. The CIDOC CRM, an ontological approach to schema heterogeneity. In Proceedings of the Dagstuhl Seminar. Schloss Dagstuhl-Leibniz-Zentrum f\u00fcr Informatik."},{"key":"e_1_3_2_11_2","volume-title":"Proceedings of the 12th Symposium on Languages, Applications and Technologies (SLATE \u201923)","author":"Faria Bruno","year":"2023","unstructured":"Bruno Faria, Dylan Perdig\u00e3o, and Hugo Gon\u00e7alo Oliveira. 2023. Question answering over linked data with GPT-3. In Proceedings of the 12th Symposium on Languages, Applications and Technologies (SLATE \u201923). Schloss Dagstuhl-Leibniz-Zentrum f\u00fcr Informatik."},{"key":"e_1_3_2_12_2","volume-title":"Proceedings of the 12th International Conference on Geographic Information Science (GIScience \u201923)","author":"Feng Yu","year":"2023","unstructured":"Yu Feng, Linfang Ding, and Guohui Xiao. 2023. GeoQAMap-geographic question answering with maps leveraging LLM and open knowledge Base (Short paper). In Proceedings of the 12th International Conference on Geographic Information Science (GIScience \u201923). Schloss Dagstuhl-Leibniz-Zentrum f\u00fcr Informatik."},{"key":"e_1_3_2_13_2","doi-asserted-by":"publisher","DOI":"10.1145\/3603163.3609067"},{"key":"e_1_3_2_14_2","doi-asserted-by":"publisher","DOI":"10.1145\/3360901.3364435"},{"key":"e_1_3_2_15_2","unstructured":"Papa Abdou Karim Karou Diallo Samuel Reyd and Amal Zouaq. 2023. A comprehensive evaluation of neural SPARQL query generation from natural language questions. arXiv:2304.07772. Retrieved from https:\/\/arxiv.org\/abs\/2304.07772"},{"key":"e_1_3_2_16_2","volume-title":"Proceedings of the 19th International Conference on Semantic Systems","author":"Kovriguina Liubov","year":"2023","unstructured":"Liubov Kovriguina, Roman Teucher, Daniil Radyush, and Dmitry Mouromtsev. 2023. SPARQLGEN: One-shot prompt-based approach for SPARQL query generation. In Proceedings of the 19th International Conference on Semantic Systems."},{"key":"e_1_3_2_17_2","doi-asserted-by":"crossref","unstructured":"Lars-Peter Meyer Claus Stadler Johannes Frey Norman Radtke Kurt Junghanns Roy Meissner Gordian Dziwis Kirill Bulert and Michael Martin. 2023. Llm-assisted knowledge graph engineering: Experiments with ChatGPT. arXiv:2307.06917. Retrieved from https:\/\/arxiv.org\/abs\/2307.06917","DOI":"10.1007\/978-3-658-43705-3_8"},{"key":"e_1_3_2_18_2","volume-title":"Proceedings of the International Workshop on Semantic Web and Ontology Design for Cultural Heritage","author":"Mountantonakis Michalis","year":"2023","unstructured":"Michalis Mountantonakis, Ioannis Theocharakis, and Yannis Tzitzikas. 2023. Why we need ontology-specific data portals: A case study for CIDOC-CRM. In Proceedings of the International Workshop on Semantic Web and Ontology Design for Cultural Heritage."},{"key":"e_1_3_2_19_2","volume-title":"Proceedings of the 22nd International Semantic Web Conference","author":"Mountantonakis Michalis","year":"2023","unstructured":"Michalis Mountantonakis and Yannis Tzitzikas. 2023. Real-time validation of ChatGPT facts using RDF knowledge graphs. In Proceedings of the 22nd International Semantic Web Conference."},{"key":"e_1_3_2_20_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-031-43430-3_24"},{"key":"e_1_3_2_21_2","author":"OpenAI","year":"2021","unstructured":"OpenAI. 2021. ChatGPT.","journal-title":"ChatGPT"},{"key":"e_1_3_2_22_2","unstructured":"Jeff Z Pan Simon Razniewski Jan-Christoph Kalo et al. 2023. Large language models and knowledge graphs: Opportunities and challenges. arXiv:2308.06374. Retrieved from https:\/\/arxiv.org\/abs\/2308.06374"},{"key":"e_1_3_2_23_2","first-page":"1","volume-title":"Proceedings of the 22nd International Semantic Web Conference on Scholarly QALD Challenge (ISWC \u201923)","volume":"3592","author":"Pliukhin Dmitrii","year":"2023","unstructured":"Dmitrii Pliukhin, Daniil Radyush, Liubov Kovriguina, and Dmitry Mouromtsev. 2023. Improving subgraph extraction algorithms for one-shot sparql query generation with large language models. In Proceedings of the 22nd International Semantic Web Conference on Scholarly QALD Challenge (ISWC \u201923), Vol. 3592, 1\u201310."},{"key":"e_1_3_2_24_2","first-page":"146","volume-title":"Proceedings of the 27th International Conference on Theory and Practice of Digital Libraries (TPDL \u201923)","volume":"14241","author":"Pride David","year":"2023","unstructured":"David Pride, Matteo Cancellieri, and Petr Knoth. 2023. Check for updates CORE-GPT: Combining open access research and large language models for credible, trustworthy question answering. In Proceedings of the 27th International Conference on Theory and Practice of Digital Libraries (TPDL \u201923), Vol. 14241. Springer Nature, 146."},{"key":"e_1_3_2_25_2","unstructured":"Julio C Rangel Tarcisio Mendes de Farias Ana Claudia Sima and Norio Kobayashi. 2024. SPARQL generation: An analysis on Fine-tuning OpenLLaMA for question answering over a life science knowledge graph. arXiv:2402.04627. Retrieved from https:\/\/arxiv.org\/abs\/2402.04627"},{"key":"e_1_3_2_26_2","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/2024.starsem-1.1"},{"key":"e_1_3_2_27_2","unstructured":"Diego Sanmartin. 2024. KG-RAG: Bridging the gap between knowledge and creativity. arXiv:2405.12035. Retrieved from https:\/\/arxiv.org\/abs\/2405.12035"},{"key":"e_1_3_2_28_2","doi-asserted-by":"crossref","unstructured":"Karthik Soman Peter W Rose John H. Morris Rabia E. Akbas Brett Smith Braian Peetoom Catalina Villouta-Reyes Gabriel Cerono Yongmei Shi Angela Rizk-Jackson et al. 2023. Biomedical knowledge graph-enhanced prompt generation for large language models. arXiv:2311.17330. Retrieved from https:\/\/arxiv.org\/abs\/2311.17330","DOI":"10.1093\/bioinformatics\/btae560"},{"key":"e_1_3_2_29_2","doi-asserted-by":"publisher","DOI":"10.1145\/3340531.3412760"},{"key":"e_1_3_2_30_2","doi-asserted-by":"publisher","DOI":"10.3233\/SW-222925"},{"key":"e_1_3_2_31_2","unstructured":"Kai Sun Yifan Ethan Xu Hanwen Zha Yue Liu and Xin Luna Dong. 2023. Head-to-tail: How knowledgeable are large language models (Llm)? AKA Will LLMs replace knowledge graphs? arXiv:2308.10168. Retrieved from https:\/\/arxiv.org\/abs\/2308.10168"},{"key":"e_1_3_2_32_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-642-38288-8_40"},{"key":"e_1_3_2_33_2","unstructured":"Tilahun Abedissa Taffa and Ricardo Usbeck. 2023. Leveraging llms in scholarly knowledge graph question answering. arXiv:2311.09841. Retrieved from https:\/\/arxiv.org\/abs\/2311.09841"},{"key":"e_1_3_2_34_2","unstructured":"Gemini Team Rohan Anil Sebastian Borgeaud Yonghui Wu Jean-Baptiste Alayrac Jiahui Yu Radu Soricut Johan Schalkwyk Andrew M Dai Anja Hauth et al. 2023. Gemini: A family of highly capable multimodal models. arXiv:2312.11805. Retrieved from https:\/\/arxiv.org\/abs\/2312.11805"},{"key":"e_1_3_2_35_2","unstructured":"Hugo Touvron Thibaut Lavril Gautier Izacard Xavier Martinet Marie-Anne Lachaux Timoth\u00e9e Lacroix Baptiste Rozi\u00e8re Naman Goyal Eric Hambro Faisal Azhar et al. 2023. LLaMA: Open and efficient foundation language models. arXiv:2302.13971. Retrieved from https:\/\/arxiv.org\/abs\/2302.13971"},{"key":"e_1_3_2_36_2","doi-asserted-by":"publisher","DOI":"10.1145\/3609987.3610018"},{"key":"e_1_3_2_37_2","doi-asserted-by":"publisher","DOI":"10.3390\/heritage5030084"},{"key":"e_1_3_2_38_2","volume":"429","author":"Tzompanaki Katerina","year":"2012","unstructured":"Katerina Tzompanaki and Martin Doerr. 2012. Fundamental Categories and Relationships for Intuitive Querying CIDOC-CRM Based Repositories. ICS-FORTH Technical Report 429.","journal-title":"Fundamental Categories and Relationships for Intuitive Querying CIDOC-CRM Based Repositories"},{"key":"e_1_3_2_39_2","doi-asserted-by":"publisher","DOI":"10.1145\/2629489"},{"key":"e_1_3_2_40_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-981-99-7224-1_24"},{"key":"e_1_3_2_41_2","unstructured":"Penghao Zhao Hailin Zhang Qinhan Yu Zhengren Wang Yunteng Geng Fangcheng Fu Ling Yang Wentao Zhang and Bin Cui. 2024. Retrieval-augmented generation for ai-generated content: A survey. arXiv:2402.19473. Retrieved from https:\/\/arxiv.org\/abs\/2402.19473"}],"container-title":["Journal on Computing and Cultural Heritage"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3708326","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3708326","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,6,19]],"date-time":"2025-06-19T01:09:45Z","timestamp":1750295385000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3708326"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,2,17]]},"references-count":40,"journal-issue":{"issue":"1","published-print":{"date-parts":[[2025,3,31]]}},"alternative-id":["10.1145\/3708326"],"URL":"https:\/\/doi.org\/10.1145\/3708326","relation":{},"ISSN":["1556-4673","1556-4711"],"issn-type":[{"value":"1556-4673","type":"print"},{"value":"1556-4711","type":"electronic"}],"subject":[],"published":{"date-parts":[[2025,2,17]]},"assertion":[{"value":"2024-04-18","order":0,"name":"received","label":"Received","group":{"name":"publication_history","label":"Publication History"}},{"value":"2024-12-02","order":2,"name":"accepted","label":"Accepted","group":{"name":"publication_history","label":"Publication History"}},{"value":"2025-02-17","order":3,"name":"published","label":"Published","group":{"name":"publication_history","label":"Publication History"}}]}}