You are here:
Hybrid Search Fusion Ranking
Ranking reorders the search results so that the most relevant results to a user query are at the top. Data 360 Hybrid search retrieves results from two indexes—keyword and vector— based on the similarity with the query and then merges (fuses) the results. The ranking model then reranks the merged results.
During setup, you can configure additional ranking factors, such as recency of records and popularity, to influence the ranking. The ranking factors are based on search index object fields or related object fields. For example, you can use the LastModifiedDate field of an indexed DMO to define the recency of a record.
The Salesforce fusion ranker model is optimized on internal benchmarks for a variety of search-based tasks. The benchmarks measure the performance for precision, robustness, and sensitivity to produce a high-quality model. The criteria for evaluation are curated from a combination of user interactions on search responses and annotations. The training and evaluation data is based on captured queries from both Salesforce Einstein Search and RAG applications, such as Einstein Search Answers.
There are many factors that affect vector and keyword search similarity scores. For example, a keyword similarity score depends on the query text and the contents of the search index DMO. A vector similarity score depends on the query text and the specific embedding model for the search index. The fusion ranker model returns a hybrid search score that's a linear combination of the keyword and vector similarity scores along with the ranking factors.
To provide the best results for a general hybrid search use case, the model is fine-tuned for optimal combinations that include the normalization strategies for each score along with weights for each score. The fusion ranking model determines the final rank for a result based on the derived hybrid search score. The model can rank a result with a high hybrid search score even when one of the search similarity scores is zero. For example, a result with zero keyword score may get a high hybrid search score if its vector score is high enough relative to the vector scores of alternate results for the same search query.
| Search Type | Score Parameter | Description |
|---|---|---|
| Vector search | vector_score__c | The similarity score returned by the underlying vector search index for a given query. |
| Keyword search | keyword_score__c | The similarity score returned by the underlying keyword search index for a given query. |
| Hybrid search | hybrid_score__c | The score derived from combining the keyword and vector scores. This score takes ranking factors. such as document popularity and recency, into account. This score determines the rank of the results. |
select * from hybrid_search(
table(<Search_Index_DMO>),
"When is the V2MOM due?",
<Pre-Filter Fields>, <Limit Results>);
| Chunk ID | Vector Score | Keyword Score | Hybrid Score | Final Rank |
|---|---|---|---|---|
| A | 0.85 | 10.0 | 0.9 | 1 |
| B | 0.90 | 1.0 | 0.8 | 2 |
| C | 0.80 | 0.5 | 0.6 | 3 |
| D | 0.75 | 0.01 | 0.5 | 4 |
select * from hybrid_search(
table(<Search_Index_DMO>),
"How do I reset the password for my Acme account?",
<Pre-Filter Fields>, <Limit Results>);
| Chunk ID | Vector Score | Keyword Score | Popularity | Recency(Days) | Hybrid Score | Final Rank |
|---|---|---|---|---|---|---|
| A | 0.91 | 10.0 | 1000 (Highly Popular) | 10 (Recent) | 0.9 | 1 |
| B | 0.90 | 10.5 | 1 | 15 | 0.875 | 2 |
| C | 0.80 | 2 | 5 | 25 | 0.8 | 3 |
| D | 0.80 | 1 | 10 | 100 | 0.75 | 4 |

