Ontology-Based Prompt Engineering for Text-to-SPARQL: A Case Study on Tuberculosis in Wikidata

Penulis: Darari, Fariz
Informasi
JurnalCEUR Workshop Proceedings
PenerbitCEUR-WS
Volume & EdisiVol. 4194
Halaman -
Tahun Publikasi2025
ISSN16130073
Jenis SumberScopus
Abstrak
This study explores whether a few-shot, ontology-based prompt engineering approach can improve text-to-SPARQL generation in the health domain. Using tuberculosis (TB) in Wikidata as a case study, we analyze how TB knowledge is represented from an ontological perspective and embed this knowledge into prompts as ontological terms, few-shot examples, and query templates. We evaluate this ontology-guided strategy against a naive prompting method using small language models on a curated set of natural language questions about TB. Our results show that the ontology-based approach significantly improves answer precision. A qualitative analysis offers key insights and lessons learned from this approach. These preliminary findings highlight the potential of ontology-based prompt engineering and motivate further evaluation across different domains. © 2025 Copyright for this paper by its authors.
Dokumen & Tautan

© 2025 Universitas Indonesia. Seluruh hak cipta dilindungi.