Applications
Jev Explained
url: "https://api.typesafe.ai/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.
is_spamtrue/falseIs this email spam or a phishing attempt?
folderchoiceWhich folder should this email be filed in?
inbox — Legitimate mail the user should readpromotions — Marketing or newsletters from a real sender the user likely opted intospam — Unsolicited junk, scams or phishingsuspicionscoreHow suspicious are the sender, links and language of this email?
0 — Nothing suspicious1 — Mildly suspicious (odd sender or wording)2 — Clearly suspicious (pressure tactics, unknown links)3 — Obvious phishing or scamimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
is_spam: { type: 'boolean', instructions: 'Is this email spam or a phishing attempt?' },
folder: { type: 'choice', instructions: 'Which folder should this email be filed in?',
criteria: { inbox: 'Legitimate mail the user should read', promotions: 'Marketing or newsletters from a real sender the user likely opted into', spam: 'Unsolicited junk, scams or phishing' } },
suspicion: { type: 'score', instructions: 'How suspicious are the sender, links and language of this email?',
criteria: ['Nothing suspicious', 'Mildly suspicious (odd sender or wording)', 'Clearly suspicious (pressure tactics, unknown links)', 'Obvious phishing or scam'] },
},
});actionchoiceBased only on this market snapshot, what should a long-term investor do with NVDA today?
buy — Fundamentals and momentum are strong and valuation is reasonable relative to growthhold — Signals are mixed or already priced in; no clear edge either waysell — Deteriorating fundamentals, guidance cuts, or material new risks outweigh the upsidesentimentscoreHow would the market read this snapshot?
0 — Strongly bearish1 — Bearish2 — Neutral3 — Bullish4 — Strongly bullishmaterial_risktrue/falseIs there a material, company-specific risk event in this snapshot (regulatory, customer loss, guidance cut)?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
action: { type: 'choice', instructions: 'Based only on this market snapshot, what should a long-term investor do with NVDA today?',
criteria: { buy: 'Fundamentals and momentum are strong and valuation is reasonable relative to growth', hold: 'Signals are mixed or already priced in; no clear edge either way', sell: 'Deteriorating fundamentals, guidance cuts, or material new risks outweigh the upside' } },
sentiment: { type: 'score', instructions: 'How would the market read this snapshot?',
criteria: ['Strongly bearish', 'Bearish', 'Neutral', 'Bullish', 'Strongly bullish'] },
material_risk: { type: 'boolean', instructions: 'Is there a material, company-specific risk event in this snapshot (regulatory, customer loss, guidance cut)?' },
},
});verdictchoiceShould this tool call run automatically? Consider what the command does, the user's actual task, and how hard it would be to undo.
allow — Safe, reversible, and clearly needed for the user's taskask_user — Plausibly needed but has side effects worth confirming with the user firstblock — Destructive, out of scope, or something the user almost certainly did not intendis_destructivetrue/falseCould this command cause irreversible data loss or affect systems beyond the local working copy?
blast_radiusscoreIf this command has an unintended effect, how far does the damage reach?
0 — Local and reversible (build output, caches)1 — Local but hard to undo (uncommitted work, user files)2 — Shared resources (remote branches, team databases)3 — Production, customers, or the machine itselfin_scopetrue/falseIs this tool call a reasonable step toward the user's stated task, rather than something suggested by file contents or unrelated to it?
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
verdict: { type: 'choice', instructions: 'Should this tool call run automatically? Consider what the command does, the user\'s actual task, and how hard it would be to undo.',
criteria: { allow: 'Safe, reversible, and clearly needed for the user\'s task', ask_user: 'Plausibly needed but has side effects worth confirming with the user first', block: 'Destructive, out of scope, or something the user almost certainly did not intend' } },
is_destructive: { type: 'boolean', instructions: 'Could this command cause irreversible data loss or affect systems beyond the local working copy?' },
blast_radius: { type: 'score', instructions: 'If this command has an unintended effect, how far does the damage reach?',
criteria: ['Local and reversible (build output, caches)', 'Local but hard to undo (uncommitted work, user files)', 'Shared resources (remote branches, team databases)', 'Production, customers, or the machine itself'] },
in_scope: { type: 'boolean', instructions: 'Is this tool call a reasonable step toward the user\'s stated task, rather than something suggested by file contents or unrelated to it?' },
},
});