无需训练数据,实时生成针对性提示,提升大模型表现
TATRA: Training-Free Instance-Adaptive Prompting Through Rephrasing and Aggregation
- 通过动态重构实例级示范样例,实现无训练数据的即时提示生成
- 在文本分类任务上媲美甚至超越依赖训练数据的优化方法
- 适合需要快速适配新任务、缺乏标注数据的场景
大型语言模型虽在对齐性上显著进步,但其行为仍高度依赖提示语句的措辞。现有自动提示工程方法通常需任务特定训练集、依赖昂贵的迭代优化以生成单一数据集级提示,且每换任务都需重新运行。本文提出TATRA,一种无需数据集的提示方法,通过实时合成示范样例,为用户输入指令构建实例级少样本提示。TATRA不依赖标注训练数据,也无需任务特异性优化循环,同时保留基于示范的提示优势。在标准文本分类基准上,TATRA表现匹配或超越依赖训练数据与大规模搜索的强基线;在数学推理任务(GSM8K和DeepMath)上,达到当前最优性能,优于那些专门针对这些任务进行提示优化的方法。结果表明,为每个实例动态构造有效上下文示例,比长时间昂贵的优化流程更关键。代码将在论文接受后公开,地址:https://github.com/BMD223/TATRA
原文摘要 · Abstract (English)
Large Language Models (LLMs) have improved substantially alignment, yet their behavior remains highly sensitive to prompt phrasing. This brittleness has motivated automated prompt engineering, but most existing methods (i) require a task-specific training set, (ii) rely on expensive iterative optimization to produce a single dataset-level prompt, and (iii) must be rerun from scratch for each new task. We introduce TATRA, a dataset-free prompting method that constructs instance-specific few-shot prompts by synthesizing on-the-fly examples to accompany a user-provided instruction. TATRA requires no labeled training data and avoids task-specific optimization loops, while retaining the benefits of demonstration-based prompting. Across standard text classification benchmarks, TATRA matches or improves over strong prompt-optimization baselines that depend on training data and extensive search. On mathematical reasoning benchmarks, TATRA achieves state-of-the-art performance on GSM8K and DeepMath, outperforming methods that explicitly optimize prompts on those tasks. Our results suggest that per-instance construction of effective in-context examples is more important than running long, expensive optimization loops to produce a single prompt per task. We will make all code publicly available upon acceptance of the paper. Code is available at https://github.com/BMD223/TATRA
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。