MAG-V: A Multi-Agent Framework for Synthetic Data Generation and Verification

📄 arXiv: 2412.04494v2 📥 PDF

作者: Saptarshi Sengupta, Harsh Vashistha, Kristal Curtis, Akshay Mallipeddi, Abhinav Mathur, Joseph Ross, Liang Gou

分类: cs.CL

发布日期: 2024-11-28 (更新: 2025-01-10)


💡 一句话要点

MAG-V:多智能体框架用于合成数据生成与轨迹验证,提升Agent性能。

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 多智能体系统 合成数据生成 轨迹验证 Agent测试 远程监督

📋 核心要点

  1. Agent测试面临客户查询数据获取耗时的问题,且Agent对工具调用序列的依赖可能导致意外行为。
  2. MAG-V框架通过多智能体协作,生成模拟客户查询的合成数据,并逆向生成问题进行轨迹验证。
  3. 实验表明,合成数据可提升Agent性能,且基于传统ML的轨迹验证方法优于GPT-4o,媲美GPT-4。

📝 摘要(中文)

本文提出MAG-V,一个多智能体框架,旨在解决Agent测试中客户查询数据稀缺和轨迹验证困难的问题。该框架首先生成模拟客户查询的数据集,然后从响应中逆向工程出替代问题,用于轨迹验证。实验结果表明,合成数据能够提升Agent在真实客户查询上的性能。此外,受远程监督启发,使用传统机器学习模型进行轨迹验证的方法,在构建的数据集上,比GPT-4o判别器基线提高了11%的准确率,并与GPT-4判别器的性能相匹配。该方法是朝着统一多样化任务Agent,以实现对齐目标迈出的一步。

🔬 方法详解

问题定义:Agent的测试和验证面临两个主要问题:一是获取大规模的客户查询数据非常耗时;二是Agent对工具调用序列(轨迹)的高度依赖可能导致不可预测或不正确的行为。现有的方法难以高效地生成高质量的测试数据,并且缺乏有效的轨迹验证机制,从而影响了Agent的可靠性和性能。

核心思路:MAG-V的核心思路是利用多智能体框架来模拟客户查询的生成过程,并从Agent的响应中逆向工程出替代问题,用于验证Agent的轨迹是否合理。通过这种方式,可以有效地生成大规模的合成数据,并对Agent的行为进行全面的评估和验证。

技术框架:MAG-V框架包含两个主要阶段:数据生成和轨迹验证。在数据生成阶段,多个智能体协同工作,模拟客户查询的生成过程。在轨迹验证阶段,从Agent的响应中逆向工程出替代问题,并使用机器学习模型来评估Agent的轨迹是否合理。整体流程包括:1. 使用LLM生成初始问题;2. Agent根据问题执行工具调用并生成响应;3. 从响应中逆向生成替代问题;4. 使用传统ML模型或LLM判别器验证轨迹的正确性。

关键创新:MAG-V的关键创新在于其多智能体协作的数据生成方法和基于逆向工程的轨迹验证机制。传统方法通常依赖人工标注或简单的规则生成数据,而MAG-V能够更真实地模拟客户查询的复杂性和多样性。此外,通过从响应中逆向生成问题,可以更有效地验证Agent的轨迹是否合理,从而提高Agent的可靠性。

关键设计:在数据生成阶段,需要设计合适的智能体角色和交互机制,以确保生成的数据具有足够的代表性和多样性。在轨迹验证阶段,需要选择合适的机器学习模型或LLM判别器,并设计合适的特征和损失函数,以提高轨迹验证的准确性。论文中使用了传统机器学习模型,并借鉴了远程监督的思想进行训练。具体参数设置和网络结构细节未知。

🖼️ 关键图片

fig_0
fig_1

📊 实验亮点

实验结果表明,使用MAG-V生成的合成数据可以提高Agent在真实客户查询上的性能。此外,基于传统机器学习模型的轨迹验证方法,在构建的数据集上,比GPT-4o判别器基线提高了11%的准确率,并与GPT-4判别器的性能相匹配。这些结果验证了MAG-V框架的有效性和优越性。

🎯 应用场景

MAG-V框架可应用于各种需要Agent进行任务处理的场景,例如客户服务、智能助手、自动化流程等。通过生成合成数据和验证Agent轨迹,可以提高Agent的可靠性和性能,降低部署和维护成本。该研究对于推动Agent技术在实际应用中的发展具有重要意义。

📄 摘要(原文)

Extending the capabilities of Large Language Models (LLMs) with functions or tools for environment interaction has led to the emergence of the agent paradigm. In industry, training an LLM is not always feasible because of the scarcity of domain data, legal holds on proprietary customer data, rapidly changing business requirements, and the need to prototype new assistants. Agents provide an elegant solution to the above by relying on the zero-shot reasoning abilities of the underlying LLM and utilizing tools to explore and reason over customer data and respond to user requests. However, there are two concerns here: (I) acquiring large scale customer queries for agent testing is time-consuming, and (II) high reliance on the tool call sequence (or trajectory) followed by the agent to respond to user queries may lead to unexpected or incorrect behavior. To address this, we propose MAG-V, a multi-agent framework to first generate a dataset of questions that mimic customer queries; and second, reverse-engineer alternate questions from the responses for trajectory verification. Initial results indicate that our synthetic data can improve agent performance on actual customer queries. Furthermore, our trajectory verification methodology, inspired by distant supervision and using traditional machine learning (ML) models, outperforms a GPT-4o judge baseline by 11% accuracy and matches the performance of a GPT-4 judge on our constructed dataset. Overall, our approach is a step towards unifying diverse task agents into a cohesive framework for achieving an aligned objective.