con un clic
orc-optimize
Set up GEPA prompt optimization for an ORC workflow
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Set up GEPA prompt optimization for an ORC workflow
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Create scheduled background jobs that run on cron schedules
Build an ORC behavior tree workflow using the DSL
Set up LLM-as-judge evaluation for ORC workflows
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
| name | orc-optimize |
| description | Set up GEPA prompt optimization for an ORC workflow |
Optimize LLM instructions in an ORC workflow using GEPA (Genetic-Pareto Prompt Optimizer). Read docs/GEPA-GUIDE.md for the full reference.
(require '[ai.obney.orc.gepa.interface :as gepa])
GEPA improves LLM node instructions through:
Metrics score how well a candidate instruction performs on each training example.
;; Exact match (binary: 0 or 1)
(gepa/exact-match-metric "answer" "expected-answer")
;; Contains check
(gepa/contains-metric "answer" "expected-substring")
;; Judge-based (LLM evaluates quality)
(gepa/judge-metric "answer"
{:instruction "Rate the answer quality 0-1."
:model "google/gemini-2.0-flash-001"})
(def examples
[{"question" "What is 2+2?" "expected-answer" "4"}
{"question" "Capital of France?" "expected-answer" "Paris"}
{"question" "Largest ocean?" "expected-answer" "Pacific"}])
(gepa/optimize! ctx
{:sheet-id sheet-id
:node-name "answer-node" ;; which LLM node to optimize
:examples examples
:metrics [(gepa/exact-match-metric "answer" "expected-answer")]
:budget {:max-generations 5
:candidates-per-generation 3}
:seed-instruction "Answer the question concisely."})
;; Get the best candidate
(gepa/get-best-candidate ctx optimization-id)
;; Get the Pareto frontier
(gepa/get-pareto-frontier ctx optimization-id)
;; Get optimization progress
(gepa/get-optimization-progress ctx optimization-id)
;; Update the LLM node with the optimized instruction
(gepa/apply-best-instruction! ctx optimization-id sheet-id "answer-node")
docs/GEPA-GUIDE.md — Full GEPA integration guidedocs/FEEDBACK-LOOP.md — How evaluation feeds back into optimization