Property B
B
Gets or sets the BM25 length normalization parameter.
public float B { get; set; }
Property Value
- float
A value between
0and1. Default is0.75.
Examples
// Reduce length normalization so longer documents are not penalized as much.
var bm25 = new Bm25RetrievalStrategy { B = 0.3f };
ragEngine.RetrievalStrategy = bm25;
Remarks
Controls how much document length affects scoring.
A value of 0 disables length normalization;
a value of 1 applies full normalization relative to the average document length.
Exceptions
- ArgumentOutOfRangeException
Thrown if set to a value outside the [0, 1] range.