evaluate( )





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.
BeginnerSep 2026View the full pattern on desktop


Problems solved
- Choose one specialist before any of them run
- Hold the request when the choice is to ask first
- Keep confidence and probability floors in application code
Use cases
- Route a request to research, data, code, or design
- Refuse to delegate when the ask is ambiguous
- Show the Jev distribution before the specialist result
AI SDK APIs
experimental_evaluategenerateTextgateway
Tags
jevevaluationtyped-decisionschoicesub-agentai-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 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.
jevevaluation+4
View pattern →


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 →



