Create a drop-down variable

I made a mistake in writing a variable and noticed that it became a drop-down. In further research, it seems this is intended. However, the setup is tricky.

I hope the following example aids your prompt creation.

As I’m dealing with social media messaging of varying standardized lengths, I made the character limit a variable.

[VARIABLE3:Character Limit:(240 words) 1440:(40 words) 240|(80 words) 480|(240 words) 1440|(480 words) 2880]

And use VARIABLE3 like so.

Limit the social media summary to a maximum length of [VARIABLE3] characters.

The drop-down variable formatting is…

[VARIABLE3:Variable Label:Default Option:Option A|Option B|Option C]

The default option between the label and the first option is what will be preselected from your choices. (Thank you @RealityMoez for the default value explanation below)

I have a word count with my character limit option because humans know words. Yet GPT is more precise with characters because, depending upon situations, the average word length is 5-6.5 characters, excluding grammar bits.

The first colon after the Variable Hint indicates the default value you should have for the dropdown list, which in your case is ‘.’, so you can replace it with default value you want.

1 Like

@RealityMoez, I much appreciate the default value details. I should’ve dug in more to learn such.

For the variable format, isn’t it [VARIABLE3:Variable Label:Variable Hint] or [VARIABLE3:Variable Label:(Default Option):(Option A)|(Option B)|(Option C)]?

I imply that it’s either a hint or a drop-down choice for the variable input.

1 Like

For the first format like you have written, it is the correct format for a normal VARIABLE placeholder.
(as I remember)

and for the second format, it is the correct format for a dropdown list VARIABLES placeholder.
(as dropdown lists don't need Variable Hint, just a Variable Label)

1 Like

Yup. The variable hint lets you prompt users on what sort of value or input your prompt is expecting, to give them some cues and clues on what they can enter. That’s essential when it is completely freeform, and you as the prompt creator cannot be sure exactly what value they’d give there.

When working with dropdowns, you are providing a ‘multiple choice’ question, rather than an open question, and the user can only give an answer in one of your pre-set options. Therefore you don’t need to give them a hint, your options already did that.

Where do we find this stuff officially documented?

Made this topic for you, to find all in one place … I appreciate who asks for a documentation.