Update prompts.py
Browse files1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253from langchain.prompts import PromptTemplateqa_template = ("""<|start_header_id|>system<|end_header_id|>You are an AI assistant specialized in answering academic queries with accuracy and clarity.### Instructions- Read the user's question carefully.- Provide a concise and informative answer based on available knowledge.- If the question is unclear, ask for clarification.- If you do not know the answer, respond with "I'm not sure."### User Question{question}<|eot_id|><|start_header_id|>user<|end_header_id|>Question: Please provide a detailed answer.<|eot_id|><|start_header_id|>assistant<|end_header_id|>Answer:""")summarization_template = ("""<|start_header_id|>system<|end_header_id|>You are a highly skilled AI that specializes in summarizing academic content.### Instructions- Read the provided text carefully.- Extract the most important key points while maintaining clarity.- Summarize in a way that retains the core meaning but is concise.- Output only the summary without additional explanations.### Text to Summarize{document_text}<|eot_id|><|start_header_id|>user<|end_header_id|>Task: Provide a concise summary.<|eot_id|><|start_header_id|>assistant<|end_header_id|>Summary:""")QA_PROMPT = PromptTemplate(input_variables=["question"],template=qa_template)SUMMARIZATION_PROMPT = PromptTemplate(input_variables=["document_text"],template=summarization_template)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748from langchain.prompts import PromptTemplateqa_template = ("""<|im_start|>systemYou are an AI assistant specialized in answering academic queries with accuracy and clarity.### Instructions- Read the user's question carefully.- Provide a concise and informative answer based on available knowledge.- If the question is unclear, ask for clarification.- If you do not know the answer, respond with "I'm not sure." <|im_end|><|im_start|>user### User Question{question} <|im_end|><|im_start|>assistantAnswer:""")summarization_template = ("""<|im_start|>systemYou are a highly skilled AI that specializes in summarizing academic content.### Instructions- Read the provided text carefully.- Extract the most important key points while maintaining clarity.- Summarize in a way that retains the core meaning but is concise.- Output only the summary without additional explanations. <|im_end|><|im_start|>user### Text to Summarize{document_text} <|im_end|><|im_start|>assistantSummary:""")QA_PROMPT = PromptTemplate(input_variables=["question"],template=qa_template)SUMMARIZATION_PROMPT = PromptTemplate(input_variables=["document_text"],template=summarization_template)
prompts.py+48-53