size_categories:10K<n<100K format:parquet modality:text library:datasets library:pandas library:mlcroissant library:polars region:us
---
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
dataset_info:
  features:
  - name: task
    dtype: string
  - name: dataset
    dtype: string
  - name: trajectory
    list:
    - name: from
      dtype: string
    - name: value
      dtype: string
  - name: chosen
    dtype: string
  - name: rejected
    dtype: string
  - name: id
    dtype: string
  - name: parent_id
    dtype: string
  - name: __index_level_0__
    dtype: string
  - name: __index_level_1__
    dtype: int64
  splits:
  - name: train
    num_bytes: 196675986
    num_examples: 26658
  download_size: 78610248
  dataset_size: 196675986
---
# Dataset Card for "UltraInteract_pair_longest_multiturn"
- Original Dataset: [openbmb/UltraInteract_pair](https://huggingface.co/datasets/openbmb/UltraInteract_pair)
- Filtered multiturn instances and longest item for each reasoning tree.

Data processing code:
```python
from datasets import load_dataset, Dataset

dataset = load_dataset("openbmb/UltraInteract_pair")

df = dataset['train'].to_pandas()
df["turns"] = df["trajectory"].apply(lambda x: len(x))
df = df[df.turns > 1]
df = df.groupby("parent_id").apply(lambda x: x[x["turns"] == x["turns"].max()])
print(df)
print(df.shape)

df = df.drop(columns=["turns"])
dataset['train'] = Dataset.from_pandas(df)
dataset.push_to_hub("heegyu/UltraInteract_pair_longest_multiturn")
```
