Files
Maven/docs/plans/2026-07-11-route-data.md
T
kami 5fe8f228c1 feat(mavweb): /ecosystem page consuming Nexus/Praxis/Hexis + shell fixes
Add a read-only /ecosystem page that consumes the sibling services'
JSON APIs (Nexus entities, Praxis attention, Hexis capabilities),
fetched concurrently with honest per-panel error states. Siblings stay
headless — mavweb is their human surface (arch §16). Wired via mavweb
-nexus/-praxis/-hexis flags; mavweb joins the ecosystem compose network.

Fix mobile horizontal overflow across all pages: .content is a flex
child with default min-width:auto, so it refused to shrink below the
tables' intrinsic width. min-width:0 lets wide tables pan inside .scroll
instead of dragging the page sideways. Verified via CDP geometry check
(scrollWidth === clientWidth at 430px).

Also includes in-progress Ethos UI redesign, ecosystem deploy compose,
and planning docs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 22:04:23 +04:00

46 lines
2.4 KiB
Markdown

# Route-training data plan (LLM-as-router)
Goal: training data that teaches the CPT'd Qwen3-1.7B to emit the **route
contract** — `[{"intent":<enum>, key?, value?, text?, verb?}, ...]`, GBNF-constrained —
matching `internal/router/llmrouter.go` (`routeSystem` + `routeGrammar`) verbatim.
Train=deploy parity: label with the EXACT prompt the daemon sends.
7 intents: `fact, reminder, note, query, act, chat, system`. Hard cases (grammar
can't enforce): note vs reminder («запомни» vs «напомни»), fact vs note (trackable
state vs static memo).
## Steps
1. **Source utterances** — real RU turns, not synthetic. Main: `function_calling.jsonl`
(473); plus `user-*.jsonl` fragments for chat/fact/system coverage. `gen_route_data.py`
dedups across all.
2. **Relabel, don't convert** — old taxonomy (time/weather/timer) ≠ 7 intents. Feed
each utterance through `routeSystem` to a strong router model → take its `{intent,...}`.
3. **Validate** — intent ∈ enum, keys ⊆ {intent,key,value,text,verb}. Drop invalid.
4. **Balance check** — after a run, count intents. `act`/`system`/`fact` likely thin
(function_calling skews query/act). Author extra examples for the holes; re-run.
5. **Better prompt first** — improve `routeSystem` for 1.7B disambiguation before a
big generation run (awaiting prompt-guy input). Re-labeling is cheap; regenerate.
6. **Train** — locked decision: fold route and persona examples into one balanced
Qwen3 SFT. The system prompt selects the contract. Evaluate the two tasks
separately; a separate route adapter is the fallback if joint SFT interferes.
## Blocking
- Router at `inference.kvmx.ru` / `localhost:6446` must be up (currently down).
- CPT must finish and pass the raw-vs-CPT decision gate before joint SFT.
## Files
- `esp32-whisper-fine-tune/llm/gen_route_data.py` — the relabeler (done, self-checks).
`ROUTE_SYSTEM` const = verbatim copy of Go `routeSystem`; **keep in sync**.
- Output: `llm/data/route_train.jsonl` (resumable append).
- Held-out: `llm/data/route_eval.jsonl`, generated from human labels by
`build_route_eval.py`; never include it in route training generation.
## Prompt-guy question (sent 2026-07-11)
How to structure the router system prompt for a 1.7B model doing 7-intent
classification + slot extraction, GBNF-constrained — example ordering/count,
contrastive near-miss pairs (note vs reminder) vs more singles, rule placement.