AI Judge

Intelligent content selection

What is AI Judge?

AI Judge uses an LLM to evaluate conditions that can't be expressed with simple operators. It asks a yes/no question about a variable's content and branches accordingly.

Example: Content Moderation

moderation.echo
You are a content moderator for a family-friendly platform.

A user submitted this content: "{{user_submission}}"

[#IF {{user_submission}} #ai_judge("Does this contain hate speech or harassment?")]
This content has been flagged for review. Do not approve it.
Explain to the user why it violates our community guidelines.
[ELSE IF {{user_submission}} #ai_judge("Does this contain adult or explicit content?")]
This content is not suitable for our family-friendly platform.
Politely ask the user to modify their submission.
[ELSE]
This content appears appropriate. You may approve it.
[END IF]

Example: Intelligent Routing

triage.echo
You are a customer support triage agent.

Customer message: "{{message}}"

[#IF {{message}} #ai_judge("Is the customer expressing frustration or anger?")]
**Priority: HIGH** - Frustrated customer detected.
Acknowledge their frustration first. Use empathetic language.
Offer immediate solutions or escalation to a manager.
[ELSE IF {{message}} #ai_judge("Is this a billing or payment related issue?")]
Route to billing department. Verify account details before discussing charges.
[ELSE IF {{message}} #ai_judge("Is this a technical problem or bug report?")]
Route to technical support. Gather device/browser info and steps to reproduce.
[ELSE]
General inquiry. Handle with standard support procedures.
[END IF]

Performance

AI Judge conditions are collected and evaluated in parallel before rendering, so multiple judges don't cause sequential delays.