Orkeon.Rag.Onnx 1.0.0-rc.4

Prefix Reserved
This is a prerelease version of Orkeon.Rag.Onnx.
dotnet add package Orkeon.Rag.Onnx --version 1.0.0-rc.4
                    
NuGet\Install-Package Orkeon.Rag.Onnx -Version 1.0.0-rc.4
                    
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="Orkeon.Rag.Onnx" Version="1.0.0-rc.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Orkeon.Rag.Onnx" Version="1.0.0-rc.4" />
                    
Directory.Packages.props
<PackageReference Include="Orkeon.Rag.Onnx" />
                    
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 Orkeon.Rag.Onnx --version 1.0.0-rc.4
                    
#r "nuget: Orkeon.Rag.Onnx, 1.0.0-rc.4"
                    
#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 Orkeon.Rag.Onnx@1.0.0-rc.4
                    
#: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=Orkeon.Rag.Onnx&version=1.0.0-rc.4&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Orkeon.Rag.Onnx&version=1.0.0-rc.4&prerelease
                    
Install as a Cake Tool

Orkeon.Rag.Onnx

License: this package runs cross-encoder/ms-marco-MiniLM-L-6-v2 (Apache-2.0, sentence-transformers / UKP Lab) but ships no weights itself. ONNX Runtime and Microsoft.ML.Tokenizers are MIT.

Install

dotnet add package Orkeon.Rag.Onnx --prerelease

Published to NuGet.org as part of the consolidated lineup (from v1.0.0-rc.3; earlier versions reached the GitHub Packages feed only); depends on the Orkeon package — see the publication matrix.

Offline story: weights are resolved in this order, lazily at first use —

  1. Orkeon.Rag.Onnx.Model referenced → embedded int8 weights (~22 MB), guaranteed offline, zero download. This is the CI path (RAG-04 acceptance criterion 3).
  2. OnnxRerankerOptions.ModelPath / VocabPath — VFS virtual paths read through IFileSystemService. Provision the files with tools/download-reranker-model.sh (SHA-256 verified).
  3. Otherwise → loud, actionable error. The runtime never downloads weights (supply-chain decision: downloading is a host choice, not a library side effect).

What it does

OnnxCrossEncoderReranker : IReranker scores each (query, chunk) pair jointly with the ms-marco-MiniLM-L-6-v2 cross-encoder — the quality stage of the 50 → 5 cascade (RerankingOptions.DefaultCandidateK → RerankingOptions.DefaultTopN, guide §7). Deterministic, CPU, millisecond latency, zero token cost. Scores are sigmoid-mapped logits in (0, 1) with ScoreOrigin = "cross-encoder".

Tokenization is BERT WordPiece (Microsoft.ML.Tokenizers.BertTokenizer, the model's own vocab.txt), pairs encoded as [CLS] query [SEP] passage [SEP], batched (OnnxRerankerOptions.BatchSize, default 16, max sequence 512).

Usage

services.AddOrkeonRag(configuration);   // registers the reranker factory (none/noop, llm/listwise)
services.AddOrkeonOnnxReranker();       // contributes onnx/cross-encoder

var reranker = provider.GetRequiredService<RerankerFactory>().Create("onnx");
var top5 = await reranker.RerankAsync(query, candidates, topN: 5, ct);

Factory names: onnx (canonical), cross-encoder (alias).

Native dependency isolation: Microsoft.ML.OnnxRuntime is confined to this opt-in package, same approach as Orkeon.Tools.Embeddings.Local (plan RAG §7).

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-rc.4 43 9/22/2026
1.0.0-rc.3 73 9/9/2026