MICROSOFT AGENT FRAMEWORK · 0.16.0-rc.1
Demo180 — Vector Ingestion
rebuild generates corpus embeddings and writes the manifest; audit inspects metadata only.
Objectives
- Build dense embeddings and a versioned SQLite vector index.
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.
| Project | Role |
|---|---|
| demos/Demo180_VectorIngestion/Demo180.App.csproj | App |
| shared/Maf.Rag/Maf.Rag.csproj | Shared implementation |
| shared/Maf.DemoConnection/Maf.DemoConnection.csproj | Connection |
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-23Modes 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();
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