Large language models (LLMs) encode parametric knowledge about world facts and have shown remarkable performance in knowledge-driven NLP tasks. However, their reliance on parametric knowledge may cause them to overlook contextual cues, leading to incorrect predictions in context-sensitive NLP tasks (e.g., knowledge acquisition tasks). In this paper, we seek to assess and enhance LLMs' contextual faithfulness in two aspects: knowledge conflict and prediction with abstention. We demonstrate that LLMs' faithfulness can be significantly improved using carefully designed prompting strategies. In particular, we identify opinion-based prompts and counterfactual demonstrations as the most effective methods. Opinion-based prompts reframe the context as a narrator's statement and inquire about the narrator's opinions, while counterfactual demonstrations use instances containing false facts to improve faithfulness in knowledge conflict situations. Neither technique requires additional training. We conduct experiments on three datasets of two standard NLP tasks, machine reading comprehension and relation extraction, and the results demonstrate significant improvement in faithfulness to contexts.
翻译:大型语言模型(LLMs)编码关于世界事实的参数化知识,在知识驱动的NLP任务中表现出了卓越的性能。然而,它们对参数化知识的依赖可能导致它们忽视上下文线索,在上下文敏感的NLP任务(例如,知识获取任务)中导致错误的预测。在本文中,我们试图评估和增强LLMs在两个方面的上下文可靠性:知识冲突和预测与弃权。我们展示了用精心设计的提示策略可以显著改善LLMs的上下文可靠性。特别是,我们确定了基于观点的提示和反事实演示为最有效的方法。基于观点的提示将上下文重新构造为叙述者的陈述,并询问叙述者的意见,而反事实演示使用包含错误事实的实例来改善在知识冲突情况下的可靠性。两种技术都不需要额外的训练。我们对两个标准NLP任务的三个数据集进行了实验,机器阅读理解和关系提取,结果显示了对上下文的显着改进。