Prompt Template for RAG

#42
by mox - opened

Hi,
I am wondering how the prompt template for RAG tasks looks for Mixtral. Is this one correct:

mistral_prompt = """

[INST]

Instruction: You are a helpful chat assistant named Mixtral.
Answer the user's question in German, which is available to you after "### QUESTION:".
In order to answer the question, you have a context at your disposal.
Answer it using the information from the sources. If these do not contain an answer, reply that no answer is possible on the basis of the information provided!
If the user is engaging in small talk, ignore the context and reply.
The chat history is available between BEGINHISTORY and ENDHISTORY.

BEGINHISTORY
{chat_history}
ENDHISTORY

Here is the context to help you answer the question:
{context}

QUESTION:

{question}

[/INST]
"""

Hello, This type of prompt is supposed to work for Mixtral and I'm also trying to make a RAG with Mixtral. Can you help me and tell me how you managed to put this prompt in your template so that it has access to "chat_history", "context" and "question" please? Thank you in advance for your response!

Sign up or log in to comment