Repetitive Responses in GPT-4o Chat Conversations

I am using “gpt-4o-2024-05-13” for chat completions. However, I’m encountering a strange issue where when I ask a new question in a conversation, the model’s response includes information that seems meant for the previous question.

For example, I might ask:

  • “What causes bloating in infants?”

The model might respond with a detailed explanation. Then, if I ask a new question like:

  • “What causes gas in children?”

The problem: Instead of focusing solely on gas in children, the model’s response often starts by repeating the explanation about bloating in infants(the previous question) and then adds the information on gas. .

Is this a common problem with GPT-4o chat models? Is there a way to prevent these repetitive responses and have the model focus on the new question I’m asking?

I have given my project memory using langchain’s ConversationBufferWindowMemory

When I try this in the openai chat playground, the problem seems not to be there.

1 Like

Welcome @Bwenyenye

You mentioned it works normally on the playground.

This means it’s is likely a problem with how it’s being implemented with the langchain module and not an issue with the underlying model.

2 Likes

I have the same issue where if i tell it to write new code it gives the example of the wrong code and calls it the original code and then continues to make the same mistakes because of this. and it doesnt owkr normally on playground, either. Similarly, it doesnt do anything i ask like for example give any coherent function call tool outputs. It continually hallucinates properties and adds more, it ignores required fields completely, etc. If it provides code and is told the code is wrong, it continues providing the same wrong code in the same wrong way while talking about fixing it. This was previously only present in gpt3.5 turbo, now it is in 4o.

1 Like