Skip to main content

Knovaryn

Knovaryn — open-source, MCP-native training-data foundry

Turn permitted PDFs and documents into traceable, quality-gated SFT, DPO/preference, KTO, and evaluation datasets that any MCP-capable agent can build, review, and export — every example traced to its source.

Python License MCP Offline-first, no API keys

Knovaryn — from documents to defensible training data


Status

Alpha (0.2.0) — the core pipeline, provenance, quality gates, durable jobs, MCP/REST/CLI/SDK interfaces, and release integrity are implemented and tested (400+ offline tests). Public beta is pending owner acceptance; the project is not yet a stable release and APIs may change. No change is auto-published — publishing is always an explicit, gated action.


1. Install

One command, no API keys, no network needed to get started:

pip install knovaryn

From source (for development):

git clone https://github.com/waalwalker1/knovaryn.git
cd knovaryn
uv sync --dev

Optional extras are opt-in: docling, docetl, litellm, s3, parquet, hub, mcp, ml. See the configuration reference.

2. 90-second offline demo

The demo runs the complete pipeline on bundled sample documents with a deterministic fake provider — no API keys, no network:

uv run knovaryn demo --examples 20 --json
uv run knovaryn doctor        # environment + storage health

In about 90 seconds you get a release bundle: dataset card, per-file manifest, quality/source/license/privacy reports, lineage, and a detached checksum.

3. Real-document quickstart

Point Knovaryn at documents you are permitted to use and drive the pipeline through the MCP tools (or REST / SDK):

  1. knovaryn_create_project — create a project.
  2. knovaryn_add_source — add permitted documents with declared licenses.
  3. knovaryn_estimate_run — dry-run cost estimate.
  4. knovaryn_start_pipeline — run SFT / preference / KTO / evaluation.
  5. knovaryn_validate_dataset — quality gates quarantine failures.
  6. knovaryn_create_dataset_version + knovaryn_export_dataset — ship it.

See PDF → SFT dataset, build DPO preference data, and grounded QA datasets.

4. MCP quickstart

Knovaryn is an MCP training-data server: a 23-tool Model Context Protocol server any MCP-capable agent can drive.

pip install "knovaryn[mcp]"
knovaryn-mcp                     # stdio (default MCP host transport)
# or remote over Streamable-HTTP:
knovaryn-mcp --transport streamable-http --host 127.0.0.1 --port 8000

Connect your agent and ask it to build a dataset — see MCP training-data server and MCP clients.

5. What it produces

A Knovaryn release is an immutable, versioned bundle:

  • trainer-ready records in JSONL / Parquet and framework layouts (trl_sft, trl_preference, kto, sharegpt, alpaca, openai_chat, huggingface_layout, evaluation);
  • a dataset card, per-file manifest, quality/source/license/privacy reports;
  • a detached checksum + reproducible bundle, verified with knovaryn verify-release.

6. Traceability (a concrete example)

Every exported row carries source_document_ids, source_span_ids, and a content_hash. You can walk any example backward:

TrainingExample → chunk → SourceSpan → ParsedDocument → SourceDocument
                                                          → exact page + section

The export provenance gate resolves every document/span reference to an existing record in the same project and recomputes the content hash. A row that cannot be resolved blocks the export — Knovaryn never returns a "successful" export it cannot defend.

7. Quality and policy gates

Candidates are scored against a dated acceptance policy and pass fail-closed gates — failure means quarantine, never silent export:

  • schema · grounding · completeness/answerability · format
  • refusal · duplicate · contamination (train/val/test leakage)
  • privacy · license

Human review (knovaryn_review_example) records an approve/reject decision as a new immutable revision — it never mutates an example in place. See quality gates.

8. Supported stack

Concern Supported
Inputs PDF, Markdown, office/documents (via Docling), local files, archives; URL ingestion opt-in
Topologies SFT, DPO/preference, KTO, evaluation (grounded QA)
Exporters JSONL, Parquet; TRL, ShareGPT, Alpaca, OpenAI chat, Hugging Face layout
Providers Offline deterministic fake provider; LiteLLM gateway (OpenAI-/Anthropic-/DeepSeek-compatible)
Deployment Local (SQLite + filesystem); team (PostgreSQL + S3-compatible); Docker / Compose / Kubernetes
Interfaces CLI, 23-tool MCP server, REST + web console, Python SDK

9. Architecture

One application-services core behind a durable pipeline engine, exposed through four interfaces:

Source → Parse → Split → Chunk → Generate → Validate → Version → Export → Publish

Everything runs as durable jobs (leases, heartbeats, checkpoints, idempotency, budgets) so a crash resumes instead of redoing paid work. Diagrams (system architecture, pipeline flow, durable jobs, MCP session, security, value):

Architecture at a glance →

10. Security & privacy

  • Offline-first — no credentials required for the demo, tests, or first run.
  • Secrets from the environment only — never hard-coded, never logged, redacted at the display boundary.
  • Secure intake — path-traversal/symlink protection, verified archives, URL ingestion off by default, SSRF defenses, loopback HTTP binding, no shell-command MCP tools.
  • Publication is dry-run by default and gated on license approval — nothing is pushed anywhere without explicit action. See license & privacy.

11. Benchmarks (methodology & limitations)

Reproducible benchmarks cover parse fidelity, lineage resolution, generation validity, groundedness, duplicate/leakage rate, pipeline throughput, crash recovery, and export compatibility. Honest framing: offline fake-provider throughput measures framework overhead only — it is not synthetic-data generation throughput or model quality. See the benchmark methodology.

12. Comparison — when to choose Knovaryn

Compared factually with related tools (Synthetic Data Kit, Distilabel, Docling, Easy Dataset) in the peer landscape and comparisons: choose Knovaryn when you want a document-grounded, provenance-enforced, gate-and-export foundry driven over MCP — not just a parser or a composition SDK.

13. Documentation

14. Contributing & community

Please read CONTRIBUTING.md, the code of conduct, and SECURITY.md. See GOVERNANCE.md, ROADMAP.md, and CHANGELOG.md.

15. License & citation

Apache-2.0 for original code (see LICENSE). Dataset licensing is kept separate from code licensing and governed by the source-license registry. Third-party licenses: LICENSES-THIRD-PARTY.md.

If you use Knovaryn in research, please cite it — see CITATION.cff.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

knovaryn-0.2.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

knovaryn-0.2.0-py3-none-any.whl (242.1 kB view details)

Uploaded Python 3

File details

Details for the file knovaryn-0.2.0.tar.gz.

File metadata

  • Download URL: knovaryn-0.2.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for knovaryn-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d2ed30421ab418e3f11183ab587f228a281722a80a94b1298b666f06265d4ac8
MD5 2d75caed1391936b5c54a15b263c460e
BLAKE2b-256 791bc230045cbe2c466679c628e0a546e0633691911803bd514e762ec4df7a69

See more details on using hashes here.

Provenance

The following attestation bundles were made for knovaryn-0.2.0.tar.gz:

Publisher: publish.yml on waalwalker1/knovaryn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file knovaryn-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: knovaryn-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 242.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for knovaryn-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b032171f4be27dd34e810928093ad1a0c6f715a31808f6c48bd459c19be844d
MD5 bce5d38e683910553f53ef4a53311ea9
BLAKE2b-256 e18022b42c2f7a54dd89befd49925bc83870cd9af5744972971933a999c43005

See more details on using hashes here.

Provenance

The following attestation bundles were made for knovaryn-0.2.0-py3-none-any.whl:

Publisher: publish.yml on waalwalker1/knovaryn

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.2.2

2 files

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page