Skip to content

Commit

Permalink
Adds knowledge base and Amazon Bedrock to AI Assistant docs
Browse files Browse the repository at this point in the history
  • Loading branch information
benironside committed Nov 1, 2023
1 parent 7690424 commit 72d23ca
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions docs/assistant/security-assistant.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ NOTE: Elastic can automatically anonymize event data that you provide to AI Assi
[[set-up-ai-assistant]]
== Set up AI Assistant

You must complete these steps before you can use AI Assistant:
You must create a generative AI connector before you can use AI Assistant.

. Create an API key with your AI provider to authenticate requests from AI Assistant. You'll use this in the next step. Refer to the provider's documentation for generating API keys:
+
* https://platform.openai.com/docs/api-reference[OpenAI]
* https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference[Azure OpenAI Service]
. Open AI Assistant *Cmd + ;* (or *Ctrl + ;* on Windows), and click **Connector** *->* *Add new Connector**
. Select either *Amazon Bedrock* or *OpenAI*.
. Enter the authentication details required for your chosen connector type, then click *Save*.

For more information about setting up a generative AI connector, refer to {ref}/openai-action-type.html[OpenAI connector] or {ref}/bedrock-action-type.html[Amazon Bedrock connector].

. Create an {kibana-ref}/openai-action-type.html[OpenAI connector] using the AI provider's API key and URL to authenticate communication between {elastic-sec} and the provider.
You can do this in {kib} from *{stack-manage-app}* -> *{connectors-ui}*, or from within AI Assistant.
NOTE: For Amazon Bedrock, only `Anthropic` models are supported: `Claude`, and `Claude Instant`. You can configure the connector to use any AWS region where these models are supported by editing the *URL* field under *Connector settings*.

[discrete]
[[start-chatting]]
Expand Down Expand Up @@ -139,5 +139,17 @@ The fields on this list are among those most likely to provide relevant context
image::images/add-alert-context.gif[A video that shows an alert being added as context to an AI Assistant chat message]
+
When you include a particular event as context, you can use a similar interface to adjust anonymization behavior. Be sure the anonymization behavior meets your specifications before sending a message with the event attached.

+
The *Show anonymized* toggle controls whether you see the obfuscated or plaintext versions of the fields you sent to AI Assistant. It doesn't control what gets obfuscated — that's determined by the anonymization settings. It also doesn't affect how event fields appear _before_ being sent to AI Assistant. Instead, it controls how fields that were already sent and obfuscated appear to you.

* **Knowledge base:** Use retrieval augmented generation to provide specialized knowledge of the Elastic Search Query Language ({esql}) to AI Assistant. For example, with knowledge base active, you can ask AI Assistant to help you write an {esql} query for a particular use-case, or ask it to answer general questions about {esql} syntax and usage. Without knowledge base enabled, AI Assistant will not be able to answer questions about {esql}.

beta::[]

To enable Knowledge base:
- Enable the Elastic Learned Sparse EncodeR (ELSER). This model provides additional context to the third-party LLM. To learn more, refer to https://www.elastic.co/guide/en/machine-learning/current/ml-nlp-elser.html#download-deploy-elser[Configure ELSER]
- Initialize the knowledge base by clicking *Initialize*.
- Initialize the {ESQL} knowledge base documents by clicking *Initialize*.
- Move the *Knowledge Base* slider to the `on` position.
- Click *Save*. Knowledge base is now active.

0 comments on commit 72d23ca

Please sign in to comment.