Skip to content

RRF_K

const RRF_K: 60 = 60

Defined in: packages/core/src/vector-store/rrf.ts:17

Reciprocal Rank Fusion (RRF) constant.

Standard value used by Elasticsearch, Weaviate, MongoDB Atlas, and other databases. The constant k=60 was empirically found to work well across many datasets.

It prevents the top-ranked result from having too high a score relative to others, while still giving higher-ranked results more weight.

Score for rank 1: 1/61 ≈ 0.0164 Score for rank 2: 1/62 ≈ 0.0161 Score for rank 10: 1/70 ≈ 0.0143