Create AI configs and versions
Read time: 4 minutes
Last edited: Nov 27, 2024
Overview
This topic explains how to create and update AI configs and versions.
Create an AI config
An AI config is a resource that you create in LaunchDarkly. You can use AI configs to customize, test, and roll out new large language models (LLMs) and prompts within your generative AI applications.
To create an AI config:
- Click Create and choose AI config. The "Create AI config" dialog appears:
- Give your AI config a human-readable Name.
- The AI config will contain a set of related versions, each of which has a model, and a prompt with one or more messages. The Name should reflect what this set of versions will do. You can update it later if you need to.
- (Optional) Click Edit key and update the AI config Key. You'll use this key to reference the AI config in your code. A suggested key auto-populates from the name you enter, but you can customize it if you wish.
After you create the AI config, you cannot modify its key. You can change an AI config's name, however, whenever you want.
- Click Create.
Now that you have an AI config, you can start creating versions. You can also update additional details.
Create an AI config version
Within each AI config, you define one or more versions, each of which includes a model configuration, and a prompt with one or more messages.
To create an AI config version:
- Navigate to the detail page for the AI config.
- Select the Versions tab. A create panel appears:
-
Enter a version Name. You'll use this to refer to the versions when you set up targeting rules.
-
Click Select a model and choose the model to use. LaunchDarkly provides a list of common models.
LaunchDarkly does not send any data to these modelsLaunchDarkly does not send of the information that you provide when creating an AI config and its versions to any models. We do not use any of the information to fine tune any models.
Your selection here is only used to suggest values for tokens and temperature, and to help you track which prompts are paired with which models.
This list is updated regularly. To request a new model, click the Give feedback option and let us know what models you'd like to have included.
-
(Optional) Adjust the maximum tokens and temperature by clicking the values next to the respective icons.
-
Use the dropdown to select the prompt role for the first message in this version. The default value is "system" but you can also choose "assistant" or "user."
-
Enter the text of the message.
- (Optional) Use standard Markdown formatting to format the message. Click Preview to view the rendered version. Click Edit to return to editing the message.
- (Optional) Use two curly braces to indicate variables that you would like to set values for at runtime from your application. For example, enter
This is an {{ example }} message
if you'd like to replace{{ example }}
with some other value in your application code when an end user encounters this AI config. - (Optional) Use two curly braces, the
ldctx
prefix, and dot (.
) notation to indicate context attributes whose values you would like to use at runtime. For example, enterDescribe the typical weather in {{ ldctx.city }}
if you'd like to replace{{ ldctx.city }}
with thecity
attribute from each context that encounters this AI config. - To learn more about how variables and context attributes are inserted into messages at runtime, read the SDK documentation for Customizing AI configs.
- (Optional) Click + Add another message and repeat steps 6 and 7 to include another message to the AI config version.
- Click Save changes to save the AI config version.
After you create an AI config and its versions, you can set up targeting rules and incorporate the AI config in your SDK.
Update AI config details
When you create an AI config, only the name and key are initially required. You can also add or update other details, including the AI config's description and tags.
To update an AI config's details:
- Navigate to the details page for the AI config.
- In the right sidebar, click the pencil icon next to the details you'd like to change.
- You can update the Name and Description by editing the text of each.
- You can update the Tags by adding or removing tags. When you add a tag to the AI config, you can use an existing tag or create a new one.
Tags are useful for managing permissions using custom roles. For example, you can use a specific tag to determine who can update this AI config. To learn more, read Custom roles.