While auxiliary information has become a key to enhancing Large Language Models (LLMs), relatively little is known about how LLMs merge these contexts, specifically contexts generated by LLMs and those retrieved from external sources. To investigate this, we formulate a systematic framework to identify whether LLMs' responses, derived from the integration of generated and retrieved contexts, are attributed to either generated or retrieved contexts. To easily trace the origin of the response, we construct datasets with conflicting contexts, i.e., each question is paired with both generated and retrieved contexts, yet only one of them contains the correct answer. Our experiments reveal a significant bias in several LLMs (GPT-4/3.5 and Llama2) to favor generated contexts, even when they provide incorrect information. We further identify two key factors contributing to this bias: i) contexts generated by LLMs typically show greater similarity to the questions, increasing their likelihood of being selected; ii) the segmentation process used in retrieved contexts disrupts their completeness, thereby hindering their full utilization in LLMs. Our analysis enhances the understanding of how LLMs merge diverse contexts, offering valuable insights for advancing current augmentation methods for LLMs.
翻译:尽管辅助信息已成为增强大型语言模型(LLMs)的关键,但关于LLMs如何融合这些上下文——特别是LLMs生成的上下文与从外部源检索的上下文——的研究仍然相对有限。为探究此问题,我们构建了一个系统性框架,以识别LLMs在整合生成与检索上下文后所生成的响应,究竟归因于生成上下文还是检索上下文。为便于追溯响应来源,我们构建了包含冲突上下文的数据集,即每个问题均配对的生成上下文和检索上下文中,仅有一个包含正确答案。实验结果表明,多个LLMs(GPT-4/3.5和Llama2)存在显著偏向生成上下文的倾向,即便这些上下文提供的是错误信息。我们进一步识别出导致该偏差的两大关键因素:(i)LLMs生成的上下文通常与问题具有更高相似度,从而增加其被选中的可能性;(ii)检索上下文中使用的分段过程破坏了其完整性,进而阻碍LLMs对其充分利用。我们的分析加深了对LLMs如何融合多样化上下文的理解,为改进当前LLMs的增强方法提供了宝贵洞见。