Skip to main content
The Conversational Q&A FAQ agent combines the Conversational Q&A agent with generated frequently asked questions:
  • 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

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.
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_id must 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.
This agent uses two AI models: one for the generated FAQ (Q&A Generation) and one for the conversation (Conversation Generation).
  1. From the Agent Studio screen, select Agents and click + Create New.
    Create a custom agent
  2. Enter a descriptive Name for the agent, select Conversational Q&A FAQ, and then click Next.
    Select an industry domain and model
  3. From the Industry Domain list, select the industry that best matches your business.
    Select an industry domain
  4. 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.
    Select the Q&A Generation model
  5. 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.
  6. On the Select a data connector screen, click GCS Bucket and then click Next.
  7. On the Configure GCS bucket to import data screen, fill out all required fields.
    GCS bucket configuration
    • 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.
  8. 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.
  9. 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.
    You can also click Exit and do either later from the agent details. Verify the agent displays on the Agents screen.
    Preview Agent or Get Agent Code
Major changes to an agent, such as updating the model or changing datasources, generate a new template-id. The old template-id still works, but it may not reflect your changes. Update your frontend code with the new template-id from the agent’s Details tab to use the latest configuration.
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.
  1. Navigate to Agent Studio, click the Agents tab, and then select the agent you want to preview or test.
    Agent Studio Agents screen
    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.
  2. 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.
  3. 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.
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:
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

  1. Navigate to Agent Studio, click Agents, and then click the agent you want to implement.
    Agent Studio Agents screen
  2. In the Agent Details section, scroll to the Agent Code section, and in the Add the Script Tag area, click Copy.
    Agent Code section
  3. Paste the script into the <head> or <body> of your website’s HTML.
No matter where you place the script, the <lw-template> snippet must be in the <body> of a page for the agent to display there.
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.
  1. Scroll to the Add Component Markup section, and then in the Automatic Extraction area, click Copy.
  2. Paste the <lw-template> snippet in the <body> of every page where you want the agent to display.
  3. 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=1234 and your product ID is 1234, enter product.
  4. Verify the agent displays on the appropriate pages of your website.
  5. 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.
  1. Scroll to the Add Component Markup section, and then in the Automatic Extraction area, click Copy.
  2. Paste the <lw-template> snippet in the <body> of every page where you want the agent to display.
  3. In the Specify the Product ID section, enter the CSS Selector that contains the product ID. The following example uses .product .product-name @data-value to extract a product ID of 1234:
  4. Verify the agent displays on the appropriate pages of your website.
  5. 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.
  1. Scroll to the Add Component Markup section, and then in the Markup Attribute area, click Copy.
  2. Paste the <lw-template> snippet in the <body> of every page where you want the agent to display. The following example uses https://www.example.com/sale/1234 and product-id in the snippet. If your product ID attribute name is different from the one in the copied snippet, change the attribute name manually.
  3. Verify the agent displays on the appropriate pages of your website.
  4. 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.