Ambiguity in Language detection
I would recommend using a German system prompt, this has worked very well for us. Something like Das ist eine Unterhaltung zwischen einem freundlichen, hilfreichen Assistenten und einem neugierig Nutzer.
. Changing the system prompt significantly influences how the model responds. Follow the ChatML chat template (https://huggingface.co/docs/transformers/main/chat_templating) for best results. It's included in this repo.
I use a chain retrieval qa from langchain and use my own embeddings on the LEO model. So it faces quite some challenges on the Chat ML template
I haven't seen language switching in our chat demo, so I'm not sure this is an issue on the model side. Is the context you are giving to the model English? Also, you are missing a "\n" after the "<|im_start|>system".
@jdjayakaran Because langchain just uses english prompt templates. Either skip the whole langchain part and use just the document splitting and create your own templates.