Random Keyword Selection in Prompts

Hi,

I'd like to propose a simple syntax addition to support random keyword selection directly within the in-site generator. This would be especially useful for creative exploration and prompt variability.

Feature Overview

The idea is to allow users to define a list of possible keywords or phrases, from which one is randomly selected each time the prompt is submitted. The list would be written directly in the prompt, using a clear and intuitive syntax.

For example:

"woman with {black|blonde|ginger} hair, wearing {dress|shirt and pants}"

Why use { | } for this syntax?

  • Square brackets [ ] are already used for keyword weighting.

  • Commas , are commonly used to separate prompt elements.

  • Using { | } makes it easy to support multi-word options that may contain commas or spaces: "woman {dancing, hands up|standing, hand on hip}"

Optional: Support for empty entries

It would also be useful to include a way to specify optional elements with a chance of being omitted.

For example: "woman {with sunglasses|-} standing at the beach"

This can generate either:

  • "woman with sunglasses standing at the beach"

  • "woman standing at the beach"

The dash (-) would act as a clear and minimal indicator of an empty or "null" choice.

Bonus: Controlling item probability

By repeating an item (or the empty -) in the list, users could control the frequency of appearance. For instance:

"woman with {sunglasses|-|-}"

Here, there's a 1-in-3 chance of sunglasses being included.

Thanks for considering this! I believe it could greatly enhance the creative potential of the prompt system with minimal overhead.

Please authenticate to join the conversation.

Upvoters
Status

Awaiting Dev Review

Board

πŸ’‘ Feature Request

Date

11 months ago

Author

MatureOnly

Subscribe to post

Get notified by email when there are changes.