feat(agents): add initialization_parameters to evaluator YAML config - #9472
Open
Ilya Matiach (imatiach-msft) wants to merge 1 commit into
Open
feat(agents): add initialization_parameters to evaluator YAML config#9472Ilya Matiach (imatiach-msft) wants to merge 1 commit into
Ilya 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. |
Contributor
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.
Copilot started reviewing on behalf of
Ilya Matiach (imatiach-msft)
August 6, 2026 23:10
View session
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.
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.