feat(agents): add initialization_parameters to evaluator YAML config - #9472
feat(agents): add initialization_parameters to evaluator YAML config#9472Ilya Matiach (imatiach-msft) wants to merge 1 commit into
Conversation
Enables evaluators that require configuration (e.g. builtin.regex_match
patterns) to be fully specified in the optimize YAML config.
Add initialization_parameters field to EvaluatorRef (YAML only,
not serialized per-evaluator in the API array) and wire it through to
EvaluatorInitParamsMap in the OptimizeRequest top-level field.
The C# API stores this in Cosmos; the Python optimizer reads it via
cosmos_loader._resolve_evaluator_init_params_map.
Usage:
evaluators:
- name: builtin.regex_match
version: 4
initialization_parameters:
patterns:
- (?i)Answer:\s*GT
|
Azure Pipelines: Successfully started running 1 pipeline(s). 19 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
|
Hi @Ilya Matiach (@imatiach-msft). Thank you for your interest in helping to improve the Azure Developer CLI experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
Problem
Evaluators that require configuration parameters (e.g. builtin.regex_match which requires patterns) couldn't be fully specified from the optimize YAML config. EvaluatorRef only had name and version.
Change
Add initialization_parameters field to EvaluatorRef (YAML-only, not serialized per-evaluator in the API evaluators array) and wire it through to EvaluatorInitParamsMap as a top-level field in OptimizeRequest.
The C# API already accepts evaluatorInitParamsMap in the request body and stores it in Cosmos. The Python optimizer reads it via cosmos_loader._resolve_evaluator_init_params_map to supply required init params when building testing criteria.
Usage
evaluators:
version: 4
initialization_parameters:
patterns:
- (?i)Answer:\s*{{ground_truth}}
Tests
4 new tests: YAML parsing, YAML omission, ToRequest forwarding, ToRequest nil when absent.