Uncomment evaluation sample function definitions, keep only invocations commented#3697
Draft
Uncomment evaluation sample function definitions, keep only invocations commented#3697
Conversation
Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add .NET samples for Foundry observability and evaluations
.NET: Add Foundry Evaluation samples for Red Teaming and Self-Reflection
Feb 5, 2026
Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
Copilot
AI
changed the title
.NET: Add Foundry Evaluation samples for Red Teaming and Self-Reflection
Refactor evaluation samples: Replace instructional Console.WriteLine with real implementations
Feb 5, 2026
…nted Co-authored-by: rogerbarreto <19890735+rogerbarreto@users.noreply.github.com>
Copilot
AI
changed the title
Refactor evaluation samples: Replace instructional Console.WriteLine with real implementations
Uncomment evaluation sample function definitions, keep only invocations commented
Feb 5, 2026
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.
Motivation and Context
Evaluation sample functions were entirely commented out (signatures + bodies), making alternative implementations invisible to users. Only function invocations should be commented to allow easy switching between approaches.
Description
Problem: Function definitions like
RunComprehensiveRedTeamEvaluation()andRunWithCustomEvaluator()were wrapped in//comments, hiding their implementations.Solution: Uncommented all function definitions while keeping invocations commented:
Changes:
RunComprehensiveRedTeamEvaluation()andRunSimulationOnlyMode()RunWithCustomEvaluator(),EvaluateGroundedness(), andRunWithAzureEvalService()#pragma warning disable CS8321around alternative implementations to suppress unused function warningsUsers can now see all available implementations and switch by uncommenting a single invocation line.
Contribution Checklist
Original prompt
This section details on the original issue you should resolve
<issue_title>.NET: Support for Foundry Observability and Evaluations</issue_title>
<issue_description>Part of #3440
Support for Foundry Observability and Evaluations. Review existing samples and verify everything is working.</issue_description>
<agent_instructions>Follow the instructions in the issue OP and the first comment.</agent_instructions>
Comments on the Issue (you are @copilot in this section)
@rogerbarreto # Subplan: #3675 - Support for Foundry Observability and EvaluationsObjective
Create .NET samples demonstrating Foundry Observability and Evaluation capabilities, achieving parity with existing Python samples. This includes verifying existing observability (Step07) works correctly and adding new evaluation samples.
Current State Analysis
Existing .NET Samples
FoundryAgents_Step07_ObservabilityMissing from .NET (Exists in Python)
evaluation/red_teaming/red_team_agent_sample.pyevaluation/self_reflection/self_reflection.pyWorkplan
Phase 1: Verify Existing Observability Sample
FoundryAgents_Step07_ObservabilitysamplePhase 2: Red Teaming Evaluation Sample
red_team_agent_sample.pyREADME.mdfor setup requirementsAzure.AI.EvaluationNuGet packagePhase 3: Self Reflection Evaluation Sample
self_reflection.pyresources/folder contentsPhase 4: Documentation & Verification
Evaluation/README.mdFoundryAgents/README.mdPython Sample References
Red Teaming
red_team_agent_sample.pyREADME.md.env.example💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.