自动优化LLM游戏智能体提示词,无需微调即可显著提升性能。
Environment-Grounded Automated Prompt Optimization for LLM Game Agents

- 将提示词分解为目标描述与动作选择两个智能体,通过环境反馈迭代优化。
- 在BabyAI任务中,使原本0%成功率的任务提升至72.5%成功。
- 适合需要高效部署且无资源微调的LLM应用开发者。
LLM智能体在交互环境中对提示词高度敏感,但提示工程仍依赖人工且任务特异。本文提出一种自动化提示优化框架,将观察到动作的流程分解为目标条件描述智能体与动作选择智能体,并通过基于环境回报的LLM驱动进化循环迭代优化各模块提示词。设计行为分析器以归因任务结果到具体提示组件,利用突变器提出针对性修改,并通过环境回放验证。在BALROG基准的全部五个BabyAI任务上评估,相较于原始RobustCoTAgent,在纯提示与引导提示初始化下均表现更优。优化后性能在所有任务和条件下持续提升,无需更新模型权重。在多步协作任务PutNext中,原方法成功率为0%,本框架使用相同基底LLM达到72.5%成功率。结果表明,多智能体结构结合自动提示优化,可在不微调模型的前提下显著增强LLM能力。
原文摘要 · Abstract (English)
LLM agents in interactive environments are highly sensitive to their prompts, yet prompt engineering remains a manual, task-specific process. We introduce an automated prompt optimization framework for LLM agents that decomposes the observation-to-action pipeline into a goal-conditioned descriptor agent and an action selection agent, and iteratively refines each module's prompt through an LLM-driven evolutionary loop guided by environment returns. We propose a behavior analyzer to attribute episode outcomes to specific prompt components, and a mutator to propose targeted revisions to the prompt, before validating them through environment rollouts. We evaluate on all five BabyAI tasks in the BALROG benchmark, comparing our pipeline against BALROG's RobustCoTAgent under both plain and guided prompt initializations. Optimization improves performance consistently across tasks and conditions, without requiring updates to the model weights. On PutNext, a multi-step coordination task where the RobustCoTAgent achieves 0% success, our framework reaches up to 72.5% success rate using the same underlying LLM with optimized prompts. These results suggest that a multi-agent framework, combined with automatic prompt optimization, enhances LLMs without the need for fine-tuning or extensive human supervision.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。