You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/AI-for-security/ai-for-security.asciidoc
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
[[ai-for-security]]
2
-
= AI for security
2
+
= AI for Security
3
3
4
4
:frontmatter-description: Learn to use AI capabilities in {elastic-sec}.
5
5
:frontmatter-tags-products: [security]
@@ -9,6 +9,8 @@
9
9
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.
Copy file name to clipboardExpand all lines: docs/AI-for-security/ai-security-assistant.asciidoc
+22-60Lines changed: 22 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ WARNING: The Elastic AI Assistant is designed to enhance your analysis with smar
24
24
25
25
* To set up AI Assistant, you need the **Actions and Connectors : All** {kibana-ref}/kibana-privileges.html[privilege].
26
26
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.
28
28
--
29
29
30
30
[discrete]
@@ -68,27 +68,25 @@ You can also chat with AI Assistant from several particular pages in {elastic-se
68
68
* <<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).
69
69
* <<timelines-ui, Timeline>>: Select the *Security Assistant* tab.
70
70
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".
72
72
73
73
[discrete]
74
74
[[interact-with-assistant]]
75
75
== Interact with AI Assistant
76
76
77
77
Use these features to adjust and act on your conversations with AI Assistant:
78
78
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}.
80
81
+
81
82
[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%]
83
84
+
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.
87
86
+
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%]
90
88
+
91
-
Quick prompt availability varies based on context — for 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 context—for 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*.
92
90
93
91
* In an active conversation, you can use the inline actions that appear on messages to incorporate AI Assistant's responses into your workflows:
94
92
@@ -104,22 +102,16 @@ TIP: AI Assistant can remember particular information you tell it to remember. F
104
102
[discrete]
105
103
[[configure-ai-assistant]]
106
104
== 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".
113
106
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:
119
108
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.
120
113
* **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>>.
123
115
124
116
[discrete]
125
117
[[ai-assistant-anonymization]]
@@ -131,7 +123,9 @@ NOTE: To delete a custom prompt, open the *Name* drop-down menu, hover over the
131
123
To modify Anonymization settings, you need the **Elastic AI Assistant: All** privilege, with **Customize sub-feature privileges** enabled.
132
124
--
133
125
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.
135
129
136
130
[role="screenshot"]
137
131
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
143
137
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.
144
138
145
139
[discrete]
146
-
[[ai-assistant-knowledge-base]]
140
+
[[ai-assistant-page-knowledge-base]]
147
141
=== 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}
155
142
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>>.
183
144
184
145
[discrete]
185
146
[[ai-assistant-queries]]
147
+
[[rag-for-esql]]
186
148
### Get the most from your queries
187
149
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.
189
151
190
152
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."
0 commit comments