Sovereign AI Foundry — Forge public educational materials into LLM training data
Every country deserves its own LLM. But without data, there is no model. SovAI Forge takes what a country already has — textbooks and exam papers from primary to high school — and forges them into ready-to-use training and evaluation datasets.
What is this
Transforms publicly licensed educational materials (textbooks, past exam papers) into structured LLM training and evaluation datasets. Curricula define what citizens must know, textbooks explain it in the national language, and past exams come with official answers — their structure is exactly what training data needs: questions as input, official answers as ground truth, textbook passages as reasoning evidence.
Why it matters
Every country should have its own sovereign LLM. Sovereignty lives in the data. Today's strongest language models were not trained in your country. When a government's systems start delegating judgment to models that have never truly understood that country — this is not just a performance issue, it is a sovereignty issue.
How it works
Three paths, one framework
A. Reasoning Training Set
Exam questions are paired with textbook chapters, and an LLM blind-solves without seeing the answer. Only reasoning that arrives at the correct answer is kept — ensuring every training example contains genuine derivation, not post-hoc rationalization.
Each question is attempted multiple times (k=4); only correct attempts are kept. Questions that stump the model on all attempts are marked hard and become benchmark items.
B. Benchmark Evaluation Set
Past exam questions ARE the evaluation data — questions as input, official answers as ground truth. Questions with no findable textbook evidence (unsupported) are the most discriminating benchmark items.
Export format plugs directly into lm-evaluation-harness for immediate standardized evaluation.
C. Synthetic Questions
Generate new questions from textbook passages. Question generation and solving are separated: generate first, then blind-solve n times independently. Only keep items where all n attempts agree AND match the claimed answer. Inconsistency means ambiguity or error — discard.
Synthetic questions go to training only, never benchmark, with n-gram dedup to prevent overlap with existing question banks.
Design Principles
Material Red Line
Only public-domain materials (curricula, CC BY/BY-SA, public domain). NC licenses are rejected outright with no bypass flag — output dataset is CC BY-SA 4.0, ensuring any country can freely adopt it.
Mandatory Grounding
The LLM must cite textbook passages to produce reasoning. Questions with no public-domain evidence are rejected — traceable reasoning is the substance of "sovereignty."
Blind-Solve Gating
No answer peeking — prevents post-hoc rationalization. Correct answers are kept, wrong ones discarded — rejection sampling simultaneously produces difficulty labels.
Self-Consistency Verification
LLM-generated questions are gated by self-consistency: multiple blind-solves must all agree before inclusion. Generation and solving are fully separated — no self-grading.
Every stage outputs JSONL — git diff friendly, resumable on interruption, skipping already-processed items.
Features
License red line is absolute
NC-licensed content is rejected outright — no flag to bypass
Blind-solve, no answer peeking
Reasoning without seeing the answer — no post-hoc rationalization
JSONL is state
Each record flushed on completion — interrupt and resume anytime
Resumable
Skips already-processed items — no redundant API spend
Get started
pip install sovai-forge
forge --recipe recipe.yaml ingest
forge --recipe recipe.yaml ground
forge --recipe recipe.yaml generate
forge --recipe recipe.yaml export --format messages
License
Framework
MIT
Output datasets
CC BY-SA 4.0
Exam question copyrights belong to their respective examination authorities; this project only processes publicly released papers and openly licensed materials