mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
c79f886dc3
* dotnet: refresh Foundry sample guidance Carry forward the still-relevant sample guidance and Foundry-specific documentation fixes from the old stacked sample migration work, adapted to the current repo layout and policy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * dotnet: rename Foundry sample env vars Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * dotnet: remove persistent provider sample Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * dotnet: drop SAMPLE_GUIDELINES.md from this PR Defer the guidelines doc and its cross-link to a follow-on PR to avoid broken-link failures in CI. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * dotnet: add DefaultAzureCredential warning to remaining samples Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * dotnet: address PR review feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
c79f886dc3
·
2026-06-11 17:26:00 +00:00
History
Evaluation - Expected Outputs
This sample demonstrates evaluating agent responses against expected outputs using built-in checks.
What this sample demonstrates
- Using
EvalChecks.ContainsExpectedfor ground-truth comparison - Using
EvalChecks.NonEmptyfor basic response validation - Passing
expectedOutputtoagent.EvaluateAsync()so checks can access ground truth
Prerequisites
- .NET 10 SDK or later
- Azure CLI installed and authenticated (
az login)
Set the following environment variables:
$env:FOUNDRY_PROJECT_ENDPOINT="https://your-foundry-service.services.ai.azure.com/api/projects/your-foundry-project"
$env:FOUNDRY_MODEL="gpt-4o-mini"
Run the sample
cd dotnet/samples/02-agents/Evaluation
dotnet run --project .\Evaluation_ExpectedOutputs
See also
- Evaluation_SimpleEval — Simplest evaluation with built-in and custom checks
- Evaluation_FoundryQuality — Cloud-based quality evaluation with Foundry evaluators