03 7 min Updated Sep 19, 2026
Run one evaluate call
Send shared state + a map of named questions; read typed answers and confidence in code.
Shape
- Build
state(string, object, or array per SDK docs). - Declare named questions (Boolean / Choice / Score).
- Call evaluate once — fan out, do not ask one question per round-trip by habit.
- Read answers + confidence in your code.
- Never paste API keys into this site or screenshots in git.
Illustrative Gateway shape (copy from live docs when implementing):
import { experimental_evaluate as evaluate } from "ai";
const result = await evaluate({
model: "typesafe-ai/jev",
state: "The support agent issued a full refund to the customer.",
questions: {
refunded: {
type: "boolean",
instructions: "Was a refund issued?",
},
},
});