{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,21]],"date-time":"2026-05-21T04:10:49Z","timestamp":1779336649042,"version":"3.51.4"},"reference-count":15,"publisher":"Oxford University Press (OUP)","issue":"5","license":[{"start":{"date-parts":[[2026,4,9]],"date-time":"2026-04-09T00:00:00Z","timestamp":1775692800000},"content-version":"vor","delay-in-days":1,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":[],"published-print":{"date-parts":[[2026,5,3]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:sec>\n                    <jats:title>Motivation<\/jats:title>\n                    <jats:p>Integrated analysis across biological databases is becoming increasingly important in life science research, leading many public databases to adopt Semantic Web technologies, also known as knowledge graphs. However, biological data possesses inherently complex and diverse structures, which makes the resulting Resource Description Framework (RDF) schemas intricate and difficult for non-expert users to master, preventing them from translating natural language questions into correct SPARQL queries. Although recent large language model (LLM)-based approaches show potential for automatic SPARQL query generation, they often suffer from structural hallucinations and require large-scale training data to capture schema-specific structures. In this study, we propose a novel framework that avoids hallucinations and requires no training data by combining LLM-based word extraction with a schema-based SPARQL query builder.<\/jats:p>\n                  <\/jats:sec>\n                  <jats:sec>\n                    <jats:title>Results<\/jats:title>\n                    <jats:p>The LLM extracts variables and parameters from the user\u2019s question based on a predefined schema, and the query builder generates a syntactically correct SPARQL query accordingly. By providing a predefined schema in prompts, our method eliminates the need for training data. Experimental results on UniProt, Rhea, and Bgee demonstrate that our method outperforms baseline LLM-based methods using fine-tuning and prompt-tuning in terms of the similarity between search results obtained from generated and expert-written queries. Furthermore, we developed a proof-of-concept chatbot system that enables users to query RDF databases via natural language input, demonstrating the practical utility of our approach in improving access to biological data resources.<\/jats:p>\n                  <\/jats:sec>\n                  <jats:sec>\n                    <jats:title>Availability and implementation<\/jats:title>\n                    <jats:p>Experimental environment: https:\/\/github.com\/scott2121\/sparql_query_generator (DOI: https:\/\/doi.org\/10.5281\/zenodo.18539213). Chatbot: https:\/\/github.com\/scott2121\/sparql_query_chatbot (DOI: https:\/\/doi.org\/10.5281\/zenodo.18539225).<\/jats:p>\n                  <\/jats:sec>","DOI":"10.1093\/bioinformatics\/btag174","type":"journal-article","created":{"date-parts":[[2026,4,7]],"date-time":"2026-04-07T11:28:10Z","timestamp":1775561290000},"source":"Crossref","is-referenced-by-count":0,"title":["Accurate SPARQL generation via in-context learning and schema-based query construction"],"prefix":"10.1093","volume":"42","author":[{"ORCID":"https:\/\/orcid.org\/0009-0009-5679-7876","authenticated-orcid":false,"given":"Hikaru","family":"Nagazumi","sequence":"first","affiliation":[{"name":"Faculty of Science and Engineering, Waseda University , Shinjuku-ku, Tokyo 169-8555,","place":["Japan"]}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-8195-5893","authenticated-orcid":false,"given":"Yuki","family":"Moriya","sequence":"additional","affiliation":[{"name":"Database Center for Life Science , Kashiwa, Chiba 277-0871,","place":["Japan"]}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7883-3756","authenticated-orcid":false,"given":"Shuichi","family":"Kawashima","sequence":"additional","affiliation":[{"name":"Database Center for Life Science , Kashiwa, Chiba 277-0871,","place":["Japan"]}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2391-0384","authenticated-orcid":false,"given":"Toshiaki","family":"Katayama","sequence":"additional","affiliation":[{"name":"Database Center for Life Science , Kashiwa, Chiba 277-0871,","place":["Japan"]}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6452-9091","authenticated-orcid":false,"given":"Kana","family":"Shimizu","sequence":"additional","affiliation":[{"name":"Faculty of Science and Engineering, Waseda University , Shinjuku-ku, Tokyo 169-8555,","place":["Japan"]}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"286","published-online":{"date-parts":[[2026,4,8]]},"reference":[{"key":"2026052023574971100_btag174-B1","volume-title":"A Semantic Web Primer","author":"Antoniou","year":"2004"},{"key":"2026052023574971100_btag174-B2","doi-asserted-by":"publisher","first-page":"D693","DOI":"10.1093\/nar\/gkab1016","article-title":"Rhea, the reaction knowledgebase in 2022","volume":"50","author":"Bansal","year":"2022","journal-title":"Nucleic Acids Res"},{"key":"2026052023574971100_btag174-B3","doi-asserted-by":"publisher","first-page":"D831","DOI":"10.1093\/nar\/gkaa793","article-title":"The bgee suite: integrated curated expression atlas and comparative transcriptomics in animals","volume":"49","author":"Bastian","year":"2021","journal-title":"Nucleic Acids Res"},{"key":"2026052023574971100_btag174-B4","doi-asserted-by":"publisher","first-page":"100869","DOI":"10.1016\/j.websem.2025.100869","article-title":"Enhancing SPARQL query generation for question answering with a hybrid encoder\u2013decoder and cross-attention model","volume":"87","author":"Chen","year":"2025","journal-title":"J Web Semantics"},{"key":"2026052023574971100_btag174-B5","doi-asserted-by":"publisher","first-page":"489","DOI":"10.3233\/SW-160218","article-title":"Knowledge graph refinement: a survey of approaches and evaluation methods","volume":"8","author":"Cimiano","year":"2017","journal-title":"Semant. Web"},{"key":"2026052023574971100_btag174-B6","author":"Emonet","year":"2024"},{"key":"2026052023574971100_btag174-B7","doi-asserted-by":"publisher","first-page":"136","DOI":"10.1186\/1471-2105-10-136","article-title":"Infrastructure for the life sciences: design and implementation of the UniProt website","volume":"10","author":"Jain","year":"2009","journal-title":"BMC Bioinformatics"},{"key":"2026052023574971100_btag174-B8","doi-asserted-by":"publisher","first-page":"bay123","DOI":"10.1093\/database\/bay123","article-title":"NBDC RDF portal: a comprehensive repository for semantic data in life sciences","volume":"2018","author":"Kawashima","year":"2018","journal-title":"Database"},{"key":"2026052023574971100_btag174-B9","doi-asserted-by":"publisher","first-page":"D453","DOI":"10.1093\/nar\/gkr811","article-title":"Protein data bank Japan (PDBj): maintaining a structural data archive and resource description framework format","volume":"40","author":"Kinjo","year":"2012","journal-title":"Nucleic Acids Res"},{"key":"2026052023574971100_btag174-B10","author":"Rangel Reyes","year":"2024"},{"key":"2026052023574971100_btag174-B11","doi-asserted-by":"publisher","first-page":"70712","DOI":"10.1109\/ACCESS.2022.3188714","article-title":"SGPT: a generative approach for SPARQL query generation from natural language questions","volume":"10","author":"Rony","year":"2022","journal-title":"IEEE Access"},{"key":"2026052023574971100_btag174-B12","doi-asserted-by":"publisher","first-page":"btae564","DOI":"10.1093\/bioinformatics\/btae564","article-title":"HunFlair2 in a cross-corpus evaluation of biomedical named entity recognition and normalization tools","volume":"40","author":"S\u00e4nger","year":"2024","journal-title":"Bioinformatics"},{"key":"2026052023574971100_btag174-B13","doi-asserted-by":"publisher","first-page":"409","DOI":"10.1007\/s10619-022-07414-w","article-title":"Bio-SODA UX: enabling natural language question answering over knowledge graphs with user disambiguation","volume":"40","author":"Sima","year":"2022","journal-title":"Distrib Parallel Databases"},{"key":"2026052023574971100_btag174-B14","doi-asserted-by":"publisher","DOI":"10.1093\/bib\/bbab282","article-title":"Deep learning methods for biomedical named entity recognition: a survey and qualitative comparison","volume":"22","author":"Song","year":"2021","journal-title":"Brief Bioinform"},{"key":"2026052023574971100_btag174-B15","volume-title":"Proceedings of the 36th International Conference on Neural Information Processing Systems","author":"Wei","year":"2022"}],"container-title":["Bioinformatics"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/academic.oup.com\/bioinformatics\/advance-article-pdf\/doi\/10.1093\/bioinformatics\/btag174\/67993203\/btag174.pdf","content-type":"application\/pdf","content-version":"am","intended-application":"syndication"},{"URL":"https:\/\/academic.oup.com\/bioinformatics\/article-pdf\/42\/5\/btag174\/67993203\/btag174.pdf","content-type":"application\/pdf","content-version":"vor","intended-application":"syndication"},{"URL":"https:\/\/academic.oup.com\/bioinformatics\/article-pdf\/42\/5\/btag174\/67993203\/btag174.pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,21]],"date-time":"2026-05-21T03:58:35Z","timestamp":1779335915000},"score":1,"resource":{"primary":{"URL":"https:\/\/academic.oup.com\/bioinformatics\/article\/doi\/10.1093\/bioinformatics\/btag174\/8644338"}},"subtitle":[],"editor":[{"given":"Daisuke","family":"Kihara","sequence":"additional","affiliation":[],"role":[{"role":"editor","vocabulary":"crossref"}]}],"short-title":[],"issued":{"date-parts":[[2026,4,8]]},"references-count":15,"journal-issue":{"issue":"5","published-print":{"date-parts":[[2026,5,3]]}},"URL":"https:\/\/doi.org\/10.1093\/bioinformatics\/btag174","relation":{},"ISSN":["1367-4803","1367-4811"],"issn-type":[{"value":"1367-4803","type":"print"},{"value":"1367-4811","type":"electronic"}],"subject":[],"published-other":{"date-parts":[[2026,5]]},"published":{"date-parts":[[2026,4,8]]},"article-number":"btag174"}}