Property KeywordWeight
KeywordWeight
Gets or sets the weight applied to the keyword (lexical) strategy during Reciprocal Rank Fusion.
public float KeywordWeight { get; set; }
Property Value
- float
A non-negative value. Default is
1.0.
Examples
// Boost keyword matching for domain-specific terminology.
var hybrid = new HybridRetrievalStrategy
{
VectorWeight = 0.4f,
KeywordWeight = 0.6f
};
ragEngine.RetrievalStrategy = hybrid;
Remarks
The weights are relative: VectorWeight = 0.7 and KeywordWeight = 0.3
gives vector results roughly twice the influence of keyword results in the
fused ranking. Equal weights (the default) give both strategies the same influence.