From 0c945512927ac1ee2b22feee807b8c1c12dea9e7 Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein Date: Fri, 3 May 2024 09:03:31 -0700 Subject: [PATCH 01/15] Adds step by step instructions for connecting to Azure OpenAI --- docs/assistant/azure-openai-setup.asciidoc | 126 +++++++++++++++++++++ docs/assistant/security-assistant.asciidoc | 1 + 2 files changed, 127 insertions(+) create mode 100644 docs/assistant/azure-openai-setup.asciidoc diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc new file mode 100644 index 0000000000..cc6f17f131 --- /dev/null +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -0,0 +1,126 @@ +[discrete] +== Connect to Azure OpenAI + +[discrete] +=== Configure a deployment + +First, set up an Azure OpenAI deployment: + +. Log in to the Azure console and search for Azure OpenAI. +. In **Azure AI services**, select **Create**. +. For the **Project Details**, select your subscription and resource group. If you don't have a resource group, select **Create new** to make one. +. For **Instance Details**, select the desired region and specify a name, such as `example-deployment-openai`. +. Select the **Standard** pricing tier, then click **Next**. +. Configure your network settings, click **Next**, optionally add tags, then click **Next**. +. Review your deployment settings, then click **Create**. When complete, select **Go to resources**. + +The following video demonstrates these steps. + +======= +++++ + + +
+++++ +======= + +[discrete] +=== Configure keys + +Next, create access keys for the deployment: + +. From within your Azure OpenAI deployment, select **Click here to manage keys**. +. Store these keys in a secure location. You'll need them later. + +The following video demonstrates these steps. + +======= +++++ + + +
+++++ +======= + +[discrete] +=== Configure a model + +Now, set up the Azure OpenAI model: + +. From within your Azure OpenAI deployment, select **Model deployments**, then click **Manage deployments**. +. On the **Deployments** page, select **Create new deployment**. +. Under **Select a model**, choose `gpt-4` or `gpt-4-32k`. +.. If you select `gpt-4`, set the **Model version** to `0125-Preview`. +.. If you select `gpt-4-32k`, set the **Model version** to `default`. ++ +IMPORTANT: The models available to you will depend on https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability[region availability]. For best results, use `GPT 4 Turbo version 0125-preview` or `GPT 4-32k` with the maximum Tokens-Per-Minute (TPM) capacity. In most regions, the GPT 4 Turbo model offers the largest supported context window. ++ +. Under **Deployment type**, select **Standard**. +. Name your deployment. +. Slide the **Tokens per Minute Rate Limit** to the maximum. This example supports 80,000 TPM, but other regions might support higher limits. Click **Create**. + +The following video demonstrates these steps. + +======= +++++ + + +
+++++ +======= + +[discrete] +== Configure Elastic AI Assistant + +Finally, configure the connector in {kib}: + +. Log in to {kib}. +. Go to **Stack Management → Connectors → Create connector → OpenAI**. +. Name your connector. +. (Optional) Add one of the following strings if you want to use a model other than the default: +.. For Turbo: `Azure OpenAI (GPT-4 Turbo v. 0125)` +.. For 32k: `Azure OpenAI (GPT-4-32k)` +. For **Select an OpenAI provider**, choose **Azure OpenAI**. +. The easiest way to update the **URL** field is to navigate to your deployment in Azure AI Studio and select **Open in Playground**. +.. Select **View code** and change the **Sample code** to `Curl`. Without including the quotes, highlight and copy the URL, then paste it into the **URL** field in {kib}. +.. (Optional) Alternatively, refer to the https://learn.microsoft.com/en-us/azure/ai-services/openai/reference[API documentation] to learn how to create the URL manually. +. Under **API key**, enter one of your API keys. +. Click **Save and test**, then click **Run**. + +Your LLM connector is now configured. The following video demonstrates these steps. + +======= +++++ + + +
+++++ +======= diff --git a/docs/assistant/security-assistant.asciidoc b/docs/assistant/security-assistant.asciidoc index 3b5c562f6f..9210fd84c7 100644 --- a/docs/assistant/security-assistant.asciidoc +++ b/docs/assistant/security-assistant.asciidoc @@ -223,3 +223,4 @@ In addition to practical advice, AI Assistant can offer conceptual advice, tips, include::ai-alert-triage.asciidoc[leveloffset=+1] +include::azure-openai-setup.asciidoc[leveloffset=+1] From c065c6146807472de073098286ed394115a72867 Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein Date: Fri, 3 May 2024 10:20:28 -0700 Subject: [PATCH 02/15] adjust headings --- docs/assistant/azure-openai-setup.asciidoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index cc6f17f131..d48e5a7c73 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -1,5 +1,8 @@ [discrete] -== Connect to Azure OpenAI += Connect to Azure OpenAI + +[discrete] +== Configure Azure [discrete] === Configure a deployment From adaa730df963525798d73fe6c9d0842fdce4231e Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein Date: Fri, 3 May 2024 10:54:05 -0700 Subject: [PATCH 03/15] fixes slug --- docs/assistant/azure-openai-setup.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index d48e5a7c73..b3f7d06d22 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -1,4 +1,4 @@ -[discrete] +[[assistant-connect-to-azure-openai]] = Connect to Azure OpenAI [discrete] From 2618a5b9249d80b59fecc824f4d98396162e9990 Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein Date: Fri, 3 May 2024 12:03:00 -0700 Subject: [PATCH 04/15] adds intro paragraph --- docs/assistant/azure-openai-setup.asciidoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index b3f7d06d22..aca31319ed 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -1,6 +1,8 @@ [[assistant-connect-to-azure-openai]] = Connect to Azure OpenAI +This page provides step-by-step instructions for setting up an Azure OpenAI connector for the first time. This connector type enables you to leverage large language models (LLMs) within {kib}. You'll first need to configure Azure, then configure the connector in {kib}. + [discrete] == Configure Azure From 5ad7bafbd2fc59bae0d347710c0c9983a80d2d4f Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> Date: Fri, 3 May 2024 12:48:12 -0700 Subject: [PATCH 05/15] Update docs/assistant/azure-openai-setup.asciidoc Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com> --- docs/assistant/azure-openai-setup.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index aca31319ed..f7e0a17170 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -17,7 +17,7 @@ First, set up an Azure OpenAI deployment: . For **Instance Details**, select the desired region and specify a name, such as `example-deployment-openai`. . Select the **Standard** pricing tier, then click **Next**. . Configure your network settings, click **Next**, optionally add tags, then click **Next**. -. Review your deployment settings, then click **Create**. When complete, select **Go to resources**. +. Review your deployment settings, then click **Create**. When complete, select **Go to resource**. The following video demonstrates these steps. From 4b35f33aca99f21a786bfd8624be26d40999a70a Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> Date: Fri, 3 May 2024 12:48:20 -0700 Subject: [PATCH 06/15] Update docs/assistant/azure-openai-setup.asciidoc Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com> --- docs/assistant/azure-openai-setup.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index f7e0a17170..9dc82ab290 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -42,7 +42,7 @@ The following video demonstrates these steps. Next, create access keys for the deployment: . From within your Azure OpenAI deployment, select **Click here to manage keys**. -. Store these keys in a secure location. You'll need them later. +. Store your keys in a secure location. You'll need them later. The following video demonstrates these steps. From 5a683ed97e33edbe2eeb8f3759873b42578118d5 Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> Date: Fri, 3 May 2024 12:48:34 -0700 Subject: [PATCH 07/15] Update docs/assistant/azure-openai-setup.asciidoc Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com> --- docs/assistant/azure-openai-setup.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index 9dc82ab290..d17f7f270e 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -69,7 +69,7 @@ Now, set up the Azure OpenAI model: . From within your Azure OpenAI deployment, select **Model deployments**, then click **Manage deployments**. . On the **Deployments** page, select **Create new deployment**. . Under **Select a model**, choose `gpt-4` or `gpt-4-32k`. -.. If you select `gpt-4`, set the **Model version** to `0125-Preview`. +** If you select `gpt-4`, set the **Model version** to `0125-Preview`. .. If you select `gpt-4-32k`, set the **Model version** to `default`. + IMPORTANT: The models available to you will depend on https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability[region availability]. For best results, use `GPT 4 Turbo version 0125-preview` or `GPT 4-32k` with the maximum Tokens-Per-Minute (TPM) capacity. In most regions, the GPT 4 Turbo model offers the largest supported context window. From 89a207eaa8be18b14959cd7019b8575ae048bda2 Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> Date: Fri, 3 May 2024 12:48:46 -0700 Subject: [PATCH 08/15] Update docs/assistant/azure-openai-setup.asciidoc Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com> --- docs/assistant/azure-openai-setup.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index d17f7f270e..bfa4a68018 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -70,7 +70,7 @@ Now, set up the Azure OpenAI model: . On the **Deployments** page, select **Create new deployment**. . Under **Select a model**, choose `gpt-4` or `gpt-4-32k`. ** If you select `gpt-4`, set the **Model version** to `0125-Preview`. -.. If you select `gpt-4-32k`, set the **Model version** to `default`. +** If you select `gpt-4-32k`, set the **Model version** to `default`. + IMPORTANT: The models available to you will depend on https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#model-summary-table-and-region-availability[region availability]. For best results, use `GPT 4 Turbo version 0125-preview` or `GPT 4-32k` with the maximum Tokens-Per-Minute (TPM) capacity. In most regions, the GPT 4 Turbo model offers the largest supported context window. + From 20755b642df6ca826a4d6a9426ce2f8d1af88c72 Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> Date: Fri, 3 May 2024 12:48:51 -0700 Subject: [PATCH 09/15] Update docs/assistant/azure-openai-setup.asciidoc Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com> --- docs/assistant/azure-openai-setup.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index bfa4a68018..c2ffa7dadd 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -104,7 +104,7 @@ Finally, configure the connector in {kib}: . Go to **Stack Management → Connectors → Create connector → OpenAI**. . Name your connector. . (Optional) Add one of the following strings if you want to use a model other than the default: -.. For Turbo: `Azure OpenAI (GPT-4 Turbo v. 0125)` +** For Turbo: `Azure OpenAI (GPT-4 Turbo v. 0125)` .. For 32k: `Azure OpenAI (GPT-4-32k)` . For **Select an OpenAI provider**, choose **Azure OpenAI**. . The easiest way to update the **URL** field is to navigate to your deployment in Azure AI Studio and select **Open in Playground**. From 31f84ef6f81a54497c213dbaff9637a284f3249d Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> Date: Fri, 3 May 2024 12:48:57 -0700 Subject: [PATCH 10/15] Update docs/assistant/azure-openai-setup.asciidoc Co-authored-by: Nastasha Solomon <79124755+nastasha-solomon@users.noreply.github.com> --- docs/assistant/azure-openai-setup.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index c2ffa7dadd..225394671a 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -105,7 +105,7 @@ Finally, configure the connector in {kib}: . Name your connector. . (Optional) Add one of the following strings if you want to use a model other than the default: ** For Turbo: `Azure OpenAI (GPT-4 Turbo v. 0125)` -.. For 32k: `Azure OpenAI (GPT-4-32k)` +** For 32k: `Azure OpenAI (GPT-4-32k)` . For **Select an OpenAI provider**, choose **Azure OpenAI**. . The easiest way to update the **URL** field is to navigate to your deployment in Azure AI Studio and select **Open in Playground**. .. Select **View code** and change the **Sample code** to `Curl`. Without including the quotes, highlight and copy the URL, then paste it into the **URL** field in {kib}. From ebd0491fbf1525f929eb50aa3bc95365b91c4b67 Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein Date: Sat, 4 May 2024 13:45:34 -0700 Subject: [PATCH 11/15] Incorporates Charles' review. Thanks Charles! --- docs/assistant/azure-openai-setup.asciidoc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index 225394671a..e3bd206f6b 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -42,7 +42,7 @@ The following video demonstrates these steps. Next, create access keys for the deployment: . From within your Azure OpenAI deployment, select **Click here to manage keys**. -. Store your keys in a secure location. You'll need them later. +. Store your keys in a secure location. The following video demonstrates these steps. @@ -102,10 +102,7 @@ Finally, configure the connector in {kib}: . Log in to {kib}. . Go to **Stack Management → Connectors → Create connector → OpenAI**. -. Name your connector. -. (Optional) Add one of the following strings if you want to use a model other than the default: -** For Turbo: `Azure OpenAI (GPT-4 Turbo v. 0125)` -** For 32k: `Azure OpenAI (GPT-4-32k)` +. Give your connector a name to help you keep track of various models, such as `Azure OpenAI (GPT-4 Turbo v. 0125)` . For **Select an OpenAI provider**, choose **Azure OpenAI**. . The easiest way to update the **URL** field is to navigate to your deployment in Azure AI Studio and select **Open in Playground**. .. Select **View code** and change the **Sample code** to `Curl`. Without including the quotes, highlight and copy the URL, then paste it into the **URL** field in {kib}. From 80380f83b14d42ac3bf78c9da52e59a7045de7bf Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein Date: Sun, 5 May 2024 07:29:34 -0700 Subject: [PATCH 12/15] line edit --- docs/assistant/azure-openai-setup.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index e3bd206f6b..e1c9edde91 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -102,7 +102,7 @@ Finally, configure the connector in {kib}: . Log in to {kib}. . Go to **Stack Management → Connectors → Create connector → OpenAI**. -. Give your connector a name to help you keep track of various models, such as `Azure OpenAI (GPT-4 Turbo v. 0125)` +. Give your connector a name to help you keep track of different models, such as `Azure OpenAI (GPT-4 Turbo v. 0125)`. . For **Select an OpenAI provider**, choose **Azure OpenAI**. . The easiest way to update the **URL** field is to navigate to your deployment in Azure AI Studio and select **Open in Playground**. .. Select **View code** and change the **Sample code** to `Curl`. Without including the quotes, highlight and copy the URL, then paste it into the **URL** field in {kib}. From 4c6af31e6f8b5291c8e8450bfb874f61b322c69c Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> Date: Mon, 6 May 2024 06:18:06 -0700 Subject: [PATCH 13/15] Update docs/assistant/azure-openai-setup.asciidoc Co-authored-by: Janeen Mikell Roberts <57149392+jmikell821@users.noreply.github.com> --- docs/assistant/azure-openai-setup.asciidoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index e1c9edde91..4afcbc8919 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -76,7 +76,8 @@ IMPORTANT: The models available to you will depend on https://learn.microsoft.co + . Under **Deployment type**, select **Standard**. . Name your deployment. -. Slide the **Tokens per Minute Rate Limit** to the maximum. This example supports 80,000 TPM, but other regions might support higher limits. Click **Create**. +. Slide the **Tokens per Minute Rate Limit** to the maximum. The following example supports 80,000 TPM, but other regions might support higher limits. +. Click **Create**. The following video demonstrates these steps. From 894aeac3d058fb74d471f4219bdf4ecc82984e04 Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> Date: Mon, 6 May 2024 06:18:23 -0700 Subject: [PATCH 14/15] Update docs/assistant/azure-openai-setup.asciidoc Co-authored-by: Janeen Mikell Roberts <57149392+jmikell821@users.noreply.github.com> --- docs/assistant/azure-openai-setup.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index 4afcbc8919..cac6adfef6 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -109,7 +109,7 @@ Finally, configure the connector in {kib}: .. Select **View code** and change the **Sample code** to `Curl`. Without including the quotes, highlight and copy the URL, then paste it into the **URL** field in {kib}. .. (Optional) Alternatively, refer to the https://learn.microsoft.com/en-us/azure/ai-services/openai/reference[API documentation] to learn how to create the URL manually. . Under **API key**, enter one of your API keys. -. Click **Save and test**, then click **Run**. +. Click **Save & test**, then click **Run**. Your LLM connector is now configured. The following video demonstrates these steps. From 5ba5165352cb9856c28f1b7234644cf5517d07dc Mon Sep 17 00:00:00 2001 From: Benjamin Ironside Goldstein <91905639+benironside@users.noreply.github.com> Date: Mon, 6 May 2024 06:21:44 -0700 Subject: [PATCH 15/15] Update docs/assistant/azure-openai-setup.asciidoc Co-authored-by: Janeen Mikell Roberts <57149392+jmikell821@users.noreply.github.com> --- docs/assistant/azure-openai-setup.asciidoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/assistant/azure-openai-setup.asciidoc b/docs/assistant/azure-openai-setup.asciidoc index cac6adfef6..873428a645 100644 --- a/docs/assistant/azure-openai-setup.asciidoc +++ b/docs/assistant/azure-openai-setup.asciidoc @@ -105,8 +105,10 @@ Finally, configure the connector in {kib}: . Go to **Stack Management → Connectors → Create connector → OpenAI**. . Give your connector a name to help you keep track of different models, such as `Azure OpenAI (GPT-4 Turbo v. 0125)`. . For **Select an OpenAI provider**, choose **Azure OpenAI**. -. The easiest way to update the **URL** field is to navigate to your deployment in Azure AI Studio and select **Open in Playground**. -.. Select **View code** and change the **Sample code** to `Curl`. Without including the quotes, highlight and copy the URL, then paste it into the **URL** field in {kib}. +. Update the **URL** field. We recommend doing the following: +.. Navigate to your deployment in Azure AI Studio and select **Open in Playground**. The **Chat playground** screen displays. +.. Select **View code**, then from the drop-down, change the **Sample code** to `Curl`. +.. Highlight and copy the URL without the quotes, then paste it into the **URL** field in {kib}. .. (Optional) Alternatively, refer to the https://learn.microsoft.com/en-us/azure/ai-services/openai/reference[API documentation] to learn how to create the URL manually. . Under **API key**, enter one of your API keys. . Click **Save & test**, then click **Run**.