preserve language in conversation retrieval
Without the addition of 'in its original language', the condensing response, more often than not, outputs the rephrased question in English, even when the conversation is in another language. This question in English then transfers to the question in the retrieval prompt and the chatbot is stuck in English.
I'm sometimes surprised that this does not happen more often, but apparently the GPT models are smart enough to understand that when the template contains
Question: .... Answer:
then the answer should be in in the language of the question.
before:
after:
I think the normal prompt_template in the prompts.py could also use some other-than-english instruction. I have experimented with it a little bit: when I ask an initial dutch question like: 'wat is NS?', with the prompt_template it answers in english, because it assumes the 'wat' is a typo (although it is Dutch for 'what' (when I type a longer more clearly Dutch question it works fine though). With the CHAT_PROMPT from question_answering/stuff_prompt.py it understand the language is Dutch. It is mysterious, but in general I think prompts should get a language-choice-instructions t be more robust.
This looks good to me, but would appreciate :eye: since it's a core prompt