Knowledge-grounded Off-policy Networks for Agentic System Harnesses
Point it at any document corpus β it trains a model that learns how to search, not just facts.
KONASH trains knowledge agents via reinforcement learning that match or exceed frontier models on grounded reasoning tasks β at a fraction of the cost.
- π° 100x cheaper training β Small training clusters. ~$100 per iteration instead of ~$100Kβ500K.
- π― Higher quality β RL-trained agents search more efficiently, retrieve more diversely, and reason more accurately than frontier models. The gains are algorithmic, not scale-dependent.
- π Consistent results β Parallel thinking (N=10β20 rollouts + aggregation) turns probabilistic search into near-deterministic accuracy. Cheap rollouts on a small model mean you can afford this on every query.
- π Zero lock-in β Your model, your weights, your infrastructure. Deploy anywhere with vLLM and LoRA hot-swapping.
pip install konash
konash setup # walks you through API keys
konash train # pick a corpus, model, and scale β hit goSetup takes 2 minutes. Training scales from ~1 hour (Quick) to several hours (Exhaustive).
- Corpus ingestion β Embeds and indexes your documents for vector search (pre-built indexes ship with supported datasets)
- QA synthesis β An agentic loop explores the corpus via search and generates grounded, multi-constraint question-answer pairs
- Rollout generation β The model attempts to answer each question via multi-step search, generating full agent trajectories
- Pass-rate filtering β Keeps questions at the learning frontier (not too easy, not too hard)
- OAPL training β Off-policy RL with squared advantage loss trains the model on successful search strategies
- Value-Guided Search β A learned value model scores partial rollouts to guide test-time tree search
konash eval financebench --limit 1Or in Python:
import konash
agent = konash.Agent(
base_model="zai-org/GLM-4.5-Air-FP8",
corpus="./my_documents",
)
agent.train(iterations=1)
answer = agent.solve("Your question here", parallel_rollouts=3)| Feature | Description |
|---|---|
| Agentic QA Synthesis | Multi-turn agent loop explores your corpus via search, generates grounded multi-constraint question-answer pairs |
| OAPL Training | Off-policy RL with squared advantage loss trains on successful search trajectories |
| Value-Guided Search | Learned value model scores partial rollouts, parallel BFS tree search at inference time |
| Pass-Rate Filtering | Keeps questions at the learning frontier β not too easy, not too hard (0.1β0.9 pass rate) |
| Parallel Rollouts | N=10β20 independent rollouts + aggregation for consistent answers |
| Pre-built Indexes | Ships with Qwen3-Embedding-8B indexes for supported datasets β no embedding step needed |
| Any Corpus | Point at a local folder of documents β KONASH builds the index on first run |
Standard retrieval systems use a frozen model with a single retrieve-then-read pass. KONASH trains the model's search policy through reinforcement learning:
- The model learns what to search for (query generation)
- The model learns when to search again (multi-step retrieval)
- The model learns how to reason over retrieved evidence (cross-document synthesis)
- The trained model generalizes to new corpora it hasn't seen
Each iteration: synthesize β rollout β filter β train β repeat with improved model.
GLM 4.5 Air on FinanceBench β no training, base model only:
| Mode | Accuracy | Avg Score | Avg Latency |
|---|---|---|---|
| Single rollout | 69% (103/150) | 0.720 | 35.0s |
Scored with LLM-based nugget evaluation (gpt-4o-mini judge, KARL paper Appendix D.1). Each question runs a multi-step search agent over 53K embedded SEC filing pages with Qwen3 embeddings + FAISS vector search.
The KARL paper reports 76% on FinanceBench after RL training (2 iterations, 12K synthesized QA pairs). KONASH implements this training pipeline β the gap between 69% (base) and 76% (trained) is what OAPL training closes.
| Mode | Accuracy | Avg Score | Avg Latency |
|---|---|---|---|
| Single rollout | 60% (3/5) | 0.614 | 44.5s |
Exhaustive entity retrieval over 293K Wikipedia sentence-level chunks. Each question requires finding ALL entities satisfying a condition.
Reproduce these results
pip install konash
konash setup
konash eval financebench
konash eval qampari
konash eval financebench --parallel 5 # add parallel thinking
konash eval financebench --train # train + evalResults are saved to eval_results/ and viewable in the eval trace viewer at http://localhost:5050/eval/ (run python tools/server.py).
| Service | Purpose | Cost |
|---|---|---|
| Shadeform | Required for konash train GPU provisioning (synthesis, rollouts, OAPL) |
GPU hourly billing |
| Together AI | Optional eval and serving backend | Pay-as-you-go |
| HuggingFace | Pre-built embedding indexes, query embeddings via Inference API | Free |
| OpenAI (optional) | Judge model for eval scoring (gpt-4o-mini) | ~$0.01 per eval question |
- Python >= 3.11
- Core dependencies:
numpy,rich,together,huggingface_hub - Optional:
faiss-cpu(fast vector search),torch+transformers+peft(local training)
KONASH uses cloud GPUs for the full remote training pipeline. In the current konash train path, synthesis, rollouts, and OAPL all run on the provisioned box, and the resulting checkpoints are synced back into ~/.konash/projects/....
We recommend Shadeform for GPU provisioning β it aggregates 20+ cloud providers and finds the cheapest available GPU automatically.
pip install konash
konash setup
konash train browsecomp-plus --model zai-org/GLM-4.5-Air-FP8 --gpu-type H200For zai-org/GLM-4.5-Air-FP8, the cleanest current path is 1x H200. On non-H200 hardware, GLM may require 2x H100 for the sleep/wake vLLM path.
What konash train does today:
- Provisions a Shadeform GPU
- Uploads the current local checkout
- Downloads the selected corpus on the remote box
- Runs synthesis, dedup, rollouts, filtering, and OAPL remotely
- Streams progress into
http://localhost:5050/training/ - Downloads checkpoints and tears the GPU down unless
--keep-aliveis set
| GPU | Typical use | Notes |
|---|---|---|
| H200 | Recommended for GLM 4.5 Air training | Best current bring-up path |
| H100 SXM | Works for remote training | GLM sleep/wake requires 2+ GPUs |
For running evals on remote GPUs (e.g., with vLLM), see the Shadeform eval guide.
Datasets download automatically when selected in konash train or konash eval:
| Dataset | Domain | Chunks | Pre-built Index | Eval Questions |
|---|---|---|---|---|
| FinanceBench | SEC filings, financial reports | 53,803 | Qwen3-Embedding-0.6B | 150 |
| QAMPARI | Wikipedia entity search | 292,825 | Qwen3-Embedding-0.6B | 1,000 |
| BrowseComp-Plus | Web documents | 100,195 | Qwen3-Embedding-8B (Tevatron) | 830 |
| FreshStack | Technical docs (LangChain) | 48,068 | Qwen3-Embedding-0.6B | 203 |
| Local folder | Your own documents | Any | Built on first run | β |
.txt .md .rst .csv .log .json .html .htm .py .js .ts .java .go .rs .c .cpp .h
Training and eval are not symmetric. konash eval can use a broader set of hosted models, but konash train depends on models that work cleanly in the remote Unsloth + vLLM pipeline.
Training-tested / recommended:
| Model | Type | Notes |
|---|---|---|
| GLM 4.5 Air | Frontier MoE | Default training target, best current KARL-style path |
| MiniMax M2.5 | MoE | Strong frontier MoE available on Together AI |
For eval and serving, you can use a broader set of models exposed through Together AI or compatible hosted APIs.
Compare models head-to-head in the Arena (run python tools/server.py).
Contributions are welcome! Please open an issue or PR on GitHub.
@misc{konaequity2026konash,
author = {Kona Equity},
title = {KONASH: Knowledge-grounded Off-policy Networks for Agentic System Harnesses},
year = {2026},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/konaequity/konash}}
}KONASH builds directly on:
- KARL: Knowledge Agents via Reinforcement Learning β Databricks, 2026. The architecture, training pipeline, and evaluation methodology that KONASH implements.
- OAPL β Ritter et al., 2026 (the RL algorithm)
- Tevatron β Pre-built BrowseComp-Plus embedding indexes
- Unsloth β Parameter-efficient training
- FAISS β Vector search
