GPT or the assistant forgets the conversation history and starts producing nonsensical responses

Hi everyone, I’ve been struggling with an issue that I haven’t been able to resolve for a while. The GPT or Assistant API doesn’t remember the conversation history.

The project is actually based on a simple logic:

X will provide its own information and give questions for the AI to ask. The AI will respond as X to the people it converses with and ask the questions.

However, after a few messages, the AI or assistant forgets the conversation history, and the project fails. I wanted to get your opinions on this; so far, I’ve tried using threading, sending the locally stored chat history along with the message, keeping a conversation record with a vector database and having the AI access this data, and using LangChain, but I haven’t reached a solution.

And I should mention that I used GPT-4o in trials outside of the assistant.

Do you have any suggestions for solving my problem?

I have the same problem. It keeps outputting the same answers despite I ask it to generate not the same of a previous run. From scanning it seems Assistants do not keep track of history messages while other articles indicate it does, hence I’m a bit confused and I wonder what the value is of a thread in that case.

For now, a quick solution would be to include the history in context prompt but that’s not great in my view.