My RAG chatbot does not reply in same language as query,

Welcome to the OpenAI dev community @hsnawn

I’d recommend simply mentioning “You reply in user’s language.” in the first system message and remove the “multi-lingual” part.

Additionally, remove the query from the system message and let it be added to the messages list as a separate message with user role.

Supply the context from previous conversation in a separate system message.

You can refer to this tutorial for the messages structure.

1 Like