- Answers to initial and follow-up queries. The agent assesses user queries and analyzes product information, specifications, and other documents on your site to generate standardized, accurate, content-based answers. If the user enters additional questions, the agent continues the conversation.
- Frequently asked questions. The agent generates a series of questions the current user is most likely to ask. This gives the user more information about their query, which can help minimize customer support calls and product returns.
Use cases
- B2B
- B2C
- Knowledge management
If you are a B2B organization that provides computer components for enterprise organizations, your customers may ask questions about the specifications and compatibility documents for your products prior to purchase.
The Conversational Q&A FAQ agent can interpret user questions, analyze the documentation, and quickly provide accurate, factually-based answers.
The agent responds to any follow-up queries to continue the conversation, providing standardized answers based on your site’s documentation.In addition, the agent predicts and surfaces several relevant questions based on the product content itself, which may provide information the current user might not have thought to ask.
This gives the user more information to understand the product, and helps minimize customer support calls and product returns.
Set up the agent
This section details how to create, configure, and test the Conversational Q&A FAQ agent.Prepare your data
Prepare your data
Agent Studio reads your data from a Google Cloud Storage (GCS) bucket outside of Lucidworks Platform.
You enter the bucket details when you create the agent.
If your organization doesn’t have a GCS bucket to use as a datasource, see Create a GCS bucket.Your data must be in JSONL and PDF format.In a JSONL file, each line is a complete JSON expression representing a single document, as in the example below:
- All fields are required.
- Each
product_idmust be unique. - JSONL lines are not separated by commas.
- Enter multiple PDF files as an array of strings.
- If a document doesn’t have an associated PDF file, a blank PDF file is accepted.
Create the agent
Create the agent
This agent uses two AI models: one for the generated FAQ (Q&A Generation) and one for the conversation (Conversation Generation).
-
From the Agent Studio screen, select Agents and click + Create New.

-
Enter a descriptive Name for the agent, select Conversational Q&A FAQ, and then click Next.

-
From the Industry Domain list, select the industry that best matches your business.

-
In the Tasks field, select the AI model to execute for Q&A Generation.
The recommended model for your industry is selected by default, but you can select a different model.

- In the Tasks field, select the AI model to execute for Conversation Generation. The recommended model for your industry is selected by default, but you can select a different model. Click Next.
- On the Select a data connector screen, click GCS Bucket and then click Next.
-
On the Configure GCS bucket to import data screen, fill out all required fields.

- In the Name field, enter the name of your datasource as you want it to display in Lucidworks Platform.
- In the Processing Region field, select the region for Lucidworks to process your data. This is not necessarily the region you created your GCS bucket in. The default value is
us-southcarolina. - In the Bucket Name field, enter the name of your GCS bucket as it displays in GCS.
- In the Service Account JSON Key field, enter your Google Cloud Platform (GCP) key in JSON format to allow access to your GCS bucket.
-
Click Verify Connection to verify the connection to the GCS bucket.
You can add multiple GCS buckets to expand the information the model uses for responses. To add another bucket, click Add New on the Configure GCS bucket screen. To remove a bucket, select it and click Remove.
-
When the agent is created, choose what to do next:
- Preview Agent opens the agent preview, where you enter a product ID and test the agent’s responses in Agent Studio before you add it to your site. See Preview and test the agent.
- Get Agent Code displays the code snippets to add the agent to your website. See Embed the agent.

Preview and test the agent
Preview and test the agent
Preview an agent in Agent Studio to test its responses before you add it to your website.
The preview displays the same component your customers see, using live data from your datasource for the product ID you enter.
You don’t need to embed the agent or configure the Agent Code section to use the preview.
-
Navigate to Agent Studio, click the Agents tab, and then select the agent you want to preview or test.
The agent details display the following sections:

