AI Assistant for QPR ProcessAnalyzer: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
 
(33 intermediate revisions by 2 users not shown)
Line 1: Line 1:
AI Assistant is generative AI based chat dialog where users can use QPR ProcessAnalyzer by interacting with natural language. AI Assistant can for example explain charts and analyses, and create filters based on user description. AI Assistant can also answer question about the analyzed model, when training material is provided beforehand.


== Take AI Assistant Into Use ==
== Take AI Assistant into Use ==
To enable AI Assistant:
In QPR Cloud, the AI Assistant is disabled by default. To take the AI Assistant into use, please sent a request to customercare@qpr.com and the AI Assistant will be enabled for your environment.
# Create OpenAI account
* Configure OpenAI API key
* Set the LLM to use


== AI Assistant Overview ==
To enable the AI Assistant for customers using an on-premise system, the system administrator need to configure following:
The chat pane is the user interface for the AI Assistant. All users can use the AI Assistant, but they must have access to a dashboard to open it. When a dashboard is removed, the related AI Assistant chat discussion is also removed. Permissions for the AI Assistant chat discussions are identical to those for the related dashboard, meaning if dashboard access is revoked, access to the chat discussion is also revoked.
# Create an OpenAI account in https://openai.com, and create an OpenAI API key. Note that the OpenAI API is a paid service and a credit card is needed for payments.
# In the PA_CONFIGURATION table in QPR ProcessAnalyzer database, define your OpenAI API key in the [[PA_Configuration_database_table#OpenAIAPIKey|OpenAIAPIKey]] field.
# Optionally, define which large language model to use in the [[PA_Configuration_database_table#OpenAIDefaultModelName|OpenAIDefaultModelName]] field.


=== Opening the AI Assistant ===
You can also fine-tune the large language model, so that it better suits to your use. For example, the large language modelcan be fine-tuned with background information regarding the analyzed process and the broader business environment. More information about fine-tuning OpenAI large language models, please contact QPR or check out the OpenAI technical instructions: https://platform.openai.com/docs/guides/fine-tuning.
The AI Assistant can be opened by clicking the '''dots menu icon''' in the '''top right corner''' of the QPR ProcessAnalyzer view and selecting '''AI Assistant''' from the menu. This will open the AI Assistant chat pane to the right side of the view.


=== Closing the AI Assistant ===
==Available AI Functionality==
The AI Assistant can be closed by clicking the '''X icon''' in the top right corner of the AI Assistant chat pane.
The AI Assistant provides the following kind of assistance to users:
* AI Assistant can answer questions about the analyzed process. The answer are based on the information used to train the LLM. To train the LLM, you can provide information in the model's description field. Alternatively, for larger data sets, fine-tuning can be used (more above).
* AI Assistant can create filters and root causes criteria based on user description. For example, you can ask "Show cases with Delivery Created" (assuming that the model has Delivery Created events). You can also ask: "Filter cases where Company Code is Germany" (assuming that the model has the Company Code case attribute and it has a value Germany). You may ask: "Why there are Customer Return events?" and it will create a root causes criteria for the [[Root_Causes|Root Causes analysis]].
* AI Assistant can explain charts in the dashboard. To ask for an explanation, select the chart and click the '''Explain the selected chart''' button. The response contains a general description what this analysis or visualization is showing, and also it makes observations and findings regarding the the shown data. If you still want more information about the chart, please ask from the AI Assistant!
 
== Using AI Assistant ==
The chat pane is used to interact with the AI Assistant which is available for all users in dashboards. Discussions are stored permanently, so the chat history in a dashboard is accessible to the user even after the user logs out and logs back in. There is a separate discussion in each dashboard. Discussions are also user specific, so users cannot see each other's discussions.
 
When a dashboard is removed, the related AI Assistant chat discussion is also removed. Permissions for the AI Assistant chat discussions are identical to those for the related dashboard, meaning if dashboard access is revoked, access to the chat discussion is also revoked.
 
