Large language models (LLMs), such as ChatGPT and GPT-4, are versatile and can solve different tasks due to their emergent ability and generalizability. However, LLMs sometimes lack domain-specific knowledge to perform tasks, which would also cause hallucination during inference. In some previous works, additional modules like graph neural networks (GNNs) are trained on retrieved knowledge from external knowledge bases, aiming to mitigate the problem of lacking domain-specific knowledge. However, incorporating additional modules: 1) would need retraining additional modules when encountering novel domains; 2) would become a bottleneck since LLMs' strong abilities are not fully utilized for retrieval. In this paper, we propose a paradigm, termed Knowledge Solver (KSL), to teach LLMs to search for essential knowledge from external knowledge bases by harnessing their own strong generalizability. Specifically, we design a simple yet effective prompt to transform retrieval into a multi-hop decision sequence, which empowers LLMs with searching knowledge ability in zero-shot manner. Additionally, KSL is able to provide complete retrieval paths and therefore increase explainability of LLMs' reasoning processes. We conduct experiments on three datasets: CommonsenseQA, OpenbookQA, and MedQA-USMLE, and found that our approach improves LLM baseline performance by a relatively large margin.
翻译:大语言模型(如ChatGPT和GPT-4)因其涌现能力与泛化性而具备通用性,可处理多种任务。然而,大语言模型在执行任务时可能缺乏领域特定知识,这也会在推理过程中引发幻觉现象。部分先前工作通过在外部知识库中检索知识,训练图神经网络等额外模块以缓解领域知识缺失问题。但引入额外模块会面临以下问题:1)面对新领域时需要重新训练;2)大语言模型的强大能力未能被充分用于知识检索,从而形成性能瓶颈。本文提出名为知识求解器(KSL)的新范式,通过利用大语言模型自身的强泛化能力,教导其从外部知识库中自主搜索关键知识。具体而言,我们设计了一种简洁高效的提示策略,将知识检索转化为多跳决策序列,使大语言模型具备零样本知识搜索能力。此外,KSL能够提供完整的检索路径,从而增强大语言模型推理过程的可解释性。我们在CommonsenseQA、OpenbookQA和MedQA-USMLE三个数据集上展开实验,结果表明我们的方法能够以较大幅度提升大语言模型的基线性能。