Skip to content

update sample code for eval init param#46309

Open
YoYoJa wants to merge 1 commit intomainfrom
jessli/evalSample
Open

update sample code for eval init param#46309
YoYoJa wants to merge 1 commit intomainfrom
jessli/evalSample

Conversation

@YoYoJa
Copy link
Copy Markdown
Contributor

@YoYoJa YoYoJa commented Apr 14, 2026

Description

Please add an informative description that covers that changes made by the pull request and link all relevant issues.

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings April 14, 2026 18:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the Azure AI Projects evaluation sample code to reflect the new initialization parameter name used by evaluators.

Changes:

  • Replaces initialization_parameters.deployment_name with initialization_parameters.model across evaluation samples
  • Updates both scheduled and inline/dataset-based evaluation examples to use the new parameter key

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sdk/ai/azure-ai-projects/samples/evaluations/sample_scheduled_evaluations.py Updates scheduled evaluation sample to use model instead of deployment_name in evaluator init params.
sdk/ai/azure-ai-projects/samples/evaluations/sample_evaluations_builtin_with_inline_data_oai.py Updates OAI inline-data sample evaluator init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/sample_evaluations_builtin_with_inline_data.py Updates inline-data sample evaluator init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/sample_evaluations_builtin_with_dataset_id.py Updates dataset-id sample evaluator init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/sample_evaluations_ai_assisted.py Updates AI-assisted evaluation sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/sample_eval_catalog_prompt_based_evaluators.py Updates catalog prompt-based evaluator sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/sample_agent_response_evaluation_with_function_tool.py Updates agent response evaluation sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/sample_agent_evaluation.py Updates agent evaluation sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_tool_selection.py Updates agentic tool selection sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_tool_output_utilization.py Updates agentic tool output utilization sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_tool_input_accuracy.py Updates agentic tool input accuracy sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_tool_call_success.py Updates agentic tool call success sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_tool_call_accuracy.py Updates agentic tool call accuracy sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_task_completion.py Updates agentic task completion sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_task_adherence.py Updates agentic task adherence sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_response_completeness.py Updates agentic response completeness sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_relevance.py Updates agentic relevance sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_intent_resolution.py Updates agentic intent resolution sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_groundedness.py Updates agentic groundedness sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_fluency.py Updates agentic fluency sample init params to use model.
sdk/ai/azure-ai-projects/samples/evaluations/agentic_evaluators/sample_coherence.py Updates agentic coherence sample init params to use model.

"evaluator_name": "builtin.violence",
"data_mapping": {"query": "{{item.query}}", "response": "{{item.response}}"},
"initialization_parameters": {"deployment_name": "{{aoai_deployment_and_model}}"},
"initialization_parameters": {"model": "{{aoai_deployment_and_model}}"},
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description is still the default template text (asks to 'add an informative description', checklist unchecked, no linked issue/spec PR). Please update the PR description to briefly explain the deployment_name -> model parameter change, and link any relevant API/spec change or tracking issue so reviewers can validate the samples against the intended API behavior.

Copilot uses AI. Check for mistakes.
"evaluator_name": "builtin.violence",
"data_mapping": {"query": "{{item.query}}", "response": "{{item.response}}"},
"initialization_parameters": {"deployment_name": f"{model_deployment_name}"},
"initialization_parameters": {"model": f"{model_deployment_name}"},
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initialization parameter key is now model, but the value is still sourced from a variable named model_deployment_name, which is potentially confusing to sample readers (is this a model name or a deployment name?). Consider renaming the variable (and related comments/strings) to match the new model terminology, or add a short inline comment clarifying what model expects here.

Copilot uses AI. Check for mistakes.
"evaluator_name": "builtin.violence",
"data_mapping": {"query": "{{item.query}}", "response": "{{item.response}}"},
"initialization_parameters": {"deployment_name": f"{model_deployment_name}"},
"initialization_parameters": {"model": f"{model_deployment_name}"},
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The f-string f\"{model_deployment_name}\" is redundant when interpolating an existing string variable. Using model_deployment_name directly makes the sample slightly clearer and avoids implying formatting is needed.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants