大模型的prompt优化往往需要深刻的专家知识和人力成本(尤其是垂直领域),现有的自动prompt优化方法往往难以生成专家级prompt(通常包含 Task Description、Domain Knowledge、Solution Guidance、Exception Handling、Out Formatting等部分)。 为解决这一痛点,本文提出了一种自动化专家级提示词优化策略——PromptAgent。 2 Methodol...
该论文提出了一个基于策略规划的prompt优化框架PromptAgent,通过蒙特卡洛树搜索(MCTS)在庞大的prompt空间进行高效探索,并利用LLM的自我反思能力引入领域知识,生成expert-level的prompts。实验旨在全面评估PromptAgent在不同任务上的优化性能,与基线方法进行比较,并分析其优化的prompts的泛化能力和质量。 3.2 实验设置 Datasets:...
PromptAgent在BIG-Bench Hard (BBH)、特定领域和一般NLP任务的12个任务上应用,显示其明显优于其他提示优化基线。🌱 PromptAgent PromptAgent的核心思想是将提示优化视为一个策略规划问题,使用MCTS来策略性地优化提示过程。MCTS结合了随机模拟与树搜索,不需要对问题领域的明确知识。MCTS的步骤包括选择、扩展、模拟和回...
鉴于此,作者引入了PromptAgent,一个基于代理的框架,通过策略规划和在提示过程中利用错误反馈进行反思,来生成专家级任务提示,恰当地平衡了探索和性能。 图3 (a)蒙特卡罗树搜索规划专家级提示。(b)一个简化的状态转换示例 PromptAgent框架设计 PromptAgent的目标是在任务提示中有效地整合专家先验知识,同时确保对广阔的提示...
APP操作的具体prompt(省略细节)如下: 代码语言:python 代码运行次数:0 运行 AI代码解释 self_explore_task_template="""You are an agent that is trained to complete certain tasks on a smartphone. You will be given a screenshot of a smartphone app. The interactive UI elements on the screenshot are...
At its core, PromptAgent views prompt optimization as a strategic planning problem and employs a principled planning algorithm, rooted in Monte Carlo tree search, to strategically navigate the expert-level prompt space. Inspired by human-like trial-and-error...
PromptAgent This is the official repo for "PromptAgent: Strategic Planning with Language Models Enables Expert-level Prompt Optimization". PromptAgent is a novel automatic prompt optimization method that autonomously crafts prompts equivalent in quality to those handcrafted by experts, i.e., expert-le...
git clone https://github.com/XinyuanWangCS/PromptAgent.gitcdPromptAgent conda create -n prompt_agent conda activate prompt_agent pip install -r requirements.txt Quick Start The following command run PromptAgent to craft an expert prompt for a BIG-bench task,penguins_in_a_table. The running co...
PromptAgent算法将优化过程抽象为强化学习的MDP,包含状态、动作、奖励和模拟等元素,旨在有效集成专家知识并探索优化空间。对于长prompt优化,作者提出将长prompt拆分为多个句子进行逐级优化,同时结合遗传算法和LLM-Evolver进行搜索和历史示例整合,进一步提升优化效果。自动优化prompt的方法为大模型应用带来了显著...
AgentIdentifier:String Properties AgentIdentifier The ARN of the agent with which to use the prompt. Required: Yes Type: String Pattern:^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:agent-alias/[0-9a-zA-Z]{10}/[0-9a-zA-Z]{10}$ ...