Datasets:
Download README.md from Squezilia/Route4Secure: direct link, hf CLI and curl.
- Browser
- Download file 23.3 kB
-
https://huggingface.co/datasets/Squezilia/Route4Secure/resolve/main/README.md
- Command line
-
hf download hf://datasets/Squezilia/Route4Secure/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Squezilia/Route4Secure/resolve/main/README.md
license: cc-by-4.0
pretty_name: Route4Secure
task_categories:
- text-classification
language:
- ar
- de
- en
- es
- fr
- hi
- it
- ja
- ko
- nl
- th
- zh
size_categories:
- 100K<n<1M
tags:
- prompt-routing
- llm-routing
- safety-guard
- complexity-classification
- aegis-2.0
- multilingual
- nemotron
- oasst1
- oasst2
- openthoughts
configs:
- config_name: default
default: true
data_files:
- split: train
path: Route4Secure.parquet
- config_name: oasst1
data_files:
- split: train
path: OASST1.parquet
- config_name: oasst2
data_files:
- split: train
path: OASST2.parquet
- config_name: nemotron
data_files:
- split: train
path: nemotron.parquet
- config_name: open_thoughts
data_files:
- split: train
path: open_thoughts.parquet
Route4Secure: Multilingual Prompt Complexity, Intent & Safety Routing Dataset
Route4Secure is a large-scale, multilingual dataset designed for training unified LLM prompt routers and safety guardrails. It combines human-curated conversational prompts from OpenAssistant (OASST1 & OASST2), adversarial, synthetic, and real-world safety examples from NVIDIA Nemotron Safety Guard Dataset v3, and high-complexity (level 5–7) code, math, and science prompts from OpenThoughts3-1.2M (machine-translated into 11 languages with Hy-MT2-7B), annotated under a unified 12-column schema using Qwen3.5-9B.
Unlike single-objective routing datasets that only score prompt difficulty or binary toxicity in isolation, Route4Secure provides joint supervision across five routing dimensions for every prompt:
- Prompt Complexity (
level:0–7): Inherent technical, mathematical, logical, or linguistic difficulty of the underlying task (explicitly stripping away decorative vocabulary inflation). - Task Intent (
category: 13 domains): Primary functional domain of the prompt (Coding & Software,Mathematics,Logical Reasoning & Problem Solving,Security & Hijack, etc.). - Reasoning Requirement (
requires_reasoning:bool): Whether multi-step deduction, algorithmic problem-solving, or mathematical calculation is required. - Binary Safety (
safe:bool): 57.62% Safe / 42.38% Unsafe distribution in the primarydefaultconfiguration (see §4 and §7). - Fine-Grained Aegis 2.0 Safety Taxonomy (
unsafe_category&violated_all): Both the single dominant Aegis 2.0 violation predicted by the annotator model and the complete list of canonical violated categories from the source annotations.
1. Repository Configurations & Files
All Parquet files in this repository share the exact same 12-column PyArrow schema (with dictionary-encoded categorical columns and zstd compression). You can load the main dataset (default) or inspect any individual source shard:
| Config Name | File | Rows | Size | Languages | Safe / Unsafe Split | Description |
|---|---|---|---|---|---|---|
default |
Route4Secure.parquet |
130,050 | 58.7 MB | 12 languages | 57.62% Safe (74,938) / 42.38% Unsafe (55,112) |
Main training dataset. Combines language- and complexity-balanced OASST1 + OASST2 with nemotron and a level 5–7 subset of open_thoughts. |
oasst1 |
OASST1.parquet |
33,170 | 5.0 MB | 23 languages (unfiltered) | 100% Safe (33,170) |
Full annotated OpenAssistant/oasst1 prompts normalized to the 12-column schema. |
oasst2 |
OASST2.parquet |
48,051 | 7.6 MB | 12 languages (unfiltered) | 100% Safe (48,051) |
Full annotated OpenAssistant/oasst2 prompts normalized to the 12-column schema. |
nemotron |
nemotron.parquet |
97,369 | 40.2 MB | 12 balanced languages | 40.68% Safe (39,610) / 59.32% Unsafe (57,759) |
Merged Nemotron shard (79,983 initial sample + 9,377 unsafe supplement + 8,009 level >= 3 supplement). |
open_thoughts |
open_thoughts.parquet |
39,732 | 26.6 MB | 12 perfectly balanced languages (3,311 each) |
100% Safe (39,732) |
Cleaned level 3–7 OpenThoughts3-1.2M prompts: 3,311 unique English source prompts × 12 languages (English original + 11 Hy-MT2-7B translations). |
2. Unified 12-Column Schema & Dictionary Encodings
Every configuration conforms to the following 12-column Arrow schema:
| Column | Arrow Type | Nullable | Description |
|---|---|---|---|
id |
int32 |
No | Sequential integer identifier (0 .. N-1). |
prompt |
string |
No | Raw user prompt text to be classified/routed. |
level |
dictionary<values=string, indices=int8> |
No | Task complexity score from "0" (trivial) to "7" (expert). |
category |
dictionary<values=string, indices=int8> |
No | Primary task intent category (13-class enum). |
requires_reasoning |
bool |
No | True if the prompt requires multi-step logic, math, or complex debugging. |
reason |
string |
No | Concise 1–3 sentence justification generated before assigning level and category. |
language |
string |
No | BCP-47 / ISO 639-1 language code (ar, de, en, es, fr, hi, it, ja, ko, nl, th, zh-CN). |
source |
string |
No | Upstream dataset identifier (OpenAssistant/oasst1, OpenAssistant/oasst2, nvidia/Nemotron-Safety-Guard-Dataset-v3, or open-thoughts/OpenThoughts3-1.2M). |
unsafe_category |
dictionary<values=string, indices=int8> |
Yes | Single most dominant Aegis 2.0 safety violation (null when the prompt is safe or borderline non-violating). |
violated_all |
list<dictionary<values=string, indices=int8>> |
No | Canonical list of all violated Aegis 2.0 categories from source annotations ([] for safe prompts). |
safe |
bool |
No | Ground-truth binary safety flag (True = safe, False = unsafe). |
synthetic |
bool |
No | True if the source safety label was synthetically annotated (llm_jury) or the prompt text is a machine translation (Hy-MT2-7B rows of open_thoughts); False for human-curated annotations (OASST1, OASST2, human-labeled Nemotron rows) and original English OpenThoughts prompts. |
3. Annotation Protocol (Qwen3.5-9B)
All prompts across OASST1, OASST2, and Nemotron were annotated using Qwen3.5-9B (unsloth/Qwen3.5-9B-GGUF:Q4_K_M) served via llama.cpp (llama-server commit fb27a525) with grammar-constrained JSON Schema validation (temperature = 0.1, max_tokens = 768, context_per_slot = 8192, thinking disabled). The English source prompts of open_thoughts were annotated with the same model, system prompt, and rubric (see §3.1).
Key Design Principles of the Annotation Pipeline
- Anti-Inflation Complexity Scoring (
reason-first): A common failure mode in LLM complexity routers is scoring ornate or academic-sounding phrasing as "hard" even when the underlying task is trivial (e.g., "derive the sum of 1 and 2 within a non-commutative ring theory framework"). The system prompt enforces stripping away decorative jargon and writing thereasonfield first to identify the literal underlying task before scoringlevel(0–7). - Preflight Token & Context Verification: Every prompt was preflight-tokenized with the exact chat template prior to inference. Oversized prompts exceeding the slot context window were explicitly excluded rather than silently truncated.
- Refusal & Schema Filtering: Prompts where the annotator model triggered an explicit refusal, truncated output, invalid JSON schema, or English refusal heuristic (
I cannot assist,I must decline, etc.) were excluded from training exports. - Dominant Aegis 2.0 Resolution: For multi-label unsafe prompts in Nemotron, the annotator received the normalized ground-truth
hint_violated_categoriesand independently selected the single most severe/dominant Aegis 2.0 category forunsafe_category, whileviolated_allpreserves the full multi-label set. - Safe Polyfill for OpenAssistant & OpenThoughts: Because
OpenAssistant/oasst1,OpenAssistant/oasst2, andopen-thoughts/OpenThoughts3-1.2Mdo not contain unsafe violation flags, their safety columns are polyfilled assafe = True,unsafe_category = None, andviolated_all = [](synthetic = Falsefor OpenAssistant; see thesyntheticcolumn definition for OpenThoughts).
3.1. OpenThoughts Pipeline (Classification → Translation → Cleaning)
- Candidate Pool & Level Filtering: A
60,000-prompt candidate pool was drawn from the code, math, and science shards ofopen-thoughts/OpenThoughts3-1.2Mand interleaved round-robin (Code → Math → Science). Each candidate was classified with theQwen3.5-9Brubric above, and only prompts scoredlevel >= 3were accepted until per-level quotas were met (4,247accepted English prompts). - Translation into 11 Languages: Each accepted English prompt was translated into
ar, de, es, fr, hi, it, ja, ko, nl, th, zh-CNwithtencent/Hy-MT2-7B-GGUF(Q4_K_M,temperature = 0.7,top_p = 0.6,top_k = 20,repetition_penalty = 1.05,max_tokens = 4096,context_per_slot = 8192). - Label Propagation: Translations inherit the English source prompt's
level,category,requires_reasoning, and (English)reason. Every source prompt therefore forms a 12-row translation group with identical labels. - Group-Level Cleaning (
4,247→3,311groups,50,964→39,732rows): Entire 12-row groups were removed when the English source prompt was an exact duplicate of another source prompt (including duplicates with conflictinglevellabels), contained<image>placeholders (references to images unavailable in text-only prompts), or had any broken / truncated translation.
4. Dataset Construction: Safety, 12-Language & Complexity (level >= 3) Balancing
Raw OASST1 (33,170 rows) and OASST2 (48,051 rows) contain 81,221 safe prompts across 23 languages, but are heavily skewed toward English (39,172 rows) and Spanish (17,047 rows). Meanwhile, nvidia/Nemotron-Safety-Guard-Dataset-v3 supports 12 balanced languages (ar, de, en, es, fr, hi, it, ja, ko, nl, th, zh-CN). Furthermore, natural prompt distributions follow a steep Zipfian curve dominated by level = 1 queries.
To construct the balanced default (Route4Secure.parquet) split across all three axes (12 languages, safety, and enriched level >= 3 complexity):
- 12-Language Alignment:
OASST1andOASST2language codes were normalized (zh$\rightarrow$zh-CN) and filtered to the 12 languages supported by Nemotron (excluding12,024rows in non-Nemotron languages). - 100% Preservation of
level >= 3in OpenAssistant (10,052rows): Rather than losing rare high-complexity prompts during language capping, 100% of alllevel >= 3prompts (10,052rows) across all 12 in-scope languages inOASST1 + OASST2were retained. In English (6,409level >= 3rows), onlylevel >= 3prompts were taken from OASST and the1,409excess above the5,000language cap was swapped 1-for-1 by removing1,409level = 1English rows from Nemotron. In Spanish (2,277level >= 3rows), the remaining2,723slots to reach5,000were sampled proportionally fromlevel = 0andlevel = 2(0rows fromlevel = 1). - 50/50 Safe / Unsafe Supplement (
9,377rows): To balance the safe OASST prompts against the initial79,983-row stratified Nemotron pass (33,184safe +46,799unsafe), a deterministic zero-overlap supplement of9,377validunsafeNemotron rows was collected. - High-Complexity (
level >= 3) Nemotron Mining & 1-for-1 Swap (8,009rows): From the remaining362,030unprocessed Nemotron rows, candidates were scored per language using structural complexity signals (language-normalized length, multi-line structure, code/math/step-by-step/technical markers) and evaluated in round-robin order withQwen3.5-9B, retaining only prompts verified aslevel >= 3. This yielded8,009additionallevel >= 3Nemotron rows (3,533L3,3,350L4,1,040L5,61L6,25L7), which were swapped 1-for-1 per(language, safe)againstlevel = 1rows in Nemotron. This reducedlevel = 1share from48.56%down to36.63%and more than doubledlevel >= 3coverage from10.15%(11,400rows) to23.69%(26,611rows) while keeping total dataset size (112,338rows), 12-language balance, and near-50/50 safety (50.94% Safe / 49.06% Unsafe) intact. - Expert-Tier (
level 5–7) OpenThoughts Expansion (17,712rows): After step 4, the top three complexity classes were still severely under-represented (L52.00%,L60.35%,L70.17%; a214×ratio between the largest and smallest class). From the cleanedopen_thoughtsshard, whole 12-language translation groups were sampled (seed42):500groups (6,000rows) each forL5andL6, and all476availableL7groups (5,712rows). Three groups whose prompts are pure chemical formulas / LaTeX (identical text across all 12 languages) were excluded. These rows are appended (no swap), with zero overlap against the existing rows.L5/L6/L7grew from2,247/397/192to8,247/6,397/5,904rows (6.34%/4.92%/4.54%).- The largest-to-smallest class ratio dropped from
214×to7.0×, andlevelentropy rose from2.29to2.68bits (max3.00). - Because all appended rows are safe, the global safety split moved from
50.94% / 49.06%to57.62% / 42.38%. - OpenThoughts rows occupy
id112,338–130,049, ordered group by group (languages in alphabetical order within each group). The translation group key is(id - 112338) // 12(in theopen_thoughtsconfig:id // 12). Use it for group-aware train/validation/test splits to avoid cross-lingual leakage.
5. Dataset Statistics (default — 130,050 Rows)
5.1. Breakdown by Source & Safety
| Source Dataset | safe |
synthetic |
Rows | Share (%) |
|---|---|---|---|---|
nvidia/Nemotron-Safety-Guard-Dataset-v3 |
False |
False |
40,541 | 31.17% |
nvidia/Nemotron-Safety-Guard-Dataset-v3 |
True |
False |
25,391 | 19.52% |
open-thoughts/OpenThoughts3-1.2M |
True |
True |
16,236 | 12.48% |
OpenAssistant/oasst2 |
True |
False |
14,885 | 11.45% |
nvidia/Nemotron-Safety-Guard-Dataset-v3 |
False |
True |
14,571 | 11.20% |
OpenAssistant/oasst1 |
True |
False |
9,502 | 7.31% |
nvidia/Nemotron-Safety-Guard-Dataset-v3 |
True |
True |
7,448 | 5.73% |
open-thoughts/OpenThoughts3-1.2M |
True |
False |
1,476 | 1.13% |
| Total | 74,938 Safe / 55,112 Unsafe | 91,795 Non-synthetic / 38,255 Synthetic | 130,050 | 100.00% |
5.2. Language Distribution (12 Languages)
| Language | Code | Safe (True) |
Unsafe (False) |
Total Rows | Share (%) |
|---|---|---|---|---|---|
| English | en |
10,386 | 3,790 | 14,176 | 10.90% |
| Spanish | es |
9,228 | 4,399 | 13,627 | 10.48% |
| Chinese (Simplified) | zh-CN |
8,568 | 4,420 | 12,988 | 9.99% |
| German | de |
7,993 | 4,805 | 12,798 | 9.84% |
| French | fr |
6,802 | 4,691 | 11,493 | 8.84% |
| Thai | th |
5,522 | 5,018 | 10,540 | 8.10% |
| Dutch | nl |
4,122 | 5,353 | 9,475 | 7.29% |
| Arabic | ar |
4,312 | 5,024 | 9,336 | 7.18% |
| Japanese | ja |
4,762 | 4,387 | 9,149 | 7.03% |
| Italian | it |
4,785 | 4,359 | 9,144 | 7.03% |
| Hindi | hi |
4,293 | 4,382 | 8,675 | 6.67% |
| Korean | ko |
4,165 | 4,484 | 8,649 | 6.65% |
5.3. Complexity Level Distribution (level 0–7)
| Level | Tier | Safe (True) |
Unsafe (False) |
Total Rows | Share (%) |
|---|---|---|---|---|---|
"0" |
Trivial | 10,744 | 6,594 | 17,338 | 13.33% |
"1" |
Trivial | 9,725 | 31,429 | 41,154 | 31.64% |
"2" |
Moderate | 15,289 | 11,946 | 27,235 | 20.94% |
"3" |
Moderate | 9,027 | 1,961 | 10,988 | 8.45% |
"4" |
Complex | 10,140 | 2,647 | 12,787 | 9.83% |
"5" |
Complex | 7,896 | 351 | 8,247 | 6.34% |
"6" |
Expert / Advanced | 6,330 | 67 | 6,397 | 4.92% |
"7" |
Expert / Advanced | 5,787 | 117 | 5,904 | 4.54% |
level >= 3:44,323(34.08%) ·level >= 5:20,548(15.80%)requires_reasoning = False:96,747(74.39%)requires_reasoning = True:33,303(25.61%)
5.4. Task Intent Category Distribution (category)
| Category | Rows | Share (%) |
|---|---|---|
Other |
32,441 | 24.95% |
Information & Science |
24,492 | 18.83% |
Writing & Content Creation |
20,950 | 16.11% |
Security & Hijack |
14,399 | 11.07% |
Coding & Software |
11,292 | 8.68% |
Roleplaying |
8,340 | 6.41% |
Mathematics |
6,982 | 5.37% |
Logical Reasoning & Problem Solving |
4,657 | 3.58% |
Text Processing & Summarization |
2,252 | 1.73% |
Arts & Culture |
1,955 | 1.50% |
Data Manipulation |
1,222 | 0.94% |
Language Translation |
682 | 0.52% |
Media Generation |
386 | 0.30% |
5.5. Dominant Aegis 2.0 Safety Category Distribution (unsafe_category)
| Aegis 2.0 Category | Rows | Share (%) |
|---|---|---|
null (Safe / Non-violating) |
74,837 | 57.54% |
Criminal Planning/Confessions |
16,449 | 12.65% |
Hate/Identity Hate |
7,712 | 5.93% |
Harassment |
4,119 | 3.17% |
PII/Privacy |
3,641 | 2.80% |
Controlled/Regulated Substances |
3,308 | 2.54% |
Sexual |
3,090 | 2.38% |
Violence |
2,790 | 2.15% |
Suicide and Self Harm |
2,297 | 1.77% |
Profanity |
1,821 | 1.40% |
Guns/Illegal Weapons |
1,723 | 1.32% |
Unauthorized Advice |
1,510 | 1.16% |
Illegal Activity |
1,455 | 1.12% |
Immoral/Unethical |
1,286 | 0.99% |
Sexual Minor |
805 | 0.62% |
Fraud/Deception |
791 | 0.61% |
Political/Misinformation/Conspiracy |
720 | 0.55% |
Malware |
537 | 0.41% |
Manipulation |
517 | 0.40% |
Threat |
314 | 0.24% |
High Risk Gov. Decision Making |
180 | 0.14% |
Copyright/Trademark/Plagiarism |
148 | 0.11% |
6. Usage
Loading with Hugging Face datasets
from datasets import load_dataset
# 1. Load the main Route4Secure dataset (130,050 rows)
ds = load_dataset("Squezilia/Route4Secure", split="train")
print(ds)
# 2. Load individual normalized source shards if needed
oasst1_ds = load_dataset("Squezilia/Route4Secure", "oasst1", split="train") # 33,170 rows
oasst2_ds = load_dataset("Squezilia/Route4Secure", "oasst2", split="train") # 48,051 rows
nemotron_ds = load_dataset("Squezilia/Route4Secure", "nemotron", split="train") # 97,369 rows
open_thoughts_ds = load_dataset("Squezilia/Route4Secure", "open_thoughts", split="train") # 39,732 rows
Reading Dictionary-Encoded Parquet Directly with pyarrow / pandas
import pyarrow.parquet as pq
table = pq.read_table("hf://datasets/Squezilia/Route4Secure/Route4Secure.parquet")
df = table.to_pandas()
print(df[["prompt", "level", "category", "requires_reasoning", "safe", "unsafe_category", "language"]].head())
7. Limitations & Ethical Considerations
- Adversarial & Sensitive Content Warning: Because roughly 42% of
Route4Secureconsists of unsafe and jailbreak prompts sourced fromnvidia/Nemotron-Safety-Guard-Dataset-v3, the dataset contains explicit examples of hate speech, criminal planning, self-harm, violence, malware requests, and other harmful categories. It is intended strictly for training and evaluating safety guardrails, moderation classifiers, and LLM routers. - LLM Annotation Disagreements: Complexity (
level), domain (category),requires_reasoning, and dominantunsafe_categoryannotations are generated byQwen3.5-9B(Q4_K_M). Whilesafeandviolated_allpreserve upstream ground-truth labels,unsafe_categoryreflects the annotator model's prediction and can occasionally disagree with the binarysafeflag on borderline prompts (~6% disagreement rate in raw Nemotron). Users training strict binary safety classifiers should rely onsafe(orlen(violated_all) > 0) as the ground-truth safety target. - High-Complexity Safety & Domain Skew:
97.4%oflevel 5–7rows are safe, and~86%of them come from OpenThoughts (code, math, and science only). A naive classifier may learn shortcuts such as "expert-level ⇒ math/code ⇒ safe" or "long prompt ⇒ high level" (OpenThoughtsL6/L7prompts are much longer than otherL6/L7rows). High-complexity unsafe prompts (e.g., sophisticated multi-step jailbreaks) remain scarce; consider class- or source-aware reweighting and evaluate on held-out complex unsafe prompts. - Machine-Translated Content: 11/12 of every OpenThoughts group is a
Hy-MT2-7Btranslation (synthetic = True) that inherits the English labels and Englishreason. Despite group-level cleaning, translations may contain residual errors, and math/code-heavy prompts naturally keep a large share of Latin script, LaTeX, and code in non-Latin-script languages. - Long Prompts: OpenThoughts prompts are long (median
~370XLM-R tokens;~37%exceed512tokens). Encoder models with a512-token limit will truncate them; head+tail truncation is recommended so that the final question is preserved. - Residual Language Ratio Skew: The 12 languages each represent 6.6%–10.9% of the dataset, but languages with heavy OpenAssistant coverage (
en,es,zh-CN,de) have a higher internal proportion ofsafeprompts (~62%–73% safe) compared to languages sourced primarily from Nemotron (nl,ar,ko,hi, ~44%–50% safe).
8. License & Attribution
This dataset is released under the Creative Commons Attribution 4.0 International (CC-BY-4.0) license, consistent with upstream attribution requirements:
- nvidia/Nemotron-Safety-Guard-Dataset-v3 — Licensed under
CC-BY-4.0. - OpenAssistant/oasst1 & OpenAssistant/oasst2 — Licensed under
Apache-2.0. - open-thoughts/OpenThoughts3-1.2M — Licensed under
Apache-2.0. Translations produced with tencent/Hy-MT2-7B.
Citation
@dataset{squezilia_route4secure_2026,
author = {Squezilia},
title = {Route4Secure: Multilingual Prompt Complexity, Intent and Safety Routing Dataset},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/datasets/Squezilia/Route4Secure}}
}
