evaluate( )





Pattern
Jev Output Verifier
Write an answer, then show it only if Jev is at least 90% sure it actually answers the question. If not, rewrite once.
BeginnerSep 2026View the full pattern on desktop


Problems solved
- Gate a generated draft with one boolean probability
- Regenerate once when the draft misses the ship floor
- Keep the verify threshold in application code
Use cases
- Answer verification before showing a draft
- One-retry regeneration floors
- Teaching Jev boolean probabilities on generated text
AI SDK APIs
experimental_evaluategenerateTextgateway
Tags
jevevaluationtyped-decisionsbooleangenerate-textai-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 Loop Breaker
Look up facts one step at a time. Stop when Jev is at least 90% sure the notes answer the task, or after 3 lookups.
jevevaluation+4
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 →



