No results for ""
EXPAND ALL
  • Home
  • API docs

Create AI configs and versions

Read time: 4 minutes
Last edited: Nov 08, 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:

  1. Click Create and choose AI config. The "Create AI config" dialog appears:
The "Create an AI config" dialog.
The "Create an AI config" dialog.
  1. 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 one or more prompts. The Name should reflect what this set of versions will do. You can update it later if you need to.
  1. (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.
AI config keys are important and permanent

After you save the AI config key, you cannot modify it. You can change an AI config's name, however, whenever you want.

  1. Click Create AI config.

The AI config's detail page appears. From here, 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 your AI prompts and model configurations.

To create an AI config version:

  1. Navigate to the detail page for the AI config.
  2. Select the Versions tab. A create panel appears:
The Versions tab of a newly-created AI config.
The Versions tab of a newly-created AI config.
  1. Enter a version Name. You'll use this to refer to the versions when you set up targeting.

  2. Click Select a model. LaunchDarkly provides a list of common models that you can choose from.

    LaunchDarkly does not send any data to these models

    LaunchDarkly 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.

  3. (Optional) Adjust the maximum tokens and temperature by clicking the values next to the respective icons.

  4. Use the dropdown to select the prompt type for the first message in this version. The default value is "System" but you can also choose "Assistant" or "User."

  5. Enter the text of the prompt.

  • (Optional) Use standard Markdown formatting to format the prompt. Click Preview to view the rendered version. Click Edit to return to editing the prompt.
  • (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 }} prompt 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, enter Describe the typical weather in {{ ldctx.city }} if you'd like to replace {{ ldctx.city }} with the city attribute from each context that encounters this AI config.
  • To learn more about how variables and context attributes are inserted into the prompt at runtime, read the SDK documentation for Customizing AI configs.
  1. (Optional) Click + Add message and repeat steps 6 and 7 to include another message to the AI config version.
  2. 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:

  1. Navigate to the Versions tab for the AI config.
  2. In the flag's 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 let you sort AI configs into groups

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.