Add Kubernetes docs and OpenAPI text builder with pinned sources

This commit is contained in:
Daniel Samson committed 2026-11-21 12:20:51 +00:00
1 parent b37df2b05a
commit f67cbce688
3 files changed
+189

No files matched your search

+18
View File
@@ -118,3 +118,21 @@ held-out document removed, matched by identifier. It fails if any held-out ident
Known limits: the generated items come from templates, so they test recognition of these
phrasings, not general language. Some concept questions will overlap with the Kubernetes docs,
so keep those docs out of the training data if you use this set to judge knowledge.
### Kubernetes text (`sources/kubernetes-sources.json`)
The pinned sources are the English Kubernetes docs (`kubernetes/website`, CC BY 4.0) and the
OpenAPI spec (`kubernetes/kubernetes`, Apache-2.0). Clone them into `sources/raw/` at the commits
in the manifest, then run:
```sh
.venv/bin/python scripts/build-k8s-text.py \
--website sources/raw/kubernetes-website --website-commit <commit> \
--swagger sources/raw/openapi/swagger.json --swagger-commit <commit> \
--swagger-sha256 <sha256>
```
This writes `corpora/kubernetes-docs.jsonl` (1,381 pages, about 1.6M words) and
`corpora/kubernetes-openapi.jsonl` (1,985 operation and object descriptions, about 0.27M words).
Each record keeps its source path, commit and license. Docs are cleaned of front matter, Hugo
shortcodes and HTML. OpenAPI prose is generated from the spec, not written by hand.