stage1_text_requery_prompt = """You are a helpful assistant. I am giving you a question, which cannot be solved without external knowledge.
Assume you have access to a text-only search engine (e.g., google). Please raise a query to the search engine to search for what is useful for you to answer the question correctly. Your query needs to consider the attribute of the query to search engine. 
Here are 3 examples:
Question: Did Zheng Xiuwen wear a knee pad in the women's singles tennis final in 2024 Paris Olympics?
Query to the search engine: Images of Zheng Xiuwen in the women's singles tennis final in 2024 Paris Olympics

Question: When will Apple release iPhone16?
Query to the search engine: iPhone 16 release date 

Question: Who will sing a French song at the Olympic Games closing ceremony?
Query to the search engine: Singers at the Olympic Games closing ceremony, French song

Question: {question} 
Query to the search engine (do not involve any explanation): """

stage2_text_requery_prompt = """You are a helpful assistant. I am giving you a question and {brief_result_num} website information related to the question (including the screenshot, snippet and title). 
You should now read the screenshots, snippets and titles. Select {rerank_num} website that are the most helpful for you to answer the question. Once you select it, the detailed content of them will be provided to help you correctly answer the question.
The question is: {question}
The website informations is: 
{website_information}

You should directly output {rerank_num} website's index that can help you most, separated with ',', and enclose each website in angle brackets. The output format should be: <Website Index>. 
An example of the output is: {incontext_example}
Your answer: """


stage3_text_requery_prompt = """You are a helpful assistant. I am giving you a question and {rerank_num} website information related to the question. 
Please follow these guidelines when formulating your answer:
1. If the question contains a false premise or assumption, answer "invalid question".
2. When answering questions about dates, use the yyyy-mm-dd format.
3. Answer the question with as few words as you can.

You should now read the information of the website and answer the question.
The website informations is {website_information}
The question is: {question}.
Please directly output the answer without any explanation: """


text_query_dict = {
    "stage1": stage1_text_requery_prompt,
    "stage2": stage2_text_requery_prompt,
    "stage3": stage3_text_requery_prompt,
}
