labs/aicharts: Jev / Clef brains with the LLM as fallback #40

Merged
teahubxyz merged 1 commits from labs/aicharts-jev into main 2026-10-13 15:25:18 +00:00
Owner

AICharts + Jev: the decision model answers ~10 choice questions in one call (chart type, x, measure, aggregation, series, order, top-N, one filter per text column); decide.js assembles the spec, the validator checks it. Confidence below FLOOR (0.5), a failed check or a model error falls through to the LLM path, and the response says why (handoff). Request format follows matcha/jev-prefab (typesafe/jev, @cf/cloudflare/clef-flash via the AI binding). Default brain stays llm until bench.py says otherwise.

Page: brain picker, a line with brain / latency / confidence, and 'or as pie (17%)' buttons from the mark probabilities (client-side re-render, no call).

Tests: questions/assemble units, worker paths (confident Jev, Clef variant, low-confidence handoff, model error handoff, default brain), rows never reach the decision model.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva


Generated by Claude Code

AICharts + Jev: the decision model answers ~10 choice questions in one call (chart type, x, measure, aggregation, series, order, top-N, one filter per text column); `decide.js` assembles the spec, the validator checks it. Confidence below FLOOR (0.5), a failed check or a model error falls through to the LLM path, and the response says why (`handoff`). Request format follows matcha/jev-prefab (`typesafe/jev`, `@cf/cloudflare/clef-flash` via the AI binding). Default brain stays `llm` until `bench.py` says otherwise. Page: brain picker, a line with brain / latency / confidence, and 'or as pie (17%)' buttons from the mark probabilities (client-side re-render, no call). Tests: questions/assemble units, worker paths (confident Jev, Clef variant, low-confidence handoff, model error handoff, default brain), rows never reach the decision model. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva --- _Generated by [Claude Code](https://claude.ai/code/session_01VDkN7ukK1kXkqov8FaZxva)_
Sign in to join this conversation.