Conversational agents powered by large language models (LLMs) with tool integration achieve strong performance on fixed task-oriented dialogue datasets but remain vulnerable to unanticipated, user-induced errors. Rather than focusing on error prevention, this work focuses on error recovery, which necessitates the accurate diagnosis of erroneous dialogue contexts and execution of proper recovery plans. Under realistic constraints precluding model fine-tuning or prompt modification due to significant cost and time requirements, we explore whether agents can recover from contextually flawed interactions and how their behavior can be adapted without altering model parameters and prompts. To this end, we propose Reasoning Inception (ReIn), a test-time intervention method that plants an initial reasoning into the agent's decision-making process. Specifically, an external inception module identifies predefined errors within the dialogue context and generates recovery plans, which are subsequently integrated into the agent's internal reasoning process to guide corrective actions, without modifying its parameters or system prompts. We evaluate ReIn by systematically simulating conversational failure scenarios that directly hinder successful completion of user goals: user's ambiguous and unsupported requests. Across diverse combinations of agent models and inception modules, ReIn substantially improves task success and generalizes to unseen error types. Moreover, it consistently outperforms explicit prompt-modification approaches, underscoring its utility as an efficient, on-the-fly method. In-depth analysis of its operational mechanism, particularly in relation to instruction hierarchy, indicates that jointly defining recovery tools with ReIn can serve as a safe and effective strategy for improving the resilience of conversational agents without modifying the backbone models or system prompts.
翻译:基于大型语言模型(LLM)并集成工具功能的对话智能体在固定任务导向对话数据集上表现出色,但在面对用户引发的非预期错误时仍显脆弱。本研究不侧重于错误预防,而聚焦于错误恢复——这要求准确诊断存在错误的对话上下文并执行恰当的恢复方案。在现实约束条件下(由于高昂成本与时间要求而无法进行模型微调或提示修改),我们探究智能体能否从存在上下文缺陷的交互中恢复,以及如何在不改变模型参数与提示的前提下调整其行为。为此,我们提出推理植入(ReIn),一种在测试时通过植入初始推理来干预智能体决策过程的方法。具体而言,外部植入模块首先识别对话上下文中预定义的错误并生成恢复方案,随后将该方案整合至智能体的内部推理流程中以引导其执行纠正操作,整个过程无需修改模型参数或系统提示。我们通过系统模拟直接阻碍用户目标达成的对话失败场景(用户模糊请求与不受支持的请求)来评估ReIn。在多种智能体模型与植入模块的组合实验中,ReIn显著提升了任务成功率,并能泛化至未见错误类型。此外,其性能持续优于显式提示修改方法,凸显了其作为高效即时恢复方法的实用性。对其运行机制(特别是与指令层级结构的关联)的深入分析表明,结合ReIn共同定义恢复工具可成为一种安全有效的策略,能在不修改骨干模型或系统提示的前提下提升对话智能体的鲁棒性。