DFA-RAG:基于确定有限自动机的大型语言模型对话语义路由器
DFA-RAG: Conversational Semantic Router for Large Language Model with Definite Finite Automaton
AI总结:
本文提出DFA-RAG框架,通过在LLM中嵌入从训练对话学习的确定有限自动机作为语义路由器,结合RAG策略选择上下文对齐的对话示例,使模型在情感支持等特定场景下遵循确定性响应路径,提升合规性与可解释性。
摘要:
本文介绍了结合确定有限自动机的检索增强大型语言模型(DFA-RAG),这是一个旨在增强使用大型语言模型(LLMs)的对话智能体能力的新颖框架。传统LLMs在具有预定响应指南的特定场景(如情感支持和客户服务)中,面临生成受监管且合规响应的挑战。我们的框架通过在LLM中嵌入从训练对话中学习到的确定有限自动机(DFA)来解决这些挑战。这种结构化方法作为语义路由器,使LLM能够遵循确定性的响应路径。该路由通过检索增强生成(RAG)策略实现,该策略仔细选择与当前对话上下文对齐的对话示例。DFA-RAG的优势包括通过人类可读的DFA实现可解释结构、对话中响应的上下文感知检索,以及与现有LLM的即插即用兼容性。广泛的基准测试验证了DFA-RAG的有效性,表明其作为对话智能体宝贵贡献的潜力。
英文摘要:
This paper introduces the retrieval-augmented large language model with Definite Finite Automaton (DFA-RAG), 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 acts as a semantic router which enables the LLM to adhere to a deterministic response pathway. The routing is achieved by the retrieval-augmentation generation (RAG) strategy, which carefully selects dialogue examples aligned with the current conversational context. The advantages of DFA-RAG 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-RAG's effectiveness, indicating its potential as a valuable contribution to the conversational agent.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。