arXiv:2511.10051cs.CL2025-11AAAI被引 1

用关系图结构提升大模型多轮对话的指令遵循能力。

GraphIF: Enhancing Multi-Turn Instruction Following for Large Language Models with Relation Graph Prompt

  • 将多轮对话建模为带标签的有向图,显式捕捉跨轮次语义关系。
  • 在两个长对话数据集上,四项评估指标均显著提升。
  • 无需重新训练,可直接接入已有指令微调模型,适合对话系统开发者。

多轮指令遵循对构建能持续遵守指令的智能对话系统至关重要。现有方法主要依赖大规模多轮对话数据集微调大语言模型(LLM),但将每轮回复视为独立任务,未将多轮指令遵循纳入优化目标,导致模型难以处理复杂长距离约束。多轮对话中的跨轮关系可自然建模为带标签的有向边,图结构特别适合建模此类约束。尽管如此,利用图结构增强LLM多轮指令遵循能力尚未被探索。为此,我们提出GraphIF,一种即插即用框架,将多轮对话建模为有向关系图,并通过图提示增强LLM的指令遵循能力。GraphIF包含三个核心组件:(1) 基于代理的关系抽取模块,通过动作触发机制捕捉跨轮语义关系以构建结构化图;(2) 关系图提示生成模块,将结构化图信息转换为自然语言提示;(3) 响应重写模块,利用生成的图提示优化初始模型输出。在两个长多轮对话数据集上的大量实验表明,GraphIF可无缝集成至指令微调的LLM中,并在全部四项多轮指令遵循评估指标上带来显著提升。

原文摘要 · Abstract (English)

Multi-turn instruction following is essential for building intelligent conversational systems that can consistently adhere to instructions across dialogue turns. However, existing approaches to enhancing multi-turn instruction following primarily rely on collecting or generating large-scale multi-turn dialogue datasets to fine-tune large language models (LLMs), which treat each response generation as an isolated task and fail to explicitly incorporate multi-turn instruction following into the optimization objectives. As a result, instruction-tuned LLMs often struggle with complex long-distance constraints. In multi-turn dialogues, relational constraints across turns can be naturally modeled as labeled directed edges, making graph structures particularly suitable for modeling multi-turn instruction following. Despite this potential, leveraging graph structures to enhance the multi-turn instruction following capabilities of LLMs remains unexplored. To bridge this gap, we propose GraphIF, a plug-and-play framework that models multi-turn dialogues as directed relation graphs and leverages graph prompts to enhance the instruction following capabilities of LLMs. GraphIF comprises three key components: (1) an agent-based relation extraction module that captures inter-turn semantic relations via action-triggered mechanisms to construct structured graphs; (2) a relation graph prompt generation module that converts structured graph information into natural language prompts; and (3) a response rewriting module that refines initial LLM outputs using the generated graph prompts. Extensive experiments on two long multi-turn dialogue datasets demonstrate that GraphIF can be seamlessly integrated into instruction-tuned LLMs and leads to significant improvements across all four multi-turn instruction-following evaluation metrics.

多轮对话指令遵循图神经网络提示工程

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。