The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationCastError Exception: DatasetGenerationCastError Message: An error occurred while generating the dataset All the data files must have the same columns, but at some point there are 2 new columns ({'labels', 'drafts'}) and 8 missing columns ({'choices_2', 'author', 'date', 'coauthor', 'choices_4', 'choices_3', 'folder_id', 'choices_5'}). This happened while the json dataset builder was generating data using hf://datasets/yueqingliang/UNBench/data/task3.json (at revision 3cf2e4319c00beb4f18ff2f14cd743a6174b914e) Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations) Traceback: Traceback (most recent call last): File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1871, in _prepare_split_single writer.write_table(table) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 643, in write_table pa_table = table_cast(pa_table, self._schema) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2293, in table_cast return cast_table_to_schema(table, schema) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2241, in cast_table_to_schema raise CastError( datasets.table.CastError: Couldn't cast drafts: string labels: int64 -- schema metadata -- pandas: '{"index_columns": [], "column_indexes": [], "columns": [{"name":' + 314 to {'folder_id': Value(dtype='int64', id=None), 'author': Value(dtype='string', id=None), 'coauthor': Value(dtype='string', id=None), 'date': Value(dtype='timestamp[ns]', id=None), 'choices_2': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'choices_3': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'choices_4': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'choices_5': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None)} because column names don't match During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1433, in compute_config_parquet_and_info_response parquet_operations = convert_to_parquet(builder) File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1050, in convert_to_parquet builder.download_and_prepare( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 925, in download_and_prepare self._download_and_prepare( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1001, in _download_and_prepare self._prepare_split(split_generator, **prepare_split_kwargs) File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1742, in _prepare_split for job_id, done, content in self._prepare_split_single( File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1873, in _prepare_split_single raise DatasetGenerationCastError.from_cast_error( datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset All the data files must have the same columns, but at some point there are 2 new columns ({'labels', 'drafts'}) and 8 missing columns ({'choices_2', 'author', 'date', 'coauthor', 'choices_4', 'choices_3', 'folder_id', 'choices_5'}). This happened while the json dataset builder was generating data using hf://datasets/yueqingliang/UNBench/data/task3.json (at revision 3cf2e4319c00beb4f18ff2f14cd743a6174b914e) Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
folder_id
int64 | author
string | coauthor
string | date
timestamp[us] | choices_2
sequence | choices_3
sequence | choices_4
sequence | choices_5
sequence |
---|---|---|---|---|---|---|---|
1,919 |
Libya
|
Lesotho
| 2023-12-08T00:00:00 |
[
"Malawi",
"Lesotho"
] |
[
"Lesotho",
"Niger",
"Gabon"
] |
[
"South Sudan",
"Eswatini",
"UN. Secretary-General",
"Lesotho"
] |
[
"Ghana",
"Israel",
"Niger",
"Guinea-Bissau",
"Lesotho"
] |
1,938 |
Romania
|
Denmark
| 2024-04-24T00:00:00 |
[
"Denmark",
"Azerbaijan"
] |
[
"Saint Kitts and Nevis",
"Turkmenistan",
"Denmark"
] |
[
"Denmark",
"Serbia",
"Peru",
"The former Yugoslav Republic of Macedonia"
] |
[
"Denmark",
"Niger",
"Gabon",
"Burkina Faso",
"Comoros"
] |
1,942 |
Singapore
|
North Macedonia
| 2024-05-24T00:00:00 |
[
"North Macedonia",
"Saint Kitts and Nevis"
] |
[
"North Macedonia",
"Botswana",
"League of Arab States"
] |
[
"UN. Secretary-General",
"Saint Lucia",
"North Macedonia",
"Burkina Faso"
] |
[
"UN. Security Council. Committee on the Admission of New Members",
"Senegal",
"Egypt",
"UN. Secretary-General",
"North Macedonia"
] |
1,938 |
Romania
|
Estonia
| 2024-04-24T00:00:00 |
[
"Estonia",
"Samoa"
] |
[
"Nicaragua",
"Estonia",
"Central African Republic"
] |
[
"Mongolia",
"Estonia",
"El Salvador",
"Namibia"
] |
[
"Fiji",
"Kiribati",
"Kuwait",
"Estonia",
"Chad"
] |
1,942 |
Myanmar
|
Andorra
| 2024-05-24T00:00:00 |
[
"Saudi Arabia",
"Andorra"
] |
[
"Senegal",
"Andorra",
"Lesotho"
] |
[
"Eritrea",
"Saint Kitts and Nevis",
"Turkmenistan",
"Andorra"
] |
[
"Senegal",
"Malaysia",
"Andorra",
"The former Yugoslav Republic of Macedonia",
"Antigua and Barbuda"
] |
1,919 |
Thailand
|
Congo
| 2023-12-08T00:00:00 |
[
"Congo",
"Venezuela"
] |
[
"Solomon Islands",
"Mauritius",
"Congo"
] |
[
"Guinea-Bissau",
"Congo",
"Zaïre",
"Kiribati"
] |
[
"Congo",
"Uruguay",
"Netherlands (Kingdom of the)",
"Nauru",
"Israel"
] |
1,942 |
Belgium
|
Romania
| 2024-05-24T00:00:00 |
[
"Romania",
"Zaïre"
] |
[
"Romania",
"Kiribati",
"Yugoslavia"
] |
[
"Tajikistan",
"Eswatini",
"Romania",
"Congo"
] |
[
"India",
"Kiribati",
"Namibia",
"Romania",
"Zimbabwe"
] |
1,919 |
Poland
|
Bangladesh
| 2023-12-08T00:00:00 |
[
"Bangladesh",
"Ghana"
] |
[
"Bangladesh",
"Liechtenstein",
"Turkey"
] |
[
"Guatemala",
"UN. Security Council (78th year : 2023)",
"Germany",
"Bangladesh"
] |
[
"Bangladesh",
"Montenegro",
"Denmark",
"Democratic People's Republic of Korea",
"Paraguay"
] |
1,956 |
San Marino
|
Slovakia
| 2024-07-19T00:00:00 |
[
"Slovakia",
"Kazakhstan"
] |
[
"Slovakia",
"Fiji",
"Egypt"
] |
[
"Saudi Arabia",
"Namibia",
"Slovakia",
"Russian Federation"
] |
[
"Sao Tome and Principe",
"Maldives",
"Cameroon",
"Sri Lanka",
"Slovakia"
] |
1,942 |
Bangladesh
|
Dominican Republic
| 2024-05-24T00:00:00 |
[
"Panama",
"Dominican Republic"
] |
[
"Dominican Republic",
"Botswana",
"Kyrgyzstan"
] |
[
"Botswana",
"Dominican Republic",
"Burkina Faso",
"Iraq"
] |
[
"The former Yugoslav Republic of Macedonia",
"Suriname",
"Seychelles",
"Dominican Republic",
"Belarus"
] |
1,976 |
Guyana
|
Republic of Korea
| 2024-11-20T00:00:00 |
[
"Iran (Islamic Republic of)",
"Republic of Korea"
] |
[
"Serbia",
"Republic of Korea",
"Bosnia and Herzegovina"
] |
[
"Republic of Korea",
"Kiribati",
"Malawi",
"Kuwait"
] |
[
"Italy",
"United Kingdom",
"Zambia",
"Republic of Korea",
"Central African Republic"
] |
1,942 |
Côte d'Ivoire
|
Canada
| 2024-05-24T00:00:00 |
[
"Canada",
"Malawi"
] |
[
"Canada",
"Sri Lanka",
"Turkmenistan"
] |
[
"Canada",
"Iran (Islamic Republic of)",
"India",
"Chad"
] |
[
"Tonga",
"Tuvalu",
"League of Arab States",
"Canada",
"Central African Republic"
] |
1,919 |
Mexico
|
Maldives
| 2023-12-08T00:00:00 |
[
"Maldives",
"Iran (Islamic Republic of)"
] |
[
"Mauritius",
"North Macedonia",
"Maldives"
] |
[
"Maldives",
"eqypt",
"Rwanda",
"Guatemala"
] |
[
"South Sudan",
"Albania",
"Eswatini",
"Bhutan",
"Maldives"
] |
1,942 |
Chile
|
Netherlands (Kingdom of the)
| 2024-05-24T00:00:00 |
[
"Netherlands (Kingdom of the)",
"Netherlands"
] |
[
"eqypt",
"Netherlands (Kingdom of the)",
"Venezuela (Bolivarian Republic of)"
] |
[
"Netherlands (Kingdom of the)",
"Malaysia",
"Mali",
"Belarus"
] |
[
"Malawi",
"Zimbabwe",
"Oman",
"Netherlands (Kingdom of the)",
"United States"
] |
1,942 |
Djibouti
|
Finland
| 2024-05-24T00:00:00 |
[
"Turkey",
"Finland"
] |
[
"UN. Security Council. Committee on the Admission of New Members",
"Israel",
"Finland"
] |
[
"Solomon Islands",
"Yugoslavia",
"Finland",
"Venezuela (Bolivarian Republic of)"
] |
[
"Egypt",
"Yugoslavia",
"Mauritania",
"Finland",
"Nicaragua"
] |
1,919 |
Saint Vincent and the Grenadines
|
Mexico
| 2023-12-08T00:00:00 |
[
"UN. Secretary-General",
"Mexico"
] |
[
"Solomon Islands",
"Sao Tome and Principe",
"Mexico"
] |
[
"Zaïre",
"Uruguay",
"Mexico",
"France"
] |
[
"India",
"Mexico",
"Guatemala",
"North Macedonia",
"League of Arab States"
] |
1,956 |
Republic of Korea
|
Bulgaria
| 2024-07-19T00:00:00 |
[
"Bulgaria",
"Myanmar"
] |
[
"Sri Lanka",
"Yugoslavia",
"Bulgaria"
] |
[
"Algeria",
"Bulgaria",
"Peru",
"China"
] |
[
"Belarus",
"Bulgaria",
"Peru",
"Botswana",
"Mauritius"
] |
1,919 |
Andorra
|
Argentina
| 2023-12-08T00:00:00 |
[
"UN. Security Council. Committee on the Admission of New Members",
"Argentina"
] |
[
"Mozambique",
"Group of Arab States. Chair",
"Argentina"
] |
[
"United Kingdom",
"Republic of Moldova",
"Argentina",
"Germany"
] |
[
"Liechtenstein",
"Cameroon",
"Yugoslavia",
"Slovakia",
"Argentina"
] |
1,919 |
Argentina
|
Mexico
| 2023-12-08T00:00:00 |
[
"Yugoslavia",
"Mexico"
] |
[
"Cabo Verde",
"Palau",
"Mexico"
] |
[
"Latvia",
"Lithuania",
"Czechia",
"Mexico"
] |
[
"Monaco",
"Sweden",
"Nauru",
"Mexico",
"Liechtenstein"
] |
1,938 |
Ireland
|
Slovakia
| 2024-04-24T00:00:00 |
[
"Venezuela (Bolivarian Republic of)",
"Slovakia"
] |
[
"United Republic of Tanzania",
"Slovakia",
"Uzbekistan"
] |
[
"Slovakia",
"Netherlands",
"Libya",
"Bolivia (Plurinational State of)"
] |
[
"Guinea",
"Serbia",
"Equatorial Guinea",
"South Sudan",
"Slovakia"
] |
1,942 |
Japan
|
Bahamas
| 2024-05-24T00:00:00 |
[
"Bahamas",
"UN. General Assembly (49th sess. : 1994-1995)"
] |
[
"Bahamas",
"Uzbekistan",
"Oman"
] |
[
"Tuvalu",
"Bahamas",
"Russian Federation",
"Kiribati"
] |
[
"Ethiopia",
"Yemen",
"Suriname",
"Kyrgyzstan",
"Bahamas"
] |
1,938 |
Sweden
|
Liechtenstein
| 2024-04-24T00:00:00 |
[
"Liechtenstein",
"Barbados"
] |
[
"Liechtenstein",
"Belarus",
"Nicaragua"
] |
[
"Tuvalu",
"Angola",
"Czech Republic",
"Liechtenstein"
] |
[
"Cuba",
"Pakistan",
"Senegal",
"Liechtenstein",
"Venezuela (Bolivarian Republic of)"
] |
1,919 |
China
|
Kuwait
| 2023-12-08T00:00:00 |
[
"Kuwait",
"Croatia"
] |
[
"Kuwait",
"Samoa",
"Sao Tome and Principe"
] |
[
"Albania",
"Kuwait",
"UN. Secretary-General",
"Sao Tome and Principe"
] |
[
"Germany",
"Liechtenstein",
"Kuwait",
"India",
"Slovakia"
] |
1,919 |
Kenya
|
Andorra
| 2023-12-08T00:00:00 |
[
"Mozambique",
"Andorra"
] |
[
"Andorra",
"Marshall Islands",
"Micronesia (Federated States of)"
] |
[
"Libyan Arab Jamahiriya",
"Andorra",
"Togo",
"Slovakia"
] |
[
"Andorra",
"Democratic People's Republic of Korea",
"Algeria",
"Syrian Arab Republic",
"Niger"
] |
1,956 |
Sierra Leone
|
Lithuania
| 2024-07-19T00:00:00 |
[
"Dominica",
"Lithuania"
] |
[
"Kazakhstan",
"Kuwait",
"Lithuania"
] |
[
"Algeria",
"Papua New Guinea",
"Kiribati",
"Lithuania"
] |
[
"Gabon",
"Iceland",
"Lithuania",
"Lesotho",
"Mauritania"
] |
1,956 |
Finland
|
Estonia
| 2024-07-19T00:00:00 |
[
"Georgia",
"Estonia"
] |
[
"Estonia",
"Tajikistan",
"Group of Arab States. Chair"
] |
[
"eqypt",
"Estonia",
"Philippines",
"Czech Republic"
] |
[
"Colombia",
"Estonia",
"Djibouti",
"United Republic of Tanzania",
"Philippines"
] |
1,919 |
Saint Lucia
|
Fiji
| 2023-12-08T00:00:00 |
[
"Fiji",
"Kiribati"
] |
[
"Vanuatu",
"Iran (Islamic Republic of)",
"Fiji"
] |
[
"Fiji",
"Turkmenistan",
"Honduras",
"Mongolia"
] |
[
"Burkina Faso",
"Palau",
"Fiji",
"Brunei Darussalam",
"Ghana"
] |
1,919 |
Saint Lucia
|
Kyrgyzstan
| 2023-12-08T00:00:00 |
[
"Rwanda",
"Kyrgyzstan"
] |
[
"Haiti",
"United Republic of Tanzania",
"Kyrgyzstan"
] |
[
"United Kingdom",
"eqypt",
"Kyrgyzstan",
"Zambia"
] |
[
"Kyrgyzstan",
"Zambia",
"Syrian Arab Republic",
"Guatemala",
"Algeria"
] |
1,942 |
Slovenia
|
Bosnia and Herzegovina
| 2024-05-24T00:00:00 |
[
"Türkiye",
"Bosnia and Herzegovina"
] |
[
"Eritrea",
"China",
"Bosnia and Herzegovina"
] |
[
"Bosnia and Herzegovina",
"Türkiye",
"South Sudan",
"Angola"
] |
[
"Serbia",
"Bosnia and Herzegovina",
"Papua New Guinea",
"Oman",
"Cameroon"
] |
1,919 |
Benin
|
Saint Lucia
| 2023-12-08T00:00:00 |
[
"Republic of Korea",
"Saint Lucia"
] |
[
"Hungary",
"Czech Republic",
"Saint Lucia"
] |
[
"The former Yugoslav Republic of Macedonia",
"Venezuela (Bolivarian Republic of). Permanent Mission to the United Nations",
"Saint Lucia",
"Ecuador"
] |
[
"Australia",
"Democratic People's Republic of Korea",
"Cabo Verde",
"Netherlands",
"Saint Lucia"
] |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
null | null | null | null | null | null | null | null |
UNBench
Overview
This project provides tools for analyzing, simulating, and generating content related to United Nations Security Council (UNSC) draft resolutions using language models. The tasks involve coauthor selection, voting simulation, resolution adoption prediction, and statement generation. We released approximately 30 samples for each task, and the full dataset will be made publicly available upon the paper's acceptance.
Features
- Task 1: Coauthor selection for UNSC draft resolutions.
- Task 2: Simulate country voting behavior on draft resolutions.
- Task 3: Predict the adoption of UNSC draft resolutions.
- Task 4: Generate diplomatic statements for UNSC meetings.
Tasks Breakdown
Task 1 - Coauthor Selection
- Goal: Choose the most likely coauthor for a UNSC draft resolution.
- Input: Draft resolutions and a list of potential coauthors.
- Output: Selected coauthor per draft.
- File:
data/task1.json
anddata/task1/
Task 2 - Voting Simulation
- Goal: Simulate voting outcomes by different countries on draft resolutions.
- Input: Draft resolutions and country profiles.
- Output: Voting results (
Y
for Yes,N
for No,A
for Abstain) and evaluation metrics. - File:
data/task2.csv
anddata/task2/
Task 3 - Resolution Adoption Prediction
- Goal: Predict whether a draft resolution will be adopted.
- Input: Text of draft resolutions.
- Output: Binary classification (
1
for adopted,0
for rejected) and model performance metrics. - File:
data/task3.json
Task 4 - Diplomatic Statement Generation
- Goal: Generate representative statements for countries on draft resolutions.
- Input: Draft resolutions and country profiles.
- Output: Generated statements and ROUGE-L scores for evaluation.
- File:
data/task4.json
Project Structure
UNBench/
│
├── data/ # All task datasets
│ ├── task1.json # Task 1 - Coauthor selection
│ ├── task2.csv # Task 2 - Voting simulation
│ ├── task3.json # Task 3 - Adoption prediction
│ ├── task4.json # Task 4 - Statement generation
│ ├── task1/ # (Optional) Raw draft files for Task 1
│ └── task2/ # (Optional) Raw draft files for Task 2
│
├── notebooks/ # Jupyter notebooks for running experiments
│ ├── run_task1.ipynb
│ ├── run_task2.ipynb
│ ├── run_task3.ipynb
│ └── run_task4.ipynb
│
├── LICENSE # License file (MIT)
├── README.md # Dataset description and usage guide
└── requirements.txt # Python dependencies
Installation
Clone the repository:
git clone <repository_url> cd github_data
Set up a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` pip install -r requirements.txt
Add Together API credentials:
Replace placeholders in notebooks:
your_model_name = 'xxxxxxxxxxxxxxxxxxxxxxxx' your_api_key = 'xxxxxxxxxxxxxxxxxxxxxxxx'
with your Together API details or you can use your own LLMs.
Usage
Launch Jupyter Notebooks:
jupyter notebook
Run the desired task notebooks:
run_task1.ipynb
— Coauthor selection.run_task2.ipynb
— Voting simulation.run_task3.ipynb
— Adoption prediction.run_task4.ipynb
— Statement generation.
Evaluate model outputs:
- Tasks 2 & 3 include performance metrics like Accuracy, AUC, F1 Score, and others.
- Task 4 computes ROUGE-L scores for generated statements.
Requirements
- Python 3.x
- Jupyter Notebook
- together
- pandas
- numpy
- scikit-learn
- tqdm
- imbalanced-learn
- rouge-score
- Downloads last month
- 10