e-naxosMAF COURSE / COURS
Français

MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1

Demo180 — Vector Ingestion

rebuild generates corpus embeddings and writes the manifest; audit inspects metadata only.

Objectives

Prepare the demo

Start at the root of the complete distribution built in Release. Shared projects Maf.Rag and Maf.DemoConnection are required. SQLite storage is local. rebuild/probe/compare need real embeddings; answer additionally needs chat if evidence remains eligible. audit alone requires no model. The delivered profile separates embeddinggemma:300m from granite4:3b.

Projects
ProjectRole
demos/Demo180_VectorIngestion/Demo180.App.csprojApp
shared/Maf.Rag/Maf.Rag.csprojShared implementation
shared/Maf.DemoConnection/Maf.DemoConnection.csprojConnection

Launch from the root

Create the root only once for the RAG series; if Demo180 already ingested the corpus, retain its existing value and do not repeat the assignment below. Without a compatible index, rebuild is explicitly required.

$env:MAF_STATE_ROOT = Join-Path $env:TEMP ('maf-rag-' + [guid]::NewGuid().ToString('N'))
dotnet run --project demos/Demo180_VectorIngestion/Demo180.App.csproj -c Release --no-build -- --Rag:AsOf 2026-10-23

Modes and procedure

Run rebuild, audit, probe Where can I export CSV in Reporting?, then quit. Reuse the same root for Demo190–220.

public async Task<float[][]> EmbedAsync(IEnumerable<string> texts, CancellationToken ct = default)
{
    var result = new List<float[]>();
    foreach (var batch in texts.Chunk(16))
    {
        var generated = await embeddings.GenerateAsync(batch, cancellationToken: ct);
        result.AddRange(generated.Select(v => v.Vector.ToArray()));
    }
    if (result.Count == 0 || result[0].Length == 0 || result.Any(v => v.Length != result[0].Length
        || v.Any(x => !float.IsFinite(x)) || !v.Any(x => x != 0)))
        throw new InvalidDataException("Invalid embedding vectors.");
    return result.ToArray();

shared/Maf.Rag/EmbeddingIndex.cs · L13–L24 · 9a895c94534c

Source code · Maf.Rag · Folder

Results and useful failures

rebuild generates corpus embeddings and writes the manifest; audit inspects metadata only. probe embeds a question and displays diagnostic ranking before hybrid policy. These three actions perform no chat generation.

These observations are expected from inspecting the linked public code revision. The site lot separately reruns deterministic tests: it does not present an unmeasured generated answer or provider score as observed output.

Persistence and limits

The index is shared under the selected root; startup does not reset it. rebuild deliberately replaces RAG tables and an incompatible embedding model, dimension, corpus or chunker fails explicitly. Changing chat alone does not change vectors. No universal erasure, general model qualification or production guarantee.

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

Continue and verify

Prerequisites

Continue reading

Complete demo folder · README

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