Selecting Better Samples from Pre-trained LLMs: A Case Study on Question Generation

Xingdi Yuan, Tong Wang, Yen-Hsiang Wang, Emery Fine, Rania Abdelghani, Hélène Sauzéon, Pierre-Yves Oudeyer

Abstract

Large Language Models (LLMs) can generate diverse outputs through stochastic sampling, but identifying the highest-quality candidates remains a challenge in zero-shot settings. This paper investigates methods for selecting optimal samples from a "black-box" LLM for Question Generation (QG). By employing "round-trip" consistency and multi-step self-scoring, the proposed zero-shot selection strategies outperform standard greedy decoding and rival human-annotated ground truths, even surpassing some supervised models.

Introduction

In natural language generation, sampling multiple outputs is a common strategy to ensure diversity and avoid repetitive text. However, this creates a "needle-in-a-haystack" problem: determining which sample is the highest quality without human intervention. Traditional reranking requires supervised training and access to model parameters, which is often impossible with proprietary "black-box" LLMs. This study, presented at ACL 2023, explores zero-shot selection strategies—choosing the best candidate from a set of samples using only prompting and basic heuristics.

Methodology

The researchers focused on Question Generation (QG), sampling $k=5$ candidate questions from GPT-3 (text-davinci-002) for a given context and target answer. They evaluated three primary selection strategies:

  1. n-gram Similarity: A heuristic measuring word overlap between the generated question and the source context.
  2. Round-trip Consistency: This treats the LLM as a cycle validator. A question is generated, and an off-the-shelf QA model is asked to answer it. If the predicted answer matches the original target, the question is deemed high quality.
  3. Prompt-based Scoring (Self-Evaluation): The model is prompted to rate its own questions across seven dimensions, such as clarity and relevance. To avoid "lazy" scoring, the researchers implemented a two-step procedure: the model first explains why a question is good or bad before providing a numerical score.
Example of the prompt-based self-evaluation process where the model assesses a generated question's relevance to the context.

Experimental Results

The methods were tested on two distinct datasets: SQuAD (extractive, sentence-level) and Fairytale QA (abstractive, narrative-level). The results indicate that LLMs are remarkably effective critics. The "round-trip" method proved particularly robust, suggesting that models are better at recognizing valid questions than generating them perfectly on the first attempt. Furthermore, the reasoning buffer in self-evaluation significantly improved the diversity and accuracy of the model's scores.

Performance comparison of various selection methods and ensembles against baselines and prior supervised works on SQuAD and Fairytale QA.

As shown in the results table above, the best ensemble method (bi-gram + APS + round-trip) achieved a BLEU-4 score of 0.401 on SQuAD, significantly outperforming the greedy baseline (0.372). Notably, these zero-shot methods outperformed several supervised models specifically fine-tuned on SQuAD, such as UniLM and ERNIE-GEN. On the more complex Fairytale QA dataset, the ensemble of APS and round-trip achieved the highest ROUGE-L score (0.439).

Conclusion

This research demonstrates that zero-shot selection methods can effectively bridge the gap between stochastic sampling and high-quality output. By leveraging the internal consistency and evaluative capabilities of LLMs, practitioners can generate superior text without the need for task-specific fine-tuning. While computationally more intensive due to multiple API calls, these techniques offer a powerful path forward for deploying LLMs in sensitive domains like education, where output quality and answerability are paramount.

Summary updated

BibTeX
@inproceedings{yuan2023selecting,
  author = {Xingdi Yuan and Tong Wang and Yen-Hsiang Wang and Emery Fine and Rania Abdelghani and Hélène Sauzéon and Pierre-Yves Oudeyer},
  title = {{Selecting Better Samples from Pre-trained LLMs: A Case Study on Question Generation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.820},
}
Figure