TCRMQ: Question Answering by Multi-hop SPARQL Queries over Event-Based Knowledge Graphs
摘要
There is an increasing trend of combining Knowledge Graphs (KGs) and LLMs for several tasks, including the generation of structured queries from natural questions. Indeed, it is quite challenging to answer natural questions over KGs, especially for a) sophisticated ontologies, since in most cases one has to derive multi-hop queries with property path expressions, and b) questions requiring extra background information that is not included in such KGs. Towards this direction, we present a research prototype, called TCRMQ (Text-2-CIDOC-CRM Query), that enables users to express their questions in natural language and to retrieve the desired answer over KGs using the event-based CIDOC-CRM model (an ISO standard used from many Cultural Heritage organizations). TCRMQ is based on a novel two-stage method combining Ontology Path Patterns and Knowledge from Large Language Models (LLMs) and can generate multi-hop SPARQL queries from natural language multilingual questions, that can even require external background knowledge to be answered. Its current version supports two CIDOC-CRM KGs containing artworks, and has been evaluated for English and Greek language through a dedicated benchmark. By applying this method over GPT-4 we achieve accuracy 83%, while the baseline has only \(32\%\) accuracy.