好文集ChatGPT Plus¥119

Jev and LLMs: who does what?

文章目录

Many LLM calls only need a classification, a choice, or a score. Jev, TypeSafe AI's model for structured decisions, targets those calls. You provide context and typed questions; it returns answers your application can act on.

A useful division of work: Jev classifies a customer request, an LLM writes the reply, and application code checks permissions before taking action. Several early projects are already exploring that split.

Start with Hello World

This minimal example uses Vercel's AI SDK:

import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state: 'Hello, world!',
  questions: {
    greeting: { type: 'boolean', instructions: 'Is this a greeting?' },
  },
});
console.log(answers.greeting.probability); // Example output: 0.97

The input is “Hello, world!”. The output estimates the probability that it is a greeting. Vercel calls this type boolean; TypeSafe's native API calls it noul. The value can vary. Your code chooses the threshold and response.

Jev also supports choices among defined options, with a probability for each, and scores against ordered descriptions. A score is a position on the scale you define, not a confidence percentage.

One message, several decisions

Take “Charged twice. I'm furious. Please refund the duplicate.” You could ask whether a refund was requested, which department should handle it, and how frustrated the customer sounds.

A traditional autoregressive LLM generates its response token by token, including when constrained to JSON. Jev evaluates independent questions against the same state in parallel and returns typed answers without generating a text response. A question that depends on an earlier answer requires another request.

文章配图

Illustrative outputs and speed ratio. Severity is scaled to 0 to 10 for display. Prices are TypeSafe's advertised launch rates.

Access options include Vercel's evaluation API and Cloudflare's typesafe/jev model. A probability still needs application logic: classifying a refund request does not establish refund eligibility.

Eight early projects

These include prototypes and experiments, alongside a live app:

  1. Jev Ultrafast: Jev selects browser actions and targets; a separate small LLM supplies text when the agent needs to type.

  2. Fast Jev Compaction: A Claude Code plugin and library scores tool calls and results to retain, drop, or truncate them, with the risk of discarding useful context.

  3. pg-jev: A PostgreSQL extension uses natural-language judgments to filter rows or score their relevance while SQL handles the query.

  4. Sponsor Skip: Jev identifies sponsored transcript segments, and extension code maps them to timestamps for skipping during YouTube playback.

  5. Nader Dabit's launcher: Jev reranks local candidates in a native macOS launcher, with the user pressing Enter to execute the selection.

  6. TypeSafe Mario: Jev chooses actions from structured emulator state and telemetry, rather than inspecting screenshots.

  7. 1kpapers: Its experimental pipeline uses a generative model to summarize papers and Jev to assign topics, with the new labels still under evaluation.

  8. Jev Drone: A simulated drone asks Jev for maneuver decisions while code builds scene descriptions and handles fast flight control.

Where I'd start

Choose an existing classification or routing call whose possible answers you can write down. Compare Jev with the current implementation on the same labelled inputs, including ambiguous cases. Measure accuracy, end-to-end latency, and full cost, including retries and fallback calls.

The full article includes more detail on each project, API documentation, access links, and resources for trying Jev.

全文完
查看原文