- Business-to-Consumer
- Business-to-Business
- Knowledge Management
For self-hosted Fusion: Enable Lucidworks AI
Before you can begin using Lucidworks AI features with self-hosted Fusion, a couple of one-time setup steps are required. If you are using Lucidworks Search, these steps have already been performed for you by the Lucidworks team.Set up Lucidworks AI Gateway
Configure A Lucidworks AI Gateway Integration
Configure A Lucidworks AI Gateway Integration
- On the Integrations tab, click your integration. If you don’t see your integration, contact your Lucidworks representative.
- Download or copy the YAML code and paste it into a file called
account.yaml.
- Apply the file to your Fusion configuration file. For example:
Configure user permissions
LWAI-ACCOUNT-NAME must match the value of fusion.lwai.account[n].name in the integration YAML you copied when you set up Lucidworks AI Gateway.Set up Neural Hybrid Search and RAG
In just a few steps, you’ll have a functional pipeline you can test, tune, and use as a starting point for future implementations.Prepare your documents

LWAI Chunker stage in the correct position in the index pipeline.
<doc.embedding_t>.Index some documents and continue to the next step.Choose a chunking strategy
Choose a chunking strategy
- Sentence
- Dynamic sentence
- Dynamic newline
- Regex splitter
- Semantic
- FAQs
- Help articles
- Structured documentation
Choose a model for indexing
Choose a model for indexing
- e5-base-v2: Balanced quality and speed. Works well for general-purpose indexing in English.
- bge-base: Strong semantic performance.
- snowflake-arctic-embed-m-v2.0: High retrieval accuracy with optional dimension reduction for performance tuning.
- multilingual-e5-base: Recommended if your content includes multiple languages.
- Start with a base or small model to establish a performance and relevance baseline.
- Index a representative sample and test retrieval using real queries.
- Use Query Workbench to inspect which chunks are returned for each query.
- Measure indexing time and vector storage to catch early scalability issues.
- Use
dimReductionSizewith supported models to reduce vector size without retraining. - If chunk retrieval is weak, try a different model before adjusting chunking strategy.
Vectorize your queries

LWAI Vectorize Query stage in the correct position in the query pipeline.
Configure NHS

Chunking Neural Hybrid Query stage in the correct position in the query pipeline.
Configure RAG

LWAI Prediction stage in the correct position in the query pipeline.
body and source fields. You can include additional fields if they help improve the responses.If your model requires an API key, add it to the configuration. The key is stored securely.Embedding models for RAG
Embedding models for RAG
- B2B
- B2C
- Knowledge Management
- snowflake-arctic-embed-m-v2.0: High retrieval quality with support for vector size reduction. Recommended starting point for B2B. Optimized for long, structured product content.
- multilingual-e5-base: Strong multilingual support with consistent performance across languages and formats. Good fallback when content spans languages or includes inconsistent structure.
- e5-base-v2: Balanced quality and speed if your data is mostly English and latency is a concern.
- Use real queries from actual users, including edge cases, to measure effectiveness.
- Start with a base or small model and scale up only if needed.
- Inspect retrieved chunks in Query Workbench to verify relevance.
- Reduce vector size using
dimReductionSizein supported models to improve performance. - Switch models easily in the LWAI Prediction stage as your use case evolves.
Fine-tune

