arXiv:2603.21520cs.CL2026-03被引 3

让AI自动积累和优化提示词,越用越聪明。

Generalizable Self-Evolving Memory for Automatic Prompt Optimization

  • 用双记忆机制记录成功策略和错误模式
  • 在多个任务上表现优于现有方法,成本更低
  • 适合长期迭代优化提示词的场景

自动提示词优化是适配大语言模型到下游任务的有前景方法,但现有方法通常针对特定任务搜索单一提示,限制了跨异构查询的泛化能力,也难以积累可复用的提示知识。本文提出MemAPO框架,将提示优化重新定义为可泛化且自演化的经验积累过程。该框架采用双记忆机制,将成功的推理路径提炼为可复用的策略模板,同时将错误生成组织为结构化的错误模式,捕捉反复出现的失败模式。面对新提示时,框架检索相关策略与错误模式,组合出促进有效推理并规避已知错误的提示。通过迭代自我反思与记忆编辑,MemAPO持续更新记忆,使提示优化随时间改进而非每次从零开始。在多个基准上的实验表明,MemAPO始终优于代表性基线,且显著降低优化成本。

原文摘要 · Abstract (English)

Automatic prompt optimization is a promising approach for adapting large language models (LLMs) to downstream tasks, yet existing methods typically search for a specific prompt specialized to a fixed task. This paradigm limits generalization across heterogeneous queries and prevents models from accumulating reusable prompting knowledge over time. In this paper, we propose MemAPO, a memory-driven framework that reconceptualizes prompt optimization as generalizable and self-evolving experience accumulation. MemAPO maintains a dual-memory mechanism that distills successful reasoning trajectories into reusable strategy templates while organizing incorrect generations into structured error patterns that capture recurrent failure modes. Given a new prompt, the framework retrieves both relevant strategies and failure patterns to compose prompts that promote effective reasoning while discouraging known mistakes. Through iterative self-reflection and memory editing, MemAPO continuously updates its memory, enabling prompt optimization to improve over time rather than restarting from scratch for each task. Experiments on diverse benchmarks show that MemAPO consistently outperforms representative prompt optimization baselines while substantially reducing optimization cost.

提示优化自进化记忆机制

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