File size: 2,278 Bytes
cb3271f
672e209
cb3271f
672e209
cb3271f
672e209
cb3271f
672e209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cb3271f
 
 
 
672e209
cb3271f
 
c62e495
cb3271f
 
 
 
 
 
 
 
672e209
2e7774c
672e209
c62e495
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
license: apache-2.0
task_categories:
- text-generation
language:
- en
tags:
- wikihow
- piqa
- hellaswag
- wikihow
- wiki
- SLM
- commonsense
- factbase
- facts
- fact
- physical
- wikipedia
- cosmopedia
- v2
- smolm
- smollm
- cleaned
pretty_name: Perfect Commonsense
size_categories:
- 100K<n<1M
---

# PerfectWikihow

A heavily filtered, deduplicated, split, improved version of FactBase-MultiDomainV2 (Facts extracted from filtered cosmopedia v2 Wikihow).
**Source:** [`ArrowLabs/FactBase-MultiDomainV2`](https://huggingface.co/datasets/ArrowLabs/FactBase-MultiDomainV2)  

## Filtering summary
1. **Removed columns**: `domain`, `source`, `source_file`, `source_license`, `dataset_version`, `prompt`, and nested `quality_metrics`.
2. **Flattened `quality_metrics` into separate columns**: `word_count`, `sentence_count`, `step_count`, `action_hits`, `explanation_hits`, `unique_word_ratio`, `prompt_overlap`, `orig_quality_score`.
3. **Quality floor & harsh penalties**: Removed all rows `< 50.0` quality; heavily penalized psychotherapy/addiction/psychology, spiritual/numerology, pure software-UI, legal/finance, and looping synthetic rows.
4. **Physical-only filtering**: Enforced physical-world procedural interaction gates (tools, materials, state changes, spatial measurements, causal mechanics) + C++20 hashed-bigram SGD physicality classifier (`ml_physical_prob >= 0.5`).
5. **Training-ready `training_text`**: Stripped `"Title:"` prefixes, recovered broken/empty titles prior to dropping `prompt`, removed alien-roleplay & meta-fluff sentences, removed duplicated headers/recaps, pruned abstract non-physical filler steps, merged short tool bullet lists into natural prose, and standardized punctuated step flow for **HellaSwag** and **PIQA**.
6. **Multi-method splitting**: Split multi-method tutorials (`Method 1`, `Method 2`, ...) into self-contained high-quality rows while keeping sequential `Part 1 / Part 2` tutorials intact.
7. **Global C++ deduplication & calibration**: C++20 3-gram LM fluency scoring, C++20 Exact + 5-gram Banded MinHash-LSH dedup, C++ FAISS/HNSWLib SemDeDup, and DuckDB + RapidFuzz topic-diversity capping.

## Stats
- **Source rows scanned**: 815,201
- **Rows after cleaning & splitting**: 176,445
- **Final deduped rows**: 118,971