add evaluation optimization loop#173
Draft
March-77 wants to merge 1 commit into
Draft
Conversation
|
CLA Assistant Lite bot: I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #173 +/- ##
==========================================
Coverage ? 87.54280%
==========================================
Files ? 467
Lines ? 44103
Branches ? 0
==========================================
Hits ? 38609
Misses ? 5494
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Summary
AgentEvaluator/AgentOptimizeradaptersWhy
Prompt optimization should not be accepted solely because its training score improves. This example keeps training and validation isolated, attributes failures from observable evidence, and leaves the final release decision to an independent gate. The bundled scenario intentionally improves training while regressing validation and introducing a critical hard fail, demonstrating that the overfit candidate is rejected.
The trace adapter makes the complete workflow reproducible without API credentials. Production users can replace it with
AgentEvaluatorand useAgentOptimizerto generate theTargetPromptwhile retaining the comparison, gate, and audit layers.Validation
python examples/optimization/eval_optimize_loop/run_pipeline.pypython -m pytest examples/optimization/eval_optimize_loop/test_pipeline.py -q(7 passed)python -m compileall -q examples/optimization/eval_optimize_loopThe broader
tests/evaluationrun has two existing Windows-specific failures unrelated to this example: drive-letter parsing in_load_eval_set_from_fileand a GEPA quickstart loop that performs zero calls. All new tests pass independently.Closes #91