task_categories:conversational task_categories:text2text-generation task_categories:text-generation task_categories:question-answering size_categories:1M<n<10M language:en rlhf reinforcement learning from human feedback region:us
---
task_categories:
- conversational
- text2text-generation
- text-generation
- question-answering
language:
- en
tags:
- rlhf
- reinforcement learning from human feedback
pretty_name: >-
  Reddit Explain Like I am Five dataset for Reinforcement Learning from Human
  Feedback
size_categories:
- 1M<n<10M
---

ELI5 paired
This is a processed version of the [eli5](https://huggingface.co/datasets/eli5) dataset. The dataset was created following very closely the steps in the [stack-exchange-paired dataset](https://huggingface.co/datasets/lvwerra/stack-exchange-paired). The following steps were applied:

- Create pairs (response_j, response_k) where j was rated better than k
- Sample at most 10 pairs per question
- Shuffle the dataset globally

This dataset is designed to be used for preference learning using techniques such as Reinforcement Learning from Human Feedback. The processing notebook is in the repository as well.

If you want to construct a "question" column in this data, you can either use just the "title" column, or concatenate the "title" column with the "selftext" column as follows:
```
def get_question(example):
  title = example["title"]
  selftext = example["selftext"]
  if selftext:
      if selftext[-1] not in [".", "?", "!"]:
          seperator = ". "
      else:
          seperator = " "
      question = title + seperator + selftext
  else:
      question = title
  example["question"] = question
  return example

dataset = load_dataset("vincentmin/eli5_askscience_askhistorians_rlhf")
dataset = dataset.map(get_question)
```

For the license, see the [eli5 dataset](https://huggingface.co/datasets/eli5) which states
"The licensing status of the dataset hinges on the legal status of the Pushshift.io data which is unclear."
at the time of creation of this dataset.