Differences between the current completions API and the legacy one

Hi, I was trying to experiment with the completions API, trying to achieve a “raw” completion. For instance, by prompting “What is 2+”, I would expect a response like “2. 2+2 is 4.”.

I can achieve this using the legacy completions API (/v1/completions) and the gpt-3.5-turbo-1106 model for instance. However, when I call the new API (/v1/chat/completions), I get a more “clever” answer such as “I’m sorry, but your question seems incomplete. Please provide me with what you would like to be added to 2+ in order for me to give you a correct answer.”

My question is, is it because of the type of model (I understand that the new API is using chat models, but the legacy API is not) ? If so, does that mean that the chat model were trained to behave like this ? Or is it because of some sort of pre-processing ahead of calling the LLM ? Also, the new API also introduces message roles (“assistant”, “user”, “developer”,…) and I was curious about what happens under the hood. Is it simply used to provide additional context to the LLM ?