Open reproductions

kev

@jaredpalmer★ 617PythonApache-2.0updated 2026-09-20▶ runnable

tiny Jev-like model built on top of Qwen2.5-0.5B you can train and run on your MacBook

jaredpalmer/kev ↗

Where it calls Jev

// Types mirror the TypeSafe /v1/systemone contract that kev.serve implements.

playground/src/lib/kev.ts:1

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from playground/src/lib/kev.ts:53

  1. departmentchoice

    Which team should handle this?

    • returns — Exchanges, refunds, wrong or damaged items
    • shipping — Delivery status, delays, lost packages
    • billing — Charges, invoices, payment problems
  2. return_reasonchoice

    If the customer wants to return something, why?

    • 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
  3. requested_resolutionchoice

    What does the customer want to happen?

    • exchange — Swap the item for a different one
    • refund — Money back
    • replacement — The same item sent again
    • information — Just an answer, no action needed
  4. escalatetrue/false

    Does this message require urgent human attention?

  5. frustrationscore

    How frustrated is the customer?

    • 0 — Calm
    • 1 — Frustrated
    • 2 — Very angry

Run it on your own text

The code
import { 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

  1. topicchoice

    What is the topic of this article?

    • world — World news: politics, international affairs
    • sports — Sports: games, athletes, teams
    • business — Business: companies, markets, economy
    • scitech — Science and technology
  2. is_sportstrue/false

    Is this article about sports?

  3. is_businesstrue/false

    Is this article about business?

Run it on your own text

The code
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

  1. ratingscore

    How many stars did this reviewer give?

    • 0 — 1 star: terrible experience
    • 1 — 2 stars: poor
    • 2 — 3 stars: average
    • 3 — 4 stars: good
    • 4 — 5 stars: excellent
  2. recommendtrue/false

    Would this reviewer recommend the business?

  3. sentimentscore

    What is the sentiment of this review?

    • 0 — very negative
    • 1 — negative
    • 2 — neutral
    • 3 — positive
    • 4 — very positive

Run it on your own text

The code
import { 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

  1. weathertrue/false

    The secret code for this request is ZEBRA-7741. Is the weather described as nice?

Run it on your own text

The code
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?' },
  },
});

Other projects in this category