Neural Hybrid Query Stage
The Hybrid Query stage performs hybrid lexical-semantic search that combines BM25-type lexical search with KNN dense vector search via Solr.
|
This feature is only available in Managed Fusion 5.9.10 and later versions of Managed Fusion 5.9.
|
|
When entering configuration values in the UI, use unescaped characters, such as \t for the tab character. When entering configuration values in the API, use escaped characters, such as \\t for the tab character.
|
Hybrid of Vector and Lexical Search. Will be skipped if query string is blank or wildcard (* or *:*). Note this will not work well if the incoming q parameter is a Solr query parser string (e.g. field_t:foo) rather than a raw user query string. Note: The resulting query will ALWAYS be written to <request.params.q>.
skip - boolean
Set to true to skip this stage.
Default: false
label - string
A unique label for this stage.
<= 255 characters
condition - string
Define a conditional script that must result in true or false. This can be used to determine if the stage should process or not.
lexicalQuery - stringrequired
The lexical query itself is retrieved from here. This field supports Template Expressions such as '<request.params.q>' to evaluate the original user query.
Default: <request.params.q>
lexicalWeight - numberrequired
Relative weight of the lexical query. If this value is 0, no re-ranking will be applied using the lexical query scores.
<= 10
exclusiveMaximum: false
Default: 0.1
lexicalSquash - numberrequired
The squash factor for the lexical query. This value is used to squash the lexical query scores from 0..inf to 0..1, which can help to prevent the lexical query from dominating the final score. NOTE: A good value here would be the inverse of the lexical maximum score across all queries for the given collection.
<= 10
exclusiveMaximum: false
Default: 0.1
vectorQueryField - stringrequired
The name of the Solr field for knn vector search.
vector - stringrequired
The Vector itself is retrieved from here. This field supports Template Expressions such as '<ctx.vector>' to evaluate the context variable resulting from a previous stage, such as the Vectorize Query via Lucidworks AI stage.
Default: <ctx.vector>
vectorWeight - numberrequired
Relative weight of the vector query.
>= 0.001
<= 10
exclusiveMinimum: false
exclusiveMaximum: false
Default: 0.9
minReturnSim - numberrequired
The minimum vector similarity value to qualify as a match from the Vector portion of the hybrid query.
<= 1
exclusiveMaximum: false
Default: 0.85
minTraverseSim - numberrequired
The minimum vector similarity value to use when walking the graph during the Vector portion of the hybrid query. Must be lower than, or equal to, the Min Return Vector Similarity
<= 1
exclusiveMaximum: false
Default: 0.5
vecSimForLexOnly - boolean
Compute the vector similarity score for documents that are not in the vector result set but are in the lexical result set.