=== Opening and Closing Chat Pane ===
When in a dashboard, the AI Assistant can be opened by clicking the dots menu icon in the top right corner and selecting '''AI Assistant''' from the menu. This will open the AI Assistant chat pane to the right side of the dashboard. The AI Assistant can be closed by clicking the X icon on in the header of the chat pane.


=== Deleting Chat Contents ===
=== Deleting Messages ===
Chat contents can be deleted by hovering over a sent chat message and clicking the trashcan icon. All chat messages starting from that message are then deleted.
Chat contents can be deleted by hovering over a sent chat message and clicking the trashcan icon. All chat messages starting from that message are then deleted. Also the entire chat discussion can be deleted by clicking the trashcan in the header of the chat pane.


=== Regenerating the AI Assistant's Message ===
Keeping the chat history is useful when you want to continue a previous discussion because the AI Assistant remembers the visible chat history when answering to subsequent messages. On the other hand, if you don't want to provide the chat history as a context when continuing the discussion, the chat can be deleted (either partly or entirely).
To regenerate a message from the AI Assistant, hover over the message and click the round arrow icon.


==Available AI Functionality==
=== Regenerating Answer ===
The AI Assistant provides the following types of help to users:
To regenerate the last message from the AI Assistant, hover over the message and click the round arrow icon. You can use the regeneration to provide a different answer from the AI Assistant in case you are not satisfied with the previous answer. Alternatively, you can elaborate you request or question so that the AI Assistant is able to provide a better response.
* Answering general questions about the analyzed process
* Creating filter rules and root causes criteria
* Explaining the chart that is currently selected
* General knowledge about process mining


