e-naxosMAF COURSE / COURS
Français

MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1

Corpus governance

Finding a relevant source is insufficient: control its version and eligibility.

Objectives

A search engine can correctly retrieve a bad document

EP007 considers a train reimbursement request without a receipt. A provisional note and an older procedure can resemble the question more closely than the current rule. The engine then correctly finds a document that must no longer guide the answer. Adding chunks or changing models establishes neither that source’s status nor its effective date.

Govern before final ranking

The renovated fixture retains counterexamples for comparison: draft, noncanonical mirror, expired text, future rule and current version. An eligible source must be active and canonical, belong to the scope and satisfy validFrom <= asOf <= validUntil when an end exists. Both boundaries are inclusive; checking the start corrects the historical omission. SQL filters precede scoring and top-K so thirty very similar invalid sources cannot hide the only eligible one.

SELECT Id, SourceJson, Text, Vector FROM RagChunks
WHERE Scope=$scope AND ($governance=0 OR (Status='active' AND Canonical=1
    AND ValidFrom <= $date AND (ValidUntil IS NULL OR ValidUntil >= $date)
    AND ($product IS NULL OR Product=$product OR Product='GENERAL')))
ORDER BY Id COLLATE BINARY

shared/Maf.Rag/SqliteVectorStore.cs · L97–L101 · 9a895c94534c

Source code · Maf.Rag · Folder

Canonical status is governed metadata, not a scoring bonus. A date is insufficient if nobody maintains its meaning. Ownership, approval process and contradiction handling must be defined by the organization. Delivered code applies the available fields; it does not automatically discover a semantic duplicate, a falsehood or two incompatible active rules.

Read audit and compare at the same date

dotnet run --project demos/Demo210_CorpusQuality/Demo210.App.csproj -c Release --no-build -- --Rag:Action audit --Rag:AsOf 2026-10-23
dotnet run --project demos/Demo210_CorpusQuality/Demo210.App.csproj -c Release --no-build -- --Rag:Action compare --Rag:AsOf 2026-10-23

First ingest using Demo180 in an isolated working root. audit walks corpus metadata and needs neither generation nor embeddings. compare computes actual query vectors and displays Raw vector ranking then Governed hybrid context; it requests no chat answer. For the corpus scope on the given date, TRAIN-CURRENT is the eligible source. The raw list remains a diagnostic and never enters the answer service.

A useful refusal keeps the gap visible

A corpus without relevant evidence must yield refusal, not an improvised reimbursement rule. Do not present the active label as independent human approval. The current scenario neither reimburses nor executes payments. Dates and quotations are software-checkable; the procedure’s actual authority and sufficiency for the case remain business responsibilities.

Compare then apply to a product

Prerequisites

Continue reading

Previous

Next

lot008-memory-rag-1 · 2026-10-24 · 9a895c94534cd5fc6f3da883e37e5f7856e588c1