A Cosmos DB system function, used with ORDER BY RANK, that merges the rankings from VectorDistance and FullTextScore, with optional weights, to give hybrid search results.
Also called Reciprocal Rank Fusion.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains RRF in context, with comparison tables and the common traps.
Terms in this definition
- Cosmos DB
NoSQL database distributed globally, offering writes in multiple regions, automatic indexing and latency below 10 ms.
- Chat message roles
Labels on chat messages: instructions go under system, the person's input under user, the model's previous answers under assistant, and results returned by a called tool under tool (or function).
- ORDER BY
Sorts what a SQL query returns on one or more columns. Leave it out and rows arrive in no guaranteed sequence.
- RANK
A window function, found in T-SQL (used with OVER) and in DAX, that gives each row's position within its partition. In DAX it accepts ORDERBY and PARTITIONBY, skips ranks after ties unless DENSE is chosen, and returns blank for total rows.
- Model parameters
The weights a model learns in training, which together hold what it knows. How many there are is what distinguishes a small language model from a large one.
- Hybrid search
One Azure AI Search request that performs vector and full-text search side by side and combines the results through Reciprocal Rank Fusion. Adding the semantic ranker yields the best relevance overall.
Related terms
- Hybrid search in T-SQL
Combines keyword and meaning-based results by running a vector search alongside a full-text query (CONTAINSTABLE or FREETEXTTABLE) on the same data, then merging the two rankings, usually with Reciprocal Rank Fusion.