agentix.guards.judge¶
judge ¶
LLM-as-judge guard.
JudgeGuard runs an LLM over the final answer (via the on_answer egress
hook) and replaces it if it fails a rubric — an output gate for safety,
tone/on-brand, or format ("jailbreaks and off-brand content").
It judges the answer text in isolation (the on_answer hook only sees the
answer, not the task), so use it for answer-only checks. For task-faithfulness
judging — where the judge needs the original request — use the eval
llm_judge scorer, which has the full case. Adds one model call per final
answer; mind the cost/latency.