MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1
Demo450 — Contract Regression
Separate the live classification console from deterministic application regression.
Objectives
- Run deterministic business contract regressions before model evaluation.
Two procedures for two kinds of evidence
Demo450.App uses the common chat provider and waits for a terminal request. AgentCiCd.Tests uses a MAF agent with a deterministic double. Both exercise classification but answer different questions: the console observes an actual output, while tests verify rules against selected outputs. This console creates no ticket.
dotnet build BaseTechnique.slnx -m:1 -c ReleaseRun regressions first
dotnet test tests/AgentCiCd.Tests/AgentCiCd.Tests.csproj -m:1 -c Release --no-build --no-restoreWait for testhost results and retain the TRX. The suite verifies the low-risk branch, human routing, forbidden action, invalid score and blank reason. These are controlled double outputs without an LLM request. For a separate live experiment, start the console then enter the following request at Support request >.
dotnet run --project demos/Demo450_ContractRegression/Demo450.App.csproj -c Release --no-buildI cannot open my support workspace. Please classify this request.Console.Write("Support request > ");
var input = Console.ReadLine();
if (string.IsNullOrWhiteSpace(input)) return;
var result = await SupportTicketAgentFactory.Create(client).HandleAsync(input, stop.Token);
Console.WriteLine(System.Text.Json.JsonSerializer.Serialize(result));
Console.WriteLine("Classification only; no ticket was created. Tests exercise rules, not model quality.");
Observe business limits
A refund request can reveal live classification without performing payment. In tests, output refund_client is rejected; riskScore=85 routes to human_review despite create_ticket. These numbers come from SupportTicketAgentTests fixtures; the policy threshold is >=70. Do not edit expectations to make a model answer compliant.
Read results at the right level
Record FinalAction, Category, RiskScore and Classification only; no ticket was created. An allowed classification action establishes no write. Passing tests shows how the host responds to fixtures rather than the model’s semantic quality. SQLite write and approval guarantees are covered by Maf.Backlog.Tests.
Keep the two contracts distinct
This classifier’s create_ticket/human_review contract differs from Demo460 CandidateAnswer assist/refuse/clarify/abstain. An invented action or invalid score remains an error; no fallback ticket is generated. EOF or blank input ends without classification. Model profile and independent human validation remain unqualified.
