Open reproductions
The open-source System One decision model. Sub-15ms, non-autoregressive, local drop-in alternative to TypeSafe Jev.
* Evaluates state and questions via System One wire protocol (POST /v1/systemone).The link points at the commit we read, so the line number still holds.
These question sets are lifted from this project's source exactly as written.
from examples/intent_routing.py:3
intentchoiceWhat does the author of `message` want?
order_status — Where is my order, has it shipped, tracking lookupproduct_question — How a product works, compatibility, specsreturn_exchange — Return, exchange, or replace an itemcomplaint — Unhappy with service or product, wants a resolutionneeds_reasoningscoreHow much thought does a good answer to `message` need?
0 — A lookup or a one-line fact1 — A short explanation using product knowledge2 — A judgment call with trade-offs or an unhappy customerimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
intent: { type: 'choice', instructions: 'What does the author of `message` want?',
criteria: { order_status: 'Where is my order, has it shipped, tracking lookup', product_question: 'How a product works, compatibility, specs', return_exchange: 'Return, exchange, or replace an item', complaint: 'Unhappy with service or product, wants a resolution' } },
needs_reasoning: { type: 'score', instructions: 'How much thought does a good answer to `message` need?',
criteria: ['A lookup or a one-line fact', 'A short explanation using product knowledge', 'A judgment call with trade-offs or an unhappy customer'] },
},
});from examples/sponsor_form.py:10
is_sponsor_inquirytrue/falseDoes `description` ask to sponsor the site or newsletter?
product_categorychoiceWhat kind of product is described by `name` and `description`?
dev_tool — Developer tools, hosting, APIs, SaaS for developerscourse — Courses, books, or trainingunrelated — Anything not aimed at developersmessage_qualityscoreHow specific is the request?
0 — Generic template, no reference to this site1 — Mentions the site but no concrete ask2 — Concrete ask with a timeframe or product namedimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
is_sponsor_inquiry: { type: 'boolean', instructions: 'Does `description` ask to sponsor the site or newsletter?' },
product_category: { type: 'choice', instructions: 'What kind of product is described by `name` and `description`?',
criteria: { dev_tool: 'Developer tools, hosting, APIs, SaaS for developers', course: 'Courses, books, or training', unrelated: 'Anything not aimed at developers' } },
message_quality: { type: 'score', instructions: 'How specific is the request?',
criteria: ['Generic template, no reference to this site', 'Mentions the site but no concrete ask', 'Concrete ask with a timeframe or product named'] },
},
});from tests/test_patterns_presets.py:63
is_outagetrue/falseIs there an active database outage?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
is_outage: { type: 'boolean', instructions: 'Is there an active database outage?' },
},
});from tests/test_patterns_presets.py:78
severityscoreRate outage severity
0 — Minor1 — Moderate2 — Critical emergencyblockingtrue/falseIs this blocking?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
severity: { type: 'score', instructions: 'Rate outage severity',
criteria: ['Minor', 'Moderate', 'Critical emergency'] },
blocking: { type: 'boolean', instructions: 'Is this blocking?' },
},
});