with one click
orc-evaluate
Set up LLM-as-judge evaluation for ORC workflows
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Set up LLM-as-judge evaluation for ORC workflows
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Create scheduled background jobs that run on cron schedules
Build an ORC behavior tree workflow using the DSL
Implement event-driven side effects that react to domain events
Implement command handlers that validate state and emit events using the Grain framework
Create a complete Grain domain service with schemas, read models, commands, queries, and tests
Implement query handlers that read from event-sourced read models
| name | orc-evaluate |
| description | Set up LLM-as-judge evaluation for ORC workflows |
Set up automated quality evaluation for ORC workflow outputs. Read docs/EVALUATION-COMPONENT.md for the full reference.
(require '[ai.obney.orc.evaluation.interface :as eval])
The evaluation component provides LLM-as-judge scoring:
Each judge returns a score (0.0-1.0) with structured feedback.
(eval/grounding-judge ctx
{:instruction "Original instruction given to the LLM"
:input "The input that was provided"
:output "The output that was generated"})
;; => {:score 0.85 :feedback {:strengths [...] :weaknesses [...]}}
(eval/completeness-judge ctx
{:instruction "Summarize the article covering all main points"
:input "Long article text..."
:output "Short summary..."})
;; => {:score 0.7 :feedback {:missing-aspects [...]}}
Attach judges to workflow nodes for automatic scoring during execution:
(orc/workflow "evaluated-pipeline"
(orc/blackboard {:question :string :answer :string})
;; Define judge configurations
(orc/judges
{:grounding {:type :grounding :weight 0.5}
:completeness {:type :completeness :weight 0.5}})
;; Attach judges to a node
(orc/llm "answer"
:instruction "Answer the question thoroughly."
:reads [:question]
:writes [:answer]
:judges [:grounding :completeness]))
When executed with tracing enabled, each judged node produces evaluation scores in the trace.
Evaluate a workflow across multiple test cases:
(eval/evaluate-batch ctx
{:sheet-id sheet-id
:examples [{"question" "What is AI?" "expected" "Artificial intelligence..."}
{"question" "What is ML?" "expected" "Machine learning..."}]
:judges [{:type :grounding :weight 0.5}
{:type :completeness :weight 0.5}]})
;; => {:avg-score 0.82 :per-example [{:scores {...}} ...]}
Evaluation judges feed directly into GEPA optimization. When GEPA proposes instruction candidates, judges score them — the scores drive Pareto selection.
;; GEPA uses judges automatically when configured
(gepa/optimize! ctx
{:sheet-id sheet-id
:node-name "answer"
:metrics [(gepa/judge-metric "answer"
{:instruction "Rate answer quality"
:model "google/gemini-2.0-flash-001"})]
...})
docs/EVALUATION-COMPONENT.md — Full evaluation guidedocs/FEEDBACK-LOOP.md — Evaluation → GEPA feedback loopdocs/GEPA-GUIDE.md — How judges integrate with optimization