Skip to content

Commit 73aad62

Browse files
[8.16]Adds Knowledge Base page and updates AI Assistant doc (#6040) (#6099)
* [8.16][serverless] Adds Knowledge Base page and updates AI Assistant doc * Update knowledge-base.mdx * ESS updates * fix broken image refs * minor updates * typo fix * updates from Charles' Feedback * Update knowledge-base-assistant-menu-dropdown.png * Adds Garrett's query for retrieving 8.15 knowledge * removes query * Delete docs/serverless/AI-for-security/ai-for-security-landing-pg.mdx remove .mdx file * Removes MDX files from PR * removes mdx docnav changes * Adds note about accessing anonymization settings * Incorporates Janeen's review * Incorporates Nat's review * Incorporates Nat's review * Update docs/AI-for-security/knowledge-base.asciidoc * Update docs/AI-for-security/knowledge-base.asciidoc (cherry picked from commit adbc277) Co-authored-by: Benjamin Ironside Goldstein <[email protected]>
1 parent 4e22d66 commit 73aad62

15 files changed

+164
-62
lines changed

docs/AI-for-security/ai-for-security.asciidoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[[ai-for-security]]
2-
= AI for security
2+
= AI for Security
33

44
:frontmatter-description: Learn to use AI capabilities in {elastic-sec}.
55
:frontmatter-tags-products: [security]
@@ -9,6 +9,8 @@
99
You can use {elastic-sec}'s built-in AI tools to speed up your work and augment your team's capabilities. The pages in this section describe <<security-assistant, AI Assistant>>, which answers questions and enhances your workflows throughout {elastic-sec}, and <<attack-discovery, Attack discovery>>, which speeds up the triage process by finding patterns and identifying attacks spanning multiple alerts.
1010

1111
include::ai-security-assistant.asciidoc[leveloffset=+1]
12+
include::knowledge-base.asciidoc[leveloffset=+2]
13+
1214
include::attack-discovery.asciidoc[leveloffset=+1]
1315

1416
include::connector-guides-landing-pg.asciidoc[leveloffset=+1]

docs/AI-for-security/ai-security-assistant.asciidoc

Lines changed: 22 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ WARNING: The Elastic AI Assistant is designed to enhance your analysis with smar
2424

2525
* To set up AI Assistant, you need the **Actions and Connectors : All** {kibana-ref}/kibana-privileges.html[privilege].
2626

27-
* You need an account with a third-party generative AI provider, which AI Assistant uses to generate responses. Supported providers are OpenAI, Azure OpenAI Service, and Amazon Bedrock.
27+
* You need a <<llm-connector-guides, generative AI connector>>, which AI Assistant uses to generate responses.
2828
--
2929

3030
[discrete]
@@ -68,27 +68,25 @@ You can also chat with AI Assistant from several particular pages in {elastic-se
6868
* <<data-quality-dash, Data Quality dashboard>>: Select the *Incompatible fields* tab, then click *Chat*. (This is only available for fields marked red, indicating they're incompatible).
6969
* <<timelines-ui, Timeline>>: Select the *Security Assistant* tab.
7070

71-
NOTE: Each user's chat history and custom quick prompts are automatically saved, so you can leave {elastic-sec} and return to pick up a conversation later.
71+
NOTE: Each user's chat history (up to the 99 most recent conversations) and custom Quick Prompts are automatically saved, so you can leave {elastic-sec} and return to a conversation later. Chat history appears to the left of the AI Assistant chat window, and on the **Conversations** tab of the **AI Assistant settings** menu. To access the settings menu, use the global search field to search for "AI Assistant for Security".
7272

7373
[discrete]
7474
[[interact-with-assistant]]
7575
== Interact with AI Assistant
7676

7777
Use these features to adjust and act on your conversations with AI Assistant:
7878

79-
* Select a _system prompt_ at the beginning of a conversation to establish how detailed and technical you want AI Assistant's answers to be.
79+
* (Optional) Select a _System Prompt_ at the beginning of a conversation by using the **Select Prompt** menu. System Prompts provide context to the model, informing its response. To create a System Prompt, open the System Prompts dropdown menu and click *+ Add new System Prompt...*.
80+
* (Optional) Select a _Quick Prompt_ at the bottom of the chat window to get help writing a prompt for a specific purpose, such as summarizing an alert or converting a query from a legacy SIEM to {elastic-sec}.
8081
+
8182
[role="screenshot"]
82-
image::images/system-prompt.gif[The system prompt drop-down menu,90%]
83+
image::images/quick-prompts.png[Quick Prompts highlighted below a conversation,90%]
8384
+
84-
System prompts provide context to the model, informing its response. To create a custom system prompt, open the system prompts dropdown menu and click *+ Add new system prompt...*.
85-
86-
* Select a _quick prompt_ at the bottom of the chat window to get help writing a prompt for a specific purpose, such as summarizing an alert or converting a query from a legacy SIEM to {elastic-sec}.
85+
* System Prompts and Quick Prompts can also be configured from the corresponding tabs on the **Security AI settings** page.
8786
+
88-
[role="screenshot"]
89-
image::images/quick-prompts.png[Quick prompts highlighted below a conversation,90%]
87+
image::images/assistant-settings-system-prompts.png[The Security AI settings menu's System Prompts tab,90%]
9088
+
91-
Quick prompt availability varies based on contextfor example, the **Alert summarization** quick prompt appears when you open AI Assistant while viewing an alert. To customize existing quick prompts and create new ones, click *Add Quick prompt*.
89+
* Quick Prompt availability varies based on contextfor example, the **Alert summarization** Quick Prompt appears when you open AI Assistant while viewing an alert. To customize existing Quick Prompts and create new ones, click *Add Quick Prompt*.
9290

9391
* In an active conversation, you can use the inline actions that appear on messages to incorporate AI Assistant's responses into your workflows:
9492

@@ -104,22 +102,16 @@ TIP: AI Assistant can remember particular information you tell it to remember. F
104102
[discrete]
105103
[[configure-ai-assistant]]
106104
== Configure AI Assistant
107-
The *Settings* menu (image:images/icon-settings.png[Settings icon,17,17]) allows you to configure default conversations, quick prompts, system prompts, and data anonymization.
108-
109-
[role="screenshot"]
110-
image::images/assistant-settings-menu.png[AI Assistant's settings menu, open to the Conversations tab]
111-
112-
The *Settings* menu has the following tabs:
105+
The *Security AI settings* page allows you to configure AI Assistant. To access it, use the global search field to search for "AI Assistant for Security".
113106

114-
* **Conversations:** When you open AI Assistant from certain pages, such as Timeline or Alerts, it defaults to the relevant conversation type. Choose the default system prompt for each conversation type, the connector, and model (if applicable). The **Streaming** setting controls whether AI Assistant's responses appear word-by-word (streamed), or as a complete block of text. Streaming is currently only available for OpenAI models.
115-
* **Quick Prompts:** Modify existing quick prompts or create new ones. To create a new quick prompt, type a unique name in the *Name* field, then press *enter*. Under *Prompt*, enter or update the quick prompt's text.
116-
* **System Prompts:** Edit existing system prompts or create new ones. To create a new system prompt, type a unique name in the *Name* field, then press *enter*. Under *Prompt*, enter or update the system prompt's text. Under *Contexts*, select where the system prompt should appear.
117-
+
118-
NOTE: To delete a custom prompt, open the *Name* drop-down menu, hover over the prompt you want to delete, and click the *X* that appears. You cannot delete the default prompts.
107+
It has the following tabs:
119108

109+
* **Conversations:** When you open AI Assistant from certain pages, such as **Timeline** or **Alerts**, it defaults to the relevant conversation type. For each conversation type, choose the default System Prompt, the default connector, and the default model (if applicable). The **Streaming** setting controls whether AI Assistant's responses appear word-by-word (streamed), or as a complete block of text. Streaming is currently only available for OpenAI models.
110+
* **Connectors:** Manage all LLM connectors.
111+
* **System Prompts:** Edit existing System Prompts or create new ones. To create a new System Prompt, type a unique name in the *Name* field, then press *enter*. Under *Prompt*, enter or update the System Prompt's text. Under *Contexts*, select where the System Prompt should appear.
112+
* **Quick Prompts:** Modify existing Quick Prompts or create new ones. To create a new Quick Prompt, type a unique name in the *Name* field, then press *enter*. Under *Prompt*, enter or update the Quick Prompt's text.
120113
* **Anonymization:** Select fields to include as plaintext, to obfuscate, and to not send when you provide events to AI Assistant as context. <<ai-assistant-anonymization, Learn more>>.
121-
122-
* **Knowledge base:** Provide additional context to AI Assistant so it can answer questions about {esql} and alerts in your environment. <<ai-assistant-knowledge-base, Learn more>>.
114+
* **Knowledge base:** Provide additional context to AI Assistant. <<ai-assistant-knowledge-base, Learn more>>.
123115

124116
[discrete]
125117
[[ai-assistant-anonymization]]
@@ -131,7 +123,9 @@ NOTE: To delete a custom prompt, open the *Name* drop-down menu, hover over the
131123
To modify Anonymization settings, you need the **Elastic AI Assistant: All** privilege, with **Customize sub-feature privileges** enabled.
132124
--
133125

134-
The **Anonymization** tab of the AI Assistant settings menu allows you to define default data anonymization behavior for events you send to AI Assistant. Fields with **Allowed** toggled on are included in events provided to AI Assistant. **Allowed** fields with **Anonymized** set to **Yes** are included, but with their values obfuscated.
126+
The **Anonymization** tab of the Security AI settings menu allows you to define default data anonymization behavior for events you send to AI Assistant. Fields with **Allowed** toggled on are included in events provided to AI Assistant. **Allowed** fields with **Anonymized** set to **Yes** are included, but with their values obfuscated.
127+
128+
NOTE: You can access anonymization settings directly from the **Attack Discovery** page by clicking the settings (image:images/icon-settings.png[Settings icon,17,17]) button next to the model selection dropdown menu.
135129

136130
[role="screenshot"]
137131
image::images/assistant-anonymization-menu.png[AI Assistant's settings menu, open to the Anonymization tab]
@@ -143,49 +137,17 @@ The *Show anonymized* toggle controls whether you see the obfuscated or plaintex
143137
When you include a particular event as context, such as an alert from the Alerts page, you can adjust anonymization behavior for the specific event. Be sure the anonymization behavior meets your specifications before sending a message with the event attached.
144138

145139
[discrete]
146-
[[ai-assistant-knowledge-base]]
140+
[[ai-assistant-page-knowledge-base]]
147141
=== Knowledge base
148-
beta::[]
149-
150-
The **Knowledge base** tab of the AI Assistant settings menu allows you to enable AI Assistant to answer questions about the Elastic Search Query Language ({esql}), and about alerts in your environment. To use knowledge base, you must <<ml-requirements, enable machine learning>>.
151-
152-
[discrete]
153-
[[rag-for-esql]]
154-
==== Knowledge base for {esql}
155142

156-
NOTE: {esql} is enabled by default in {kib}. It can be
157-
disabled using the `enableESQL` setting from the
158-
{kibana-ref}/advanced-options.html[Advanced Settings]. This will hide the {esql} user interface from various applications. However, users will be able to access existing {esql} artifacts like saved searches and visualizations.
159-
160-
IMPORTANT: {esql} queries generated by AI Assistant might require additional validation. To ensure they're correct, refer to the {ref}/esql-language.html[{esql} documentation].
161-
162-
When this feature is enabled, AI Assistant can help you write an {esql} query for a particular use case, or answer general questions about {esql} syntax and usage. To enable AI Assistant to answer questions about {esql}:
163-
164-
. Turn on the knowledge base by clicking **Setup**. If the **Setup** button doesn't appear, knowledge base is already enabled.
165-
. Click *Save*. The knowledge base is now active. A quick prompt for {esql} queries becomes available, which provides a good starting point for your {esql} conversations and questions.
166-
167-
NOTE: AI Assistant's knowledge base gets additional context from {ml-docs}/ml-nlp-elser.html#download-deploy-elser[Elastic Learned Sparse EncodeR (ELSER)].
168-
169-
[discrete]
170-
[[rag-for-alerts]]
171-
==== Knowledge base for alerts
172-
When this feature is enabled, AI Assistant will receive multiple alerts as context for each of your prompts. It will receive alerts from the last 24 hours that have a status of `open` or `acknowledged`, ordered first by risk score, then by recency. Building block alerts are excluded. This enables it to answer questions about multiple alerts in your environment, rather than just the individual alerts you choose to include as context.
173-
174-
To enable RAG for alerts:
175-
176-
. Turn on the knowledge base by clicking **Setup**. If the **Setup** button doesn't appear, knowledge base is already enabled.
177-
. Use the slider to select the number of alerts to send to AI Assistant. Click **Save**.
178-
+
179-
[role="screenshot"]
180-
image::images/knowledge-base-settings.png["AI Assistant's settings menu open to the Knowledge Base tab",75%]
181-
182-
NOTE: Including a large number of alerts may cause your request to exceed the maximum token length of your third-party generative AI provider. If this happens, try selecting a lower number of alerts to send.
143+
The **Knowledge base** tab of the **Security AI settings** page allows you to enable AI Assistant to remember specified information, and use it as context to improve response quality. To learn more, refer to <<ai-assistant-knowledge-base>>.
183144

184145
[discrete]
185146
[[ai-assistant-queries]]
147+
[[rag-for-esql]]
186148
### Get the most from your queries
187149

188-
Elastic AI Assistant helps you take full advantage of the {elastic-sec} platform to improve your security operations. Its ability to assist you depends on the specificity and detail of your questions. The more context and detail you provide, the more tailored and useful its responses will be.
150+
Elastic AI Assistant allows you to take full advantage of the {elastic-sec} platform to improve your security operations. It can help you write an {esql} query for a particular use case, or answer general questions about how to use the platform. Its ability to assist you depends on the specificity and detail of your questions. The more context and detail you provide, the more tailored and useful its responses will be.
189151

190152
To maximize its usefulness, consider using more detailed prompts or asking for additional information. For instance, after asking for an {esql} query example, you could ask a follow-up question like, “Could you give me some other examples?” You can also ask for clarification or further exposition, for example "Please provide comments explaining the query you just gave."
191153

docs/AI-for-security/attack-discovery.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ It may take from a few seconds up to several minutes to generate discoveries, de
5656

5757
IMPORTANT: Attack discovery is in technical preview and will only analyze opened and acknowleged alerts from the past 24 hours. By default it only analyzes up to 20 alerts within this timeframe, but you can expand this up to 100 by going to **AI Assistant → Settings (image:images/icon-settings.png[Settings icon,17,17]) → Knowledge Base** and updating the **Alerts** setting.
5858

59-
image::images/knowledge-base-settings.png["AI Assistant's settings menu open to the Knowledge Base tab",75%]
59+
image::images/knowledge-base-assistant-settings-kb-tab.png["AI Assistant's settings menu open to the Knowledge Base tab",75%]
6060

6161
IMPORTANT: Attack discovery uses the same data anonymization settings as <<security-assistant, Elastic AI Assistant>>. To configure which alert fields are sent to the LLM and which of those fields are obfuscated, use the Elastic AI Assistant settings. Consider the privacy policies of third-party LLMs before sending them sensitive data.
6262

250 KB
Loading
182 KB
Loading
-95.4 KB
Binary file not shown.
153 KB
Loading
189 KB
Loading
117 KB
Loading
90 KB
Loading

0 commit comments

Comments
 (0)