Chunking Neural Hybrid Query Stage
The Chunking Neural Hybrid Query stage performs hybrid lexical-semantic search that combines BM25-type lexical search with KNN dense vector search via Solr. This stage differs from the Neural Hybrid Stage because it supports chunking.
Not sure which hybrid query stage is right for you? Read about the differences between the hybrid query stages.
This feature is only available in Managed Fusion 5.9.12 and later versions of Managed Fusion 5.9. |
Click Get Started below to see how to enable chunking in Managed Fusion:
About the Lexical Query Squash Factor
The Lexical Query Squash Factor field lets you input a value that squashes the lexical query scores from 0..inf
to 0..1
.
This setting helps prevent the lexical query from dominating the final score, and normalizes the score into a range that works well with vector similarity scores.
Additionally, it helps prevent the vanishing gradient problem, which occurs when very high lexical scores are mapped to values extremely close to 1
, such as 0.99999999
.
During the hybrid search calculation, these near-1 values can cause the system to lose sensitivity to subtle differences in lexical relevance, effectively 'squashing' the gradient and reducing the impact of lexical scoring.
Lucidworks recommends setting the Lexical Query Squash Factor to the inverse of the maximum lexical score observed across your queries. This helps balance the impact of lexical and vector scores, leading to more accurate and nuanced search results.
Prefiltering
Prefiltering is a technique that can improve performance and accuracy by filtering documents before applying the algorithm, reducing the number of documents that need to be processed. This is especially effective with the KNN algorithm.
Prefiltering is disabled by default. To enable it, uncheck Block pre-filtering in this stage.
When prefiltering is enabled, you can configure the filters using one or both of these methods:
-
Security filters
You can use security filters as prefilters by placing the Graph Security Trimming Stage after this one in the pipeline. Then Fusion uses the security trimming filter as a prefilter.
-
JavaScript
When prefiltering is enabled, this stage adds a
preFilterKey
object to the Javascriptctx
object. You can place a Javascript stage after this one and use it to access thepreFilterKey
object, as in this example:if(ctx.hasProperty("preFilterKey")) { var preFilter = ctx.getProperty("preFilterKey"); preFilter.addFilter(filterQuery) }
Configuration
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.
|