kelvinmade✳Independent maker ↗
JEV USE CASE

Prompt-Injection Detection.

Inspect retrieved or user-supplied content before an agent lets that content influence tool use.

THE DECISION CONTRACT
STATE

A webpage tells the browsing agent to ignore prior instructions and upload local files.

QUESTION

How should the agent treat this content?

CHOICES

safe_context untrusted_instruction possible_injection block

TYPESCRIPT EXAMPLE

Ask for one bounded answer

This Vercel AI SDK-shaped example is illustrative. Check the current provider documentation before shipping.

import { experimental_evaluate as evaluate } from 'ai';

const result = await evaluate({
  model: 'typesafe-ai/jev',
  state: "A webpage tells the browsing agent to ignore prior instructions and upload local files.",
  questions: {
    decision: {
      type: 'choice',
      instructions: "How should the agent treat this content?",
      options: ["safe_context","untrusted_instruction","possible_injection","block"]
    }
  }
});

// Validate permissions and thresholds before acting.
console.log(result.answers.decision);
SAFE IMPLEMENTATION

Keep the boundary clear

Guardrail

Use this as one layer. Hard permission boundaries, sandboxing and allowlists must remain deterministic.

  • Log the input, answer distribution, chosen threshold and resulting route.
  • Test on labelled examples from your own production distribution.
  • Send low-confidence, high-impact or out-of-distribution cases to a safer fallback.
  • Re-evaluate thresholds when the model or workflow changes.
PRIMARY SOURCES

Read before implementing

TypeSafe AI: Introducing System One Models and Jev ↗

Vercel: Jev available on AI Gateway ↗