让提示词跨模型迁移,不用重调就能保持效果。
PromptBridge: Cross-Model Prompt Transfer for Large Language Models
- 用迭代反思优化法生成适配不同模型的最优提示
- 仅需少量对齐任务即可实现跨模型提示迁移
- 适合频繁换大模型的开发与部署场景
大语言模型广泛应用于代码生成、数学推理和智能体工作流。实际中系统通过商业API或开源部署使用不同模型(如GPT、Claude、Llama),模型生态快速演进,常因能力、成本、部署或隐私需求频繁切换。然而提示词高度依赖模型:为某模型设计的提示直接用于另一模型,性能往往显著下降,我们称之为模型漂移。通过多组实验验证,模型漂移普遍存在且严重。为此提出PromptBridge——一种无需训练的跨模型提示迁移框架,可避免每次换模型都重新优化提示。该方法先通过模型自适应反射提示演化(MAP-RPE)获取源模型与目标模型的最优提示对,再基于这些校准提示对学习跨模型映射关系。测试时,给定源模型提示,即可直接生成适配目标模型的优化提示。单智能体与多智能体实验表明,PromptBridge能持续提升下游任务准确率,大幅降低迁移成本。
原文摘要 · Abstract (English)
Large language models (LLMs) underpin applications in code generation, mathematical reasoning, and agent-based workflows. In practice, systems access LLMs via commercial APIs or open-source deployments, and the model landscape (e.g., GPT, Claude, Llama) evolves rapidly. This rapid evolution forces frequent model switches driven by capability, cost, deployment constraints, and privacy. Yet prompts are highly model-sensitive: reusing a prompt engineered for one model on another often yields substantially worse performance than a prompt optimized for the target model. We term this phenomenon Model Drifting. Through extensive empirical analysis across diverse LLM configurations, we show that model drifting is both common and severe. To address this challenge, we introduce PromptBridge, a training-free framework that preserves prompt effectiveness under model switches, enabling cross-model prompt transfer without costly per-task or per-model re-optimization. PromptBridge requires only a small set of alignment tasks for calibration. It first applies Model-Adaptive Reflective Prompt Evolution (MAP-RPE) to obtain task- and model-specific optimal prompts via iterative reflective refinement and quantitative evaluation. Using the resulting calibrated prompt pairs for the source and target models, PromptBridge learns a cross-model prompt mapping. At test time, i.e., for an unseen task, given a source-model prompt, this mapping directly produces an optimized prompt for the target model. Experiments in single-agent and multi-agent settings show that PromptBridge consistently improves downstream accuracy while reducing migration effort. The code will be available soon.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。