بنقرة واحدة
orc-optimize
Set up GEPA prompt optimization for an ORC workflow
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Set up GEPA prompt optimization for an ORC workflow
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
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
استنادا إلى تصنيف SOC المهني
| 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