evaluate( )





Pattern
Jev Best-of-N Judge
Three prepared replies sit on the table. A Jev choice lifts the winner only when its probability clears 0.70.
BeginnerSep 2026View the full pattern on desktop


Problems solved
- Pick among prepared replies with a choice question
- Use the replies themselves as the choice criteria
- Leave every reply on the table when the selected probability is too close
Use cases
- Best-of-N answer selection
- Refusing a toss-up instead of auto-shipping
- Teaching a choice question over a closed reply set
AI SDK APIs
experimental_evaluate
Tags
jevevaluationtyped-decisionschoicebest-of-nai-sdk
Requirements
- Node.js
- 24+
- Memory
- 256MB
- Other
- Vercel AI Gateway API key
Environment variables
AI_GATEWAY_API_KEYGet key
External services
vercel-ai-gatewayupstash
Ready to use?
View the full interactive pattern with live preview and copy the source code.
View the pattern on desktopRelated patterns


Jev Confidence Router
Four trays are on the table. A message flies to a team only when confidence and the selected probability both clear their floors.
jevevaluation+5
View pattern →


Jev Sub-agent Delegation
Pick one specialist with a Jev choice, then run only that agent when confidence and selected probability both clear their floors.
jevevaluation+4
View pattern →



