This paper introduces the Definite Finite Automaton augmented large language model (DFA-LLM), a novel framework designed to enhance the capabilities of conversational agents using large language models (LLMs). Traditional LLMs face challenges in generating regulated and compliant responses in special scenarios with predetermined response guidelines, like emotional support and customer service. Our framework addresses these challenges by embedding a Definite Finite Automaton (DFA), learned from training dialogues, within the LLM. This structured approach enables the LLM to adhere to a deterministic response pathway, guided by the DFA. The advantages of DFA-LLM include an interpretable structure through human-readable DFA, context-aware retrieval for responses in conversations, and plug-and-play compatibility with existing LLMs. Extensive benchmarks validate DFA-LLM's effectiveness, indicating its potential as a valuable contribution to the conversational agent.
翻译:本文介绍了确定性有限自动机增强的大型语言模型(DFA-LLM),这是一种旨在提升基于大型语言模型(LLM)的对话代理能力的新框架。传统LLM在特定场景(如情感支持和客户服务)中需要遵循预先设定的响应指南时,难以生成规范且合规的回复。我们的框架通过在LLM中嵌入从训练对话中学习到的确定性有限自动机(DFA)来解决这些挑战。这种结构化方法使LLM能够遵循由DFA引导的确定性响应路径。DFA-LLM的优势包括:通过可读的DFA实现可解释结构、在对话中进行上下文感知的响应检索,以及与现有LLM的即插即用兼容性。广泛的基准测试验证了DFA-LLM的有效性,表明其作为对话代理领域一项有价值贡献的潜力。