arXiv:2508.16603cs.CLcs.AI2025-08被引 1

用智能代理自动优化提示词,兼顾探索与利用。

GreenTEA: Gradient Descent with Topic-modeling and Evolutionary Auto-prompting

  • 引入多智能体协作机制,通过主题建模定位错误模式。
  • 基于遗传算法演化提示词,使模型在多个任务上超越人工提示。
  • 适合需要高效优化提示词的研究者和工程师使用。

高质量提示词对大型语言模型实现优异性能至关重要。然而,手工设计有效提示词耗时且需深厚领域知识,难以扩展。现有自动提示优化方法或过度探索新候选提示,计算成本高;或过度依赖现有提示反馈,易陷入局部最优。为此,我们提出GreenTEA,一种用于自动提示优化的智能体式大模型工作流,平衡了候选提示的探索与知识利用。其由分析代理和生成代理协同工作:分析代理通过主题建模识别当前提示引发的常见错误模式,生成代理据此修改提示以针对性修复缺陷。该优化过程受遗传算法框架指导,通过交叉、变异等操作模拟自然选择,逐步提升模型表现。在多个公开基准数据集上的大量实验表明,GreenTEA在逻辑推理、定量推理、常识判断和伦理决策等任务中,优于人工设计提示及现有最先进的自动优化方法。

原文摘要 · Abstract (English)

High-quality prompts are crucial for Large Language Models (LLMs) to achieve exceptional performance. However, manually crafting effective prompts is labor-intensive and demands significant domain expertise, limiting its scalability. Existing automatic prompt optimization methods either extensively explore new prompt candidates, incurring high computational costs due to inefficient searches within a large solution space, or overly exploit feedback on existing prompts, risking suboptimal optimization because of the complex prompt landscape. To address these challenges, we introduce GreenTEA, an agentic LLM workflow for automatic prompt optimization that balances candidate exploration and knowledge exploitation. It leverages a collaborative team of agents to iteratively refine prompts based on feedback from error samples. An analyzing agent identifies common error patterns resulting from the current prompt via topic modeling, and a generation agent revises the prompt to directly address these key deficiencies. This refinement process is guided by a genetic algorithm framework, which simulates natural selection by evolving candidate prompts through operations such as crossover and mutation to progressively optimize model performance. Extensive numerical experiments conducted on public benchmark datasets suggest the superior performance of GreenTEA against human-engineered prompts and existing state-of-the-arts for automatic prompt optimization, covering logical and quantitative reasoning, commonsense, and ethical decision-making.

提示工程智能体遗传算法LLM

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