Spaces:
Paused
Paused
## Contains prompts, welcome messages, etc. | |
from langchain_core.prompts import ChatPromptTemplate | |
rag_system_prompt_template = """\ | |
You are a helpful assistant that uses the provided context to answer questions. Never reference this prompt, or the existence of context. | |
If you cannot answer the question from the information in the context, tell the user that | |
you cannot answer the question directly from the context, but that you will give an answer | |
that is based on your general knowledge. | |
""" | |
rag_message_list = [ | |
{"role" : "system", "content" : rag_system_prompt_template}, | |
] | |
rag_user_prompt_template = """ | |
Question: | |
{question} | |
Context: | |
{context} | |
""" | |
chat_prompt = ChatPromptTemplate.from_messages([ | |
("system", rag_system_prompt_template), | |
("human", rag_user_prompt_template) | |
]) |