MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1
Correct and forget a fact
Verify correction, provenance and forgetting without confusing storage mechanisms.
Objectives
- Use this page to understand: Correct and forget a fact.
Prepare a verifiable experiment
Prerequisites: Demo130–Demo160. Use a complete copy and isolated working roots. The objective is state evidence, not a judgment of answer style. Repository assignments are exercises/Advanced/Lab06_Ex01_SharedMemory_Facts.md and Lab06_Ex02_SharedMemory_Reuse.md, with solutions under solutions. Compare their controls with Maf.Memory without editing canonical code.
Admitted and rejected correction
In Demo150 then Demo160, enter module=Reporting; database=PostgreSQL. Inspect mem, then correct module=Billing; database=SQL Server 2022. The expected solution is two current keys with quotations from the correction. Next send unknown=value: failure must preserve previous facts. A free question must create no fact. The exact outcome depends on live extraction success; if it fails, record the diagnostic instead of inventing the correction.
Forget on the correct storage mechanism
forget module retains database and replaces both histories. forget removes all facts; mem stays empty after a question without an assertion. Close and reopen Demo150: the store is fresh because it is not persistent. To establish durable forgetting, use Demo130: setctx module=Reporting, quit, restart and showctx; reset, quit, restart and showctx. Demo140: after a saved answer, forget, quit, restart and load must not restore the deleted snapshot.
Read deterministic verification
dotnet test tests/Maf.Memory.Tests/Maf.Memory.Tests.csproj -m:1 -c Release --no-build --no-restoreCorrectionsReplaceSameKeyAndKeepProvenance checks replacement; ForgottenOrOutOfOrderUpdatesCannotResurrectFacts covers stale extraction. RestartPreservesSqliteContextAndTransactionalResetWorksWithPooling and SessionRoundTripRestoresMessagesAndDeletePlusFreshSessionForgetsThem cover recovery then forgetting. The scripted model makes outgoing inputs inspectable; it replaces neither SQLite nor MAF serialization.
Verification hints
Before reading the correction, record prediction and observation. Separate generated text, terminal state, decision and persisted state. If they differ, follow the file and test named in the procedure; do not remove the guard to obtain the expected result.
Explain the result
Record commands, before/after states, provenance and any failures. Distinguish deletion in the active store, loss on process exit and an absent snapshot at restart. None of these results erases logs, external copies or provider retention.
