Table of Contents

Constructor RagReranker

Namespace
LMKit.Retrieval
Assembly
LM-Kit.NET.dll

RagReranker(LM, float)

Instantiates a new RagEngine.RagReranker with the specified language model and optional blending weight.

public RagReranker(LM textRerankingModel, float rerankedAlpha = 0.5)

Parameters

textRerankingModel LM

The LM to use for computing rerank scores.

rerankedAlpha float

The weight (in [0,1]) applied to the rerank score when blending with the original similarity. Defaults to 0.5.

Examples

LM rerankModel = LM.LoadFromModelID("qwen3:1.7b");

// Create a reranker with 70% weight on the rerank score
var reranker = new RagEngine.RagReranker(rerankModel, rerankedAlpha: 0.7f);
Share