Evaluating the Diversity and Quality of LLM Generated Content

Alexander Shypula, Shuo Li, Botong Zhang, Vishakh Padmakumar, Kayo Yin, Osbert Bastani · DOI

Abstract

As Large Language Models (LLMs) are increasingly deployed for creative and synthetic data tasks, concerns regarding "mode collapse"—the reduction of output diversity due to alignment—have intensified. This paper introduces Effective Semantic Diversity, a novel framework that evaluates diversity only among outputs that satisfy a minimum quality threshold. By analyzing 19 models across programming and natural language domains, the study demonstrates that while preference-tuning (e.g., RLHF, DPO) may reduce raw lexical variety, it significantly enhances the volume of unique, high-quality content produced. These findings suggest that alignment processes refine rather than restrict the useful creative space of LLMs.

Introduction

The prevailing narrative in LLM research suggests a fundamental trade-off between alignment and diversity. Traditional metrics like Self-BLEU often penalize models for producing structured, high-quality responses, labeling them as "less diverse" than models generating high-entropy noise. This research challenges that narrative by arguing that diversity metrics must be quality-aware to be meaningful for real-world applications.

Methodology

The authors propose a two-pronged approach to measure diversity:

  1. Objective (Programming): Using a benchmark of 108 open-ended tasks, code validity is determined by execution against test cases. Semantic diversity is measured by the number of unique functional implementations (different outputs for the same inputs).
  2. Subjective (Natural Language): Using 100 creative writing and brainstorming prompts, a strong LLM judge (GPT-4o) evaluates quality and semantic similarity between responses.

Key Insights: The "Mode Collapse" Myth

The study finds that the perceived "collapse" in preference-tuned models primarily occurs in the space of invalid or low-quality outputs. When filtered for validity, aligned models—particularly those tuned via Reinforcement Learning (RL)—consistently outperform base models in generating unique, useful ideas.

Comparison of Effective Semantic Diversity, Validity, and Neural Diversity across temperatures for Llama 3.1 models.

As shown in the figure above, while base models (green) may maintain some level of "neural diversity," their validity and effective semantic diversity are near zero across most temperatures. In contrast, instruct-tuned models (orange and blue) show a clear peak in effective diversity at moderate temperatures (around 0.7 to 0.8), where they balance quality with variety.

Statistical Analysis of Model Families

Quantitative comparisons across model families (Llama 2, Llama 3.1, Tulu, Qwen) reveal that preference-tuning consistently yields superior results in both validity and semantic variety.

Statistical comparison of model types across multiple diversity and quality metrics, showing p-values (W) and effect sizes (ES).

The statistical data confirms that the transition from Base to Instruct models results in significant gains in Validity (ES: 1.33) and Semantic Diversity (ES: 1.34). Interestingly, while syntactic variety often decreases (indicating more standardized coding styles), the actual functional (semantic) variety of what the code achieves remains high or increases.

Conclusion

Effective Semantic Diversity provides a more accurate reflection of a model's utility for brainstorming and synthetic data generation. The research concludes that alignment techniques like RLHF and DPO do not necessarily cause a loss of creative breadth; instead, they steer the model toward a more productive and valid distribution of responses. For practitioners, this implies that sampling from smaller, well-aligned models can often yield more unique, high-quality ideas than limited sampling from larger, unaligned counterparts.

Summary updated

BibTeX
@inproceedings{shypula2025evaluating,
  author = {Alexander Shypula and Shuo Li and Botong Zhang and Vishakh Padmakumar and Kayo Yin and Osbert Bastani},
  title = {{Evaluating the Diversity and Quality of LLM Generated Content}},
  booktitle = {COLM},
  year = {2025},
  url = {https://openreview.net/forum?id=O7bF6nlSOD},
}
Figure