Prompts as Auto-Optimized Training Hyperparameters: Training Best-in-Class IR Models from Scratch with 10 Gold Labels

Jasper Xian, Saron Samuel, Faraz Khoubsirat, Ronak Pradeep, Md. Arafat Sultan, Radu Florian, Salim Roukos, Avirup Sil, Christopher Potts, Omar KhattabarXiv 2024 · DOI

Introduction

Modern neural Information Retrieval (IR) models have traditionally been data-hungry, requiring hundreds of thousands of labeled query-passage pairs to achieve high performance. This reliance on massive datasets like MS MARCO creates a significant barrier for "long-tail" domains—specialized fields such as legal discovery, rare disease research, or niche technical documentation—where labeled data is scarce and expensive to acquire.

While synthetic data generation using Large Language Models (LLMs) has emerged as a potential solution, it often relies on static, hand-written prompts. If these prompts fail to capture the specific nuances of a task, the resulting training data is sub-optimal. The PATH (Prompts as Auto-optimized Training Hyperparameters) framework addresses this by treating the data-generation prompt as a tunable hyperparameter, allowing for the training of high-performing, small-scale models using as few as 10 gold labels.

The PATH Framework

PATH introduces an iterative loop that "closes the loop" between model performance and data generation. Instead of using a fixed prompt, the system treats the instructions given to the LLM as a variable to be optimized based on the performance of the resulting IR model.

The PATH iterative pipeline for optimizing synthetic training data generation.

As illustrated in the pipeline above, the process consists of four main stages:

  1. Synthetic Generation: An LLM (e.g., GPT-3.5-turbo) uses a candidate prompt to generate synthetic queries for a set of documents.
  2. Model Training: A small "student" encoder model, such as DeBERTa-v3 (86M) or MiniLM (33M), is trained on this synthetic data.
  3. Evaluation: The trained student model is evaluated against a tiny validation set of just 10 gold labels (real human relevance judgments).
  4. Prompt Optimization: Using the DSPy framework and the CA-OPRO optimizer, the system analyzes the evaluation scores. If performance is unsatisfactory, the LLM proposes a refined prompt designed to generate more effective training examples.

By repeating this cycle, PATH learns the optimal way to describe a task to the LLM, ensuring the synthetic data is perfectly tailored to the student model's needs.

Experimental Setup and Datasets

The researchers evaluated PATH using the BIRCO (Benchmark of Information Retrieval tasks with Complex Objectives) benchmark. BIRCO is specifically designed to test models on difficult, non-traditional retrieval tasks where standard keyword matching often fails. The benchmark includes five distinct tasks:

  • ArguA: Retrieving counterarguments for a given argument.
  • CTrial: Matching patient records to appropriate clinical trials.
  • DMAE: Finding computer science research papers based on abstracts.
  • Relic: Linking literary quotations to their original source text.
  • WTB (What's That Book): Identifying books from vague "tip-of-the-tongue" descriptions.

Crucially, the optimization process for each task utilized only 10 positive relevance judgments, simulating an extreme low-resource scenario.

Key Results and Discussion

The results demonstrate that PATH-trained models can outperform significantly larger models trained on vastly more data.

Comparison of PATH performance against baselines and large-scale reference rerankers.

As shown in the table above, the PATH-optimized DeBERTa-v3 (86M) model achieved an average 32.0 nDCG@10 across the BIRCO tasks. This performance is particularly striking when compared to state-of-the-art large language models:

  • Outperforming 7B Models: The 86M parameter DeBERTa model outperformed RankZephyr (7B), which scored 31.3, despite RankZephyr being roughly 80 times larger and trained on over 100,000 labels.
  • Beating Manual Baselines: PATH outperformed manual prompting by an average of 4.5 points, suggesting that automated optimization can discover more effective instructions than human intuition alone.
  • The Necessity of Feedback: Training directly on the 10 gold labels without synthetic data yielded poor results (23.6 nDCG), confirming that the optimized synthetic data is the primary driver of performance.

These findings suggest that the "language" of task description is a critical variable. For instance, in the "Relic" task, optimization moved the prompt from a simple request for an excerpt to a sophisticated instruction to "intelligently formulate an excerpt that seamlessly integrates the quote," resulting in a significant performance boost.

Conclusion and Future Work

PATH proves that high-quality IR models do not always require massive datasets or billions of parameters. By treating prompts as optimizable hyperparameters, researchers can leverage the power of LLMs to bootstrap specialized models for niche domains with minimal human effort.

Future work may involve co-optimizing standard hyperparameters (like learning rates) alongside prompts, exploring the impact of different initial "seed" prompts, and scaling the student models to see if the performance gains continue to grow. For now, PATH offers a powerful new tool for democratizing high-performance information retrieval in data-scarce environments.

Summary updated

Abstract

We develop a method for training small-scale (under 100M parameter) neural information retrieval models with as few as 10 gold relevance labels. The method depends on generating synthetic queries for documents using a language model (LM), and the key step is that we automatically optimize the LM prompt that is used to generate these queries based on training quality. In experiments with the BIRCO benchmark, we find that models trained with our method outperform RankZephyr and are competitive with RankLLama, both of which are 7B parameter models trained on over 100K labels. These findings point to the power of automatic prompt optimization for synthetic dataset generation.
BibTeX
@misc{xian2024prompts,
  author = {Jasper Xian and Saron Samuel and Faraz Khoubsirat and Ronak Pradeep and Md. Arafat Sultan and Radu Florian and Salim Roukos and Avirup Sil and Christopher Potts and Omar Khattab},
  title = {{Prompts as Auto-Optimized Training Hyperparameters: Training Best-in-Class IR Models from Scratch with 10 Gold Labels}},
  year = {2024},
  eprint = {2406.11706},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.11706},
}
Figure