The faster AI can help the user get to a good result, the faster the user will reach their "ah ha" moment. For more complicated prompts though, this could take a while.
In these moments, the next best option is to let the user show the AI what good looks like.
Using variants lets the AI proactively seek out more information from the user, which helps to give the user a sense of progress while training the AI to improve its processing of the user's prompt.
Variations rely closely on other patterns:
- Like the Sample Plan pattern, it lets the AI signal its intent before spending a ton of time and processing pattern on a poor result. Variants tend to be used in the flow of conversation, whereas a Sample Plan tends be used when the AI is about to complete a complicated task (like, generate 50 examples of something) and it's useful to get the format right up front.
- When combined with the Regenerate pattern, users can process multiple iterations against a single prompt and then compare the results. Some generators, namely image generators, even support branching off of different variants.
- Variations make the controls pattern more powerful, as it gives a stronger signal of the AI's understanding of the prompt, which could lead the user to stop the generation ahead of time if things feel off
One area that variations are not common, surprisingly, is within inline prompts. For example, you can ask Github Copilot to generate code for you, and it might generate multiple versions to compare. However, once you choose one, the other disappears and you can't go back and compare how either would perform.
Generally speaking, variations give more control to users. They aren't needed at all times, but they can be a powerful pattern to build trust that the AI understands the user, or give the user the opportunity to adjust their input. Overall, since AI doesn't have all of the answers, they keep the user in the driver's seat, while reducing the amount of processor hours that are burned on bad results. Overall, a win-win for all parties.