This paper studies the impact of retrieved ideological texts on the outputs of large language models (LLMs). While interest in understanding ideology in LLMs has recently increased, little attention has been given to this issue in the context of Retrieval-Augmented Generation (RAG). To fill this gap, we design an external knowledge source based on ideological loaded texts about COVID-19 treatments. Our corpus is based on 1,117 academic articles representing discourses about controversial and endorsed treatments for the disease. We propose a corpus linguistics framework, based on Lexical Multidimensional Analysis (LMDA), to identify the ideologies within the corpus. LLMs are tasked to answer questions derived from three identified ideological dimensions, and two types of contextual prompts are adopted: the first comprises the user question and ideological texts; and the second contains the question, ideological texts, and LMDA descriptions. Ideological alignment between reference ideological texts and LLMs' responses is assessed using cosine similarity for lexical and semantic representations. Results demonstrate that LLMs' responses based on ideological retrieved texts are more aligned with the ideology encountered in the external knowledge, with the enhanced prompt further influencing LLMs' outputs. Our findings highlight the importance of identifying ideological discourses within the RAG framework in order to mitigate not just unintended ideological bias, but also the risks of malicious manipulation of such models.
翻译:本文研究了检索到的意识形态文本对大型语言模型(LLM)输出的影响。尽管近来对理解LLM中意识形态的兴趣有所增加,但在检索增强生成(RAG)的背景下,此问题却鲜有关注。为填补这一空白,我们设计了一个基于关于COVID-19治疗方案的意识形态负载文本的外部知识源。我们的语料库基于1117篇学术文章,代表了关于该疾病有争议和受认可治疗方案的论述。我们提出了一个基于词汇多维分析(LMDA)的语料库语言学框架,以识别语料库内的意识形态。我们要求LLM回答源自三个已识别意识形态维度的问题,并采用两种类型的上下文提示:第一种包含用户问题和意识形态文本;第二种包含问题、意识形态文本以及LMDA描述。参考意识形态文本与LLM回答之间的意识形态对齐度,通过词汇和语义表示的余弦相似度进行评估。结果表明,基于检索到的意识形态文本的LLM回答,与外部知识中遇到的意识形态更为一致,而增强提示进一步影响了LLM的输出。我们的研究结果强调了在RAG框架内识别意识形态话语的重要性,这不仅是为了减轻非预期的意识形态偏见,也是为了降低恶意操纵此类模型的风险。