Question Answering over Knowledge Graphs (KGQA) is the task of answering natural language questions over a knowledge graph (KG). This task requires a model to reason over multiple edges of the KG to reach the right answer. In this work, we present a method to equip large language models (LLMs) with classic logical programming languages to provide an explainable solution to the problem. Our goal is to extract the representation of the question in the form of a Prolog query, which can then be used to answer the query programmatically. To demonstrate the effectiveness of this approach, we use the MetaQA dataset and show that our method finds the correct answer entities for all the questions in the test dataset.
翻译:知识图解答问题( KGQA) 是用知识图解解答自然语言问题的任务。 这项任务需要一个模型, 用来在KG的多个边缘上解释自然语言问题, 以得出正确的答案。 在此工作中, 我们提出了一个方法, 使大型语言模型( LLMS) 具备经典逻辑编程语言, 以提供可以解释的解决问题的方法。 我们的目标是以Prolog 查询的形式解析问题的表达方式, 然后用Prolog 查询来用程序解答查询。 为了证明这个方法的有效性, 我们使用 MetaQA 数据集, 并显示我们的方法为测试数据集中的所有问题找到正确的答案实体 。</s>