This study explores the realm of knowledge base question answering (KBQA). KBQA is considered a challenging task, particularly in parsing intricate questions into executable logical forms. Traditional semantic parsing (SP)-based methods require extensive data annotations, which result in significant costs. Recently, the advent of few-shot in-context learning, powered by large language models (LLMs), has showcased promising capabilities. However, fully leveraging LLMs to parse questions into logical forms in low-resource scenarios poses a substantial challenge. To tackle these hurdles, we introduce Interactive-KBQA, a framework designed to generate logical forms through direct interaction with knowledge bases (KBs). Within this framework, we have developed three generic APIs for KB interaction. For each category of complex question, we devised exemplars to guide LLMs through the reasoning processes. Our method achieves competitive results on the WebQuestionsSP, ComplexWebQuestions, KQA Pro, and MetaQA datasets with a minimal number of examples (shots). Importantly, our approach supports manual intervention, allowing for the iterative refinement of LLM outputs. By annotating a dataset with step-wise reasoning processes, we showcase our model's adaptability and highlight its potential for contributing significant enhancements to the field.
翻译:本研究探索了知识库问答(KBQA)领域。KBQA被认为是一项具有挑战性的任务,尤其是在将复杂问题解析为可执行的逻辑形式方面。传统的基于语义解析(SP)的方法需要大量的数据标注,导致成本高昂。最近,由大语言模型(LLMs)驱动的少样本上下文学习展现出有前景的能力。然而,在低资源场景下充分利用LLMs将问题解析为逻辑形式仍面临巨大挑战。为应对这些难题,我们提出了Interactive-KBQA,这是一个旨在通过与知识库(KBs)直接交互来生成逻辑形式的框架。在此框架内,我们开发了三种通用的KB交互API。针对每一类复杂问题,我们设计了示例来引导LLMs完成推理过程。我们的方法在WebQuestionsSP、ComplexWebQuestions、KQA Pro和MetaQA数据集上,仅使用极少量的示例(shots)就取得了有竞争力的结果。重要的是,我们的方法支持人工干预,允许对LLM的输出进行迭代优化。通过标注一个包含逐步推理过程的数据集,我们展示了模型的适应性,并突显了其为该领域带来显著改进的潜力。