Connections in the AI Toolkit
Use the Connections options in the AI Toolkit to configure a connection with a large-language model (LLM) or container:
-
The LLM connection type lets you select your preferred LLM provider.
-
The Container connection type lets you choose between Docker and Kubernetes container types, which is used primarily for Splunk App for Data Science and Deep Learning (DSDL) cases.
Getting started
From the AI Toolkit app, navigate to the Connections tab and choose Connections from the drop-down menu.
From +Connection in the top right, select the Connection type of LLM or Container.
Select your preferred LLM provider or Container provider from the list view. Then complete the required fields for that provider on the resulting modal windows.
Adding an LLM connection
ai command is processed by an external LLM service provider.
LLM connection permissions
To select LLM as the Connection type, you must have the following capabilities from the mltk admin role:
-
apply_ai_commander_command -
edit_ai_commander_config -
list_ai_commander_config
To select Splunk hosted LLM from the LLM providers menu, you must have the following capability:
-
list_tokens_scs
After the connection has been configured, you can use the LLM with the ai command. For more information see About the ai command.
ai command does not inspect the input to the LLM. Use discretion to determine if the data you send to the LLM is suitable and appropriate.
Supported LLM providers
You can use the ai command with the following LLM providers:
list_tokens_scs capability to see this option.
- Splunk hosted LLM
-
Custom LLM connection
- OpenAI
-
Anthropic
- AzureOpenAI
- Groq
- Gemini
- Bedrock
- Ollama
You can use the provider= or model= parameters in your ai command search to switch between these providers.
Bedrock configuration steps
When choosing Bedrock as the LLM provider some additional steps are required.
You must set up an AWS IAM Role and IAM User to integrate with Amazon Bedrock, and configure these credentials in the Connection Management page.
Compete the following steps:
-
Create an IAM Role with AmazonBedrockFullAccess Policy:
-
Sign into your AWS account and navigate to the IAM Console - Roles page. See https://console.aws.amazon.com/iam/home#/roles
-
Select Create Role.
-
Select Trusted Entity Type as AWS account.
-
Choose Another AWS account or your own account, as applicable.
-
In the Permissions policies section, search and select
AmazonBedrockFullAccess. -
Complete the role creation steps and note down the Role ARN as shown in the following example:
arn:aws:iam::<account_id>:role/mltk-bedrock-fullaccess-roleThe following image shows an example view of a completed create roles page:
-
-
Create IAM User with Assume Role Permissions:
-
In your AWS account navigate to the IAM Console - Users page. See https://console.aws.amazon.com/iam/home#/users
-
Select Add users.
-
Enable Access key – Programmatic access.
-
In the Permissions step, choose Attach policies directly and select no policies.
-
Complete the user creation. Make note of the Access Key ID and Secret Access Key.
-
Edit the user to attach the following inline policy to allow assume-role access:
JSON{ "Version": "2012-10-17", "Statement": [ { "Sid": "Statement1", "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::<account_id>:role/mltk-bedrock-fullaccess-role" } ] } -
Replace
<account_id>with your actual AWS account ID. The following image shows an example view of the completed permissions page: -
Add the newly created user to the Trust relationships and the role created in step 1.
-
Adding a Container connection
When you select Container you can create a Kubernetes or Docker external runtime connection, or enable HPA.
Container connection permissions
To select Container as the Connection type, you must have the following capability from the mltk admin role:
-
list_ai_commander_config
dsdl_admin role:
-
list_container_connections -
setup_container_configuration -
enable_hpa
To run the fit and apply commands for a specific AI Toolkit container you must have the following capabilities from the dsdl_admin role:
-
fit_mltkcontainer -
apply_mltkcontainer