Datasets:
id stringlengths 16 18 | input_prompt stringlengths 16.4k 16.4k | reference_output stringlengths 881 1.4k | metadata stringlengths 94 104 |
|---|---|---|---|
countdown_0.5k_0 | [TASK]
You will be given four numbers and a target number, your task is to find a way to use all four numbers exactly once, along with the basic operations (+, -, *, /), to reach the target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate ... | # Search Procedure
Initial number set: [21, 16, 17, 26], target: 46. Options for choosing two numbers: [(21, 16), (21, 17), (21, 26), (16, 17), (16, 26), (17, 26)].
|- Pick two numbers (21, 16) (numbers left: [17, 26]). Try possible operations.
|- Try 21 + 16 = 37. Add 37 to the number set. Current number set: [37, ... | {"nums": [21, 16, 17, 26], "target": 46, "solution": ["21 + 16 = 37", "37 - 17 = 20", "26 + 20 = 46"]} |
countdown_0.5k_1 | [TASK]
You will be given four numbers and a target number, your task is to find a way to use all four numbers exactly once, along with the basic operations (+, -, *, /), to reach the target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate ... | # Search Procedure
Initial number set: [12, 48, 22, 27], target: 11. Options for choosing two numbers: [(12, 48), (12, 22), (12, 27), (48, 22), (48, 27), (22, 27)].
|- Pick two numbers (12, 48) (numbers left: [22, 27]). Try possible operations.
|- Try 48 + 12 = 60. Add 60 to the number set. Current number set: [60, ... | {"nums": [12, 48, 22, 27], "target": 11, "solution": ["48 + 12 = 60", "60 - 22 = 38", "38 - 27 = 11"]} |
countdown_0.5k_2 | [TASK]
You will be given four numbers and a target number, your task is to find a way to use all four numbers exactly once, along with the basic operations (+, -, *, /), to reach the target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate ... | # Search Procedure
Initial number set: [33, 20, 43, 27], target: 37. Options for choosing two numbers: [(33, 20), (33, 43), (33, 27), (20, 43), (20, 27), (43, 27)].
|- Pick two numbers (33, 20) (numbers left: [43, 27]). Try possible operations.
|- Try 33 + 20 = 53. Add 53 to the number set. Current number set: [53, ... | {"nums": [33, 20, 43, 27], "target": 37, "solution": ["33 + 20 = 53", "53 - 43 = 10", "27 + 10 = 37"]} |
countdown_0.5k_3 | [TASK]
You will be given four numbers and a target number, your task is to find a way to use all four numbers exactly once, along with the basic operations (+, -, *, /), to reach the target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate ... | # Search Procedure
Initial number set: [39, 21, 49, 29], target: 18. Options for choosing two numbers: [(39, 21), (39, 49), (39, 29), (21, 49), (21, 29), (49, 29)].
|- Pick two numbers (39, 21) (numbers left: [49, 29]). Try possible operations.
|- Try 39 + 21 = 60. Add 60 to the number set. Current number set: [60, ... | {"nums": [39, 21, 49, 29], "target": 18, "solution": ["39 + 21 = 60", "60 - 49 = 11", "29 - 11 = 18"]} |
countdown_0.5k_4 | [TASK]
You will be given four numbers and a target number, your task is to find a way to use all four numbers exactly once, along with the basic operations (+, -, *, /), to reach the target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate ... | # Search Procedure
Initial number set: [5, 4, 11, 20], target: 22. Options for choosing two numbers: [(5, 4), (5, 11), (5, 20), (4, 11), (4, 20), (11, 20)].
|- Pick two numbers (5, 4) (numbers left: [11, 20]). Try possible operations.
|- Try 5 + 4 = 9. Add 9 to the number set. Current number set: [9, 11, 20], target... | {"nums": [5, 4, 11, 20], "target": 22, "solution": ["5 + 4 = 9", "11 - 9 = 2", "20 + 2 = 22"]} |
countdown_0.5k_5 | [TASK]
You will be given four numbers and a target number, your task is to find a way to use all four numbers exactly once, along with the basic operations (+, -, *, /), to reach the target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate ... | # Search Procedure
Initial number set: [31, 23, 22, 36], target: 40. Options for choosing two numbers: [(31, 23), (31, 22), (31, 36), (23, 22), (23, 36), (22, 36)].
|- Pick two numbers (31, 23) (numbers left: [22, 36]). Try possible operations.
|- Try 31 + 23 = 54. Add 54 to the number set. Current number set: [54, ... | {"nums": [31, 23, 22, 36], "target": 40, "solution": ["31 + 23 = 54", "54 + 22 = 76", "76 - 36 = 40"]} |
countdown_0.5k_6 | [TASK]
You will be given four numbers and a target number, your task is to find a way to use all four numbers exactly once, along with the basic operations (+, -, *, /), to reach the target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate ... | # Search Procedure
Initial number set: [26, 42, 6, 22], target: 40. Options for choosing two numbers: [(26, 42), (26, 6), (26, 22), (42, 6), (42, 22), (6, 22)].
|- Pick two numbers (26, 42) (numbers left: [6, 22]). Try possible operations.
|- Try 42 + 26 = 68. Add 68 to the number set. Current number set: [68, 6, 22... | {"nums": [26, 42, 6, 22], "target": 40, "solution": ["42 + 26 = 68", "68 - 6 = 62", "62 - 22 = 40"]} |
countdown_0.5k_7 | [TASK]
You will be given four numbers and a target number, your task is to find a way to use all four numbers exactly once, along with the basic operations (+, -, *, /), to reach the target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate ... | # Search Procedure
Initial number set: [19, 2, 43, 26], target: 38. Options for choosing two numbers: [(19, 2), (19, 43), (19, 26), (2, 43), (2, 26), (43, 26)].
|- Pick two numbers (19, 2) (numbers left: [43, 26]). Try possible operations.
|- Try 19 + 2 = 21. Add 21 to the number set. Current number set: [21, 43, 26... | {"nums": [19, 2, 43, 26], "target": 38, "solution": ["19 + 2 = 21", "43 + 21 = 64", "64 - 26 = 38"]} |
countdown_0.5k_8 | [TASK]
You will be given four numbers and a target number, your task is to find a way to use all four numbers exactly once, along with the basic operations (+, -, *, /), to reach the target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate ... | # Search Procedure
Initial number set: [4, 39, 48, 32], target: 27. Options for choosing two numbers: [(4, 39), (4, 48), (4, 32), (39, 48), (39, 32), (48, 32)].
|- Pick two numbers (4, 39) (numbers left: [48, 32]). Try possible operations.
|- Try 39 + 4 = 43. Add 43 to the number set. Current number set: [43, 48, 32... | {"nums": [4, 39, 48, 32], "target": 27, "solution": ["39 + 4 = 43", "48 - 43 = 5", "32 - 5 = 27"]} |
countdown_0.5k_9 | [TASK]
You will be given four numbers and a target number, your task is to find a way to use all four numbers exactly once, along with the basic operations (+, -, *, /), to reach the target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate ... | # Search Procedure
Initial number set: [39, 2, 4, 22], target: 15. Options for choosing two numbers: [(39, 2), (39, 4), (39, 22), (2, 4), (2, 22), (4, 22)].
|- Pick two numbers (39, 2) (numbers left: [4, 22]). Try possible operations.
|- Try 39 + 2 = 41. Add 41 to the number set. Current number set: [41, 4, 22], tar... | {"nums": [39, 2, 4, 22], "target": 15, "solution": ["39 + 2 = 41", "41 - 4 = 37", "37 - 22 = 15"]} |
LongProc: Benchmarking Long-Context Language Models on Long Procedural Generation
LongProc (Long Procedural Generation) is a benchmark for evaluating long-context LLMs through long procedural generation tasks that require models to follow specified procedures and produce structured outputs. LongProc was accepted at COLM 2025.
Dataset Overview
LongProc consists of 6 tasks, each at up to 3 difficulty levels based on the expected output length (~0.5K, ~2K, ~8K tokens). The dataset is organized into 17 subsets (configs), each containing a single test split.
| Task | Description | Configs | Total Examples |
|---|---|---|---|
| HTML to TSV | Extract information from HTML pages into structured TSV tables | html_to_tsv_0.5k, html_to_tsv_2k, html_to_tsv_8k |
100 + 189 + 120 = 409 |
| Pseudocode to Code | Translate line-by-line pseudocode into C++ code | pseudo_to_code_0.5k, pseudo_to_code_2k |
199 + 200 = 399 |
| Path Traversal | Trace a route between cities in a directed graph where each city has one outgoing edge | path_traversal_0.5k, path_traversal_2k, path_traversal_8k |
200 + 200 + 200 = 600 |
| Theory-of-Mind Tracking | Track object locations and agent beliefs through multi-step stories | tom_tracking_0.5k, tom_tracking_2k, tom_tracking_8k |
200 + 200 + 200 = 600 |
| Countdown | Search to combine numbers with arithmetic operations to reach a target | countdown_0.5k, countdown_2k, countdown_8k |
200 + 200 + 200 = 600 |
| Travel Planning | Search to construct a trip plan satisfying duration and flight constraints | travel_planning_2k, travel_planning_8k, travel_planning_icl_examples |
769 + 239 + 4 = 1012 |
Loading the Dataset
from datasets import load_dataset
# Load a specific task + difficulty
ds = load_dataset("PrincetonPli/LongProc", "countdown_0.5k", split="test")
print(ds)
# Dataset({
# features: ['nums', 'target', 'solution', 'search_steps', 'demonstration', 'solution_text', 'num_search_tokens'],
# num_rows: 200
# })
# Load another config
ds = load_dataset("PrincetonPli/LongProc", "html_to_tsv_2k", split="test")
print(ds[0].keys())
# dict_keys(['task_id', 'website_id', 'task_topic', 'task_description', 'gt', 'tsv_header', 'filtering_instruction', 'html_content'])
Data Fields
html_to_tsv
| Field | Type | Description |
|---|---|---|
task_id |
string | Unique identifier for the task instance |
website_id |
string | Identifier for the source website |
task_topic |
string | Topic of the webpage (e.g., "electronics", "books") |
task_description |
string | Description of what properties to extract |
gt |
string | Ground truth TSV output |
tsv_header |
string | Header row for the TSV output |
filtering_instruction |
string | Additional instructions for filtering rows |
html_content |
string | Full HTML content of the webpage (inlined) |
pseudo_to_code
| Field | Type | Description |
|---|---|---|
problem_id |
string | Unique problem identifier |
pseudocode_lines |
list[string] | Pseudocode description, line by line |
code_lines |
list[string] | Ground truth C++ code lines |
testcases |
list | Test cases for validation |
path_traversal
| Field | Type | Description |
|---|---|---|
context_nl |
string | Natural language description of the city graph |
question_repr |
list[string] | Source and destination cities |
answer_nl |
string | Ground truth route in natural language |
tom_tracking
| Field | Type | Description |
|---|---|---|
story_components |
string | Components of the story (agents, objects, rooms, containers) |
story |
string | The multi-step story |
question |
string | Question about an agent's belief about an object's location |
solution |
string | Step-by-step solution trace |
answer |
list[string] | Final answer(s) |
countdown
| Field | Type | Description |
|---|---|---|
nums |
list[int] | Four input numbers |
target |
int | Target number to reach |
solution |
list[string] | Sequence of equations forming the solution |
search_steps |
float | Number of search steps in the ground truth trace |
demonstration |
string | In-context demonstration of the search procedure |
solution_text |
string | Full solution text including the search procedure |
num_search_tokens |
int | Number of tokens in the search procedure |
travel_planning
| Field | Type | Description |
|---|---|---|
id |
string | Unique problem identifier |
ground_truth_cities |
string | Ordered list of cities in the ground truth plan |
ground_truth_durations |
string | Duration of stay for each city |
num_cities |
int | Number of cities to visit |
total_days |
int | Total number of trip days |
constraints |
list[object] | Constraints with city, type, start/end days, num_days |
connected_cities |
list[list[string]] | Direct flight connections between cities |
original_question_text |
string | Original problem statement |
disambig_question_text |
string | Disambiguated problem statement |
ground_truth_plan |
string | Complete ground truth trip plan |
estimated_output_tokens |
int | Estimated output length in tokens (not present in ICL examples) |
The travel_planning_icl_examples config contains 4 in-context learning examples that share the same schema but without estimated_output_tokens.
Prompt Templates
The prompt templates below are used to construct the input prompts for each task. Placeholders in {braces} are filled from the corresponding data fields.
HTML to TSV
[TASK]
Your task is to extract specific information from an HTML webpage and output the extracted
information in a tsv file. You will be first given an HTML webpage. Then, you should follow
the specific instruction provided later and output the tsv file following the format provided
in the instruction.
[INPUT WEBPAGE]
```html
{html_content}
[TARGET INFORMATION] Based on the HTML webpage above about {task_topic}, extract the following properties from the items listed on the webpage: {task_description}{filtering_instruction}
[OUTPUT FORMAT] Structure your output in TSV format such that each row of your output corresponds to the aforementioned properties of an item and each property is separated from each other by a tab "\t". Your output should be in the following format:
{tsv_header}
{Your TSV output}
[IMPORTANT NOTES]
- Make sure that you have read through all items listed on the webpage and followed the same order as they appear on the webpage.
- If you are asked to only extract some rows that satisfy specific conditions, ONLY extract those rows that satisfy the conditions and do NOT include other irrelevant rows in your output.
- If a property of an item is blank, not applicable, or not parseable, please set the property to "N/A" for the item.
- If a property spans multiple lines, please extract all the lines and replace the newline character with a space character.
- If a property consists of a list of items, please replace the newline character with a space character and separate the items with a comma ",".
- If there are any special characters, numerical values of a specific format, or any unusual formatting in the property, please keep them as they are. If the property comes with a unit, please keep the unit as well in the property.
- Do not include html tags in the extracted information. Only include the text.
- Do not provide any additional information in your output other than the tsv.
Now, extract the information from the HTML webpage above and follow the output format above in your answer.
</details>
<details>
<summary><b>Pseudocode to Code</b></summary>
[TASK]: You will be given lines of pseudocode, your task is to write the corresponding C++ code. The pseudocode will provide detailed description of the c++ code line by line. The pseudocode is garanteed to be correct and complete.
[INSTRUCTION]: The following libraries are already included in the code.
#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <fstream>
#include <climits>
#include <cassert>
#include <iomanip>
#include <sstream>
#include <bitset>
using namespace std;
Do not include them in your code again. Please surround your code with cpp and markers.
Note that the code should correspond to the pseudocode line by line.
Where {pseudocode} is constructed by joining pseudocode_lines with newlines.
Path Traversal
[TASK]
In a completely hypothetical world, there are a number of cities. Each city has a one-way
connection to only one other city via a specific transit method (bus, train, plane, or ferry).
Your task is to provide a route from a city to another city. You should follow the specific
instruction provided later and output the route following the format provided in the instruction.
[IMPORTANT NOTES]
- All connections are one-way. If city A is connected to city B, you can travel from A to B,
but not the other way around.
- Because each city is connected to only one other city, so there's only one possible route.
To find the route, you can simply start from the starting city, identify the next city it's
connected to, and repeat the process until you reach the destination city.
- Please follow the exact format specified below when outputting the route.
[OUTPUT FORMAT]
Please mark the route with <Route> and </Route> tags. The route should be in the following
format, where one line is one step of the route:
<Route>
From <CITY_NAME>, take a <TRANSIT_METHOD> to <CITY_NAME>.
...
From <CITY_NAME>, take a <TRANSIT_METHOD> to <CITY_NAME>.
</Route>
[EXAMPLE]
...
[PROBLEM]
{context_nl}
Now find the route from {src_city} to {dst_city} based on the information above.
Where {src_city} and {dst_city} come from the question_repr field.
Theory-of-Mind Tracking
[TASK]
You'll see a story about object placement. Each story involves four components: Agents,
Objects, Rooms, and Containers. Given a question about an (agent, object) pair, your task
is to track the locations and beliefs in stories about object placement asked in the question.
[APPROACH]
You will solve the problem by tracking the location of the agent, location of the object,
and the agent's belief of the object.
1. Initial Setup: set up agent's starting location, object's starting location, agent's
initial belief on the object's location. Note that if an agent does not see an object
at the start, their belief on the object is None.
2. Then, track step-by-step:
- If a step involves that the agent moves to another room, leaves a room, or enters a
room, you should update the agent's location.
- If a step involves the object of interest moving, you should update the object's location.
- To keep track of the agent's belief on the object: If the agent and the object are in
the same room, the agent can see the object, so the agent's belief will reflect the
true location of the object. If the agent cannot see the object, the agent's belief
will remain unchanged until the agent sees the object again.
3. Format your output exactly as shown in example answers below.
[EXAMPLE STORY / QUESTION / ANSWER]
...
[PROBLEM]
Read the following story and answer the question.
[STORY]
{story}
[QUESTION]
{question}
[YOUR ANSWER]
Countdown
[TASK]
You will be given four numbers and a target number, your task is to find a way to use all
four numbers exactly once, along with the basic operations (+, -, *, /), to reach the
target number.
[RULES]
- You can use each number exactly once.
- You can use the four basic operations (+, -, *, /).
- The intermediate results must be integers (no decimals allowed).
- The intermediate results must be positive.
- The intermediate results will not exceed 2000.
[APPROACH]
We will solve the problem by searching. Starting from a given set of four numbers, we will
follow this search process...
[EXAMPLES]
{demonstration}
[Problem]
Numbers: {nums}
Target: {target}
The {demonstration} field is provided per-example and contains worked examples of the search procedure. {nums} comes from joining the nums list.
Travel Planning
TASK:
Your task is to create a trip plan based on given constraints regarding cities to visit,
duration of stays for each city, and available direct flight connections.
REQUIREMENTS AND NOTES:
- You will arrange a trip plan for visiting several cities for a specified total number of days.
- You will be informed about how long we will stay in each city. Some cities have fixed
schedules because of pre-planned events. You have to follow the fixed schedules for those
cities. Cities without fixed schedules need to be arranged according to the constraints.
- Only direct flights may be used to travel between cities.
- When calculating the duration of a stay in a city, count both arrival and departure days
as full days.
APPROACH:
We will solve the problem by searching...
EXAMPLES:
{demonstration}
YOUR TASK:
{problem}
The {demonstration} is constructed from the travel_planning_icl_examples config. {problem} comes from disambig_question_text (or original_question_text).
Running Evaluation
We recommend using the LongProc GitHub repository for data loading and evaluation:
from longproc.longproc_data import load_longproc_data
data, eval_fn = load_longproc_data("countdown_0.5k")
# data: list of dicts with 'input_prompt', 'reference_output', 'item'
# eval_fn: task-specific evaluation function
For large-scale evaluation, we recommend the HELMET framework with the LongProc Addon.
Citation
@inproceedings{ye25longproc,
title={LongProc: Benchmarking Long-Context Language Models on Long Procedural Generation},
author={Ye, Xi and Yin, Fangcong and He, Yinghui and Zhang, Joie and Yen, Howard and Gao, Tianyu and Durrett, Greg and Chen, Danqi},
journal={Conference on Language Modeling},
year={2025}
}
LongProc adapts several existing datasets. Please also cite the original sources:
@article{arborist,
author = {Li, Xiang and Zhou, Xiangyu and Dong, Rui and Zhang, Yihong and Wang, Xinyu},
title = {Efficient Bottom-Up Synthesis for Programs with Local Variables},
year = {2024},
journal = {Proc. ACM Program. Lang.},
volume = {8},
number = {POPL},
}
@inproceedings{spoc,
author = {Kulal, Sumith and Pasupat, Panupong and Chandra, Kartik and Lee, Mina and Padon, Oded and Aiken, Alex and Liang, Percy S},
booktitle = {Proceedings of the Conference on Advances in Neural Information Processing Systems (NeurIPS)},
title = {{SPoC: Search-based Pseudocode to Code}},
}
@inproceedings{gandhi2024stream,
title={{Stream of Search (SoS): Learning to Search in Language}},
author={Kanishk Gandhi and Denise H J Lee and Gabriel Grand and Muxin Liu and Winson Cheng and Archit Sharma and Noah Goodman},
booktitle={First Conference on Language Modeling},
year={2024},
}
@article{natplan,
title={{NATURAL PLAN: Benchmarking LLMs on Natural Language Planning}},
author={Zheng, Huaixiu Steven and Mishra, Swaroop and Zhang, Hugh and Chen, Xinyun and Chen, Minmin and Nova, Azade and Hou, Le and Cheng, Heng-Tze and Le, Quoc V and Chi, Ed H and others},
journal={arXiv preprint arXiv:2406.04520},
year={2024}
}
Contact
For questions, feel free to open issues on the GitHub repository or email xi.ye@princeton.edu.
- Downloads last month
- 130