examples: add evaluation + optimization closed-loop pipeline#107
Open
han12580 wants to merge 1 commit into
Open
examples: add evaluation + optimization closed-loop pipeline#107han12580 wants to merge 1 commit into
han12580 wants to merge 1 commit into
Conversation
Add a reproducible Evaluation + Optimization pipeline under examples/optimization/eval_optimize_loop that wires AgentEvaluator and AgentOptimizer into a single auditable loop: baseline evaluation, failure attribution, prompt optimization over a three-field TargetPrompt, candidate validation with per-case delta, a configurable acceptance gate, and audit artifacts. The pipeline records per-case metric scores, pass/fail, failure reasons and key trajectory during baseline evaluation, clusters failures into six categories, re-runs the validation set on the candidate to distinguish newly passed, newly failed, improved and regressed cases, and rejects overfitting candidates that improve on train but regress on validation. It emits optimization_report.json and optimization_report.md, and persists per-round candidate prompts, cost, duration and the reproducibility config. A default offline fake backend runs the whole loop deterministically without an API key in a few seconds, while a real backend drives a live multi-agent setup and the real GEPA optimizer when model credentials are provided. Six sample cases cover the optimizable, ineffective and regressing scenarios. Fixes trpc-group#91 RELEASE NOTES: Add an evaluation + optimization closed-loop example under examples/optimization/eval_optimize_loop. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #107 +/- ##
==========================================
Coverage ? 87.64107%
==========================================
Files ? 433
Lines ? 41557
Branches ? 0
==========================================
Hits ? 36421
Misses ? 5136
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Rook1ex
added a commit
to trpc-group/cla-database
that referenced
this pull request
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Add a reproducible Evaluation + Optimization pipeline under
examples/optimization/eval_optimize_loop/that wiresAgentEvaluatorandAgentOptimizerinto a single auditable loop.Stages: baseline evaluation → failure attribution → prompt optimization (three-field
TargetPrompt: router / system / skill) → candidate validation with per-case delta → configurable acceptance gate → audit artifacts.Highlights
optimization_report.json+optimization_report.md, and persists per-round candidate prompts, cost, duration and the reproducibility config (seed / mode / dataset paths).DESIGN.mddocuments the attribution method, acceptance strategy, anti-overfitting strategy and audit approach.Fixes #91
RELEASE NOTES: Add an evaluation + optimization closed-loop example under examples/optimization/eval_optimize_loop.