e-naxosMAF COURSE / COURS
Français

MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1

Demo450 — Contract Regression

Separate the live classification console from deterministic application regression.

Objectives

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 Release

Run regressions first

dotnet test tests/AgentCiCd.Tests/AgentCiCd.Tests.csproj -m:1 -c Release --no-build --no-restore

Wait 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-build
I 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.");

demos/Demo450_ContractRegression/Program.cs · L7–L12 · 9a895c94534c

Source code · Demo450 · Folder

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.

Continue to the evaluator

Prerequisites

Continue reading

Complete demo folder · README

lot012-observability-1 · 2026-10-24 · 9a895c94534cd5fc6f3da883e37e5f7856e588c1