Refine-n-Judge: Curating High-Quality Preference Chains for LLM-Fine-Tuning

Derin Cayir, Renjie Tao, Rashi Rungta, Kai Sun, Sean Chen, Haidar Khan, Minseok Kim, Julia Reinspach, Yue Liu · OpenReview

Abstract

Large Language Models (LLMs) have demonstrated remarkable progress through preference-based fine-tuning, which critically depends on the quality of the underlying training data. While human feedback is essential for improving data quality, it is costly and does not scale well. In this paper, we introduce Refine-n-Judge, an automated iterative approach that leverages a single LLM as both a refiner and a judge to enhance dataset quality. Unlike existing iterative refinement methods, Refine-n-Judge employs an LLM to both generate refinements and explicitly evaluate each improvement, ensuring that every iteration meaningfully enhances the dataset without requiring additional human annotation or a separate reward model. At each step, the LLM refines a response and judges whether the refinement is an improvement over the previous answer. This process continues until the LLM prefers the initial answer over the refinement, indicating no further improvements. This produces sequences of increasing quality, preference-labeled responses ideal for fine-tuning. We demonstrate the effectiveness of Refine-n-Judge across a range of public datasets spanning five corpora, targeting tasks such as coding, math, and conversation. Models (Llama 3.1-8B and Llama 3.3-70B) fine-tuned on Refine-n-Judge-enhanced datasets were preferred by LLM judges in over 74% of comparisons against models tuned on the original dataset by GPT-4. Additionally, we report performance gains: +5% on AlpacaEval and AlpacaEval 2.0, and +19% on MT-Bench. Our results indicate that Refine-n-Judge produces high-quality datasets and scalable model improvements.

Introduction

Fine-tuning Large Language Models (LLMs) is a bit like coaching an athlete: the quality of the training data determines the ceiling of the performance. While human feedback (RLHF) is the gold standard for high-quality data, it is notoriously expensive and difficult to scale. Existing "self-refinement" methods often suffer from "drift," where a model might change its answer without necessarily improving it, often leading to unnecessary verbosity.

Refine-n-Judge addresses this "data bottleneck" by introducing an automated framework that turns a single LLM into both a creator and a rigorous editor. By curating high-quality "preference chains," the system provides a scalable, human-free way to ensure that every iteration of a dataset represents a meaningful improvement in quality.

The Refine-n-Judge Framework

The core of the system is an iterative, automated pipeline where an LLM acts as both a refiner and a judge to systematically improve dataset quality. By explicitly evaluating every refinement step, the system generates sequences of increasing quality ideal for Direct Preference Optimization (DPO) and Supervised Fine-Tuning (SFT).

The Refine-n-Judge architecture illustrates the iterative loop between the LLM-Refine and LLM-Judge components.

The loop consists of three main stages:

  1. Refinement: Given a query and an initial answer, the LLM generates specific feedback based on criteria like accuracy, clarity, and conciseness, then produces a refined version.
  2. Judgment: A "Judge" (the same or a different LLM) compares the new answer against the previous one. It assigns scores based on the same criteria and decides which one is superior.
  3. Iteration & Termination: If the judge prefers the refined answer, it becomes the new baseline, and the loop repeats. If the judge prefers the previous answer—indicating that further refinement is degrading quality—the process terminates.

Iterative Refinement in Practice

This process creates a Preference Chain: a sequence of answers where each subsequent answer is demonstrably better than the last. This prevents "verbosity drift," ensuring that refinements are substantive rather than just longer.

A step-by-step example showing how an initial response is iteratively improved and evaluated against specific criteria.

As shown in the example, the judge component acts as a filter. The researchers found that the LLM-Judge is highly consistent in early stages when improvements are obvious. As answers reach high quality, the judge’s confidence naturally drops, providing a data-driven signal for when to stop refining.

Experimental Results and Benchmarks

The researchers tested the framework across five diverse corpora (Acronym, UltraChat, TruthfulQA, OpenAssistant, and TULU3). The results suggest that automated curation is catching up to human-labeled data:

  • Win Rates: Models fine-tuned on Refine-n-Judge data were preferred by GPT-4 in over 74% of direct comparisons against models tuned on the original, unrefined datasets.
  • Benchmark Gains: Fine-tuning Llama 3.1-8B and Llama 3.3-70B on the curated data led to a 5% increase on AlpacaEval 2.0 and a significant 19% increase on MT-Bench.
  • Robustness to Noise: The system effectively "fixes" bad data. When fed intentionally misleading or verbose answers, Refine-n-Judge improved accuracy by 85% and reduced unnecessary tokens by 52%.

Conclusion

Refine-n-Judge demonstrates that an LLM can effectively identify and fix its own misconceptions if it is prompted to look at the answer through the lens of specific quality criteria. By generating over 78,000 high-quality preference-ranked chains, this method provides a scalable path for improving modern frontier models without the prohibitive cost of human annotation.

Summary updated

Abstract

Large Language Models (LLMs) have demonstrated remarkable progress through preference-based fine-tuning, which critically depends on the quality of the underlying training data. While human feedback is essential for improving data quality, it is costly and does not scale well. In this paper, we introduce Refine-n-Judge, an automated iterative approach that leverages a single LLM as both a refiner and a judge to enhance dataset quality. Unlike existing iterative refinement methods, Refine-n-Judge employs an LLM to both generate refinements and explicitly evaluate each improvement, ensuring that every iteration meaningfully enhances the dataset without requiring additional human annotation or a separate reward model. At each step, the LLM refines a response and judges whether the refinement is an improvement over the previous answer. This process continues until the LLM prefers the initial answer over the refinement, indicating no further improvements. This produces sequences of increasing quality, preference-labeled responses ideal for fine-tuning. We demonstrate the effectiveness of Refine-n-Judge across a range of public datasets spanning five corpora, targeting tasks such as coding, math, and conversation. Models (Llama 3.1-8B and Llama 3.3-70B) fine-tuned on Refine-n-Judge-enhanced datasets were preferred by LLM judges in over 74% of comparisons against models tuned on the original dataset by GPT-4. Additionally, we report performance gains: +5% on AlpacaEval and AlpacaEval 2.0, and +19% on MT-Bench. Our results indicate that Refine-n-Judge produces high-quality datasets and scalable model improvements.
BibTeX
@misc{cayir2025refine,
  author = {Derin Cayir and Renjie Tao and Rashi Rungta and Kai Sun and Sean Chen and Haidar Khan and Minseok Kim and Julia Reinspach and Yue Liu},
  title = {{Refine-n-Judge: Curating High-Quality Preference Chains for LLM-Fine-Tuning}},
  year = {2025},
  eprint = {2508.01543},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.01543},
}
Figure