Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

TATRA: Training-Free Instance-Adaptive Prompting Through Rephrasing and Aggregation

About

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

Bartosz Dziuba, Kacper Kuchta, Pawe{\l} Batorski, Przemys{\l}aw Spurek, Paul Swoboda• 2026

Related benchmarks

TaskDatasetResultRank
Mathematical ReasoningMATH 500
Accuracy43.2
442
Text ClassificationTREC
Accuracy86.15
207
Medical Question AnsweringMedQA
Accuracy45.64
153
Text ClassificationMR
Accuracy91.78
106
Text ClassificationSST-5
Accuracy54.66
52
Text ClassificationSubj
CA (%)82.18
48
Text ClassificationCR
CA92.75
44
Mathematical ReasoningDeepMath
Accuracy27.78
30
Text ClassificationAG's News
Accuracy85.61
19
Showing 9 of 9 rows

Other info

Follow for update