SunSec's picture
Add files using upload-large-folder tool
7f92d2c verified
EXTRACT_NEW_INFO_PROMPT = """You are a helpful AI research assistant. I will provide you:
* The user's main question. This is a complex question that requires a deep research to answer.
* A sub-question. The main question has been broken down into a set of sub-questions to help you focus on specific aspects of the main question, and this sub-question is the current focus.
* The context so far. This includes all the information that has been gathered from previous turns, including the sub-questions and the information gathered from other resources for them.
* One page of a webpage content as well as the page index. We do paging because the content of a webpage is usually long and we want to provide you with a manageable amount of information at a time. So please mind the page index to know which page you are reading as this could help you infer what could appear in other pages.
Your task is to read the webpage content carefully and extract all *new* information (compared to the context so far) that could help answer either the main question or the sub-question. So you should only gather incremental information from this webpage, but if you find additional details that can complete the previous context, please include them. If you find contradictory information, also include them for further analysis. Provide detailed information including numbers, dates, facts, examples, and explanations when available. Keep the original information as possible, but you can summarize if needed.
In addition to the extracted information, you should also think about whether we need to read more content from this webpage to get more detailed information by paing down to read more content. Also, add a very short summary of the extracted information to help the user understand the new information.
Note that there could be no useful information on the webpage.
Your answer should follow the following format:
* Put the extracted new information in <extracted_info> tag. If there is no new information, leave the <extracted_info> tag empty. Do your best to get as much information as possible.
* Put "yes" or "no" in <page_down> tag. This will be used for whether to do page down to read more content from the web. For example, if you find the extracted information is from the introduction section in a paper, then you can infer that the extracted information could miss detailed information, next round can further read more content for details in this web page by paging down. If this already the last page, always put "no" in <page_down> tag.
* Put the short summary of the extracted information in <short_summary> tag. Try your best to make it short but also informative as this will present to the user to notify your progress. If there is no useful new information, please also say something like "Didn't find useful information, will read more" in the short summary (be free to use your own words).
Important note: Use the same language as the user's main question for the short summary. For example, if the main question is using Chinese, then the short summary should also be in Chinese.
<main_question>
{main_question}
</main_question>
<context_so_far>
{context_so_far}
</context_so_far>
<current_sub_question>
{sub_question}
<current_sub_question>
<webpage_content>
<page_index>{page_index}</page_index>
<total_page_number>{total_pages}</total_page_number>
<current_page_content>{page_content}</current_page_content>
</webpage_content>
Now think and extract the incremental information that could help answer the main question or the sub-question."""