==What Data Is Sent to OpenAI==
==What Data Is Sent to OpenAI==
The AI Assistant is based on the generative AI and large language models (LLM). When the AI Assistant is used following data is sent to the OpenAI service:
AI Assistant is based on the large language models (LLM) offered by OpenAI through their API. When the AI Assistant is used, the following data is sent to the OpenAI API as a prompt to the LLM:
* Model name
* Model and project name
* Project name
* Case and event attribute names
* Case attribute names
* Event attribute name
* Event type names
* Event type names
* Model description
* Model description field (available in [[QPR_ProcessAnalyzer_Project_Workspace#Editing_Model_Settings|Model Properties]] dialog)
 
Additionally, when user asks to explain a chart, the following information is sent:
* Chart settings (shown in chart settings [[QPR_ProcessAnalyzer_Chart#Advanced_Settings|Advanced tab]])
* Data the chart is visualizing


When asked to explain a chart, the following information is sent:
Additional information how data is handled:
* Chart settings
* AI Assistant does not make additional queries to the model data, but it only sees information that is shown to the user in the dashboard.
* Visualized data
* AI Assistant uses the OpenAI API for which the OpenAI's Business Terms are applied (https://openai.com/policies/business-terms).
* OpenAI does not use the customer data to train LLM's.
* In OpenAI services, all data is encryption at rest (AES-256) and in transit (TLS 1.2+).
* More information about privacy for OpenAI services: https://openai.com/enterprise-privacy/.

Latest revision as of 05:56, 4 June 2024

AI Assistant is generative AI based chat dialog where users can use QPR ProcessAnalyzer by interacting with natural language. AI Assistant can for example explain charts and analyses, and create filters based on user description. AI Assistant can also answer question about the analyzed model, when training material is provided beforehand.

Take AI Assistant into Use

In QPR Cloud, the AI Assistant is disabled by default. To take the AI Assistant into use, please sent a request to customercare@qpr.com and the AI Assistant will be enabled for your environment.

To enable the AI Assistant for customers using an on-premise system, the system administrator need to configure following:

  1. Create an OpenAI account in https://openai.com, and create an OpenAI API key. Note that the OpenAI API is a paid service and a credit card is needed for payments.
  2. In the PA_CONFIGURATION table in QPR ProcessAnalyzer database, define your OpenAI API key in the OpenAIAPIKey field.
  3. Optionally, define which large language model to use in the OpenAIDefaultModelName field.

You can also fine-tune the large language model, so that it better suits to your use. For example, the large language modelcan be fine-tuned with background information regarding the analyzed process and the broader business environment. More information about fine-tuning OpenAI large language models, please contact QPR or check out the OpenAI technical instructions: https://platform.openai.com/docs/guides/fine-tuning.

Available AI Functionality

The AI Assistant provides the following kind of assistance to users:

  • AI Assistant can answer questions about the analyzed process. The answer are based on the information used to train the LLM. To train the LLM, you can provide information in the model's description field. Alternatively, for larger data sets, fine-tuning can be used (more above).
  • AI Assistant can create filters and root causes criteria based on user description. For example, you can ask "Show cases with Delivery Created" (assuming that the model has Delivery Created events). You can also ask: "Filter cases where Company Code is Germany" (assuming that the model has the Company Code case attribute and it has a value Germany). You may ask: "Why there are Customer Return events?" and it will create a root causes criteria for the Root Causes analysis.
  • AI Assistant can explain charts in the dashboard. To ask for an explanation, select the chart and click the Explain the selected chart button. The response contains a general description what this analysis or visualization is showing, and also it makes observations and findings regarding the the shown data. If you still want more information about the chart, please ask from the AI Assistant!

Using AI Assistant

The chat pane is used to interact with the AI Assistant which is available for all users in dashboards. Discussions are stored permanently, so the chat history in a dashboard is accessible to the user even after the user logs out and logs back in. There is a separate discussion in each dashboard. Discussions are also user specific, so users cannot see each other's discussions.

When a dashboard is removed, the related AI Assistant chat discussion is also removed. Permissions for the AI Assistant chat discussions are identical to those for the related dashboard, meaning if dashboard access is revoked, access to the chat discussion is also revoked.

Opening and Closing Chat Pane

When in a dashboard, the AI Assistant can be opened by clicking the dots menu icon in the top right corner and selecting AI Assistant from the menu. This will open the AI Assistant chat pane to the right side of the dashboard. The AI Assistant can be closed by clicking the X icon on in the header of the chat pane.

Deleting Messages

Chat contents can be deleted by hovering over a sent chat message and clicking the trashcan icon. All chat messages starting from that message are then deleted. Also the entire chat discussion can be deleted by clicking the trashcan in the header of the chat pane.

Keeping the chat history is useful when you want to continue a previous discussion because the AI Assistant remembers the visible chat history when answering to subsequent messages. On the other hand, if you don't want to provide the chat history as a context when continuing the discussion, the chat can be deleted (either partly or entirely).

Regenerating Answer

To regenerate the last message from the AI Assistant, hover over the message and click the round arrow icon. You can use the regeneration to provide a different answer from the AI Assistant in case you are not satisfied with the previous answer. Alternatively, you can elaborate you request or question so that the AI Assistant is able to provide a better response.

What Data Is Sent to OpenAI

AI Assistant is based on the large language models (LLM) offered by OpenAI through their API. When the AI Assistant is used, the following data is sent to the OpenAI API as a prompt to the LLM:

  • Model and project name
  • Case and event attribute names
  • Event type names
  • Model description field (available in Model Properties dialog)

Additionally, when user asks to explain a chart, the following information is sent:

  • Chart settings (shown in chart settings Advanced tab)
  • Data the chart is visualizing

Additional information how data is handled:

  • AI Assistant does not make additional queries to the model data, but it only sees information that is shown to the user in the dashboard.
  • AI Assistant uses the OpenAI API for which the OpenAI's Business Terms are applied (https://openai.com/policies/business-terms).
  • OpenAI does not use the customer data to train LLM's.
  • In OpenAI services, all data is encryption at rest (AES-256) and in transit (TLS 1.2+).
  • More information about privacy for OpenAI services: https://openai.com/enterprise-privacy/.