JIMDRURY.
Jim Drury
Workshop still life: crumpled chat transcripts discarded on the left, brass Choice Score and Boolean tags floating mid-air, a YES/NO lever firing a cyan beam through a small gateway arch
ai

Stop asking an LLM to say yes or no

SEP 17, 20263 MIN READ

Yes. No. Maybe parse that.

What Jev actually returns

The catch: evaluate, not chat

Install AI SDK 7
pnpm add ai@latest
evaluate with typesafe-ai/jev
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?',
    },
  },
  providerOptions: {
    gateway: { zeroDataRetention: true },
  },
});

console.log(result.answers.refunded);

Price and claims

What I'll try first

Similar Articles