Prompts with multiple variables
You can parameterize a lot of information in a prompt. For example, in our prompt that finds the best attractions, you can add multiple variables, such as the number of days that the person is staying, the things they like and dislike, and how many attractions they want to see.
In such a case, our prompt will become more complex, so we will need to create a new skprompt.txt
file. Since our prompt will be a new function and have multiple parameters, we will also need to create a new config.json
file.
These two files can be found in the plugins/prompt_engineering/attractions_multiple_variables
folder.
Skprompt.txt
To add more variables to a prompt, simply add them within double curly brackets with a dollar sign before their name. The following code shows how to add several variables (city
, n_days
, likes
, dislikes
, and n_attractions
) to a single prompt:
I am traveling to {{$city}} and staying {{$n_days}} days. I like {{$likes}}. I dislike...