o
    7ti,                     @   s  d dl Z d dlmZ i ddddddddd	d
dd
dd
dddddddddddddd
dddddd
d
d
dddZi ddddddddd	ddddddddddd dd!dd"dd#dd$dd%dd&dd'd(d)d*d+dZi dd,dd,dd,dd-d	d,dd,dd,dd.dd/dd/dd/dd.dd0dd,dd/dd0d1d2d3d4d5d5d6Zg d7Zd8d9 Zd:Ze	d;krbe Z
e ZeeZeD ]Zed<redd= neZed>v Zee d?d@dAZee dBdCdDdEdFdGdHdIZdDee  dDdJdKdLgZed<rdMndNgdOe dPdQeedRdSee  eeedTdUidVZejdYi eZee
je dW dXZee W d   n	1 s\w   Y  qdS dS )Z    N)Environmentnarrativeqa   qaspermultifieldqa_en@   multifieldqa_zhhotpotqa    2wikimqamusiquedureader
gov_reporti   qmsum
multi_newsvcsumtrectriviaqasamsumlshtpassage_count)passage_retrieval_enpassage_retrieval_zhlccrepobench-pa}  You are given a story, which can be either a novel or a movie script, and a question. Answer the question asconcisely as you can, using a single phrase if possible. Do not provide any explanation.

Story: {context}

Now, answer the question based on the story asconcisely as you can, using a single phrase if possible. Do not provide any explanation.

Question: {question}

Answer:a  You are given a scientific article and a question. Answer the question as concisely as you can, using a single phrase or sentence if possible. If the question cannot be answered based on the information in the article, write "unanswerable". If the question is a yes/no question, answer "yes", "no", or "unanswerable". Do not provide any explanation.

Article: {context}

 Answer the question based on the above article as concisely as you can, using a single phrase or sentence if possible. If the question cannot be answered based on the information in the article, write "unanswerable". If the question is a yes/no question, answer "yes", "no", or "unanswerable". Do not provide any explanation.

Question: {question}

Answer:zRead the following text and answer briefly.

{context}

Now, answer the following question based on the above text, only give me the answer and do not output any other words.

Question: {question}
Answer:u   阅读以下文字并用中文简短回答：

{context}

现在请基于上面的文章回答下面的问题，只告诉我答案，不要输出任何其他字词。

问题：{question}
回答：a#  Answer the question based on the given passages. Only give me the answer and do not output any other words.

The following are given passages.
{context}

Answer the question based on the given passages. Only give me the answer and do not output any other words.

Question: {question}
Answer:u   请基于给定的文章回答下述问题。

文章：{context}

请基于上述文章回答下面的问题。

问题：{question}
回答：zYou are given a report by a government agency. Write a one-page summary of the report.

Report:
{context}

Now, write a one-page summary of the report.

Summary:a  You are given a meeting transcript and a query containing a question or instruction. Answer the query in one or more sentences.

Transcript:
{context}

Now, answer the query based on the above meeting transcript in one or more sentences.

Query: {question}
Answer:zYou are given several news passages. Write a one-page summary of all news. 

News:
{context}

Now, write a one-page summary of all the news.

Summary:u   下面有一段会议记录，请你阅读后，写一段总结，总结会议的内容。
会议记录：
{context}

会议总结：zkPlease determine the type of the question below. Here are some examples of questions.

{context}
{question}zAnswer the question based on the given passage. Only give me the answer and do not output any other words. The following are some examples.

{context}
{question}ziSummarize the dialogue into a few short sentences. The following are some examples.

{context}
{question}uO   请判断给定新闻的类别，下面是一些例子。

{context}
{question}a  There are some paragraphs below sourced from Wikipedia. Some of them may be duplicates. Please carefully read these paragraphs and determine how many unique paragraphs there are after removing duplicates. In other words, how many non-repeating paragraphs are there in total?

{context}

Please enter the final count of unique paragraphs after removing duplicates. The output format should only contain the number, such as 1, 2, 3, and so on.

The final answer is:aB  Here are 30 paragraphs from Wikipedia, along with an abstract. Please determine which paragraph the abstract is from.

{context}

The following is an abstract.

{question}

Please enter the number of the paragraph that the abstract is from. The answer format must be like "Paragraph 1", "Paragraph 2", etc.

The answer is:u  以下是若干段落文字，以及其中一个段落的摘要。请确定给定的摘要出自哪一段。

{context}

下面是一个摘要

{question}

请输入摘要所属段落的编号。答案格式必须是"段落1"，"段落2"等格式

答案是：zBPlease complete the code given below. 
{context}Next line of code:zLPlease complete the code given below. 
{context}{question}Next line of code:qa_f1_scoreqa_f1_zh_scorerouge_zh_scorerouge_scoreclassification_scorer   retrieval_scorecount_scoreretrieval_zh_scorecode_sim_score)r   r   r   r   )"r   
2wikimqa_er   r   gov_report_er	   
hotpotqa_er   lcc_er   r   multi_news_er   multifieldqa_en_er   r   r   r   passage_count_er   passage_retrieval_en_er   r   qasper_er   r   zrepobench-p_er   samsum_er   trec_er   
triviaqa_er   c                  C   s   t  } | jddd |  S )Nz--save_prefix_path )default)argparseArgumentParseradd_argument
parse_args)parser r7   \/home/ubuntu/.local/lib/python3.10/site-packages/lm_eval/tasks/longbench/_generate_config.pyr5      s   r5   a  
tag:
  - {{ tag[0] }}
task: {{ task }}
dataset_path: {{ dataset_path }}
test_split: {{ test_split }}
dataset_name: {{ dataset_name }}
doc_to_text: "{{ doc_to_text }}"
doc_to_target: '{{ doc_to_target }}'
process_results: {{ process_results }}
generation_kwargs:
  max_gen_toks: {{ generation_kwargs.max_gen_toks }}
  temperature: {{ generation_kwargs.temperature }}
  do_sample: {{ generation_kwargs.do_sample }}
  until: {% if has_newline %}["\n"]{% else %}[]{% endif %}
metric_list:
  - metric: {{ metric_list[0].metric }}
    aggregation: {{ metric_list[0].aggregation }}
    higher_is_better: {{ metric_list[0].higher_is_better }}
metadata:
  version: {{ metadata.version }}
__main___e)r   r   r   r      F)max_gen_tokstemperature	do_sample
z\n"z\"{z{{}z}}meanT)metricaggregationhigher_is_betterlongbench_e	longbench
longbench_zXnhyacinth/LongBenchtestz{{answers}}z!function metrics.get_versionz5.0)tagtaskdataset_path
test_splitdataset_namedoc_to_textdoc_to_targetprocess_resultsgeneration_kwargshas_newlinemetric_listmetadataz.yamlwr7   )r2   jinja2r   dataset2maxlendataset2promptdataset2metricDATASETSr5   template_str__name__argsenvfrom_stringtemplatedsendswithdfrV   rU   replaceraw_doc_to_textrW   datarenderrendered_yamlopensave_prefix_pathfwriter7   r7   r7   r8   <module>   sN  	
	
	
&

		