Refine API Generated Response

Hello Everyone I am using Chatgpt API to generate questions related to different topics. the Questions generated are generally not up to points and some time even after making changes and refining the prompt used the questions not to the mark and also if I ask it to generate questions 60 70 questions it only generate 20 questions and If I try generating in small batch it generate repeated and redundant questions. what should I do to handle this situation.