GhostScientist's picture
Dataset card: pipeline, stats, schema, provenance
e7b14ac verified
|
Raw History Blame Contribute Delete
3.07 kB

SemanticWiki Data v3

Training data for architectural-wiki generation with verifiable citations. 313 examples, each a full DeepWiki-style page generated from a real GitHub repository, where every path:line citation was deterministically verified against the harvested repo snapshot (file exists, lines in bounds, non-empty).

Why v3

v1/v2 (semanticwiki-data) contained synthetic two-file toy snippets, a single category, and taught format memorization rather than architecture reasoning. v3 uses real repositories across 7 languages and 4 documentation categories.

Pipeline

  1. Discovery - 100 repos via GitHub search (permissive licenses, 500-100k stars, 0.5-30 MB), multi-language quota. 97 harvested, 3 rejected (markdown-only).
  2. Context - line-numbered rendering of each repo's core files (large files windowed, tokenizer-measured budget <= 20k tokens).
  3. Teacher generation - Qwen/Qwen3-Coder-30B-A3B-Instruct (vLLM), strict path:start-end citation format with a one-shot example.
  4. Verification - deterministic citation checker per page.
  5. Repair - one batched round: the teacher sees its own draft + the exact invalid citations and rewrites. 177 repairs run, 176 accepted.
  6. Gate - keep pages with validity >= 0.8: 388 generated -> 313 kept.

Stats

Repos 97 (python 25, typescript/javascript, go, rust, java, c)
Pages kept / generated 313 / 388
Mean citation validity by category overview 0.846, deep-dive 0.803, data-flow 0.780, rationale 0.830
Post-repair repairs accepted 176 / 177

Schema (train.jsonl)

  • messages - [system, user(<START_OF_CONTEXT>...<query>...), assistant]
  • source - org/name of the real repo
  • category - architecture_overview | module_deep_dive | data_flow | design_rationale
  • quality_score - citation validity x 100
  • citation_stats - total/validity/invalid details
  • license, language - from the GitHub registry

Files

  • train.jsonl - the 313 training rows
  • repo_registry.json - all 100 discovered repos with licenses (also the eval exclusion list)
  • repo_snapshots.tar.gz (272 MB) - harvested repo snapshots, for citation re-verification
  • raw_pages.jsonl, repair_history.json, summary.json - full provenance

License

Dataset released under Apache-2.0. Source repositories are MIT / Apache-2.0 / BSD-3-Clause (see repo_registry.json); code contexts are excerpts under those licenses, generated pages are teacher-model text about that code.

Usage

Train with TRL SFTTrainer using the conversational prompt-completion format (prompt = messages[:-1], completion = [assistant]); loss is computed on the completion only. See GhostScientist/semanticwiki-dataset-v3-scripts/sw_train.py.

Provenance

Generated with the pipeline in GhostScientist/semanticwiki-dataset-v3-scripts; evaluated in GhostScientist/semanticwiki-eval-v3.