Rag.NET.Mediator 0.1.0

dotnet add package Rag.NET.Mediator --version 0.1.0
                    
NuGet\Install-Package Rag.NET.Mediator -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Rag.NET.Mediator" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rag.NET.Mediator" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Rag.NET.Mediator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Rag.NET.Mediator --version 0.1.0
                    
#r "nuget: Rag.NET.Mediator, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Rag.NET.Mediator@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Rag.NET.Mediator&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Rag.NET.Mediator&version=0.1.0
                    
Install as a Cake Tool

Rag.NET.Mediator

ZeroAlloc.Mediator integration for Rag.NET: exposes the pipeline as IngestCommand, RetrieveQuery and DeleteCommand requests so applications built on the mediator pattern can drive RAG without holding an IRagPipeline reference.

Install

dotnet add package Rag.NET.Mediator

Setup

using Rag.NET.DependencyInjection;
using Rag.NET.Mediator.DependencyInjection;

services.AddRagNet(rag => rag.UseMediator());

UseMediator() registers the three request handlers; the requests resolve the same pipeline your other registrations configured.

Example

using Rag.NET.Mediator.Requests;
using Rag.NET.Models;

using var stream = File.OpenRead("report.pdf");
var metadata = new DocumentMetadata
{
    DocumentId  = new DocumentId("report-2024-q4"),
    FileName    = "report.pdf",
    ContentType = "application/pdf",
};

var result = await mediator.Send(new IngestCommand(stream, metadata));
if (result.IsSuccess)
    Console.WriteLine($"Stored {result.Value.ChunksStored} chunks");

var retrieved = await mediator.Send(new RetrieveQuery("key findings", new RetrievalOptions { TopK = 5 }));
if (retrieved.IsSuccess)
    foreach (var r in retrieved.Value)
        Console.WriteLine($"[{r.Score:F2}] {r.Chunk.Text}");

await mediator.Send(new DeleteCommand(new DocumentId("report-2024-q4")));

Full guide

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Rag.NET.Mediator:

Package Downloads
Rag.NET.Api

ASP.NET Core REST API for Rag.NET pipelines

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 103 8/11/2026