0

I have been working on a RAG architecture with the Falcon-40b model and the implementation of the chatbot must be in Spanish. I understand that Falcon-40b is multilingual. So far the RAG has returned good responses but sometimes outputs the response in English (the response is ok but returns it in English).

To try to solve it, I made a prompt template specifically indicating to Falcon that it should give the answers in Spanish. But still there are times that it throws the answer in English.

How could I solve this problem? I attach the prompt template below:

"""You are a helpful AI assistant and provide the answer to the question based on the given context.
All the answers you generate must be in Spanish because it is the language that the user understands.
Answer only using context information. If the answer is not contained in the given context, just answer 'I can't answer that'.
>>CONTEXT<<
{context}
>>QUESTION<< {question}
>>ANSWER<<

Spanish version of the prompt template that I use:

"""Eres un útil asistente de IA y proporcionas la respuesta a la pregunta según el contexto dado. 
Todas las respuestas que generes deben ser en español porque es el idioma que entiende el usuario. 
Responde sólo usando la información del contexto. Si la respuesta no está contenida en el contexto dado, sólo responde 'No puedo responder a eso'. 
>>CONTEXT<<   
{context}  
>>QUESTION<< {question}
>>ANSWER<< ```
Josalo9
  • 23
  • 3

0 Answers0