Even when provided with the correct context, GPT-3.5-Turbo-1106 does not consistently produce accurate answers

when the right context is provided, sometimes it says ‘I don’t know’ and sometimes it gives the
right answer.

How can it produce accurate answers by default in the first place? It is a language model. If you want accurate answers, provide it with some data, for example, a piece of text, and tell it not to produce new data but to use only the provided text.

Welcome to the forum.

We need a lot more details to be able to help you.

What model are you using? What settings like temperature? What is your system prompt / user prompt / assistant prompt?

Do you have an example of what you’re seeing?