Property ProximityWeight
ProximityWeight
Gets or sets the weight applied to the proximity boosting factor.
public float ProximityWeight { get; set; }
Property Value
- float
A non-negative value. Default is
0.3.
Examples
// Increase proximity boosting so phrase-like matches score higher.
var bm25 = new Bm25RetrievalStrategy { ProximityWeight = 0.6f };
ragEngine.RetrievalStrategy = bm25;
Remarks
When multiple query terms appear close together in a document, the base BM25+
score is multiplied by (1 + ProximityWeight * proximityScore), where
the proximity score is computed from the inverse distance between consecutive
query terms. Set to 0 to disable proximity boosting entirely.