MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1
Demo440 — Context Budget
Compare raw context, selection, summary and memory with full request accounting.
Objectives
- Measure extraction, summary and compaction overhead separately.
Prepare the live experiment
Demo440.App references Maf.Memory, Maf.Observability and the common connection. An available chat provider is required, Ollama granite4:3b by default or an explicitly configured API. This scenario uses neither embeddings nor RAG. Donnees/dossier_support_volumineux.txt is copied to output; its content remains unchanged, including French labels used by the filter.
dotnet build BaseTechnique.slnx -m:1 -c ReleaseRun through the final ledger
dotnet run --project demos/Demo440_ContextBudget/Demo440.App.csproj -c Release --no-buildThe program runs then exits without a menu. Read raw-corpus and scenario-specific-line-filter, memory updates, context policies, then NativeWindow and Experiment coverage including auxiliary calls. For each stage retain size, available provider usage and answer. Failure exits 1 with Context experiment failed; no savings are inferred.
string selected = string.Join('\n', corpus.Split('\n').Where(line =>
line.StartsWith("Client :", StringComparison.OrdinalIgnoreCase)
|| line.StartsWith("Situation :", StringComparison.OrdinalIgnoreCase)
|| line.StartsWith("Impact :", StringComparison.OrdinalIgnoreCase)
|| line.StartsWith("Contrainte", StringComparison.OrdinalIgnoreCase)
|| line.StartsWith("Point métier", StringComparison.OrdinalIgnoreCase)
|| line.Contains("billing.outbound", StringComparison.OrdinalIgnoreCase)));
if (string.IsNullOrWhiteSpace(selected))
throw new InvalidDataException("The explicit scenario filter selected no lines. No fallback.");
Compare retained facts
In a corpus copy, move a prohibition outside selected prefixes; observe whether it disappears from transmitted context. In ContextExperiment, compare full, window-last-3, generated-summary-unverified and bounded-user-facts with the same question. Check Billing, SQL Server 2022 and the nightly-restart prohibition. Do not treat a plausible answer as fidelity evidence.
Keep an attributable table
| Mechanism | Scope |
|---|---|
| Context | Policy name; file and hash; characters; labelled estimate |
| Transport | Request count; known/absent counters; subtotals and coverage |
| Quality | Correction present; prohibition preserved; unknowns stated |
| Comparability | Profile, parameters, order, duration, repetitions and auxiliary calls |
Console.WriteLine("This line filter is deterministic selection for this fixture. Native MAF compaction and history policies follow.");
await ContextExperiment.RunAsync(chat, stop.Token);
Console.WriteLine("Experiment coverage including auxiliary calls: " + JsonSerializer.Serialize(ledger.Summarize()));
Console.WriteLine("All extraction, summary and compaction calls are reported separately. No cost or savings claim; answer quality must be evaluated separately.");
Interpret without claiming savings
The estimate need not cover the whole request. A summary can lose or invent a fact; window compaction removes turns without summarizing. Extraction and summary add requests. Null values remain unknown. This page publishes no new live campaign or price comparison; the default profile remains unqualified.
