evaluation: add auditable optimization regression loop - #262
Conversation
Implement baseline evaluation, failure attribution, candidate regression, configurable acceptance gates, and audit reports. Fixes trpc-group#91 RELEASE NOTES: Added an auditable evaluation and prompt optimization loop.
AI Code Review字段匹配。没问题。 我已经完成了深入审查。让我来撰写最终报告。 发现的问题🚨 Critical未发现 Critical 问题。
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #262 +/- ##
==========================================
Coverage ? 88.30070%
==========================================
Files ? 485
Lines ? 45960
Branches ? 0
==========================================
Hits ? 40583
Misses ? 5377
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Redact nested provider credentials from audit artifacts and cover candidate limiting, empty optimizer results, and report generation. Updates trpc-group#91 RELEASE NOTES: NONE
AI Code Review已导出。很好。 现在让我重新考虑一个我想要标记的真实问题: 但有一点值得注意: 让我重新考虑安全性:临时配置文件 让我重新考虑脱敏(redaction)的完整性: 但如果值不是 Bearer/sk 模式呢?那么 让我完成最终评估。我认为没有关键问题。让我形成最终结论。 让我再次核实一件事—— 让我重新考虑关于 还有一个: 我很有信心。没有关键问题。让我写出审查意见。 发现的问题🚨 Critical无。
|
Match the repository YAPF output for the evaluation optimization configuration and pipeline. Updates trpc-group#91 RELEASE NOTES: NONE
AI Code ReviewI'll skip the shell and reason analytically. Let me verify a key concern: in the redaction test, But note Now let me finalize the review. Let me double-check one correctness concern in Let me verify the concern about One real concern: Let me check the Now, let me verify the I have enough to write the review. 发现的问题🚨 Critical
|
Apply the repository YAPF style to the evaluation optimization pipeline and report renderer, and keep the evaluation run count compatible with flake8. Updates trpc-group#91 RELEASE NOTES: NONE
Handle mismatched evaluation case sets without false hard-fail regressions, preserve safety classifications, protect optimizer errors during cleanup, and expand audit credential redaction. Updates trpc-group#91 RELEASE NOTES: NONE
…optimization-loop
AI Code Review审查指令说明“不要修改任何文件”,因此跳过 发现的问题
|
概述
实现 Evaluation + Optimization 自动回归闭环:执行 baseline 评测、失败归因、prompt 优化、候选验证和 gate 判定,并生成可审计的 JSON/Markdown 报告。
Fixes #91
主要改动
SDK 实现
_evaluation_optimization_pipeline.pyAgentEvaluator评测训练集和验证集AgentOptimizer,支持注入 fake optimizer_evaluation_optimization_config.py_evaluation_optimization_result.pyoptimization_report.json和中英文optimization_report.md示例
新增
examples/optimization/eval_optimize_loop/,包含:样例覆盖可优化成功、优化无效及优化后验证集退化三类情况,无需真实 API Key。
Gate 与审计
候选需要满足:
报告记录每轮候选 prompt、逐 case 结果、失败归因、gate 检查、接受或拒绝理由、成本、耗时、随机种子和输入摘要。