Hi, Newbie here so no laughing.
I have set my API call to use the following.
model: “gpt-4”,
messages: [
{ role: “user”, content: fullPrompt },
{ role: “system”, content: “Generate a json summary for the topic discussed. Do not repeat the question in the reply”}
],
I cannot, no matter how I phrase it, stop the API repeating the question, this is so annoying as I am using repetitive questions. Also how do I set the temperature in a call like this?
Many thanks in advance of a response.
Chris
Few things here…
- Try “positive” instructions along with your negative instructions. E.g., “Do not repeat the question in your reply - instead, only generate a JSON summary in your replies”
- I sometimes opt for similar phrases like “The user hates it when you repeat questions in your replies - instead …”. It depends on your outputs. Sometimes the model needs to be wrangled with.
- You could also try appending that instruction to the end of your user message, like:
f"{fullPrompt}. Do not repeat the question in the reply."
I would definitely suggest doing this.
- You may be mixing the system/user messages a bit. The system message might be something more like, “You generate JSON outputs based on the user prompt. You do not repeat the question in your replies”. Then in the user message might be, f"Here is the message to convert into JSON: {fullPrompt}"
With a slightly clearer syntax, you might see better results. You could also try fleshing out the system message a little more to provide clearer instructions and associate its reply more with outputting JSON.
Good luck