System propmpt behavior

Hello!

I have a system prompt set up for my gemini ai model.
The ai model speaks first and behaves according to the settings of the system prompt.
However, when you have solved the question, it will return to plain basic chat, which answers all questions.
We tried many different ways with the system prompt to get it to stay on the topic set with the system prompt for every question asked, but it didn’t work.
Does anyone have an idea how to solve this?

(The AI ​​model does not work from a separate database)