On Using Large Language Models for Ontology-Based Data Access
摘要
Ontology-Based Data Access (OBDA) focuses on representing legacy data sources through ontologies, enabled by a modern, distributed, and standardized data format like OWL. This approach facilitates intelligent querying and processing using SPARQL. However, implementing OBDA requires significant effort to develop software capable of interpreting and transforming data into ontologies. Recently, large language models (LLMs) have emerged as powerful tools for generating solutions from user-provided natural language input. In this paper, we examine the potential of LLMs to automate OBDA. Our hypothesis is that LLMs, such as ChatGPT and LLaMA, can effectively perform OBDA tasks. To test this, we analyzed their responses to various OBDA-related challenges. Our findings indicate that both ChatGPT and LLaMA can generate ontologies from free-text descriptions and structured data, such as tables in text or CSV format. Additionally, they can construct SPARQL queries, convert relational tables into ontologies, and correct integrity constraint violations when given appropriate instructions. However, limitations exist: the free version of ChatGPT struggles with processing large datasets, while LLaMA often provides only partial results.