Configure Lucidworks AI vector searchLucidworks AI
You can use Lucidworks AI models to vectorize text for Neural Hybrid Search. This configuration uses the LWAI Vectorize Field and the LWAI Vectorize Query stages.
Prerequisites
In order to set up the Lucidworks AI index and query stages, you need to first set up your Lucidworks AI Gateway integration.
Configure Lucidworks Vectorize Field index stage
To vectorize the index pipeline fields:
-
Sign in to Managed Fusion and click Indexing > Index Pipelines.
-
Click the pipeline you want to associate with Lucidworks AI.
-
To vectorize text, click Add a new pipeline stage.
-
In the AI section, click LWAI Vectorize Field.
-
In the Label field, enter a unique identifier for this stage.
-
In the Condition field, enter a script that results in true or false, which determines if the stage should process.
-
In the Account Name field, select the Lucidworks AI API account name defined in Lucidworks AI Gateway.
If you do not see your account name or you are unsure which one to select, contact the Managed Fusion team at Lucidworks.
-
In the Model field, select the Lucidworks AI model to use for encoding.
If you do not see your model name or you are unsure which one to select, contact the Managed Fusion team at Lucidworks.
For more information, see:
-
Custom embedding model training. To use a custom model, you must obtain the deployment ID from the deployments screen.
-
In the Source field, enter the name of the string field where the value should be submitted to the model for encoding. If the field is blank or does not exist, this stage is not processed. Template expressions are supported.
-
In the Destination field, enter the name of the field where the vector value from the model response is saved.
-
If a value is entered in this field, the following information added to the document:
-
{Destination Field}_b
is the boolean value if the vector has been indexed. -
{Destination Field}
is the vector field.
-
-
-
In the Use Case Configuration section, click the + sign to enter the parameter name and value to send to Lucidworks AI. The
useCaseConfig
parameter that is common to embedding use cases isdataType
, but each use case may have other parameters. The value for the query stage isquery
. -
The Model Configuration section is not currently available.
-
The Call Asynchronously? check box is not currently available.
-
Select the Fail on Error checkbox to generate an exception if an error occurs while generating a prediction for a document.
-
Click Save.
-
Index data using the new pipeline. Verify the vector field is indexed by confirming the field is present in documents. For reference information, see LWAI Vectorize Field.
Configure Lucidworks Vectorize query stage
To vectorize the query in the query pipeline:
-
Sign in to Managed Fusion and click Querying > Query Pipelines.
-
Click the pipeline you want to associate with Lucidworks AI.
-
To vectorize text, click Add a new pipeline stage.
-
Click LWAI Vectorize Query.
-
In the Label field, enter a unique identifier for this stage.
-
In the Condition field, enter a script that results in true or false, which determines if the stage should process.
-
In the Account Name field, select the name of the Lucidworks AI account.
If you do not see your account name or you are unsure which one to select, contact the Managed Fusion team at Lucidworks.
-
In the Model field, select the Lucidworks AI model to use for encoding.
If you do not see your model name or you are unsure which one to select, contact the Managed Fusion team at Lucidworks.
For more information, see:
-
In the Query Input field, enter the location from which the query is retrieved.
-
In the Output context variable field, enter the name of the variable where the vector value from the response is saved.
-
In the Use Case Configuration section, click the + sign to enter the parameter name and value to send to Lucidworks AI. The
useCaseConfig
parameter that is common to embedding use cases isdataType
, but each use case may have other parameters. The value for the query stage isquery
. -
The Model Configuration section is not currently available.
-
Select the Fail on Error checkbox to generate an exception if an error occurs during this stage.
-
Click Save.
The Top K setting is set to 100 by default. We recommend leaving this as 100 or setting it to 200. This query stage must be placed before the Solr Query stage. For more information, see Reorder Query Pipeline Stages. |
Using additional pipeline stages
Vector Search does not support all available pipeline stages. At minimum, use the Solr Query and LWAI Vectorize Query stages. Do not use the Query Fields stage when setting up vector search. |
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 LWAI 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.