Rag.NET.Reranking.Onnx
1.0.0
dotnet add package Rag.NET.Reranking.Onnx --version 1.0.0
NuGet\Install-Package Rag.NET.Reranking.Onnx -Version 1.0.0
<PackageReference Include="Rag.NET.Reranking.Onnx" Version="1.0.0" />
<PackageVersion Include="Rag.NET.Reranking.Onnx" Version="1.0.0" />
<PackageReference Include="Rag.NET.Reranking.Onnx" />
paket add Rag.NET.Reranking.Onnx --version 1.0.0
#r "nuget: Rag.NET.Reranking.Onnx, 1.0.0"
#:package Rag.NET.Reranking.Onnx@1.0.0
#addin nuget:?package=Rag.NET.Reranking.Onnx&version=1.0.0
#tool nuget:?package=Rag.NET.Reranking.Onnx&version=1.0.0
Rag.NET.Reranking.Onnx
Local cross-encoder reranking for Rag.NET on ONNX Runtime: retrieved chunks are re-scored against the query by a cross-encoder model (ms-marco MiniLM and friends) on your own hardware — no reranking API, no per-call cost.
Install
dotnet add package Rag.NET.Reranking.Onnx
Install alongside the core pipeline package (dotnet add package Rag.NET), which supplies
the AddRagNet(...) builder the reranker registers into.
Setup
Inside your AddRagNet(...) builder callback, point at an exported cross-encoder and its
vocabulary:
using Rag.NET.Reranking.Onnx;
rag.UseOnnxReranking(o =>
{
o.ModelPath = "models/ms-marco-MiniLM-L-6-v2.onnx";
o.VocabPath = "models/vocab.txt";
});
Example
using Rag.NET.Reranking.Onnx;
rag.UseOnnxReranking(o =>
{
o.ModelPath = "models/ms-marco-MiniLM-L-6-v2.onnx";
o.VocabPath = "models/vocab.txt";
o.MaxLength = 512; // default: query + chunk token budget per pair
});
Reranking then applies to every retrieval with UseReranking = true (the
RetrievalOptions default). Prefer a managed service? See Rag.NET.Reranking.Cohere.
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.ML.OnnxRuntime (>= 1.30.0)
- Microsoft.ML.Tokenizers (>= 1.0.3)
- Rag.NET.Abstractions (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.