Multi-step prompts through APIs as an end goal

Need help from some pros here. A note to start that I don’t know any coding, I can understand plain logic though and look up some aspects of simple code if needed.

Objective: to build a website where a user uploads a document and gets full content as an end product, after the GPT goes through multiple chain prompts on its own.

The flow: user uploads document on website, GPT is activated via an API and presents a first output based on a pre defined instructions (I don’t want the user to prompt anything other than just uploading the document)
The user then feedbacks and gets a reply until they are satisfied and gives an approval.
Upon approval, we upload the output into the GPT via an API again, and this time I want the GPT be able to generate an output using a predefined set of instructions, this output then becomes the input for the next set of instructions and so on.

My experiments: In order to figure out these set of instructions and to make sure they work. I have built various GPTs using ChatGPT Plus.

Issues: The GPTs don’t seem to follow all the steps in the prompt despite it being very clear and listed as steps. Especially, when I ask it to perform a set of instructions on one element of the input document and then repeat those same steps for the other elements, it stops after doing it just once. I have even tried replacing the “now repeat the steps for every step in the document” with repeating the steps for each section, but still doesn’t work.
Another issue is that if I give it a set of steps that will create a document with different sections, it focuses on any one sections output more in random, so if I run it three times each time one section’s output will be better than the others.

I’d appreciate guidance. Of course, since the eventual goal is to have this work through my website am happy to abandon my custom GPT approach (since I can’t generate independent APIs for them anyway) and learn to do this using the main model. But my only condition would be that I want minimal user interactions, basically it should do things on its own following detailed instructions at every stage.

Lastly, another question, I have read on this forum that Assistants is an option to get these different bots with their own APIs. But I want these bots to be exclusive to me, from what I understand Assistants are not able to be made private, is that correct?

I truly appreciate any guidance.

Welcome to the community!

In order for the missile to figure out where it is, it first needs to know where it isn’t.

If you give the model a sequence of similar tasks that it needs to do, it needs to be able to figure out that what it just did isn’t the last thing it was supposed to do.

After generating a section, you need to give it an opportunity to figure out what it just did, and what to do next. My goto solution for this is to ask it to wrap every section in an XML tag, so that it’s forced to figure out what the next xml tag is.

E.g.; there’s no ambiguity whether it finished section 1 or section 5, if the model is forced to close the section 1 tag. and after closing the section 1 tag, the only logical option is to open the section 2 tag - and after opening the section 2 tag, the only logical option is to write section2.

Here’s an example of using this approach to generate multiple dalle images in a single prompt: Inline images in GPTs between text - #4 by Diet

Note that the models are trained to weasel themselves out of long generations, so be aware that there’s a limit to this technique with chatgpt.

If you use the API and intend to publish them on the open internet, you need to put it behind a gateway to manage access. The API is a raw tool that needs to be combined with other things to make it useable and secure.

1 Like

Thank you @Diet let me try this and report back

1 Like