Variable Collections

Variables are ways to store data collections to be used during Experiments.

Variables, also known as {{variables}} within prompts, are designed to keep your prompt dynamic.

Example prompt: Summarize the {{transcript}}.

Storing your variable collections can be helpful when using the same variable multiple times. Common use cases are: regression testing and back testing.

Variables can also be used to validate configuration changes on an existing model. Re-testing a model with previously used variables can ensure that behaviors stay consistent with expectations.

To promote reusability, variabless can be created at the workspace level and imported during any Experiment.

Creating a new Variable Collection

To create a new Variable collection, head to your panel and select the Data > Variable Collection tab.

Start by selecting Create Collection at the top right of the screen. After entering a name and a project, you will be redirected to the following screen.

Here you will have an overview of all inputs present in the collection.

Here you will have an overview of all variables present in the collection.

Preparing a .csv file for import

To create an Variable Collection, you need a .csv file containing your Variables.

Here we will be working with the following sample file, containing two columns, call_id and transcript.

An example .csv file containing two columns `call_id` and `transcript` . Each row representing an input for the collection.

An example .csv file containing two columns call_id and transcript . Each row representing a variable for the collection.

🚧

The delimiter for your .csv file must be ,.

Do not use a trailing delimiter

Importing a .csv file

To add this file to your collection, select Import, then drag-and-drop your .csv file into the modal.

Once your file is uploaded, you will be able to double check the columns loaded in your variables.

The column to input mapping. Once ready select **Import**.

The column to variable mapping. Once ready select Import.


Once imported, you can review and edit all variables within the collection:

Select any row to edit the content and press **Save** to validate.

Select any row to edit the content and press Save to validate.

Using a Variable Collection in an Experiment

Within an Experiment, head to the Variable Collection tab and select Import then Import from variable collection.

You'll then see the following modal where you can select a previously created Variable Collection.

You can see the previously created collection and the number of rows it has. Select **Import inputs collection** to finish the process.

You can see the previously created collection and the number of rows it has. Select Import to finish the process.

📘

Once imported you can use the collection within your experiment, to learn more, see Running an Experiment.