wflying/instruction-following-rl-content-constrained-30k
Instruction-Following RL Content-Constrained 30K Dataset summary Instruction-Following RL Content-Constrained 30K is a training dataset for precise instruction following and reinforcement learning from verifiable rewards (RLVR). The current cleaned revision contains 29,520 heterogeneous, single-turn user prompts. Each prompt combines a substantive task with one to five explicit output constraints, such as keyword inclusion or exclusion, response length… See the full description on the dataset page: https://huggingface.co/datasets/wflying/instruction-following-rl-content-constrained-30k.
Instruction-Following RL Content-Constrained 30K
Dataset summary
Instruction-Following RL Content-Constrained 30K is a training dataset for precise instruction following and reinforcement learning from verifiable rewards (RLVR). The current cleaned revision contains 29,520 heterogeneous, single-turn user prompts. Each prompt combines a substantive task with one to five explicit output constraints, such as keyword inclusion or exclusion, response length, capitalization, punctuation, paragraph structure, copying, target language, and start/end requirements.
The data is primarily derived from AllenAI's IF_multi_constraints_upto5. That upstream dataset contains IF-RLVR prompts with up to five constraints sampled from 25 IFEval constraint types and 29 IFBench-Train constraint types. This release contains the same 54 instruction IDs across 16 ID-prefix families.
Every local prompt also includes a common content-quality instruction telling the model to satisfy both the substantive task and the formal constraints, avoid superficial reward hacking, and produce relevant, useful content. This shared appendix is not represented by a separate machine-checkable instruction ID.
Files and integrity
The statistics in this card were recomputed with a complete streaming pass over the cleaned JSONL file on 2026-08-11. All 29,520 lines parsed as JSON and shared the same schema.
Data structure
Each JSONL row has the following shape:
prompt: list[{
role: "user",
content: string
}]
label: string # empty in every row
metadata: {
data_type: "if_content_constrained",
instruction_id_list: list[string],
instruction_kwargs: list[dict | null]
}instruction_id_list[i] and instruction_kwargs[i] form an aligned verifier specification. A null or empty dictionary is expected for a parameter-free constraint. Across this file, the two lists have equal lengths in every row; all instruction IDs are strings.
The records contain no reference response, scalar reward, pass rate, or model output. label is an empty string in all 29,520 rows.
Provenance and processing
The dataset owner identifies allenai/IF_multi_constraints_upto5 as the primary source. A content-level comparison also matched the first local record to the corresponding AllenAI record, including the substantive bill-summarization task, constraint text, instruction IDs, and arguments.
The observed processing is:
- Upstream user
messagesare stored asprompt. - The upstream verifier specification in
ground_truthis decoded intometadata.instruction_id_listandmetadata.instruction_kwargs. metadata.data_typeis set toif_content_constrained.- A common content-quality/anti-reward-hacking appendix is added to every prompt.
- An empty
labelfield is added. - Upstream fields such as
key,dataset,constraint_type, and the plain-textconstraintfield are not retained.
Because the upstream key was dropped, this release does not provide reliable row-level joins back to the source. The exact 30K selection rule and any additional source records are not encoded in the file.
Dataset statistics
Record-level validation
Prompt lengths range from 699 to 392,434 characters. The median is 1,335 characters, the mean is 1,687.29, and the 95th percentile is 2,705.05. A small number of very long source documents create substantial length outliers.
Constraints per row
Mean constraints per row: 3.1230.
Constraint-family distribution
Counts below are constraint instances, not rows. A row may contribute to several families.
The most frequent individual IDs are last_word:last_word_answer (2,335), length_constraints:number_sentences (2,267), keywords:word_once (2,267), startend:end_checker (2,263), and last_word:last_word_sent (2,253).
language:response_language occurs 1,913 times and requests one of 30 response-language codes: ar, bg, bn, de, en, es, fa, fi, fr, gu, he, hi, it, ja, kn, ko, ml, mr, ne, pa, pl, pt, ru, sw, ta, te, th, uk, ur, or vi. The prompts themselves are primarily English; this list describes requested response languages, not a verified language label for every prompt.
Heuristic task shapes
The following distribution was produced by a rule-based content router over prompt text and constraint metadata. It is descriptive rather than ground-truth annotation.
Loading the dataset
from datasets import load_dataset
dataset = load_dataset(
"wflying/instruction-following-rl-content-constrained-30k",
split="train",
)
row = dataset[0]
for instruction_id, kwargs in zip(
row["metadata"]["instruction_id_list"],
row["metadata"]["instruction_kwargs"],
):
print(instruction_id, kwargs)Because of the 392K-character prompt outlier, users with strict memory or batching limits may prefer streaming=True and length-aware batching.
Reward design
The metadata is intended for an ID-based hard-constraint verifier: instantiate the checker named by each instruction ID with its paired kwargs, evaluate the candidate response, and require all hard constraints to pass. The shared content-quality appendix is not captured by these IDs, so a rule-only verifier cannot determine whether a formally valid response substantively answers the task.
For content-constrained RL, a two-stage reward is recommended:
- Require every machine-checkable constraint to pass.
- Separately evaluate substantive relevance and non-degeneracy with a pinned semantic judge or carefully validated content rules.
Verifier versions, tokenization, sentence splitting, Unicode normalization, whitespace handling, and judge prompts can materially change rewards. Pin and document them for reproducibility. This repository contains the training data only; it does not bundle a canonical verifier implementation or judge model.
Intended uses
- RLVR training for precise instruction following.
- Multi-constraint curriculum and composition research.
- Development of hard-constraint verifiers and hybrid rule/semantic rewards.
- Analysis of format compliance versus substantive task quality.
Limitations and risks
- Only a
trainsplit is provided; there is no independent validation or test set. - All labels are empty, and no reference responses or precomputed rewards are included.
- Multi-constraint compositions have not been exhaustively proven satisfiable under every verifier implementation.
- The exact verifier implementation is not part of the dataset, so results can vary across implementations.
- The common content-quality instruction requires semantic judgment and is not fully verifiable from the structured metadata.
- Dropping upstream row keys reduces provenance, deduplication, contamination analysis, and correction traceability.
- The substantive tasks are heterogeneous and may contain factual errors, outdated material, copyrighted text, personal information, political content, or unsafe requests inherited from source mixtures. No comprehensive content or privacy audit was performed for this repackaging.
- A prompt can request output in a language for which the underlying task or verifier has not been linguistically validated.
- Training on these templates may improve template-specific compliance without guaranteeing generalization to unseen constraints or real-world user intent.
License, responsible use, and citation
The primary upstream dataset, allenai/IF_multi_constraints_upto5, is released under ODC-BY-1.0, which is reflected in this repository's machine-readable metadata. Its card states that the data is intended for research and educational use under Ai2's Responsible Use Guidelines, and that output data generated by third-party models may be subject to separate terms.
Any records or underlying task content originating from additional sources remain subject to their original licenses and terms. Users should review the upstream card and source-mixture obligations before redistribution or commercial use.
The constraint taxonomy builds on Google IFEval and IFBench-Train. For methodology and citation details, see Generalizing Verifiable Instruction Following by Pyatkin et al. (NeurIPS 2025).
@inproceedings{pyatkin2025generalizing,
title={Generalizing Verifiable Instruction Following},
author={Pyatkin, Valentina and Malik, Saumya and Graf, Victoria and Ivison, Hamish and Huang, Shengyi and Dasigi, Pradeep and Lambert, Nathan and Hajishirzi, Hannaneh},
booktitle={Advances in Neural Information Processing Systems},
year={2025},
url={https://arxiv.org/abs/2507.02833}
}Changes in this release
- Published a cleaned 29,520-row, JSONL-formatted, content-constrained training subset.
- Parsed verifier IDs and kwargs into compact nested metadata.
- Added an empty
labelfield andif_content_constraineddata type for RL pipelines. - Added a shared instruction discouraging surface-only reward hacking.
- Preserved the relative order and byte content of every surviving record.
- Added full-file integrity, schema, constraint, task-shape, duplicate, and known-unsatisfiable-record statistics.
