应用产品

jev-explained

@davila74TypeScript更新于 2026-09-19可当场跑

Jev Explained 是对 Jev 项目的详细说明和解析。

英文原文

Jev Explained

davila7/jev-explained

它在哪儿调用了 Jev

url: "https://api.typesafe.ai/v1/systemone",

src/lib/providers.ts:21

链接指向我们抓取当天的那个 commit,行号是准的。

它问 Jev 的问题

下面是从这个项目源码里原样取出来的 question 组合。

取自 src/lib/examples.ts:28

  1. is_spam是/否

    Is this email spam or a phishing attempt?

  2. folder选项

    Which folder should this email be filed in?

    • inboxLegitimate mail the user should read
    • promotionsMarketing or newsletters from a real sender the user likely opted into
    • spamUnsolicited junk, scams or phishing
  3. suspicion打分

    How suspicious are the sender, links and language of this email?

    • 0Nothing suspicious
    • 1Mildly suspicious (odd sender or wording)
    • 2Clearly suspicious (pressure tactics, unknown links)
    • 3Obvious phishing or scam

用你自己的内容跑一遍

代码
import { 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'] },
  },
});

取自 src/lib/examples.ts:222

  1. action选项

    Based only on this market snapshot, what should a long-term investor do with NVDA today?

    • buyFundamentals and momentum are strong and valuation is reasonable relative to growth
    • holdSignals are mixed or already priced in; no clear edge either way
    • sellDeteriorating fundamentals, guidance cuts, or material new risks outweigh the upside
  2. sentiment打分

    How would the market read this snapshot?

    • 0Strongly bearish
    • 1Bearish
    • 2Neutral
    • 3Bullish
    • 4Strongly bullish
  3. material_risk是/否

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

取自 src/lib/examples.ts:365

  1. verdict选项

    Should this tool call run automatically? Consider what the command does, the user's actual task, and how hard it would be to undo.

    • allowSafe, reversible, and clearly needed for the user's task
    • ask_userPlausibly needed but has side effects worth confirming with the user first
    • blockDestructive, out of scope, or something the user almost certainly did not intend
  2. is_destructive是/否

    Could this command cause irreversible data loss or affect systems beyond the local working copy?

  3. blast_radius打分

    If this command has an unintended effect, how far does the damage reach?

    • 0Local and reversible (build output, caches)
    • 1Local but hard to undo (uncommitted work, user files)
    • 2Shared resources (remote branches, team databases)
    • 3Production, customers, or the machine itself
  4. in_scope是/否

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

同类的其他项目