Class RagEngine.RagReranker
Encapsulates a reranking model and blending factor for adjusting raw similarity scores in RAG workflows.
public sealed class RagEngine.RagReranker
- Inheritance
-
RagEngine.RagReranker
- Inherited Members
Examples
LM rerankModel = LM.LoadFromModelID("qwen3:1.7b");
var reranker = new RagEngine.RagReranker(rerankModel, rerankedAlpha: 0.7f);
// Assign to a PdfChat or DocumentRag instance
chat.Reranker = reranker;
Constructors
- RagReranker(LM, float)
Instantiates a new RagEngine.RagReranker with the specified language model and optional blending weight.
Properties
- RerankAlpha
Gets or sets the blending factor α used to combine the raw similarity with the rerank score. Must be between 0 (use only raw score) and 1 (use only rerank score).
- TextRerankingModel
Gets the underlying LM used for text reranking.