Skip to main content
Evaluate outputs against your own criteria, then retry with another model when needed.
TypeScript SDK

Escalate only when needed

Parse the review and retry with a stronger frontier model when it falls below your threshold:
TypeScript SDK
For deterministic checks—schema validity, required citations, policy rules, code compilation—run those before invoking a model judge. Store every NinjaChat request_id so failures remain traceable.

When to use a gate

For infrastructure reliability, use ordered fallbacks. Quality gates are for output acceptance, not provider uptime.