Configure Seldon vector search
You can use Seldon models to vectorize text for Neural Hybrid Search.
This feature is only available in Fusion 5.9.5 and later versions of Fusion 5.9. |
Prerequisites
To vectorize text with Seldon, you’ll first need to develop and deploy a machine learning model.
Configure index pipeline
-
Sign into Fusion, go to Indexing > Index Pipelines, then select an existing pipeline or create a new one.
-
Click Add a new pipeline stage, then select Seldon Vectorize Field.
-
Fill in the required fields:
-
Enter a Model ID. This is the name of the model you developed and deployed.
-
Enter the Model Input Field. For example,
text
. -
Enter the Model Output Vector Field. For example,
vector
. -
Enter the Source Field. For example,
body_t
. -
Enter the Destination Field. For example,
body_512_v
.
-
-
Click Save.
-
Make sure the Seldon Vectorize Field stage is ordered before the Solr Indexer stage.
Index data using the new pipeline. Confirm that your vector field is indexed by checking to see that the field is present in documents.
Configure query pipeline
-
Go to Querying > Query Pipelines, then select an existing pipeline.
-
Click Add a new pipeline stage, then select Seldon Vectorize Query.
-
Fill in the required fields, making sure to search against the field into which you indexed the vectors:
-
Enter a Model ID. This is the name of the model you developed and deployed.
-
Enter the Query Input.
-
Enter the Model Input Field. For example,
text
. -
Enter the Model Output Vector Field. For example,
vector
. -
Enter the Vector Context Key. For example,
vector
.
-
-
Click Save.
-
Make sure the Seldon Vectorize Query stage is ordered before the Solr Query stage. See Reorder Query Pipeline Stages.
Perform vector searches
After setting up the stages, you can perform vector searches via the knn
query parser as you would with Solr. Specify the search vector and include it in the query. For example, change the q
parameter to a knn
query parser string.
The Seldon Vectorize Query stage will encode user queries using the specified model and modify the q
parameter to use the knn
query parser, turning the query into a vector search.