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.
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
.
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.
Once imported, you can review and edit all variables within the collection:
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.
Once imported you can use the collection within your experiment, to learn more, see Running an Experiment.
Updated 3 months ago