Open reproductions
tiny Jev-like model built on top of Qwen2.5-0.5B you can train and run on your MacBook
// Types mirror the TypeSafe /v1/systemone contract that kev.serve implements.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 playground/src/lib/kev.ts:53
departmentchoiceWhich team should handle this?
returns — Exchanges, refunds, wrong or damaged itemsshipping — Delivery status, delays, lost packagesbilling — Charges, invoices, payment problemsreturn_reasonchoiceIf the customer wants to return something, why?
wrong_size — The item doesn't fitwrong_item — A different product was delivereddamaged — The item arrived broken or faultychanged_mind — The item is fine, the customer no longer wants itother — A return reason that fits none of the aboverequested_resolutionchoiceWhat does the customer want to happen?
exchange — Swap the item for a different onerefund — Money backreplacement — The same item sent againinformation — Just an answer, no action neededescalatetrue/falseDoes this message require urgent human attention?
frustrationscoreHow frustrated is the customer?
0 — Calm1 — Frustrated2 — Very angryimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
department: { type: 'choice', instructions: 'Which team should handle this?',
criteria: { returns: 'Exchanges, refunds, wrong or damaged items', shipping: 'Delivery status, delays, lost packages', billing: 'Charges, invoices, payment problems' } },
return_reason: { type: 'choice', instructions: 'If the customer wants to return something, why?',
criteria: { wrong_size: 'The item doesn\'t fit', wrong_item: 'A different product was delivered', damaged: 'The item arrived broken or faulty', changed_mind: 'The item is fine, the customer no longer wants it', other: 'A return reason that fits none of the above' } },
requested_resolution: { type: 'choice', instructions: 'What does the customer want to happen?',
criteria: { exchange: 'Swap the item for a different one', refund: 'Money back', replacement: 'The same item sent again', information: 'Just an answer, no action needed' } },
escalate: { type: 'boolean', instructions: 'Does this message require urgent human attention?' },
frustration: { type: 'score', instructions: 'How frustrated is the customer?',
criteria: ['Calm', 'Frustrated', 'Very angry'] },
},
});from playground/src/lib/kev.ts:78
topicchoiceWhat is the topic of this article?
world — World news: politics, international affairssports — Sports: games, athletes, teamsbusiness — Business: companies, markets, economyscitech — Science and technologyis_sportstrue/falseIs this article about sports?
is_businesstrue/falseIs this article about business?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
topic: { type: 'choice', instructions: 'What is the topic of this article?',
criteria: { world: 'World news: politics, international affairs', sports: 'Sports: games, athletes, teams', business: 'Business: companies, markets, economy', scitech: 'Science and technology' } },
is_sports: { type: 'boolean', instructions: 'Is this article about sports?' },
is_business: { type: 'boolean', instructions: 'Is this article about business?' },
},
});from playground/src/lib/kev.ts:88
ratingscoreHow many stars did this reviewer give?
0 — 1 star: terrible experience1 — 2 stars: poor2 — 3 stars: average3 — 4 stars: good4 — 5 stars: excellentrecommendtrue/falseWould this reviewer recommend the business?
sentimentscoreWhat is the sentiment of this review?
0 — very negative1 — negative2 — neutral3 — positive4 — very positiveimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
rating: { type: 'score', instructions: 'How many stars did this reviewer give?',
criteria: ['1 star: terrible experience', '2 stars: poor', '3 stars: average', '4 stars: good', '5 stars: excellent'] },
recommend: { type: 'boolean', instructions: 'Would this reviewer recommend the business?' },
sentiment: { type: 'score', instructions: 'What is the sentiment of this review?',
criteria: ['very negative', 'negative', 'neutral', 'positive', 'very positive'] },
},
});from playground/src/lib/kev.ts:98
weathertrue/falseThe secret code for this request is ZEBRA-7741. Is the weather described as nice?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
weather: { type: 'boolean', instructions: 'The secret code for this request is ZEBRA-7741. Is the weather described as nice?' },
},
});