In modern dialogue systems, the use of Large Language Models (LLMs) has grown exponentially due to their capacity to generate diverse, relevant, and creative responses. Despite their strengths, striking a balance between the LLMs' creativity and their faithfulness to external knowledge remains a key challenge. This paper presents an innovative user-controllable mechanism that modulates the balance between an LLM's imaginative capabilities and its adherence to factual information. Our approach incorporates a numerical tag during the fine-tuning phase of the LLM's training, representing the degree of faithfulness to the reference knowledge in the generated responses. This degree is computed through an automated process that measures lexical overlap using ROUGE scores, semantic similarity using Sentence-BERT embeddings, and an LLM's self-evaluation score. During model inference, users can manipulate this numerical tag, thus controlling the degree of the LLM's reliance on external knowledge. We conduct extensive experiments across various scenarios, demonstrating the adaptability of our method and its efficacy in ensuring the quality and accuracy of the LLM's responses. The results highlight the potential of our approach to enhance the versatility of LLMs while maintaining a balance between creativity and hallucination.
翻译:在现代对话系统中,大型语言模型(LLM)因能生成多样、相关且富有创意的回复而得到广泛应用。然而,如何在LLM的创造力与对外部知识的忠实度之间取得平衡仍是一个关键挑战。本文提出一种创新的用户可控机制,用于调节LLM的想象能力与事实信息遵从度之间的平衡。该方法在LLM微调阶段引入一个数值标签,用于表征生成回复对参考知识的忠实程度。该忠实度通过自动化流程计算,包括基于ROUGE分数的词汇重叠度量、基于Sentence-BERT嵌入的语义相似度,以及LLM的自我评估得分。在模型推理阶段,用户可通过调控该数值标签来控制LLM对外部知识的依赖程度。我们通过多场景下的广泛实验证明了该方法的适应性及其在确保LLM回复质量与准确性方面的有效性。实验结果凸显了该方法在增强LLM多样性的同时维持创造力与幻觉之间平衡的潜力。