Property K1
K1
Gets or sets the BM25 term saturation parameter.
public float K1 { get; set; }
Property Value
- float
A non-negative value. Default is
1.2.
Examples
// Increase K1 to give more weight to repeated terms.
var bm25 = new Bm25RetrievalStrategy { K1 = 2.0f };
ragEngine.RetrievalStrategy = bm25;
Remarks
Higher values give more weight to repeated term occurrences within a document.
A value of 0 reduces BM25 to a binary presence/absence model.