Skip to content

Commit

Permalink
Add section about AI connector to serverless (#3958)
Browse files Browse the repository at this point in the history
* Add section about AI connector to serverless

* Apply suggestions from code review
  • Loading branch information
dedemorton authored Jun 11, 2024
1 parent 1e14bd1 commit bbaa6a4
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 6 deletions.
3 changes: 0 additions & 3 deletions docs/en/observability/observability-ai-assistant.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,6 @@ You can continue a conversation from a contextual prompt by clicking *Start chat
[[obs-ai-connector]]
=== Add the AI Assistant connector to alerting workflows

IMPORTANT: To use the Observability AI Assistant connector,
you must have the `api:observabilityAIAssistant` and `app:observabilityAIAssistant` privileges.

You can use the {kibana-ref}/obs-ai-assistant-action-type.html[Observability AI Assistant connector] to add AI-generated insights and custom actions to your alerting workflows.
To do this:

Expand Down
61 changes: 58 additions & 3 deletions docs/en/serverless/ai-assistant/ai-assistant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ After every answer the LLM provides, let us know if the answer was helpful.
Your feedback helps us improve the AI Assistant!
</DocCallOut>

### AI Assistant chat
### Chat with the assistant

Click **AI Assistant** in the upper-right corner where available to start the chat:

Expand All @@ -159,7 +159,7 @@ This opens the AI Assistant flyout, where you can ask the assistant questions ab

![Observability AI assistant chat](../images/ai-assistant-chat.png)

### AI Assistant functions
### Suggest functions

<DocCallOut template="beta" />

Expand Down Expand Up @@ -219,7 +219,7 @@ Additional functions are available when your cluster has APM data:
</DocRow>
</DocTable>

### AI Assistant contextual prompts
### Use contextual prompts

AI Assistant contextual prompts throughout ((observability)) provide the following information:

Expand All @@ -240,12 +240,67 @@ You can continue a conversation from a contextual prompt by clicking **Start cha

![Observability AI assistant example](../images/ai-assistant-logs.png)

### Add the AI Assistant connector to alerting workflows

You can use the Observability AI Assistant connector to add AI-generated insights and custom actions to your alerting workflows.
To do this:

1. <DocLink id="serverlessObservabilityCreateRules" text="Create (or edit) an alerting rule" /> and specify the conditions that must be met for the alert to fire.
1. Under **Actions**, select the **Observability AI Assistant** connector type.
1. In the **Connector** list, select the AI connector you created when you set up the assistant.
1. In the **Message** field, specify the message to send to the assistant:

![Add an Observability AI assistant action while creating a rule in the Observability UI](../images/obs-ai-assistant-action-high-cpu.png)

You can ask the assistant to generate a report of the alert that fired,
recall any information or potential resolutions of past occurrences stored in the knowledge base,
provide troubleshooting guidance and resolution steps,
and also include other active alerts that may be related.
As a last step, you can ask the assistant to trigger an action,
such as sending the report (or any other message) to a Slack webhook.

<DocCallOut title="NOTE">
Currently you can only send messages to Slack, email, Jira, PagerDuty, or a webhook.
Additional actions will be added in the future.
</DocCallOut>

When the alert fires, contextual details about the event—such as when the alert fired,
the service or host impacted, and the threshold breached—are sent to the AI Assistant,
along with the message provided during configuration.
The AI Assistant runs the tasks requested in the message and creates a conversation you can use to chat with the assistant:

![AI Assistant conversation created in response to an alert](../images/obs-ai-assistant-output.png)

<DocCallOut color="warning" title="Important">
Conversations created by the AI Assistant are public and accessible to every user with permissions to use the assistant.
</DocCallOut>

It might take a minute or two for the AI Assistant to process the message and create the conversation.

Note that overly broad prompts may result in the request exceeding token limits.
For more information, refer to <DocLink id="serverlessObservabilityAiAssistant" section="token-limits" />
Also, attempting to analyze several alerts in a single connector execution may cause you to exceed the function call limit.
If this happens, modify the message specified in the connector configuration to avoid exceeding limits.

When asked to send a message to another connector, such as Slack,
the AI Assistant attempts to include a link to the generated conversation.

![Message sent by Slack by the AI Assistant includes a link to the conversation](../images/obs-ai-assistant-slack-message.png)

The Observability AI Assistant connector is called when the alert fires and when it recovers.

To learn more about alerting, actions, and connectors, refer to <DocLink id="serverlessObservabilityAlerting" />.

## Known issues

<div id="token-limits"></div>

### Token limits

Most LLMs have a set number of tokens they can manage in single a conversation.
When you reach the token limit, the LLM will throw an error, and Elastic will display a "Token limit reached" error.
The exact number of tokens that the LLM can support depends on the LLM provider and model you're using.
If you are using an OpenAI connector, you can monitor token usage in **OpenAI Token Usage** dashboard.
For more information, refer to the [OpenAI Connector documentation](((kibana-ref))/openai-action-type.html#openai-connector-token-dashboard).

<span id="hello-world"></span>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bbaa6a4

Please sign in to comment.