AI Assistant

Cloudera Data Visualization enables you to embed interactive and actionable elements within your dashboards and applications. The Artificial Intelligence (AI) Assistant visual introduces a natural language interface for interacting with dashboards and datasets. It leverages text input and speech detection with interactive data visualization to provide an intuitive user experience. The AI Assistant is a powerful tool for enhancing your dashboards. It helps you to obtain data insights through interactive conversations about the information stored in a dataset.

How does it work?

When added to a dashboard, the AI Assistant visual connects to a vector database (Solr or SQLite). The AI Assistant queries this database based on user-entered text, providing augmented chat support. Results resembling your query are sent to the specified large language completion model defined in the site settings. The model processes the information and displays the results within the visual as a text response.

How to use it?

You can simply ask a question and the AI Assistant visual provides a textual response. After configuring and adding the visual to your dahsboard, you can interact with it by entering your question into the text box. You can also use the [microphone] icon to ask your question. The system will detect your speech, convert it to text, and enter it to the text box. The AI Assistant will provide a response based on the underlying data. You can ask further questions or refine your queries through voice or text, and the system will offer additional insights by updating the visualizations accordingly.

To explore the data behind the AI Assistant's response, you can click the [info] button to reveal the underlying data. The information displayed is based on the settings defined for Tooltips when the visual was created. Additionally, you can explore other components of the dashboard to validate your insights and enhance your analysis.

The following steps demonstrate how to create an AI Assistant visual. For an overview of the shelves that specify this visual, see Shelves for AI Assistant.

Before using the AI Assistant in Cloudera Data Visualization, ensure the following prerequisites are met:

  • Enable the AI Assistant feature in the Site Settings. For instructions, see Managing AI settings.
  • Select the AI engine and configure the necessary settings for the selected engine. For more information, see Managing AI settings.
  • Ensure the data you intend to use with the AI Assistant visual has been vectorized.
  • Ensure that a data connection has been configured for a data source that supports columns of vector type.
  1. Upload a CSV file that contains the required data.
    For data upload instructions, see Importing data in CSV format.
  2. Create a dataset from the uploaded data.
    For instructions, see Creating a dataset.
  3. Create a new dashboard.
    For instructions, see Creating a dashboard.
  4. Add the AI Assistant visual to the dashboard.
    1. In the VISUALS menu, locate and click the icon of the AI Assistant visual.
    2. Populate the shelves from the fields available in the DATA pane.
      1. Embeddings: Add vector fields containing embeddings.
      2. Embedding Context: Add fields that you want to be included in the chat prompt.
      3. Tooltip: Define the source information to be included in the result.
      4. Limit: Define the number of data rows that are processed by the visual.

      For more information, see Shelves for AI Assistant.

  5. Configure the visual settings.
    1. Display
      1. Customize the chat welcome message.

        This is the text that appears as the first message from the AI Assistant.

      2. Set the display format for the conversation.

        You have two options: plain text or markdown

    2. Embeddings
      1. Maximum tokens
      2. Model
    3. Completion
      1. Maximum tokens: Set a limit for the tokens. If exceeded, the request is not sent to the service and an error message is displayed.
      2. Context Overflow Policy: Choose an option to manage situations where the length of generated tokens exceeds the context window size:
        • Throw an error - Raises an error when the conversation length exceeds the defined context window.
        • Remove old conversation first - Automatically manages conversation length by removing old tokens.
        • Truncate embedding context first - Truncates the embedding context, retaining the latest tokens.
      3. Context prompt: Specify the first prompt message for the chat.
      4. Question prompt: Specify the formatting of the user question.
      5. Temperature: Control the randomness of the output to maintain a certain level of consistency and relevance. On a scale between 0 and 2, lower values result in more focused and deterministic responses, while higher values introduce more randomness and creativity.

        The default value is 1.

      6. Model: Specify the OpenAI model for the completion.
      7. Extra arguments: Provide additional arguments for the request.