Different Variations in Prompt - How to manage multiple prompts

I am trying to generate answers for a query in different variations.
For example - There is a query - “Write a content on Nature”. Then the user can select the variations. The length, Style, Level etc.
What we have is different prompts for different variations. And every time a query is asked the system find the matching prompt by analysing the query and selected variations and that prompt is triggered. But this multiple prompt this is leading to more confusion and complexities. As with time the variations are increasing.
Is there any other approach or existing application to solve this issue.
Can we use some system, programming language in prompt or If, else condition.
Or is there any available applications to solve this scenario in easier way.

2 Likes

Hey there! So, you’re dealing with a bunch of prompts and variations for your content generation. Have you considered using a modular approach to simplify things? It’s worked wonders for our clients.

We can also help you set up some conditional logic to make the process even smoother. And if you’re ready to take it to the next level, our AI-powered tools can help you generate content like a pro.

What do you say? Want to chat more about how we can help?

Hi @Y1S1 !

It sounds like you may be looking for DSPy. This is a new paradigm where you try to avoid over-verbalizing the prompts and essentially “programming the prompts”. So I would recommend you have a look there, it’s open source and they have some great tutorials to get you started.

3 Likes

That sounds like a pretty straight-forward application of fine-tuning your own model via the API.

Hi, I’m a little unclear on your use case. Why wouldn’t someone just use the web version of ChatGPT and include their own modifications in the prompt, like “with formal style”? If you’re creating an app, I would recommend that you make the a radio button for the parameters you offer support for. “Formality (select one): informal; professional; erudite”. Then based on whatever they select, you can just pull the right prompt for your API call.

If you like the idea of an app, but don’t have the tech familiarity yourself, you might play with Claude and ask it for an “artifact” (a working code demo) that does what you want.

Hi @Y1S1

Could you share your current prompt or instruction so we can understand better?

I can share what my a GPT uses as template and how it responds:

I use following template in it:

You are a Content Generation Specialist. Your task is to create content about the topic '{Topic}' in the {Style} style. The content should be {Length} in length, with a {Complexity} level of complexity. Use a {Tone} tone and write from a {Perspective} perspective. The content is intended for a {Audience} audience and should serve the purpose of being {Purpose}.

Please format the content using {Formatting} and write it as a {Content Type}. The content should be in {Language}, with an {Emotion} emotion. Maintain a {Pacing} pacing, and provide a {Depth of Analysis} analysis. Ensure that the content reflects a {Cultural Context} cultural context, with a {Creative Direction} approach.

The content should have a {Interactivity} level of interactivity and be structured in a {Structure} manner. Use a {Voice} voice, with {Imagery} imagery. Include {Rhetorical Devices} rhetorical devices and base your arguments on {Use of Data} data. The level of detail should be {Level of Detail}, and the point of view should be {Point of View}.

Ensure the content emphasizes a {Contextual Emphasis} context and maintains a {Engagement Level} level of engagement. The content should be {Visual Elements}, formatted according to {Formatting Style} guidelines. Aim to evoke {Emotion Target} in the reader, with a {Narrative Structure} narrative structure. Finally, the content should be suitable for a {Reader's Knowledge Level} knowledge level and align with {Specialized Content Type} specialized content types, within the {Genre} genre.

This is the Output:

1 Like