dataset-curation / index.html
Agenten's picture
Upload 2 files
a0ae180 verified
Raw History Blame Contribute Delete
20.9 kB
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="description" content="Interactive dataset curation assistant with tailored recommendations for training, post-training, RAG, evaluation and agent data.">
<title>Dataset Curation</title>
<style>
:root{
--bg:#07111e;--panel:#0d1a2f;--line:#27415e;
--text:#f4f8ff;--muted:#9fb3c7;--cyan:#50ddff;--violet:#a58aff;
}
*{box-sizing:border-box}
body{
margin:0;
background:
radial-gradient(circle at 14% -8%,rgba(80,221,255,.14),transparent 30%),
radial-gradient(circle at 90% 0,rgba(165,138,255,.12),transparent 28%),
var(--bg);
color:var(--text);
font:15px/1.55 Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
.wrap{max-width:1180px;margin:auto;padding:0 22px}
.hero{text-align:center;padding:64px 0 28px}
.kicker{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:7px 12px;background:#0a1830;color:var(--cyan);font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.1em}
h1{font-size:clamp(44px,8vw,76px);line-height:1;margin:20px 0 14px;letter-spacing:-.055em}
.grad{background:linear-gradient(90deg,var(--cyan),#dce8ff,var(--violet));background-clip:text;-webkit-background-clip:text;color:transparent}
.hero p{max-width:820px;margin:auto;color:var(--muted);font-size:18px}
.layout{display:grid;grid-template-columns:370px 1fr;gap:16px;padding:18px 0 52px}
.panel{border:1px solid var(--line);border-radius:19px;padding:18px;background:linear-gradient(150deg,#10213b,#09172b);box-shadow:0 18px 44px rgba(0,0,0,.22)}
h2{font-size:20px;margin:0 0 5px}.sub{color:var(--muted);font-size:12px;margin-bottom:14px}
label{display:block;font-size:12px;font-weight:800;margin:11px 0 5px}
select{width:100%;background:#08172b;color:var(--text);border:1px solid var(--line);border-radius:11px;padding:10px 11px}
.group{border:1px solid #223b58;background:#09182d;border-radius:12px;padding:10px;margin:9px 0}
.groupTitle{display:flex;justify-content:space-between;gap:12px;font-size:11px;font-weight:800}
.val{color:var(--cyan)}
input[type=range]{width:100%;accent-color:#6e7dff}
.check{display:flex;gap:8px;align-items:center;border:1px solid #223b58;background:#09182d;border-radius:11px;padding:10px;margin-top:9px;font-size:12px;color:#ccd9e7}
button{width:100%;border:0;border-radius:11px;padding:12px;color:white;font-weight:850;background:linear-gradient(90deg,#3188ff,#775df0);cursor:pointer;margin-top:13px}
.head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.eyebrow{font-size:10px;color:var(--cyan);font-weight:850;text-transform:uppercase;letter-spacing:.08em}
.route{font-size:28px;font-weight:900;letter-spacing:-.035em}
.badge{font-size:10px;border:1px solid #31506f;background:#0e2039;color:#c9dae9;border-radius:999px;padding:5px 8px;white-space:nowrap}
.summary{color:var(--muted);font-size:13px;margin-top:6px}
.health{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:16px 0}
.stat{border:1px solid #223b58;background:#08172c;border-radius:11px;padding:10px}
.stat strong{display:block;font-size:20px}.stat span{font-size:9px;color:var(--muted)}
.flowbox{border:1px solid #203854;border-radius:15px;background:#07152a;padding:16px;margin:16px 0}
.flow{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.node{border:1px solid #35577b;background:#102542;border-radius:9px;padding:8px 9px;font-size:10px;font-weight:850}
.node.high{border-color:#8c79ff;background:#251f4d}
.arrow{color:var(--cyan);font-weight:900}
.planTitle{font-size:18px;font-weight:900;margin:17px 0 5px}
.action{display:grid;grid-template-columns:50px 1fr auto;gap:10px;align-items:start;padding:11px 0;border-top:1px solid var(--line)}
.stepno{width:40px;height:40px;border-radius:11px;border:1px solid #31516f;background:#0a1d35;display:flex;align-items:center;justify-content:center;font-weight:900}
.action b{display:block;font-size:12px}.action p{margin:3px 0 0;color:var(--muted);font-size:11px}
.priority{font-size:9px;border-radius:999px;padding:4px 7px;border:1px solid #38536f;color:#cedbea}
.priority.high{border-color:#7d6de7;color:#ddd5ff}
.priority.critical{border-color:#9f5f65;color:#ffd0d0}
.validation{margin-top:14px;border-top:1px solid var(--line);padding-top:13px}
.validation ul{padding-left:18px;color:var(--muted);font-size:12px;margin-bottom:0}
.note{margin-top:14px;color:var(--muted);font-size:11px}
footer{border-top:1px solid var(--line);padding:28px 0 45px;color:var(--muted);font-size:13px}
footer strong{color:var(--text)}
@media(max-width:900px){.layout{grid-template-columns:1fr}.health{grid-template-columns:repeat(2,1fr)}}
</style>
</head>
<body>
<header class="hero">
<div class="wrap">
<span class="kicker">Interactive AI Data Assistant</span>
<h1>Dataset <span class="grad">Curation</span></h1>
<p>Describe your dataset and objective. The assistant builds an ordered curation plan with concrete recommendations.</p>
</div>
</header>
<main class="wrap">
<section class="layout">
<aside class="panel">
<h2>Describe your dataset</h2>
<div class="sub">The recommendations adapt to your objective and data condition.</div>
<label for="objective">AI objective</label>
<select id="objective">
<option value="pretraining">Pretraining</option>
<option value="posttraining">Post-Training / Fine-Tuning</option>
<option value="evaluation">Evaluation / Benchmark</option>
<option value="rag">RAG / Retrieval</option>
<option value="agents">Agent / Tool-Use Data</option>
</select>
<label for="modality">Primary data type</label>
<select id="modality">
<option value="text">Text</option>
<option value="code">Code</option>
<option value="synthetic">Synthetic Data</option>
<option value="multimodal">Multimodal</option>
<option value="trajectories">Agent / Robot Trajectories</option>
</select>
<label for="scale">Dataset scale</label>
<select id="scale">
<option value="small">Small — &lt;100k examples</option>
<option value="medium" selected>Medium — 100k to 10M</option>
<option value="large">Large — 10M+</option>
</select>
<div id="ranges"></div>
<label class="check">
<input id="humanReview" type="checkbox" checked>
Human review is available for uncertain examples
</label>
<button id="generate">Generate curation plan</button>
</aside>
<section class="panel">
<div class="head">
<div>
<div class="eyebrow">Recommended workflow</div>
<div class="route" id="route"></div>
</div>
<span class="badge" id="badge"></span>
</div>
<div class="summary" id="summary"></div>
<div class="health" id="health"></div>
<div class="flowbox"><div class="flow" id="flow"></div></div>
<div class="planTitle">Concrete action plan</div>
<div id="actions"></div>
<div class="validation">
<div class="eyebrow">Before release or training</div>
<ul id="validationList"></ul>
</div>
<div class="note">
Educational and vendor-neutral guidance. Validate recommendations against licensing, privacy, safety, governance and downstream model behavior.
</div>
</section>
</section>
</main>
<footer>
<div class="wrap">
<strong>Dataset Curation</strong> — an independent Hugging Face Space for AI data curation.<br>
Collaboration and partnerships: <strong>agenten@magenta.de</strong>
</div>
</footer>
<script>
const $=id=>document.getElementById(id);
const dimensions=[
["duplicates","Duplicate level",35],
["quality","Quality inconsistency",40],
["provenance","Missing provenance",30],
["privacy","Privacy / PII risk",25],
["contamination","Contamination risk",20],
["imbalance","Distribution imbalance",35]
];
const ranges=$("ranges");
dimensions.forEach(([id,label,val])=>{
const d=document.createElement("div");
d.className="group";
d.innerHTML=`<div class="groupTitle"><span>${label}</span><span class="val" id="${id}Val">${val}</span></div>
<input id="${id}" type="range" min="0" max="100" value="${val}" aria-label="${label}">`;
ranges.appendChild(d);
d.querySelector("input").addEventListener("input",e=>{
$(id+"Val").textContent=e.target.value;
build();
});
});
const base={
pretraining:{
label:"Pretraining",
intro:"Build a scalable pipeline that reduces redundancy and noise while preserving useful diversity.",
stages:["Validate & Normalize","Language / Format Filter","Deduplicate","Quality Score","Privacy / Safety","Decontaminate","Select & Mix","Version & Evaluate"]
},
posttraining:{
label:"Post-Training",
intro:"Prioritize correctness, supervision quality, task diversity and reliable labels.",
stages:["Validate Schema","Instruction Quality","Verify Responses","Deduplicate","Difficulty / Diversity","Privacy / Safety","Select & Balance","Evaluate"]
},
evaluation:{
label:"Evaluation",
intro:"Protect benchmark integrity and make ground truth, coverage and difficulty auditable.",
stages:["Validate Schema","Verify Ground Truth","Decontaminate","Deduplicate","Balance Difficulty","Audit Coverage","Freeze Version","Evaluate Judges"]
},
rag:{
label:"RAG / Retrieval",
intro:"Optimize the knowledge base for relevance, freshness, provenance and retrieval quality.",
stages:["Validate Sources","Normalize","Deduplicate","Quality / Relevance","Freshness","Metadata / Access","Chunk & Index","Retrieval Eval"]
},
agents:{
label:"Agent Data",
intro:"Select trajectories that demonstrate successful, efficient and safe tool use.",
stages:["Validate Trace","Check Tool Calls","Verify Outcome","Score Efficiency","Deduplicate","Safety Review","Balance Tasks","Evaluate Policy"]
}
};
const modalitySteps={
text:["Language identification","Boilerplate and malformed-text filtering"],
code:["Parse or compile checks","Repository and license-level deduplication"],
synthetic:["Generator-artifact detection","Independent verification and difficulty scoring"],
multimodal:["Media integrity checks","Cross-modal alignment and synchronization"],
trajectories:["State-action consistency","Outcome and trajectory verification"]
};
const actionText={
"Validate & Normalize":"Repair encoding, normalize schema and reject structurally invalid records before deeper scoring.",
"Language / Format Filter":"Measure language and format distribution; remove only clearly out-of-scope or malformed records.",
"Deduplicate":"Run exact hashes first, then near-duplicate detection; add semantic deduplication only where redundancy remains costly.",
"Quality Score":"Combine interpretable heuristics with a task-specific learned or model-based quality signal.",
"Privacy / Safety":"Scan for PII and policy-sensitive content; log whether examples are removed, masked, restricted or retained.",
"Decontaminate":"Compare against target evaluation sets using exact, fuzzy and semantic overlap checks.",
"Select & Mix":"Select for quality and utility, then rebalance sources, domains, languages and difficulty before training.",
"Version & Evaluate":"Freeze a versioned output and measure downstream model impact against an uncurated or previous baseline.",
"Validate Schema":"Reject malformed records and enforce consistent fields, IDs and metadata.",
"Instruction Quality":"Check whether prompts are clear, non-trivial and representative of target tasks.",
"Verify Responses":"Use deterministic checks where possible, calibrated model judges where needed, and humans for uncertain high-value examples.",
"Difficulty / Diversity":"Measure task clusters and difficulty; prevent easy or repetitive examples from dominating.",
"Select & Balance":"Retain verified examples while maintaining representative task and domain coverage.",
"Evaluate":"Run downstream fine-tuning or post-training ablations to validate that curation improves the target system.",
"Verify Ground Truth":"Audit expected answers, labels and scoring rules; isolate ambiguous examples.",
"Balance Difficulty":"Construct a deliberate mix of easy, medium, hard and adversarial cases.",
"Audit Coverage":"Map benchmark items to target capabilities and identify missing or overrepresented skills.",
"Freeze Version":"Create an immutable evaluation version with provenance and documented changes.",
"Evaluate Judges":"Measure judge agreement, calibration and known biases where automated judging is used.",
"Validate Sources":"Confirm source identity, permissions and relevance before ingesting documents.",
"Normalize":"Standardize text, metadata, timestamps and fields before chunking or indexing.",
"Quality / Relevance":"Score documents for usefulness to the target query distribution rather than generic writing quality alone.",
"Freshness":"Detect stale documents and define refresh or expiry policies.",
"Metadata / Access":"Attach source, permissions, timestamps, ownership and domain metadata to each retrievable unit.",
"Chunk & Index":"Tune chunk boundaries and indexing strategy after document-level curation.",
"Retrieval Eval":"Test retrieval recall, ranking quality and answer support on representative queries.",
"Validate Trace":"Ensure each trajectory has a coherent sequence of observations, actions, tool results and outcomes.",
"Check Tool Calls":"Flag invalid tools, malformed arguments, redundant calls and incorrect use of tool outputs.",
"Verify Outcome":"Label task success using deterministic or carefully calibrated evaluation where possible.",
"Score Efficiency":"Measure unnecessary steps, cost, latency and repeated actions.",
"Safety Review":"Detect unsafe actions and distinguish useful failure examples from trajectories that should be excluded.",
"Balance Tasks":"Avoid overrepresenting a narrow set of environments, tools or task templates.",
"Evaluate Policy":"Test whether training on the curated trajectories improves task success, efficiency and safety."
};
function risk(id){return +$(id).value}
function severity(v){return v>=70?"critical":v>=45?"high":"normal"}
function build(){
const objective=$("objective").value;
const modality=$("modality").value;
const scale=$("scale").value;
const cfg=base[objective];
const risks={
duplicates:risk("duplicates"),
quality:risk("quality"),
provenance:risk("provenance"),
privacy:risk("privacy"),
contamination:risk("contamination"),
imbalance:risk("imbalance")
};
let stages=[...cfg.stages];
if(risks.provenance>=55 && !stages.includes("Validate Sources")) stages.unshift("Source & Provenance Audit");
if(risks.duplicates>=65 && !stages.includes("Deduplicate")) stages.splice(2,0,"Deduplicate");
if(risks.privacy>=65 && !stages.includes("Privacy / Safety")) stages.splice(Math.max(2,stages.length-2),0,"Privacy / Safety");
if(risks.contamination>=65 && !stages.includes("Decontaminate")) stages.splice(Math.max(2,stages.length-2),0,"Decontaminate");
stages=[...new Set(stages)];
$("route").textContent=cfg.label+" Curation";
$("badge").textContent=scale.charAt(0).toUpperCase()+scale.slice(1)+" · "+$("modality").options[$("modality").selectedIndex].text;
$("summary").textContent=cfg.intro+" "+summarySentence(risks, modality, scale);
const overallRisk=Math.round(Object.values(risks).reduce((a,b)=>a+b,0)/6);
const readiness=Math.max(0,100-overallRisk);
const review=$("humanReview").checked ? "Available" : "Limited";
$("health").innerHTML=`
<div class="stat"><strong>${readiness}</strong><span>estimated readiness</span></div>
<div class="stat"><strong>${overallRisk}</strong><span>average risk</span></div>
<div class="stat"><strong>${stages.length}</strong><span>pipeline stages</span></div>
<div class="stat"><strong>${review}</strong><span>human review</span></div>`;
$("flow").innerHTML=stages.map((s,i)=>`
<span class="node ${importantStage(s,risks)?'high':''}">${s}</span>${i<stages.length-1?'<span class="arrow">→</span>':''}`
).join("");
let actions=stages.map(stage=>({
stage,
text:actionText[stage] || customText(stage),
priority:priorityFor(stage,risks)
}));
modalitySteps[modality].forEach((txt,j)=>{
actions.splice(Math.min(2+j,actions.length),0,{
stage:modalityLabel(modality,j),
text:txt+".",
priority:(modality==="synthetic"||modality==="trajectories")?"high":"normal"
});
});
if($("humanReview").checked){
actions.push({
stage:"Targeted Human Review",
text:"Send uncertain, high-value or high-risk examples to human review instead of applying blanket removal.",
priority:"high"
});
}
$("actions").innerHTML=actions.slice(0,11).map((a,i)=>`
<div class="action">
<div class="stepno">${i+1}</div>
<div><b>${a.stage}</b><p>${a.text}</p></div>
<span class="priority ${a.priority}">${a.priority==="critical"?"CRITICAL":a.priority==="high"?"HIGH":"STANDARD"}</span>
</div>`).join("");
$("validationList").innerHTML=validationItems(objective,risks,scale).map(x=>`<li>${x}</li>`).join("");
}
function summarySentence(r, modality, scale){
const arr=Object.entries(r).sort((a,b)=>b[1]-a[1]).slice(0,2);
const nice={
duplicates:"duplication",
quality:"quality inconsistency",
provenance:"provenance gaps",
privacy:"privacy risk",
contamination:"contamination risk",
imbalance:"distribution imbalance"
};
return `The highest current concerns are ${nice[arr[0][0]]} and ${nice[arr[1][0]]}; the plan prioritizes those risks for this ${scale}-scale ${modality} dataset.`;
}
function importantStage(stage,r){
return (stage.includes("Deduplicate")&&r.duplicates>=55) ||
(stage.includes("Quality")&&r.quality>=55) ||
(stage.includes("Privacy")&&r.privacy>=55) ||
(stage.includes("Decontaminate")&&r.contamination>=55) ||
(stage.includes("Provenance")&&r.provenance>=55) ||
(stage.includes("Balance")&&r.imbalance>=55);
}
function priorityFor(stage,r){
let v=35;
if(stage.includes("Deduplicate")) v=r.duplicates;
else if(stage.includes("Quality")||stage.includes("Verify Response")) v=r.quality;
else if(stage.includes("Privacy")) v=r.privacy;
else if(stage.includes("Decontaminate")) v=r.contamination;
else if(stage.includes("Source")||stage.includes("Provenance")||stage.includes("Metadata")) v=r.provenance;
else if(stage.includes("Balance")||stage.includes("Mix")||stage.includes("Coverage")) v=r.imbalance;
return severity(v);
}
function customText(stage){
if(stage==="Source & Provenance Audit") return "Inventory sources, licenses, collection dates and transformation history before additional processing.";
return "Apply this stage with measurable thresholds and log the decision for reproducibility.";
}
function modalityLabel(modality,i){
const labels={
text:["Text Integrity","Boilerplate Control"],
code:["Code Validity","Repository Hygiene"],
synthetic:["Synthetic Verification","Difficulty & Diversity"],
multimodal:["Media Integrity","Modality Alignment"],
trajectories:["Trajectory Integrity","Outcome Verification"]
};
return labels[modality][i];
}
function validationItems(objective,r,scale){
const items=[
"Save filter thresholds, scorer versions and random seeds with the dataset version.",
"Manually inspect retained and rejected samples from every major source or cluster.",
"Run an ablation or downstream comparison against the previous or uncurated dataset."
];
if(r.contamination>=45) items.push("Re-run contamination checks against the exact evaluation suite used for reporting.");
if(r.provenance>=45) items.push("Do not publish or train until source and license gaps are explicitly documented.");
if(r.privacy>=45) items.push("Review the treatment of flagged personal data and retain an auditable removal/redaction policy.");
if(scale==="large") items.push("Measure curation throughput, storage overhead and failure recovery on representative shards before full-scale processing.");
if(objective==="rag") items.push("Evaluate retrieval on representative user queries before measuring generation quality.");
if(objective==="posttraining") items.push("Check correctness and difficulty distributions after filtering so easy examples do not dominate.");
if(objective==="evaluation") items.push("Freeze the final benchmark version and prevent accidental reuse in training pipelines.");
if(objective==="agents") items.push("Compare task success, step count, tool accuracy and safety before and after trajectory curation.");
return items;
}
["objective","modality","scale","humanReview"].forEach(id=>$(id).addEventListener("change",build));
$("generate").addEventListener("click",build);
build();
</script>
</body>
</html>