Large language models (LLMs) have demonstrated remarkable capabilities across various tasks but still face challenges such as hallucinations. One potential reason for hallucinations is the lack of relevant knowledge or context. Thus, a promising solution to mitigate this issue involves instructing LLMs to respond with "I do not know" when a question falls outside their knowledge domain or the provided context. However, in this work, we observed that LLMs struggle to admit their lack of knowledge, primarily due to existing instruction datasets designed to encourage specific answers. To improve large language models' capability to recognize the boundaries of their knowledge, we propose a novel approach called uncertainty-sensitive tuning. This method involves two-stage training designed for uncertainty recognition and prompt-sensitive activation. In the first stage, we guide the LLM to reject unknown questions. In the second stage, we recover the decreased performance in QA tasks by incorporating designed causal instructions. By leveraging this method, we aim to enhance the model's ability to identify areas of uncertainty. The experimental results demonstrate that our proposed uncertainty-sensitive tuning method significantly improves the performance of the Llama2-chat-7B model. Specifically, it achieves a substantial 34.7% improvement in handling questions involving knowledge gaps compared to the original model. Moreover, our approach outperforms GPT-4, exhibiting a 9.4% increase in overall performance. We open-source the model and code on GitHub.
翻译:大语言模型(LLM)已在多种任务中展现出卓越能力,但仍面临诸如幻觉等挑战。产生幻觉的一个潜在原因是模型缺乏相关知识或上下文。因此,一个有望缓解该问题的方法是指导LLM在问题超出其知识领域或给定上下文时以“我不知道”进行回应。然而,在本研究中,我们观察到LLM难以承认自身知识的缺乏,这主要源于现有指令数据集旨在鼓励特定答案的设计。为提升大语言模型识别自身知识边界的能力,我们提出了一种称为不确定性敏感调优的新方法。该方法包含针对不确定性识别与提示敏感激活的两阶段训练:第一阶段引导LLM拒答未知问题;第二阶段通过引入设计的因果指令恢复其在问答任务中下降的性能。通过运用此方法,我们旨在增强模型识别不确定领域的能力。实验结果表明,我们提出的不确定性敏感调优方法显著提升了Llama2-chat-7B模型的性能。具体而言,在处理涉及知识空白的问题上,相较于原始模型实现了34.7%的显著提升。此外,我们的方法整体性能超越GPT-4达9.4%。相关模型与代码已在GitHub开源。