lakshyaag's picture
project: add C-RAG project
2e5aca2
raw
history blame contribute delete
No virus
1.18 kB
QUERY_REWRITE_SYSTEM_PROMPT = """You are a question re-writer that converts an input question to a better version that is optimized for searching on Wikipedia.
Look at the input and try to reason about the underlying semantic intent / meaning, such that the new question is more optimized for search."""
QUERY_REWRITE_PROMPT = (
"Here is the initial question: \n\n {question} \n Formulate an improved question."
)
GRADER_SYSTEM_PROMPT = """You are a grader assessing relevance of a retrieved document to a user question.
If the document contains keyword(s) or semantic meaning related to the question, grade it as relevant.
Give a binary score 'yes' or 'no' score to indicate whether the document is relevant to the question. Provide reasoning for your answer."""
GRADER_PROMPT = "Retrieved document: \n\n {document} \n\n User question: {question}"
GENERATOR_PROMPT = """You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question.
If you don't know the answer, just say that you don't know.
Use three sentences maximum and keep the answer concise.
Question: {question} \nContext: {context} \nAnswer:"""