Rag.NET.Evaluation.Ragas
1.0.0
dotnet add package Rag.NET.Evaluation.Ragas --version 1.0.0
NuGet\Install-Package Rag.NET.Evaluation.Ragas -Version 1.0.0
<PackageReference Include="Rag.NET.Evaluation.Ragas" Version="1.0.0" />
<PackageVersion Include="Rag.NET.Evaluation.Ragas" Version="1.0.0" />
<PackageReference Include="Rag.NET.Evaluation.Ragas" />
paket add Rag.NET.Evaluation.Ragas --version 1.0.0
#r "nuget: Rag.NET.Evaluation.Ragas, 1.0.0"
#:package Rag.NET.Evaluation.Ragas@1.0.0
#addin nuget:?package=Rag.NET.Evaluation.Ragas&version=1.0.0
#tool nuget:?package=Rag.NET.Evaluation.Ragas&version=1.0.0
Rag.NET.Evaluation.Ragas
RAGAS-style metrics for Rag.NET pipelines: faithfulness, answer relevance, context precision and context recall, computed natively in .NET with your own chat and embedding clients — no Python sidecar.
Install
dotnet add package Rag.NET.Evaluation.Ragas
Setup
using Rag.NET.Evaluation.Ragas;
var suite = new RagasEvaluationSuiteBuilder(chatClient, embeddingGenerator)
.AddFaithfulness()
.AddAnswerRelevance()
.AddContextPrecision()
.AddContextRecall()
.Build();
Example
Samples carry the question, the pipeline's answer and the chunks it used; metrics that
lack their required fields return null rather than a fake score:
using Rag.NET.Evaluation;
using Rag.NET.Evaluation.Ragas;
RagasReport report = await suite.EvaluateAsync(samples);
if (report.Faithfulness is { } faithfulness)
Console.WriteLine($"Faithfulness: {faithfulness:F2}");
RagAbTester compares two pipeline variants over the same samples with confidence
intervals — feed it live traffic captured by UseShadow from Rag.NET.Evaluation.
Full guide
| Product | Versions 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. |
-
net10.0
- Microsoft.Extensions.AI.Abstractions (>= 10.9.0)
- Rag.NET.Abstractions (>= 1.0.0)
- Rag.NET.Evaluation (>= 1.0.0)
- System.Numerics.Tensors (>= 10.0.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.