| --- |
| license: cc-by-4.0 |
| language: |
| - en |
| pretty_name: Ballast T2 |
| size_categories: |
| - 10K<n<100K |
| task_categories: |
| - text-retrieval |
| tags: |
| - knowledge-base |
| - textbooks |
| - openstax |
| - rag |
| - grounding |
| configs: |
| - config_name: passages |
| data_files: "passages/tier=T2/lang=en/lic=by/rank_bucket=*/*.parquet" |
| - config_name: sources |
| data_files: "sources.parquet" |
| --- |
| |
| # ⚓ Ballast T2 |
|
|
| The textbook tier of the Ballast knowledge artifact: **61 OpenStax |
| textbooks as passage chunks**, 90,445 chunks across 9,018 linked |
| sections (≈92 MB of text, 34 MB zstd parquet). Where |
| [T0](https://huggingface.co/datasets/OpenBallast/ballast-t0) carries facts |
| as triples and [T1](https://huggingface.co/datasets/OpenBallast/ballast-t1) |
| carries encyclopedia prose, T2 carries pedagogical prose: definitions, |
| worked explanations, and method text of the kind reference corpora state |
| but never teach. |
|
|
| ## Layout |
|
|
| ``` |
| passages/tier=T2/lang=en/lic=by/rank_bucket=7/part-0.parquet |
| sources.parquet # one row per book: name, homepage, pinned git SHA, license |
| licenses.parquet # license registry the per-chunk lic key resolves to |
| manifest.json # per-file counts, bytes, sha256, build provenance |
| ``` |
|
|
| `passages` schema matches T1 (`qid`, `chunk_idx`, `title`, `heading`, |
| `text`; chunker `t1-chunk-v1`, ~1.2 KB atomic chunks). Two T1 conventions |
| do **not** apply here: T2 v1 has no notability ranking; every chunk sits |
| in the tail bucket (`rank_bucket=7`), so corpus levels are a no-op; and |
| chunks are keyed to book sections rather than Wikidata entities. |
|
|
| ```sql |
| SELECT title, heading, text |
| FROM read_parquet('ballast-t2/passages/**/*.parquet', hive_partitioning=true) |
| WHERE text ILIKE '%standard deviation%' LIMIT 5; |
| ``` |
|
|
| ## Run it locally (serving format) |
|
|
| `serving/sqlite/` carries the same chunks as a single-level SQLite corpus |
| for the [`ballast` CLI](https://github.com/OpenBallast/ballast-cli) |
| (v0.3.0+): 25 MB download, 116 MB on disk. Documents are the 9,018 book |
| modules; the name index is module titles plus per-module index terms, so |
| lookup resolves questions like "what is marginal cost" to the right |
| chapter. Entity-name lookup over textbook prose is functional but |
| unbenchmarked. |
|
|
| ```bash |
| uvx openballast pull --tier t2 |
| uvx openballast serve --corpus t2 # proxy :11435 + MCP :11436 |
| ``` |
|
|
| Serving ids are corpus-local (`D…`); provenance stays in this parquet |
| distribution (`chunk_id`, pinned `revision`, `source_url` per chunk). |
|
|
| ## Provenance: pinned against a license flip |
|
|
| Every book is ingested from its official OpenStax source repository at a |
| **pinned git commit**, recorded per book in `sources.parquet` |
| (`access_path` = `git:<repo>@<sha>`, retrieved 2026-08-02). The pinning is |
| load-bearing: parts of the OpenStax catalog moved from CC BY to |
| CC BY-NC-SA in spring 2026, and aggregator license metadata did not always |
| track the change. This distribution therefore trusts **only the license |
| text at the pinned commit of the official repo**, never catalog metadata. |
|
|
| The research build behind this artifact contains a second cell: 9 |
| post-flip titles (10,050 chunks) under **CC BY-NC-SA 4.0**. That cell is |
| **excluded from this distribution** to keep the published artifact |
| commercially safe under a single license. The full manifest documents both |
| cells, so the exclusion is visible rather than silent. |
|
|
| ## Curation & processing |
|
|
| What was selected, what was done to it, and why, so this is auditable |
| rather than "some textbook text": |
|
|
| 1. **Selection.** The OpenStax catalog, and nothing else: every book with |
| an official source repository under `github.com/openstax` at retrieval |
| time (2026-08-02). No aggregators, no mirrors, no PDF scrapes: the |
| official CNXML/collection source is the only ingestion path, because it |
| is the only place license status is authoritative. |
| 2. **Pinning.** Each repository is pinned to one commit |
| (`sources.parquet.access_path`), chosen as the newest commit whose |
| `LICENSE` grants CC BY 4.0. Books whose current license is |
| CC BY-NC-SA are carried at their NC state, not silently rolled back; |
| that cell is excluded from this distribution (see Provenance). |
| 3. **License resolution.** Per-book license read from the repo's license |
| file at the pinned commit under versioned rules |
| (`t1-license-rules-v2`), never from catalog or aggregator metadata: |
| the spring-2026 relicensing showed the metadata lags the repos. |
| 4. **Extraction & chunking.** Book markup to plain prose with the same |
| deliberately simple parser as T1 (`t1-chunk-v1`): boilerplate sections |
| dropped, figures and math markup dropped, paragraphs merged greedily |
| to a ≈1.2 KB atomic-chunk target, section heading carried per chunk. |
| 5. **Dedup.** Exact-duplicate chunks removed within the tier |
| (`dedup_ledger.parquet` records what, if anything, was suppressed: |
| zero for this build). |
| 6. **Why this tier exists.** The companion tiers carry facts (T0) and |
| encyclopedia prose (T1). Pedagogical prose is a different knowledge |
| shape (definitions and worked method text), and keeping it a separate, |
| separately-licensed tier lets downstream users include or exclude it |
| deliberately rather than inheriting it mixed in. |
|
|
| ## Limitations |
|
|
| - **Pedagogical prose, verbatim.** Exercises, figure references, and |
| chapter cross-references survive in chunk text; figures themselves and |
| math markup are dropped by the parser (`t1-chunk-v1`, the same |
| deliberately simple parser as T1, with the same class of markup residue). |
| - **No notability ranking** (see above): download is all-or-nothing at |
| 34 MB, which at this size is not a hardship. |
| - **English only, one catalog.** T2 v1 is OpenStax-only; the tier is |
| designed to grow by adding pinned sources, not by re-crawling. |
|
|
| ## License & attribution |
|
|
| **CC BY 4.0** (OpenStax, Rice University). Attribution resolves through |
| each chunk's partition and `title` to the book row in `sources.parquet`, |
| which carries the book's name, homepage, and pinned source commit. |
| OpenStax is not affiliated with and does not endorse this distribution. |
|
|
| Companion artifacts: |
| [ballast-t0](https://huggingface.co/datasets/OpenBallast/ballast-t0), |
| [ballast-t1](https://huggingface.co/datasets/OpenBallast/ballast-t1), |
| [ballast-evalsets](https://huggingface.co/datasets/OpenBallast/ballast-evalsets). |
|
|
| Questions and issues: [github.com/OpenBallast/ballast/issues](https://github.com/OpenBallast/ballast/issues). |
|
|