Abstract
Instruction tuning benefits from large and diverse datasets; however, creating such datasets involves a high cost of human labeling. While synthetic datasets generated by large language models (LLMs) have partly solved this issue, they often contain low-quality data. One effective solution is selectively annotating unlabeled instructions, especially given the relative ease of acquiring unlabeled instructions or texts from various sources. However, how to select unlabeled instructions is not well-explored, especially in the context of LLMs. Further, traditional data selection methods, relying on input embedding space density, tend to underestimate instruction sample complexity, whereas those based on model prediction uncertainty often struggle with synthetic label quality. Therefore, we introduce SelectLLM, an alternative framework that leverages the capabilities of LLMs to more effectively select unlabeled instructions. SelectLLM consists of two key steps: Coreset-based clustering of unlabeled instructions for diversity and then prompting an LLM to identify the most beneficial instructions within each cluster. Our experiments demonstrate that SelectLLM matches or outperforms other state-of-the-art methods in instruction tuning benchmarks. It exhibits remarkable consistency across human and synthetic datasets, along with better cross-dataset generalization, as evidenced by a 10% performance improvement on the Cleaned Alpaca test set when trained on Dolly data.
Introduction
To make a base language model useful, researchers use "instruction tuning"—fine-tuning the model on pairs of instructions and responses. However, we face a "quality vs. quantity" dilemma. Human data is high-quality but expensive and slow to produce, while synthetic data is cheap but often contains noisy, repetitive, or low-quality examples that can degrade model performance.
The challenge lies in Active Learning: out of a massive pool of unlabeled instructions, which ones should be prioritized for labeling? Existing methods typically focus on input density (diversity) or output uncertainty (difficulty). However, these methods often ignore the inherent instructional value or require expensive synthetic responses just to decide what to label.
The SelectLLM Framework
SelectLLM introduces a two-step "Select-then-Annotate" pipeline that leverages the latent reasoning capabilities of advanced LLMs to judge the potential of an instruction before it is ever labeled. This approach bypasses the "noisy label" problem where models might discard high-quality instructions due to poor synthetic answers.
1. Diversity via Equal-Size Clustering
To ensure the selected data covers a wide range of tasks, SelectLLM embeds unlabeled instructions into a vector space and applies K-means clustering. By ensuring each cluster is of equal size, the framework prevents the model from over-selecting from specific task types, maintaining a balanced representation of the instruction space.
2. Quality via LLM Prompting
Instead of relying on mathematical proxies for difficulty, SelectLLM asks a "teacher" LLM (e.g., GPT-3.5) to evaluate batches of instructions from each cluster. The prompt directs the LLM to select instructions that are "clear, relevant, complex, and significant." By selecting top candidates from every cluster, the final subset is both diverse and high-quality.
Experimental Results
The framework was evaluated using the Dolly (human-generated) and Cleaned Alpaca (synthetic) datasets, with performance measured on MT-Bench and AlpacaEval2.
- Superior Performance: On the Dolly dataset (3k samples), SelectLLM achieved an MT-Bench score of 6.12, significantly outperforming the Alpagasus baseline (5.69) and random selection (5.44).
- Cost Efficiency: SelectLLM reduces API costs by nearly 90%. Selecting 3k samples from the Alpaca pool cost $2.82, compared to $23.76 for methods requiring full synthetic response generation and scoring.
- Data Efficiency: A model trained on just 3,000 instructions selected by SelectLLM achieved approximately 99% of the performance of a model trained on the full 14,000-instance Dolly dataset.
Discussion and Limitations
SelectLLM demonstrates that LLMs can effectively predict the utility of an instruction just by reading it. Ablation studies confirmed that the combination of clustering (diversity) and LLM selection (quality) is essential for peak performance.
However, the framework's success is dependent on the "teacher" LLM; while GPT models performed well, smaller open-source models were less effective at identifying high-quality instructions. Additionally, the selection criteria are sensitive to prompt engineering, and scaling the "scouting" process to millions of instructions remains a cost hurdle for massive-scale pre-training.
Summary updated