- Agent Information, such as the name, type, and model for the agent.
- Agent Preview, to test whether the responses accurately reflect the information on your website.
- Agent Code, to embed the agent in your web page.
-
In the Agent Preview section, enter the ID of a product from your datasource.
The agent loads using the data for that product.
If the product ID isn’t found, check the ID and try again.
What the preview displays depends on the agent type:
- Product Q&A displays the questions and answers generated for the product. Select a question to view its answer.
- Conversational Q&A opens a chat. Enter questions about the product, including follow-up questions.
- Conversational Q&A FAQ opens a chat for your questions and displays generated questions a customer is likely to ask.
- Test the agent’s responses and verify they accurately reflect the information about that product.
If the preview reports that no data is available, your datasource is still processing or contains no documents.
Wait for the initial processing to finish, and then try again.
Embed the agent
Embed the agent
After you create an agent, the agent details screen provides the code to embed the agent on your website.
Embedding an agent involves two decisions:
- Where you place the script that loads the agent.
- How the agent obtains the product ID so it provides accurate information.
The script, component markup, and CSS are unique to each agent.
Always copy the code from the Agent Details section of the agent you’re embedding.
Add the script
-
Navigate to Agent Studio, click Agents, and then click the agent you want to implement.

-
In the Agent Details section, scroll to the Agent Code section, and in the Add the Script Tag area, click Copy.

-
Paste the script into the
<head>or<body>of your website’s HTML.
<lw-template> snippet must be in the <body> of a page for the agent to display there.- In the <head> (recommended)
- In the <body>
For best performance, place the script in the
<head>.
The script loads before the page body, along with any other scripts in your <head>.
The agent displays only on pages where you also place the <lw-template> snippet in the <body>.If your site uses a Content Security Policy (CSP), add
https://storage.googleapis.com to your script-src directive (the agent script is served from Google Cloud Storage) and add the App Studio API URL to your connect-src directive.To use the Signals beacon on the same page as your agent, you need additional script configuration.
See Configure the beacon with Agent Studio or UI Studio.
Specify the product ID
The agent answers questions about a specific product. It identifies the product by its unique ID, which it gets from the<lw-template> snippet in the <body> of your page.Choose one of the following methods, and use it with the script placement you chose in Add the script.URL query parameter
Use this method when the product ID is consistently in the page URL as a query parameter, or when you want to avoid manually injecting it into the HTML snippet.- Scroll to the Add Component Markup section, and then in the Automatic Extraction area, click Copy.
- Paste the
<lw-template>snippet in the<body>of every page where you want the agent to display. - In the Specify the Product ID section, enter the URL Query Parameters value for the product ID.
For example, if your URL is
https://www.example.com/sale?q=solvents&product=1234and your product ID is1234, enterproduct. - Verify the agent displays on the appropriate pages of your website.
- Test the agent by entering various queries to determine if it returns appropriate responses.
CSS selector
Use this method when the product ID isn’t in a URL query parameter, you don’t want to inject it into the HTML snippet, and the product ID is already on the page in an element you can isolate with CSS selectors.You must be able to extract the exact product ID through CSS selectors.
For example, if the product ID is
1234, you must be able to extract 1234 without any additional text, such as product-id: 1234.- Scroll to the Add Component Markup section, and then in the Automatic Extraction area, click Copy.
-
Paste the
<lw-template>snippet in the<body>of every page where you want the agent to display. -
In the Specify the Product ID section, enter the CSS Selector that contains the product ID.
The following example uses
.product .product-name @data-valueto extract a product ID of1234: - Verify the agent displays on the appropriate pages of your website.
- Test the agent by entering various queries to determine if it returns appropriate responses.
Markup attribute
Use this method when the product ID exists on the product detail page but isn’t available in the HTML or as a query parameter. You inject the product ID dynamically into the markup.- Scroll to the Add Component Markup section, and then in the Markup Attribute area, click Copy.
-
Paste the
<lw-template>snippet in the<body>of every page where you want the agent to display. The following example useshttps://www.example.com/sale/1234andproduct-idin the snippet. If your product ID attribute name is different from the one in the copied snippet, change the attribute name manually. - Verify the agent displays on the appropriate pages of your website.
- Test the agent by entering various queries to determine if it returns appropriate responses.
Customize the layout with CSS
The agent details screen also contains a CSS code block. Use it to customize the appearance of the agent to match your website’s existing layout.The following example shows some custom styling options. Styling options vary by agent type.All agent customizations must be contained within the
.lw-template properties.Manage the agent
Manage agents
Preview, edit, and delete agents.