RAG responses in the Query Workbench.
- Is the answer backed by retrieved content? The response should only include facts found in the retrieved documents.
- Do citations match the content? References must point to documents that support the answer.
- What happens if nothing useful is retrieved? The system should avoid generating unsupported content.
- Does the answer stay on topic? The response should directly address the query.
- Does the system handle edge cases well? Use ambiguous or off-topic queries to test its behavior.
Learn more
LWAI pipeline with NHS plus RAG
LWAI pipeline with NHS plus RAG
- Additional Query Parameters
- LWAI Query Rewrite
- Additional Query Parameters
- LWAI Vectorize Query
- Hybrid Query
- Solr Query
- LWAI Prediction
Add the pipeline
- Navigate to Querying > Query Pipelines.
- Click Add+.
- Enter the Pipeline ID, for example
LWAI-NHS-plus-RAG. - Remove the default stages except for Solr Query:
- Remove the Text Tagger stage.
- Remove the Boost with Signals stage.
- Remove the Query Fields stage.
- Remove the Facets stage.
- Remove the Apply Rules stage.
- Remove the Modify Response with Rules stage.
Additional Query Parameters
Configure the Additional Query Parameters stage as follows.- Click Add a new pipeline stage > Additional Query Parameters.
- Enter names, values, and policies for the Parameters and Values:
orig_q-<request.q>-replace.rewritten_q-<request.q>-replace.
- Save the pipeline.
LWAI Query Rewrite
LWAI Query Rewrite is set up using the LWAI Prediction stage.- Click Add a new pipeline stage > LWAI Prediction.
- Enter a Label, such as
[LWAI] Query Rewrite. - In the Condition field, enter
request.getFirstFieldValue('q') != '**:**' && request.hasParam('memory_uuid'). - Select the Lucidworks AI integration Account Name as defined by your Fusion Administrator.
- Select the Use Case, such as
standalone-query-rewriter. - Select the Model to use.
- Enter the Input context variable as
<request.q>. - Enter the Destination Variable Name & Context Output as
standalone. - Enter the following under Use Case Configuration:
- Parameter Name:
memoryUuid. - Parameter Value:
<request.memory_uuid>.
- Parameter Name:
- Save the pipeline.
Additional Query Parameters
Configure another Additional Query Parameters stage as follows.- Click *Add a new pipeline stage > Additional Query Parameters.
- Enter the following under Parameters and Values:
- Parameter Name:
rewritten_q. - Parameter Value:
<ctx.standalone>. - Update Policy:
replace.
- Parameter Name:
- Save the pipeline.
LWAI Vectorize Query
Configure the LWAI Vectorize Query stage as follows.- Click Add a new pipeline stage > 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.
- Select Asynchronous Execution Config if you want to run this stage asynchronously. If this field is enabled, complete the following fields:
- Select Enable Async Execution. Fusion automatically assigns an Async ID value to this stage. Change this to a more memorable string that describes the asynchronous stages you are merging, such as
signalsoraccess_control. - Copy the Async ID value.
For detailed information, see Enable asynchronous query pipeline processing and Asynchronous query pipeline processing.
- Select Enable Async Execution. Fusion automatically assigns an Async ID value to this stage. Change this to a more memorable string that describes the asynchronous stages you are merging, such as
- Select the Account Name.
- Select the Model to use.
- Set the Query Input to
<request.rewritten_q>. - Enter the Output Context Variable as
vector. - Save the pipeline.
Hybrid Query
Configure the Hybrid Query stage as follows.- Click Add a new pipeline stage > Hybrid Query.
- Set the Lexical Query Input as
<request.rewritten_q>. - Enter a value for the Lexical Query Weight, for example,
0.3. - Set the Number of Lexical Results, such as
1000. - In the Vector Query Field, enter the name of the Solr field for KNN vector search.
- Set the Vector Input to
<ctx.vector>. - Enter a value for the Vector Query Weight, for example,
0.7. - Check the box for Use KNN Query.
- Under Use KNN Query, enter Number of Vector Results, such as
1000. - Save the pipeline.
Solr Query
Configure the Solr Query stage as follows.- Select the HTTP Method as POST.
- Make sure the Generate Response Signal is checked.
- Set the Preferred Replica Type to pull.
- Save the pipeline.
LWAI Prediction
Configure the LWAI Prediction stage as follows.- Click Add a new pipeline stage > LWAI Prediction.
- 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.
- Select Asynchronous Execution Config if you want to run this stage asynchronously. If this field is enabled, complete the following fields:
- Select Enable Async Execution. Fusion automatically assigns an Async ID value to this stage. Change this to a more memorable string that describes the asynchronous stages you are merging, such as
signalsoraccess_control. - Copy the Async ID value.
For detailed information, see Enable asynchronous query pipeline processing and Asynchronous query pipeline processing.
- Select Enable Async Execution. Fusion automatically assigns an Async ID value to this stage. Change this to a more memorable string that describes the asynchronous stages you are merging, such as
- Set the Account Name to the Lucidworks AI integration name as defined by your Fusion Administrator.
- Select the Use Case as
rag. - Select the Model to use.
- Set the Input context variable to
<request.rewritten_q>. - Make sure Include Response Documents? is checked.
- Enter values into the Use Case Configuration:
- Parameter Name:
answerNotFoundMessage. - Parameter Value:
Not possible to answer given this content.
- Parameter Name:
- Save the pipeline.
Order the stages
- Make sure the stages are in the following order:
- Additional Query Parameters
- LWAI Query Rewrite
- Additional Query Parameters
- LWAI Vectorize Query
- Hybrid Query
- Solr Query
- LWAI Prediction
- Save the pipeline.