ChatGPT skipping my questions, any dev can help me?

using API, engine gpt35turbo, helper function as this:

def get_completion(prompt, model=llm_model):
messages = [{“role”: “user”, “content”: prompt}]
response = openai.ChatCompletion.create(
model=model,
messages=messages,
temperature=0,
)
return response.choices[0].message[“content”]

I have a list of 2 elements
math_task_list = [“simplify 5(2+2)”, “evaluate x+2=4”]

and trying to ask gpt with these 2 elements in list
simple_prompt =“what is the category of each mathematical task: {math_task_list}

response is good when the list size is small (2 elements), i’ve got 2 answers:
1.simplification
2.evaluation of variable

But when I increase the list size to over 25, the response answer size is only 22 , sometimes 20.
if i increase to 100 , the response is around 85-95.

Is there anyway to get the precisely same count of response, by the count of the list in the prompt?

Welcome to the forum…

Are you numbering these? You might try that…

If that doesn’t work, I’d try smaller batches…

1 Like

Thanks so much!

yes, actrually i tuned up my prompt as:
please tell the category for each one of the 24 math task:{math_task_list}

it still gave me 22 answers instead of 24.

smaller batches probably only working on 10 or less, given a pooi of several thousands questions, this means a long time batch(since it will have to be over 20s wait)

Is there any good way of prompt that gpt could go exactly with some form of list, and process one by one? benefit doing this is saving network I/O between client and gpt.

David, I think Paul ment something like this:

[1, “simplify 5(2+2)”, "S"]
[2, “evaluate x+2=4”, "E"]
S stands for simplification and E evaluation. Augment the list below to the form above.
<<your input on form [1, "evaluate 2+2"] >>

Specifying desired output makes for easy parsing of E/S. The numbering seems to force the model to recognize the exact format of the input, not forgetting lines. I noticed the text but not equations was changed - in wording, but not meaning. But you’d probably want to keep the input anyhow, so you can pair with the E/S which is the only new info from chatGPT.

Good luck!