Files changed (4) hide show
  1. README.md +4 -10
  2. tasks.py +601 -4
  3. tlem.py +28 -9
  4. utils.py +1204 -0
README.md CHANGED
@@ -1,11 +1,5 @@
1
- ---
2
- title: Tlem
3
- emoji: 🏆
4
- colorFrom: yellow
5
- colorTo: yellow
6
- sdk: static
7
- pinned: false
8
- license: apache-2.0
9
- ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
1
 
2
+
3
+ # Transparent LLMs Evaluation Metrics
4
+
5
+ > LLMs belong to *tout le monde*
tasks.py CHANGED
@@ -14,16 +14,42 @@ from evaluate import load
14
  from collections import defaultdict
15
  import sys
16
 
 
17
  # if sys.version_info >= (3, 9):
18
  # from functools import cache
19
  # else:
20
  # from functools import lru_cache as cache
21
 
 
22
  disable_progress_bar()
23
 
24
 
25
- def fake_pipeline(prompts: Iterable[str]) -> list[str]:
26
- return [prompt for prompt in tqdm(prompts)]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
 
29
  @dataclass
@@ -33,7 +59,7 @@ class Task:
33
  # metrics: list[str] = field(default_factory=list)
34
  metric_name: str | tuple[str, str] = ("sustech/tlem", "gsm8k")
35
  input_column: str = "question"
36
- label_column: str = "answer"
37
  prompt: Optional[Callable | str] = None
38
  few_shot: int = 0
39
  few_shot_from: Optional[str] = None
@@ -54,6 +80,7 @@ class Task:
54
  input_column=example[self.input_column]
55
  )
56
  }
 
57
 
58
  @cached_property
59
  def samples(self):
@@ -78,7 +105,10 @@ class Task:
78
  self.few_shot_from = name
79
  break
80
 
 
81
  shots = ds[self.few_shot_from].select(range(self.few_shot))
 
 
82
  if self.prompt is not None:
83
  shots = shots.map(self.prompt)
84
 
@@ -126,6 +156,8 @@ class Task:
126
  result = self.metric.compute(
127
  responses=outputs, references=self.dataset[self.label_column]
128
  )
 
 
129
  # if log:
130
  # name = name or pipeline.__name__
131
  # self.results[name] = result
@@ -154,6 +186,75 @@ def multichoice_zh(responses: Any, references: list[str]):
154
  class Metrics:
155
  cmmlu = multichoice_zh
156
  mmlu = multichoice
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
157
 
158
  def gsm8k(responses: list[str], answers: list[str | int]):
159
  # scores = []
@@ -431,7 +532,6 @@ class MMLU:
431
  "psychology",
432
  ],
433
  "other": ["other", "business", "health"],
434
- "Test": ["culture"],
435
  }
436
 
437
  @classmethod
@@ -464,3 +564,500 @@ class MMLU:
464
  ]
465
  )
466
  return suite
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  from collections import defaultdict
15
  import sys
16
 
17
+
18
  # if sys.version_info >= (3, 9):
19
  # from functools import cache
20
  # else:
21
  # from functools import lru_cache as cache
22
 
23
+
24
  disable_progress_bar()
25
 
26
 
27
+ def mt_bench_prompt(example):
28
+ judge_prompt = "You are ChatGPT, a large language model trained by OpenAI. Please act as an impartial judge and evaluate the quality of the response provided by an AI assistant to the user question displayed below. The Your evaluation should consider factors such as the helpfulness, relevance, accuracy, depth, creativity, and level of detail of the response."
29
+ judge_prompt = "You are ChatGPT, a large language model trained by OpenAI. Your task is to act as an impartial judge and evaluate the quality of the responses provided by an 'assistant' role in the displayed conversation. Your evaluation should focus on the helpfulness, relevance, accuracy, depth, creativity, language fluency, clarity, and level of detail in the assistant's responses. Please note that the evaluation should not consider the user's questions or the overall conversation, but solely the quality of the assistant's replies."
30
+ multi_prompt = "You evaluation should focus on the assistant's answer to the second user question."
31
+ ref_prompt = "In the conversation, you will encounter system messages labeled 'Reference Answer' followed by the assistant's response. Your task is to evaluate the quality of the assistant's response by comparing it with the reference answer."
32
+ json_prompt = 'You must rate the response on a scale of 1 to 10 in JSON format, for example: {"rating": 5}.'
33
+ prompt_list = [judge_prompt]
34
+ conversations = example["conversation"]
35
+ if example["turn"] == 2:
36
+ prompt_list.append(multi_prompt)
37
+
38
+ if example["reference"] is not None:
39
+ conversations = []
40
+ quesiotns = filter(lambda e: e["role"] == "user", example["conversation"])
41
+ answers = filter(lambda e: e["role"] == "assistant", example["conversation"])
42
+ for q, a, r in zip(quesiotns, answers, example["reference"]):
43
+ conversations.append(q)
44
+ conversations.append(
45
+ {"role": "system", "content": "Reference Answer: " + r}
46
+ )
47
+ conversations.append(a)
48
+ prompt_list.append(ref_prompt)
49
+ prompt_list.append(json_prompt)
50
+
51
+ messages = [{"role": "system", "content": " ".join(prompt_list)}] + conversations
52
+ return messages
53
 
54
 
55
  @dataclass
 
59
  # metrics: list[str] = field(default_factory=list)
60
  metric_name: str | tuple[str, str] = ("sustech/tlem", "gsm8k")
61
  input_column: str = "question"
62
+ label_column: str = ""
63
  prompt: Optional[Callable | str] = None
64
  few_shot: int = 0
65
  few_shot_from: Optional[str] = None
 
80
  input_column=example[self.input_column]
81
  )
82
  }
83
+ self.label_column = self.label_column or self.input_column
84
 
85
  @cached_property
86
  def samples(self):
 
105
  self.few_shot_from = name
106
  break
107
 
108
+ assert self.few_shot_from != self.split
109
  shots = ds[self.few_shot_from].select(range(self.few_shot))
110
+ # else:
111
+ # shots = ds.select(range(self.few_shot))
112
  if self.prompt is not None:
113
  shots = shots.map(self.prompt)
114
 
 
156
  result = self.metric.compute(
157
  responses=outputs, references=self.dataset[self.label_column]
158
  )
159
+ finally:
160
+ result = outputs
161
  # if log:
162
  # name = name or pipeline.__name__
163
  # self.results[name] = result
 
186
  class Metrics:
187
  cmmlu = multichoice_zh
188
  mmlu = multichoice
189
+
190
+ def ceval(responses: list[str], answers: list[str | int]):
191
+ responses = [first_capital_postprocess(pred) for pred in responses]
192
+ return responses, answers
193
+
194
+ def winogrande(responses: list[str], answers: list[str | int]):
195
+ responses = [first_option_postprocess(pred, options="AB") for pred in responses]
196
+ return responses, answers
197
+
198
+ def arc(responses: list[str], answers: list[str | int]):
199
+ if len(responses) != len(answers):
200
+ return {
201
+ 'error': 'predictions and references have different '
202
+ 'length'
203
+ }
204
+ responses = [first_option_postprocess(pred, options="ABCD") for pred in responses]
205
+
206
+ return responses, answers
207
+
208
+ def hellaswag(responses: list[str], answers: list[str | int]):
209
+ if len(responses) != len(answers):
210
+ return {
211
+ 'error': 'predictions and references have different '
212
+ 'length'
213
+ }
214
+ responses = [first_option_postprocess(pred, options="ABCD") for pred in responses]
215
+ answers = ['ABCD'[int(ans)] for ans in answers]
216
+ return responses, answers
217
+
218
+ def drop(responses: list[str], answers: list[list]):
219
+ if len(responses) != len(answers):
220
+ return {
221
+ 'error': 'predictions and references have different '
222
+ 'length'
223
+ }
224
+ responses = [general_postprocess(pred) for pred in responses]
225
+ processed_answers = [[general_postprocess(j) for j in i]
226
+ for i in answers]
227
+ matched_answers = []
228
+ for pred, ans, origin_ans in zip(responses, processed_answers,
229
+ answers):
230
+
231
+ if pred in ans or pred in origin_ans:
232
+ matched_answers.append(pred)
233
+ else:
234
+ matched_answers.append(ans[0])
235
+
236
+ return responses, matched_answers
237
+
238
+ def bbh_mcq(responses: list[str], answers: list[str | int]):
239
+ if len(responses) != len(answers):
240
+ return {
241
+ 'error': 'predictions and references have different '
242
+ 'length'
243
+ }
244
+ responses = [bbh_mcq_postprocess(pred) for pred in responses]
245
+
246
+ return responses, answers
247
+
248
+ def bbh_freefrom(responses: list[str], answers: list[str | int]):
249
+ if len(responses) != len(answers):
250
+ return {
251
+ 'error': 'predictions and references have different '
252
+ 'length'
253
+ }
254
+
255
+ responses = [bbh_freeform_postprocess(pred) for pred in responses]
256
+
257
+ return responses, answers
258
 
259
  def gsm8k(responses: list[str], answers: list[str | int]):
260
  # scores = []
 
532
  "psychology",
533
  ],
534
  "other": ["other", "business", "health"],
 
535
  }
536
 
537
  @classmethod
 
564
  ]
565
  )
566
  return suite
567
+
568
+
569
+ class Winogrande:
570
+ input_column = "input"
571
+ label_column = "answer"
572
+
573
+ categories = [
574
+ "winogrande_debiased",
575
+ "winogrande_l",
576
+ "winogrande_m",
577
+ "winogrande_s",
578
+ "winogrande_xl",
579
+ "winogrande_xs",
580
+ ]
581
+
582
+ @classmethod
583
+ def prompt_winogrande(cls, example):
584
+ option1 = example["sentence"].replace("_", example['option1'])
585
+ option2 = example["sentence"].replace("_", example['option2'])
586
+ answer = example[cls.label_column]
587
+ prompt = f"Which of the following is a good sentence:\nA. {option1}\nB. {option2}\nAnswer:"
588
+
589
+ return {
590
+ cls.input_column: prompt,
591
+ cls.label_column: ' AB'[int(answer)] if answer != '' else ''
592
+ }
593
+
594
+ @classmethod
595
+ def suite(cls,):
596
+ subcategories = {
597
+ item: [item] for item in cls.categories
598
+ }
599
+ finer_categories = (
600
+ pd.Series(subcategories) # noqa # type: ignore
601
+ .explode()
602
+ .reset_index()
603
+ .set_index(0)
604
+ .groupby(0)
605
+ .agg(list)["index"]
606
+ .to_dict()
607
+ )
608
+ suite = defaultdict(list)
609
+ subcategories["all"] = list(finer_categories.keys())
610
+ for cate, sub_cates in subcategories.items():
611
+ for sub_cate in sub_cates:
612
+ suite[cate].append(
613
+ Task(
614
+ ("winogrande", sub_cate),
615
+ metric_name=("sustech/tlem", "winogrande"),
616
+ input_column=cls.input_column,
617
+ label_column=cls.label_column,
618
+ prompt=partial(cls.prompt_winogrande),
619
+ few_shot=0,
620
+ split="validation"
621
+ )
622
+ )
623
+
624
+ return suite
625
+
626
+
627
+
628
+ class DROP:
629
+ input_column = "input"
630
+ label_column = "answers"
631
+
632
+ icl_prompt = '''\
633
+ Text: In the county, the population was spread out with 23.50% under the age of 18, 8.70% from 18 to 24, 29.70% from 25 to 44, 24.70% from 45 to 64, and 13.30% who were 65 years of age or older.
634
+ Question: How many more percent are under the age of 18 compared to the 18 to 24 group?
635
+ Anawer: According to the text, 23.5% are under the age of 18, and 8.7% are from ages 18 to 24. 23.5%-8.7%=14.8%. So the answer is 14.8.
636
+
637
+ Text: Playing in their second straight Thanksgiving game, the Eagles struggled especially on defense, where they were unable to stop the much-hyped Lions offense. The worst of it all was how unproven rookie Eric Rowe was tasked with covering wide receiver Calvin Johnson, leading to Johnson catching 3 touchdowns. Stafford’s five passing touchdowns, including three of them to Johnson was too much for the Eagles to overcome and for the second consecutive time this season, the Eagles gave up 45 points in a game. With the loss, the Eagles drop to 4-7 on the season and 6-1 when playing on Thanksgiving.
638
+ Question: How many TD passes did Stafford throw other than to Johnson?
639
+ Anawer: According to the text, Stafford threw 5 TD passes, 3 of which were to Johnson. 5-3=2. So the answer is 2.
640
+
641
+ Text: [PROMPT]
642
+ Question: [QUESTION]
643
+ Anawer:'''
644
+
645
+ categories = ["validation"]
646
+
647
+ @classmethod
648
+ def prompt_drop(cls, example):
649
+
650
+ prompt = cls.icl_prompt.replace("[PROMPT]", example["passage"]).replace("[QUESTION]", example["question"])
651
+
652
+ validated_answers = example["answers_spans"]["spans"]
653
+ validated_types = example["answers_spans"]["types"]
654
+ answers = []
655
+ for answer_item, answer_type in zip(validated_answers, validated_types):
656
+ # if answer_type == "number":
657
+ # answers.append(answer_item)
658
+ # elif any(answer_item['date'][i] for i in ['day', 'month', 'year']):
659
+ # d = [answer_item['date'][i] for i in ['day', 'month', 'year']]
660
+ # answers.append(' '.join(d).strip())
661
+ # else:
662
+ # for span in answer_item['spans']:
663
+ # answers.append(span)
664
+ answers.append(answer_item)
665
+ answers = list(set(answers))
666
+
667
+ return {
668
+ cls.input_column: prompt,
669
+ cls.label_column: answers
670
+ }
671
+
672
+ @classmethod
673
+ def suite(cls,):
674
+
675
+ finer_categories = (
676
+ pd.Series(cls.categories) # noqa # type: ignore
677
+ .explode()
678
+ .reset_index()
679
+ .set_index(0)
680
+ .groupby(0)
681
+ .agg(list)["index"]
682
+ .to_dict()
683
+ )
684
+ suite = defaultdict(list)
685
+ categories = list(finer_categories.keys())
686
+ for cate in categories:
687
+ suite[cate].append(
688
+ Task(
689
+ ("drop", cate),
690
+ metric_name=("sustech/tlem", "drop"),
691
+ input_column=cls.input_column,
692
+ label_column=cls.label_column,
693
+ prompt=partial(cls.prompt_drop),
694
+ few_shot=0,
695
+ split="validation"
696
+ )
697
+ )
698
+
699
+ return suite
700
+
701
+
702
+ class HellaSwag:
703
+ input_column = "input"
704
+ label_column = "label"
705
+
706
+ categories = ["validation"]
707
+
708
+ @classmethod
709
+ def prompt_hellaswag(cls, example):
710
+
711
+ prompt = f"{example['ctx']}\nQuestion: Which ending makes the most sense?\n"
712
+ prompt += f"A. {example['endings'][0]}\n"
713
+ prompt += f"B. {example['endings'][1]}\n"
714
+ prompt += f"C. {example['endings'][2]}\n"
715
+ prompt += f"D. {example['endings'][3]}\n"
716
+ prompt += "You may choose from 'A', 'B', 'C', 'D'.\nAnswer:"
717
+
718
+ return {cls.input_column: prompt}
719
+
720
+ @classmethod
721
+ def suite(cls,):
722
+ finer_categories = (
723
+ pd.Series(cls.categories) # noqa # type: ignore
724
+ .explode()
725
+ .reset_index()
726
+ .set_index(0)
727
+ .groupby(0)
728
+ .agg(list)["index"]
729
+ .to_dict()
730
+ )
731
+ suite = defaultdict(list)
732
+ categories = list(finer_categories.keys())
733
+ for cate in categories:
734
+ suite[cate].append(
735
+ Task(
736
+ ("Rowan/hellaswag", cate),
737
+ metric_name=("sustech/tlem", "hellaswag"),
738
+ input_column=cls.input_column,
739
+ label_column=cls.label_column,
740
+ prompt=partial(cls.prompt_hellaswag),
741
+ few_shot=0,
742
+ split="validation"
743
+ )
744
+ )
745
+
746
+ return suite
747
+
748
+ class ARC:
749
+ input_column = "input"
750
+ label_column = "answerKey"
751
+
752
+ categories = [
753
+ "ARC-Challenge",
754
+ "ARC-Easy",
755
+ ]
756
+
757
+ @classmethod
758
+ def prompt_arc(cls, example):
759
+ choices = example["choices"]
760
+ prompt = f"Question: {example['question']}"
761
+ for label, choice in zip(choices["label"], choices["text"]):
762
+ prompt += f"\n{label}. {choice}"
763
+ prompt += "\nAnswer:"
764
+ return {
765
+ cls.input_column: prompt
766
+ }
767
+
768
+ @classmethod
769
+ def suite(cls):
770
+ finer_categories = (
771
+ pd.Series(cls.categories) # noqa # type: ignore
772
+ .explode()
773
+ .reset_index()
774
+ .set_index(0)
775
+ .groupby(0)
776
+ .agg(list)["index"]
777
+ .to_dict()
778
+ )
779
+ suite = defaultdict(list)
780
+ categories = list(finer_categories.keys())
781
+ for cate in categories:
782
+ suite[cate].append(
783
+ Task(
784
+ ("ai2_arc", cate),
785
+ metric_name=("sustech/tlem", "arc"),
786
+ input_column=cls.input_column,
787
+ label_column=cls.label_column,
788
+ prompt=partial(cls.prompt_arc),
789
+ few_shot=0,
790
+ )
791
+ )
792
+
793
+ return suite
794
+
795
+
796
+ class BBH:
797
+ input_column = "input"
798
+ label_column = "target"
799
+
800
+ multiple_choice_prefix = "Follow the given examples and answer the question.\n[HINT]\n\nQ: [INPUT]\nA: Let's think step by step."
801
+ free_form_prefix = "Follow the given examples and answer the question.\n[HINT]\n\nQ: [INPUT]\nA: Let's think step by step."
802
+
803
+ bbh_multiple_choice_sets = [
804
+ 'temporal_sequences',
805
+ 'disambiguation_qa',
806
+ 'date_understanding',
807
+ 'tracking_shuffled_objects_three_objects',
808
+ 'penguins_in_a_table',
809
+ 'geometric_shapes',
810
+ 'snarks',
811
+ 'ruin_names',
812
+ 'tracking_shuffled_objects_seven_objects',
813
+ 'tracking_shuffled_objects_five_objects',
814
+ 'logical_deduction_three_objects',
815
+ 'hyperbaton',
816
+ 'logical_deduction_five_objects',
817
+ 'logical_deduction_seven_objects',
818
+ 'movie_recommendation',
819
+ 'salient_translation_error_detection',
820
+ 'reasoning_about_colored_objects',
821
+ ]
822
+
823
+ bbh_free_form_sets = [
824
+ 'multistep_arithmetic_two',
825
+ 'navigate',
826
+ 'dyck_languages',
827
+ 'word_sorting',
828
+ 'sports_understanding',
829
+ 'boolean_expressions',
830
+ 'object_counting',
831
+ 'formal_fallacies',
832
+ 'causal_judgement',
833
+ 'web_of_lies',
834
+ ]
835
+
836
+ @classmethod
837
+ def prompt_bbh(cls, example, category:str):
838
+
839
+ meta_prompt = cls.multiple_choice_prefix if category in cls.bbh_multiple_choice_sets else cls.free_form_prefix
840
+ prompt = meta_prompt.replace("[HINT]", bbh_lib_prompt(category=category)).replace("[INPUT]", example[cls.input_column])
841
+
842
+ return {"input": prompt}
843
+
844
+ @classmethod
845
+ def suite(cls,):
846
+ finer_categories = (
847
+ pd.Series(cls.bbh_free_form_sets + cls.bbh_multiple_choice_sets) # noqa # type: ignore
848
+ .explode()
849
+ .reset_index()
850
+ .set_index(0)
851
+ .groupby(0)
852
+ .agg(list)["index"]
853
+ .to_dict()
854
+ )
855
+ suite = defaultdict(list)
856
+ categories = list(finer_categories.keys())
857
+ for cate in categories:
858
+ if cate in cls.bbh_multiple_choice_sets:
859
+ suite[cate].append(
860
+ Task(
861
+ ("lukaemon/bbh", cate),
862
+ metric_name=("sustech/tlem", "bbh_mcq"),
863
+ input_column=cls.input_column,
864
+ label_column=cls.label_column,
865
+ prompt=partial(cls.prompt_bbh, category=cate),
866
+ few_shot=0,
867
+ )
868
+ )
869
+ else:
870
+ suite[cate].append(
871
+ Task(
872
+ ("lukaemon/bbh", cate),
873
+ metric_name=("sustech/tlem", "bbh_freefrom"),
874
+ input_column=cls.input_column,
875
+ label_column=cls.label_column,
876
+ prompt=partial(cls.prompt_bbh, category=cate),
877
+ few_shot=0,
878
+ )
879
+ )
880
+
881
+ return suite
882
+
883
+
884
+
885
+ class CEVAL:
886
+ input_column = "input"
887
+ label_column = "answer"
888
+
889
+ @classmethod
890
+ def prompt_ceval(cls, example, cate:str, chat=False):
891
+ _ch_name = cls.ceval_subject_mapping[cate][1]
892
+ prefix = (
893
+ f"以下是中国关于{_ch_name}考试的单项选择题,请选出其中的正确答案。\n"
894
+ if chat
895
+ else "问题"
896
+ )
897
+
898
+ prompt = prefix + f'{example["question"]}'
899
+ for choice in list("ABCD"):
900
+ prompt += f"\n{choice}. {example[choice]}"
901
+
902
+ prompt += "\n答案:"
903
+ return {"input": prompt}
904
+
905
+ ceval_subject_mapping = {
906
+ "computer_network":
907
+ ["Computer Network", "\u8ba1\u7b97\u673a\u7f51\u7edc", "STEM"],
908
+ "operating_system":
909
+ ["Operating System", "\u64cd\u4f5c\u7cfb\u7edf", "STEM"],
910
+ "computer_architecture":
911
+ ["Computer Architecture", "\u8ba1\u7b97\u673a\u7ec4\u6210", "STEM"],
912
+ "college_programming":
913
+ ["College Programming", "\u5927\u5b66\u7f16\u7a0b", "STEM"],
914
+ "college_physics": ["College Physics", "\u5927\u5b66\u7269\u7406", "STEM"],
915
+ "college_chemistry":
916
+ ["College Chemistry", "\u5927\u5b66\u5316\u5b66", "STEM"],
917
+ "advanced_mathematics":
918
+ ["Advanced Mathematics", "\u9ad8\u7b49\u6570\u5b66", "STEM"],
919
+ "probability_and_statistics":
920
+ ["Probability and Statistics", "\u6982\u7387\u7edf\u8ba1", "STEM"],
921
+ "discrete_mathematics":
922
+ ["Discrete Mathematics", "\u79bb\u6563\u6570\u5b66", "STEM"],
923
+ "electrical_engineer": [
924
+ "Electrical Engineer", "\u6ce8\u518c\u7535\u6c14\u5de5\u7a0b\u5e08",
925
+ "STEM"
926
+ ],
927
+ "metrology_engineer":
928
+ ["Metrology Engineer", "\u6ce8\u518c\u8ba1\u91cf\u5e08", "STEM"],
929
+ "high_school_mathematics":
930
+ ["High School Mathematics", "\u9ad8\u4e2d\u6570\u5b66", "STEM"],
931
+ "high_school_physics":
932
+ ["High School Physics", "\u9ad8\u4e2d\u7269\u7406", "STEM"],
933
+ "high_school_chemistry":
934
+ ["High School Chemistry", "\u9ad8\u4e2d\u5316\u5b66", "STEM"],
935
+ "high_school_biology": [
936
+ "High School Biology", "\u9ad8\u4e2d\u751f\u7269", "STEM"
937
+ ],
938
+ "middle_school_mathematics": [
939
+ "Middle School Mathematics", "\u521d\u4e2d\u6570\u5b66", "STEM"
940
+ ],
941
+ "middle_school_biology": [
942
+ "Middle School Biology", "\u521d\u4e2d\u751f\u7269", "STEM"
943
+ ],
944
+ "middle_school_physics": [
945
+ "Middle School Physics", "\u521d\u4e2d\u7269\u7406", "STEM"
946
+ ],
947
+ "middle_school_chemistry": [
948
+ "Middle School Chemistry", "\u521d\u4e2d\u5316\u5b66", "STEM"
949
+ ],
950
+ "veterinary_medicine": [
951
+ "Veterinary Medicine", "\u517d\u533b\u5b66", "STEM"
952
+ ],
953
+ "college_economics": [
954
+ "College Economics", "\u5927\u5b66\u7ecf\u6d4e\u5b66", "Social Science"
955
+ ],
956
+ "business_administration": [
957
+ "Business Administration", "\u5de5\u5546\u7ba1\u7406", "Social Science"
958
+ ],
959
+ "marxism": [
960
+ "Marxism", "\u9a6c\u514b\u601d\u4e3b\u4e49\u57fa\u672c\u539f\u7406",
961
+ "Social Science"
962
+ ],
963
+ "mao_zedong_thought": [
964
+ "Mao Zedong Thought",
965
+ "\u6bdb\u6cfd\u4e1c\u601d\u60f3\u548c\u4e2d\u56fd\u7279\u8272\u793e\u4f1a\u4e3b\u4e49\u7406\u8bba\u4f53\u7cfb\u6982\u8bba",
966
+ "Social Science"
967
+ ],
968
+ "education_science": [
969
+ "Education Science", "\u6559\u80b2\u5b66", "Social Science"
970
+ ],
971
+ "teacher_qualification": [
972
+ "Teacher Qualification", "\u6559\u5e08\u8d44\u683c", "Social Science"
973
+ ],
974
+ "high_school_politics": [
975
+ "High School Politics", "\u9ad8\u4e2d\u653f\u6cbb", "Social Science"
976
+ ],
977
+ "high_school_geography": [
978
+ "High School Geography", "\u9ad8\u4e2d\u5730\u7406", "Social Science"
979
+ ],
980
+ "middle_school_politics": [
981
+ "Middle School Politics", "\u521d\u4e2d\u653f\u6cbb", "Social Science"
982
+ ],
983
+ "middle_school_geography": [
984
+ "Middle School Geography", "\u521d\u4e2d\u5730\u7406", "Social Science"
985
+ ],
986
+ "modern_chinese_history":
987
+ ["Modern Chinese History", "\u8fd1\u4ee3\u53f2\u7eb2\u8981", "Humanities"],
988
+ "ideological_and_moral_cultivation": [
989
+ "Ideological and Moral Cultivation",
990
+ "\u601d\u60f3\u9053\u5fb7\u4fee\u517b\u4e0e\u6cd5\u5f8b\u57fa\u7840",
991
+ "Humanities"
992
+ ],
993
+ "logic": ["Logic", "\u903b\u8f91\u5b66", "Humanities"],
994
+ "law": ["Law", "\u6cd5\u5b66", "Humanities"],
995
+ "chinese_language_and_literature": [
996
+ "Chinese Language and Literature",
997
+ "\u4e2d\u56fd\u8bed\u8a00\u6587\u5b66", "Humanities"
998
+ ],
999
+ "art_studies": ["Art Studies", "\u827a\u672f\u5b66", "Humanities"],
1000
+ "professional_tour_guide": [
1001
+ "Professional Tour Guide", "\u5bfc\u6e38\u8d44\u683c", "Humanities"
1002
+ ],
1003
+ "legal_professional": [
1004
+ "Legal Professional", "\u6cd5\u5f8b\u804c\u4e1a\u8d44\u683c",
1005
+ "Humanities"
1006
+ ],
1007
+ "high_school_chinese": [
1008
+ "High School Chinese", "\u9ad8\u4e2d\u8bed\u6587", "Humanities"
1009
+ ],
1010
+ "high_school_history": [
1011
+ "High School History", "\u9ad8\u4e2d\u5386\u53f2", "Humanities"
1012
+ ],
1013
+ "middle_school_history": [
1014
+ "Middle School History", "\u521d\u4e2d\u5386\u53f2", "Humanities"
1015
+ ],
1016
+ "civil_servant": ["Civil Servant", "\u516c\u52a1\u5458", "Other"],
1017
+ "sports_science": ["Sports Science", "\u4f53\u80b2\u5b66", "Other"],
1018
+ "plant_protection": [
1019
+ "Plant Protection", "\u690d\u7269\u4fdd\u62a4", "Other"
1020
+ ],
1021
+ "basic_medicine": ["Basic Medicine", "\u57fa\u7840\u533b\u5b66", "Other"],
1022
+ "clinical_medicine": [
1023
+ "Clinical Medicine", "\u4e34\u5e8a\u533b\u5b66", "Other"
1024
+ ],
1025
+ "urban_and_rural_planner": [
1026
+ "Urban and Rural Planner",
1027
+ "\u6ce8\u518c\u57ce\u4e61\u89c4\u5212\u5e08", "Other"
1028
+ ],
1029
+ "accountant": ["Accountant", "\u6ce8\u518c\u4f1a\u8ba1\u5e08", "Other"],
1030
+ "fire_engineer": [
1031
+ "Fire Engineer", "\u6ce8\u518c\u6d88\u9632\u5de5\u7a0b\u5e08", "Other"
1032
+ ],
1033
+ "environmental_impact_assessment_engineer": [
1034
+ "Environmental Impact Assessment Engineer",
1035
+ "\u73af\u5883\u5f71\u54cd\u8bc4\u4ef7\u5de5\u7a0b\u5e08", "Other"
1036
+ ],
1037
+ "tax_accountant": ["Tax Accountant", "\u7a0e\u52a1\u5e08", "Other"],
1038
+ "physician": ["Physician", "\u533b\u5e08\u8d44\u683c", "Other"]
1039
+ }
1040
+
1041
+ @classmethod
1042
+ def suite(cls, chat: bool):
1043
+ suite = defaultdict(list)
1044
+ cls.categories = defaultdict(list)
1045
+ for task, info in cls.ceval_subject_mapping.items():
1046
+ cls.categories[info[2]].append(task)
1047
+ cls.categories["all"] = list(cls.ceval_subject_mapping.keys())
1048
+ for k, v in cls.categories.items():
1049
+ for subject in v:
1050
+ suite[k].append(
1051
+ Task(
1052
+ dataset_name=("ceval/ceval-exam", subject),
1053
+ metric_name=("sustech/tlem", "ceval"),
1054
+ input_column=cls.input_column,
1055
+ label_column=cls.label_column,
1056
+ prompt=partial(cls.prompt_ceval, cate=subject, chat=chat),
1057
+ few_shot=0 if chat else 5,
1058
+ few_shot_from="dev",
1059
+ split="val"
1060
+ )
1061
+ )
1062
+
1063
+ return suite
tlem.py CHANGED
@@ -58,6 +58,7 @@ class ReasoningMetric(evaluate.Metric):
58
  )
59
  df["extract_responses"] = extract_responses
60
  df["extract_references"] = extract_references
 
61
  results = {
62
  "Accuracy": (df["extract_references"] == df["extract_responses"])
63
  .astype(int)
@@ -69,15 +70,9 @@ class ReasoningMetric(evaluate.Metric):
69
  return results
70
 
71
 
72
- gsm8k = Task(
73
- dataset_name=("gsm8k", "main"),
74
- metric_name=("sustech/tlem", "gsm8k"),
75
- input_column="question",
76
- label_column="answer",
77
- )
78
-
79
-
80
  class Suite(EvaluationSuite):
 
 
81
  def run(
82
  self,
83
  model_or_pipeline: Any,
@@ -115,7 +110,31 @@ class Suite(EvaluationSuite):
115
  case _ if name.startswith("cmmlu"):
116
  suite = CMMLU.suite(chat=chat)
117
  case "gsm8k":
118
- suite = [gsm8k]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  match name:
120
  case _ if "test" in name:
121
  suite = suite["Test"]
 
58
  )
59
  df["extract_responses"] = extract_responses
60
  df["extract_references"] = extract_references
61
+ print(df)
62
  results = {
63
  "Accuracy": (df["extract_references"] == df["extract_responses"])
64
  .astype(int)
 
70
  return results
71
 
72
 
 
 
 
 
 
 
 
 
73
  class Suite(EvaluationSuite):
74
+ task_class = Task
75
+
76
  def run(
77
  self,
78
  model_or_pipeline: Any,
 
110
  case _ if name.startswith("cmmlu"):
111
  suite = CMMLU.suite(chat=chat)
112
  case "gsm8k":
113
+ suite = Task(
114
+ dataset_name=("gsm8k", "main"),
115
+ metric_name=("sustech/tlem", "gsm8k"),
116
+ input_column="question",
117
+ label_column="answer",
118
+ )
119
+ case "bbh":
120
+ suite = BBH.suite()
121
+ case "arc":
122
+ suite = ARC.suite()
123
+ case "hellaswag":
124
+ suite = HellaSwag.suite()
125
+ case "drop":
126
+ suite = DROP.suite()
127
+ case "winogrande":
128
+ suite = Winogrande.suite()
129
+ case _ if name.startswith("ceval"):
130
+ suite = CEVAL.suite(chat=chat)
131
+ case "mt_bench":
132
+ suite = Task(
133
+ dataset_name="SUSTech/mt_bench_judge",
134
+ split="train",
135
+ prompt=mt_bench_prompt
136
+ # metric_name=("sustech/tlem", "gsm8k"),
137
+ )
138
  match name:
139
  case _ if "test" in name:
140
  suite = suite["Test"]
utils.py CHANGED
@@ -307,6 +307,1210 @@ def is_equiv(str1, str2, verbose=False):
307
  except Exception:
308
  return str1 == str2
309
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
310
 
311
  if __name__ == "__main__":
312
  num = extract_numeric("the answer is -1.5")
 
307
  except Exception:
308
  return str1 == str2
309
 
310
+ def first_option_postprocess(text: str, options: str) -> str:
311
+ """Find first valid option for text."""
312
+
313
+ patterns = [
314
+ f'[Tt]he answer is [{options}]',
315
+ f'[Tt]he correct answer\s?(?:option)?\s?is [{options}]', # noqa
316
+ f'答案(?:选项)?是(.*?)[{options}]',
317
+ f'答案(?:选项)?为(.*?)[{options}]',
318
+ f'答案(?:选项)?选(.*?)[{options}]',
319
+ f'选项[{options}]是?正确',
320
+ f'选项[{options}]为?正确',
321
+ f'固选(.*?)[{options}]',
322
+ f'答案应该是(.*?)[{options}]',
323
+ f'(\s|^)[{options}][\s。,,\.$]', # noqa
324
+ f'[{options}]',
325
+ ]
326
+
327
+ regexes = [re.compile(pattern) for pattern in patterns]
328
+ for regex in regexes:
329
+ match = regex.search(text)
330
+ if match:
331
+ outputs = match.group(0)
332
+ for i in options:
333
+ if i in outputs:
334
+ return i
335
+ return ''
336
+
337
+
338
+ def first_capital_postprocess(text: str) -> str:
339
+ for t in text:
340
+ if t.isupper():
341
+ return t
342
+ return ''
343
+
344
+
345
+ def general_postprocess(text: str) -> str:
346
+ # Cut off the first newline, period, or comma
347
+ truncated_text = re.split(r'[\n.,]', text, 1)[0]
348
+
349
+ # Remove punctuation
350
+ no_punctuation = re.sub(r'[^\w\s]', '', truncated_text)
351
+
352
+ # Remove article
353
+ no_articles = re.sub(r'\b(a|an|the)\b',
354
+ '',
355
+ no_punctuation,
356
+ flags=re.IGNORECASE)
357
+
358
+ # Remove duplicated blank spaces
359
+ cleaned_text = re.sub(r'\s+', ' ', no_articles).strip()
360
+
361
+ return cleaned_text
362
+
363
+
364
+ def bbh_mcq_postprocess(text: str) -> str:
365
+ ans = text
366
+ ans_line = ans.split('answer is ')
367
+ if len(ans_line) != 1:
368
+ ans = ans_line[-1].strip()
369
+ match = re.search(r'\(([A-Z])\)*', ans)
370
+ if match:
371
+ return f"({match.group(1)})"
372
+ match = re.search(r'([A-Z])', ans)
373
+ if match:
374
+ return f"({match.group(1)})"
375
+ return f"({ans})"
376
+
377
+
378
+ def bbh_freeform_postprocess(text: str) -> str:
379
+ ans = text
380
+ ans_line = ans.split('answer is ')
381
+ if len(ans_line) != 1:
382
+ ans = ans_line[-1].strip()
383
+ ans = ans.split('\n')[0]
384
+ if ans.endswith('.'):
385
+ ans = ans[:-1]
386
+ return ans
387
+
388
+
389
+
390
+ icl_prompts = {
391
+ 'temporal_sequences': """Task description: Answer questions about which times certain events could have occurred.
392
+
393
+ Q: Today, Emily went to the museum. Between what times could they have gone?
394
+ We know that:
395
+ Emily woke up at 1pm.
396
+ Elizabeth saw Emily reading at the library from 2pm to 4pm.
397
+ Jessica saw Emily watching a movie at the theater from 4pm to 5pm.
398
+ Leslie saw Emily waiting at the airport from 5pm to 6pm.
399
+ William saw Emily buying clothes at the mall from 6pm to 7pm.
400
+ The museum was closed after 7pm.
401
+ Between what times could Emily have gone to the museum?
402
+ Options:
403
+ (A) 1pm to 2pm
404
+ (B) 6pm to 7pm
405
+ (C) 5pm to 6pm
406
+ (D) 2pm to 4pm
407
+ A: Let's think step by step.
408
+ Wake-up time: 1pm.
409
+ 1pm-2pm: free.
410
+ 2pm-4pm: reading at the library.
411
+ 4pm-5pm: watching a movie at the theater.
412
+ 5pm-6pm: waiting at the airport.
413
+ 6pm-7pm: buying clothes at the mall.
414
+ The museum closure time: 7pm.
415
+ The only time when Emily could have gone to the museum was 1pm to 2pm. So the answer is (A).
416
+
417
+ Q: Today, Elizabeth went to the amusement park. Between what times could they have gone?
418
+ We know that:
419
+ Elizabeth woke up at 7am.
420
+ David saw Elizabeth fixing their computer at the electronic store from 1pm to 2pm.
421
+ Sarah saw Elizabeth playing tennis at the tennis court from 2pm to 3pm.
422
+ Susan saw Elizabeth walking towards the Statue of Liberty from 3pm to 6pm.
423
+ Andrew saw Elizabeth taking photos near the Eiffel Tower from 6pm to 9pm.
424
+ Emily saw Elizabeth getting a coffee at the cafe from 9pm to 10pm.
425
+ The amusement park was closed after 10pm.
426
+ Between what times could Elizabeth have gone to the amusement park?
427
+ Options:
428
+ (A) 7am to 1pm
429
+ (B) 9pm to 10pm
430
+ (C) 1pm to 2pm
431
+ (D) 3pm to 6pm
432
+ A: Let's think step by step.
433
+ Wake-up time: 7am.
434
+ 7am-1pm: free.
435
+ 1pm-2pm: fixing their computer at the electronic store.
436
+ 2pm-3pm: playing tennis at the tennis court.
437
+ 3pm-6pm: walking towards the Statue of Liberty.
438
+ 6pm-9pm: taking photos near the Eiffel Tower.
439
+ 9pm-10pm: getting a coffee at the cafe.
440
+ The amusement park closure time: 10pm.
441
+ The only time when Elizabeth could have gone to the amusement park was 7am to 1pm. So the answer is (A).
442
+
443
+ Q: Today, Tiffany went to the beach. Between what times could they have gone?
444
+ We know that:
445
+ Tiffany woke up at 5am.
446
+ Betty saw Tiffany getting a coffee at the cafe from 5am to 6am.
447
+ Jessica saw Tiffany working at the office from 6am to 9am.
448
+ John saw Tiffany stretching at a yoga studio from 9am to 12pm.
449
+ Sean saw Tiffany sitting on a rooftop from 12pm to 2pm.
450
+ Sarah saw Tiffany playing tennis at the tennis court from 2pm to 3pm.
451
+ The beach was closed after 4pm.
452
+ Between what times could Tiffany have gone to the beach?
453
+ Options:
454
+ (A) 9am to 12pm
455
+ (B) 12pm to 2pm
456
+ (C) 5am to 6am
457
+ (D) 3pm to 4pm
458
+ A: Let's think step by step.
459
+ Wake-up time: 5am.
460
+ 5am-6am: getting a coffee at the cafe.
461
+ 6am-9am: working at the office.
462
+ 9am-12pm: stretching at a yoga studio.
463
+ 12pm-2pm: sitting on a rooftop.
464
+ 2pm-3pm: playing tennis at the tennis court.
465
+ 3pm-4pm: free.
466
+ The beach closure time: 4pm.
467
+ The only time when Tiffany could have gone to the beach was 3pm to 4pm. So the answer is (D).""",
468
+
469
+
470
+ 'disambiguation_qa': """Clarify the meaning of sentences with ambiguous pronouns.
471
+
472
+ Q: In the following sentences, explain the antecedent of the pronoun (which thing the pronoun refers to), or state that it is ambiguous.
473
+ Sentence: The chief told the counselor that they took the day off.
474
+ Options:
475
+ (A) The chief took the day off
476
+ (B) The counselor took the day off
477
+ (C) Ambiguous
478
+ A: Let's think step by step.
479
+ Here we need to determine who the pronoun "they" might be referring to. There are two possible referents for "they", namely the chief and the counselor. The verb "told" might be able to help us determine which one is more likely (if either). Let X be the chief and Y the counselor. The sentence is then of the form "X told Y that (X or Y) did something."
480
+ Let's consider Y first: "X told Y that Y did something." This case does not make much sense, as Y would already have the information that Y did something, because it is information about themself.
481
+ Now, consider X: "X told Y that X did something." This makes sense, because X would be sharing some information about themself that Y might not have known before.
482
+ Because in this context, X is the chief and Y is the counselor, the answer should be the chief. So the answer is (A).
483
+
484
+ Q: In the following sentences, explain the antecedent of the pronoun (which thing the pronoun refers to), or state that it is ambiguous.
485
+ Sentence: The manager sent a message to the secretary, but he didn't reply yet.
486
+ Options:
487
+ (A) The secretary didn't reply yet
488
+ (B) The manager didn't reply yet
489
+ (C) Ambiguous
490
+ A: Let's think step by step.
491
+ Here we need to determine who the pronoun "he" might be referring to. There are two possible referents for "he", namely the manager and the secretary. The verbs "sent" and "reply" might be able to help us determine which one is more likely (if either). Let X be the manager and Y the secretary. The sentence is then of the form "X sent a message to Y, but (X or Y) didn't reply yet."
492
+ Let's consider Y first: "X sent a message to Y, but Y didn't reply yet." This case makes sense, because of the implicit causality of the sentence. Y was the receiver of the message, but Y didn't get back to X yet.
493
+ Now, consider X: "X sent a message to Y, but X didn't reply yet." This case doesn't make sense, because X was the initial sender of the message, so it is now Y's turn to write back to X.
494
+ Because in this context, X is the manager and Y is the secretary, the answer should be the secretary. So the answer is (A).
495
+
496
+ Q: In the following sentences, explain the antecedent of the pronoun (which thing the pronoun refers to), or state that it is ambiguous.
497
+ Sentence: Bailey will plan to meet the director at his office
498
+ Options:
499
+ (A) It will be Bailey's office
500
+ (B) It will be the director's office
501
+ (C) Ambiguous
502
+ A: Let's think step by step.
503
+ Here we need to determine who the pronoun "his" might be referring to. There are two possible referents for "his", namely Bailey's and the director's. The verb phrase "plan to meet" might be able to help us determine which one is more likely (if either). Let X be Bailey and Y the director. The sentence is then of the form "X will plan to meet Y at (X or Y)'s office."
504
+ Let's consider Y first: "X will plan to meet Y at Y's office." This case makes sense, because X might want to meet up with Y at Y's office.
505
+ Now, consider X: "X will plan to meet Y at X's office." This case also makes sense, because X might want to meet up with Y at X's own office.
506
+ Because both X and Y are possible at the same time, we conclude that the antecedent of the pronoun is ambiguous. So the answer is (C).""",
507
+
508
+
509
+ 'date_understanding': """Infer the date from context.
510
+
511
+ Q: Today is Christmas Eve of 1937. What is the date 10 days ago in MM/DD/YYYY?
512
+ Options:
513
+ (A) 12/14/2026
514
+ (B) 12/14/1950
515
+ (C) 12/14/2007
516
+ (D) 12/14/1937
517
+ (E) 07/14/1938
518
+ (F) 12/14/1988
519
+ A: Let's think step by step.
520
+ If today is Christmas Eve of 1937, then today's date is December 24, 1937. 10 days before today is December 14, 1937, that is 12/14/1937. So the answer is (D).
521
+
522
+ Q: Tomorrow is 11/12/2019. What is the date one year ago from today in MM/DD/YYYY?
523
+ Options:
524
+ (A) 09/04/2018
525
+ (B) 11/11/2018
526
+ (C) 08/25/2018
527
+ (D) 11/02/2018
528
+ (E) 11/04/2018
529
+ A: Let's think step by step.
530
+ If tomorrow is 11/12/2019, then today is 11/11/2019. The date one year ago from today is 11/11/2018. So the answer is (B).
531
+
532
+ Q: Jane and John married on Jan 2, 1958. It is their 5-year anniversary today. What is the date tomorrow in MM/DD/YYYY?
533
+ Options:
534
+ (A) 01/11/1961
535
+ (B) 01/03/1963
536
+ (C) 01/18/1961
537
+ (D) 10/14/1960
538
+ (E) 01/03/1982
539
+ (F) 12/03/1960
540
+ A: Let's think step by step.
541
+ If Jane and John married on Jan 2, 1958, then and if it is their 5-year anniversary today, then today's date is Jan 2, 1963. The date tomorrow is Jan 3, 1963, that is 01/03/1963. So the answer is (B).""",
542
+
543
+
544
+ 'tracking_shuffled_objects_three_objects': """A task requiring determining the final positions of a set of objects given their initial positions and a description of a sequence of swaps.
545
+
546
+ Q: Alice, Bob, and Claire are playing a game. At the start of the game, they are each holding a ball: Alice has a yellow ball, Bob has a blue ball, and Claire has a pink ball.
547
+ As the game progresses, pairs of players trade balls. First, Claire and Alice swap balls. Then, Alice and Bob swap balls. Finally, Claire and Bob swap balls. At the end of the game, Bob has the
548
+ Options:
549
+ (A) yellow ball
550
+ (B) blue ball
551
+ (C) pink ball
552
+ A: Let's think step by step.
553
+ (0) At the start: Alice: yellow, Bob: blue, Claire: pink.
554
+ (1) Claire and Alice swap balls: Alice: pink, Bob: blue, Claire: yellow.
555
+ (2) Alice and Bob swap balls: Alice: blue, Bob: pink, Claire: yellow.
556
+ (3) Claire and Bob swap balls: Alice: blue, Bob: yellow, Claire: pink.
557
+ At the end of the game, Bob has the yellow ball. So the answer is (A).
558
+
559
+ Q: Alice, Bob, and Claire are playing a game. At the start of the game, they are each holding a ball: Alice has a white ball, Bob has a purple ball, and Claire has a pink ball.
560
+ As the game progresses, pairs of players trade balls. First, Bob and Alice swap balls. Then, Bob and Claire swap balls. Finally, Bob and Alice swap balls. At the end of the game, Alice has the
561
+ Options:
562
+ (A) white ball
563
+ (B) purple ball
564
+ (C) pink ball
565
+ A: Let's think step by step.
566
+ (0) At the start: Alice: white, Bob: purple, Claire: pink.
567
+ (1) Bob and Alice swap balls: Alice: purple, Bob: white, Claire: pink.
568
+ (2) Bob and Claire swap balls: Alice: purple, Bob: pink, Claire: white.
569
+ (3) Bob and Alice swap balls: Alice: pink, Bob: purple, Claire: white.
570
+ At the end of the game, Alice has the pink ball. So the answer is (C).
571
+
572
+ Q: Alice, Bob, and Claire are dancers at a square dance. At the start of a song, they each have a partner: Alice is dancing with Lola, Bob is dancing with Rodrigo, and Claire is dancing with Patrick.
573
+ Throughout the song, the dancers often trade partners. First, Alice and Bob switch partners. Then, Claire and Bob switch partners. Finally, Bob and Alice switch partners. At the end of the dance, Alice is dancing with
574
+ Options:
575
+ (A) Lola
576
+ (B) Rodrigo
577
+ (C) Patrick
578
+ A: Let's think step by step.
579
+ (0) At the start: Alice: Lola, Bob: Rodrigo, Claire: Patrick.
580
+ (1) Alice and Bob switch partners: Alice: Rodrigo, Bob: Lola, Claire: Patrick.
581
+ (2) Claire and Bob switch partners: Alice: Rodrigo, Bob: Patrick, Claire: Lola.
582
+ (3) Bob and Alice switch partners: Alice: Patrick, Bob: Rodrigo, Claire: Lola.
583
+ At the end of the dance, Alice is dancing with Patrick. So the answer is (C).""",
584
+
585
+
586
+ 'penguins_in_a_table': """Answer questions about a table of penguins and their attributes.
587
+
588
+ Q: Here is a table where the first line is a header and each subsequent line is a penguin: name, age, height (cm), weight (kg) Louis, 7, 50, 11 Bernard, 5, 80, 13 Vincent, 9, 60, 11 Gwen, 8, 70, 15 For example: the age of Louis is 7, the weight of Gwen is 15 kg, the height of Bernard is 80 cm. We now add a penguin to the table:
589
+ James, 12, 90, 12
590
+ How many penguins are less than 8 years old?
591
+ Options:
592
+ (A) 1
593
+ (B) 2
594
+ (C) 3
595
+ (D) 4
596
+ (E) 5
597
+ A: Let's think step by step.
598
+ This question focuses on age. We know the following: Louis is 7 years old, Bernard is 5 years old, Vincent is 9 years old, and Gwen is 8 years old.
599
+ Now, we add James to this table: James is 12 years old.
600
+ The penguins that are less than 8 years old are Louis and Bernard.
601
+ There are 2 penguins less than 8 years old. So the answer is (B).
602
+
603
+ Q: Here is a table where the first line is a header and each subsequent line is a penguin: name, age, height (cm), weight (kg) Louis, 7, 50, 11 Bernard, 5, 80, 13 Vincent, 9, 60, 11 Gwen, 8, 70, 15 For example: the age of Louis is 7, the weight of Gwen is 15 kg, the height of Bernard is 80 cm. Which is the youngest penguin?
604
+ Options:
605
+ (A) Louis
606
+ (B) Bernard
607
+ (C) Vincent
608
+ (D) Gwen
609
+ (E) James
610
+ A: Let's think step by step.
611
+ This question focuses on age. We know the following: Louis is 7 years old, Bernard is 5 years old, Vincent is 9 years old, and Gwen is 8 years old.
612
+ According to the table, Bernard (5) is the youngest amongst them.
613
+ The youngest penguin is Bernard. So the answer is (B).
614
+
615
+ Q: Here is a table where the first line is a header and each subsequent line is a penguin: name, age, height (cm), weight (kg) Louis, 7, 50, 11 Bernard, 5, 80, 13 Vincent, 9, 60, 11 Gwen, 8, 70, 15 For example: the age of Louis is 7, the weight of Gwen is 15 kg, the height of Bernard is 80 cm. What is the name of the second penguin sorted by alphabetic order?
616
+ Options:
617
+ (A) Louis
618
+ (B) Bernard
619
+ (C) Vincent
620
+ (D) Gwen
621
+ (E) James
622
+ A: Let's think step by step.
623
+ This question focuses on the name. We know the following: The names of the penguin in the table are Louis, Bernard, Vincent, and Gwen.
624
+ When we sort their names alphabetically, we get Bernard, Gwen, Louis, Vincent.
625
+ The name of the second penguin sorted by alphabetical order is Gwen.
626
+ The name of the second penguin sorted by alphabetic order is Gwen. So the answer is (D).""",
627
+
628
+
629
+ 'geometric_shapes': """Name geometric shapes from their SVG paths.
630
+
631
+ Q: This SVG path element <path d="M 31.00,73.00 L 32.00,59.00 L 44.00,50.00 L 49.00,41.00 L 64.00,37.00 L 71.00,55.00 L 64.00,76.00 L 52.00,61.00 L 31.00,73.00"/> draws a
632
+ Options:
633
+ (A) circle
634
+ (B) heptagon
635
+ (C) hexagon
636
+ (D) kite
637
+ (E) line
638
+ (F) octagon
639
+ (G) pentagon
640
+ (H) rectangle
641
+ (I) sector
642
+ (J) triangle
643
+ A: Let's think step by step.
644
+ This SVG path element contains "M" and "L" commands. M takes two parameters (x,y) and moves the current point to the coordinates (x,y). L takes two parameters (x,y) and draws a line from the previous coordinate to the new coordinate (x,y).
645
+ This path can be decomposed into 9 separate commands.
646
+ (1) M 31.00,73.00: Move the current point to 31.00,73.00.
647
+ (2) L 32.00,59.00: Create a line from 31.00,73.00 to 32.00,59.00.
648
+ (3) L 44.00,50.00: Create a line from 32.00,59.00 to 44.00,50.00.
649
+ (4) L 49.00,41.00: Create a line from 44.00,50.00 to 49.00,41.00.
650
+ (5) L 64.00,37.00: Create a line from 49.00,41.00 to 64.00,37.00.
651
+ (6) L 71.00,55.00: Create a line from 64.00,37.00 to 71.00,55.00.
652
+ (7) L 64.00,76.00: Create a line from 71.00,55.00 to 64.00,76.00.
653
+ (8) L 52.00,61.00: Create a line from 64.00,76.00 to 52.00,61.00.
654
+ (9) L 31.00,73.00: Create a line from 52.00,61.00 to 31.00,73.00.
655
+ This SVG path starts at point 31.00,73.00, creates eight consecutive and touching lines, and then returns back its starting point, thereby creating an eight-sided shape. It does not have any curves or arches. "octagon" is the only eight-sided object on the list. So the answer is (F).
656
+
657
+ Q: This SVG path element <path d="M 14.19,26.04 L 51.43,39.21 L 58.44,36.69 L 56.63,30.17 L 48.53,26.66 L 14.19,26.04"/> draws a
658
+ Options:
659
+ (A) circle
660
+ (B) heptagon
661
+ (C) hexagon
662
+ (D) kite
663
+ (E) line
664
+ (F) octagon
665
+ (G) pentagon
666
+ (H) rectangle
667
+ (I) sector
668
+ (J) triangle
669
+ A: Let's think step by step.
670
+ This SVG path element contains "M" and "L" commands. M takes two parameters (x,y) and moves the current point to the coordinates (x,y). L takes two parameters (x,y) and draws a line from the previous coordinate to the new coordinate (x,y).
671
+ This path can be decomposed into 6 separate commands.
672
+ (1) M 14.19,26.04: Move the current point to 14.19,26.04.
673
+ (2) L 51.43,39.21: Create a line from 14.19,26.04 to 51.43,39.21.
674
+ (3) L 58.44,36.69: Create a line from 51.43,39.21 to 58.44,36.69.
675
+ (4) L 56.63,30.17: Create a line from 58.44,36.69 to 56.63,30.17.
676
+ (5) L 48.53,26.66: Create a line from 56.63,30.17 to 48.53,26.66.
677
+ (6) L 14.19,26.04: Create a line from 48.53,26.66 to 14.19,26.04.
678
+ This SVG path starts at point 14.19,26.04, creates five consecutive and touching lines, and then returns back its starting point, thereby creating a five-sided shape. It does not have any curves or arches. "pentagon" is the only five-sided polygon on the list. So the answer is (G).
679
+
680
+ Q: This SVG path element <path d="M 41.00,43.00 L 37.00,34.00 L 41.00,33.00 L 45.00,34.00 L 41.00,43.00"/> draws a
681
+ Options:
682
+ (A) circle
683
+ (B) heptagon
684
+ (C) hexagon
685
+ (D) kite
686
+ (E) line
687
+ (F) octagon
688
+ (G) pentagon
689
+ (H) rectangle
690
+ (I) sector
691
+ (J) triangle
692
+ A: Let's think step by step.
693
+ This SVG path element contains "M" and "L" commands. M takes two parameters (x,y) and moves the current point to the coordinates (x,y). L takes two parameters (x,y) and draws a line from the previous coordinate to the new coordinate (x,y).
694
+ This path can be decomposed into 5 separate commands.
695
+ (1) M 41.00,43.00: Move the current point to 41.00,43.00.
696
+ (2) L 37.00,34.00: Create a line from 41.00,43.00 to 37.00,34.00.
697
+ (3) L 41.00,33.00: Create a line from 37.00,34.00 to 41.00,33.00.
698
+ (4) L 45.00,34.00: Create a line from 41.00,33.00 to 45.00,34.00.
699
+ (5) L 41.00,43.00: Create a line from 45.00,34.00 to 41.00,43.00.
700
+ This SVG path starts at point 41.00,43.00, creates four consecutive and touching lines, and then returns back its starting point, thereby creating a four-sided shape. "kite" and "rectangle" are the only two four-sided polygons on the list. So, we need to determine which one is the correct answer.
701
+ A kite has two pairs of equal-length adjacent sides, whereas a rectangle has two pairs of equal-length alternate (opposite) sides. Now, let's check whether the two adjacent sides of this shape are equal.
702
+ Length of side A: |A| = sqrt((41.00-37.00)^2 + (43.00-34.00)^2) = sqrt((4)^2 + (9)^2) = sqrt(16 + 81) = sqrt(97).
703
+ Length of side B: |B| = sqrt((37.00-41.00)^2 + (34.00-33.00)^2)) = sqrt((4)^2 + (1)^2) = sqrt(16 + 1) = sqrt(17).
704
+ Length of side C: |C| = sqrt((41.00-45.00)^2 + (33.00-34.00)^2)) = sqrt((-4)^2 + (-1)^2) = sqrt(16 + 1) = sqrt(17).
705
+ Length of side D: |D| = sqrt((45.00-41.00)^2 + (34.00-43.00)^2)) = sqrt((4)^2 + (-9)^2) = sqrt(16 + 81) = sqrt(97).
706
+ Note that |A| = |D| and |B| = |C|. Furthermore, A and D are adjacent and B and C are adjacent. Thus, this polygon has two pairs of equal-length adjacent sides and is "kite". So the answer is (D).""",
707
+
708
+
709
+ 'snarks': """Determine which of two sentences is sarcastic.
710
+
711
+ According to Cambridge University Dictionary, sarcasm is "the use of remarks that clearly mean the opposite of what they say, made in order to hurt someone's feelings or to criticize something in a humorous way." Sarcastic sentences often contain satirical or ironic utterances, hyperboles, ambivalent or witty remarks.
712
+
713
+ Q: Which statement is sarcastic?
714
+ Options:
715
+ (A) Yes, because having interests and actively researching them is a huge waste
716
+ (B) Yes, because having interests and actively researching them is a huge deal
717
+ A: Let's think step by step.
718
+ If we look at (A), it says that having interests and actively researching them is a huge waste, implying that it is a useless effort. However, we know that having interests and actively researching them is typically not a waste but rather is beneficial to the individual. The presence of such a juxtaposition in (A) suggests that it contains a taste of irony and sarcasm.
719
+ If we look at (B), it says that having interests and actively researching them is a huge deal, implying that it is an important and consequential effort. This is arguably a neutral and correct statement.
720
+ Above the above, the sarcastic option is (A). So the answer is (A).
721
+
722
+ Q: Which statement is sarcastic?
723
+ Options:
724
+ (A) No one is going to disagree with you on this. Avoiding ad hominem attacks really help your case
725
+ (B) No one is going to disagree with you on this. Ad hominem attacks really help your case
726
+ A: Let's think step by step.
727
+ If we look at (A), it says that avoiding ad hominem attacks really help your case, implying that ad hominem attacks are adverse and injurious. Because ad hominem attacks are adressed at a person rather than an idea, it is indeed true that avoiding them is often useful and helpful; so, (A) is a neutral (valid and agreeable) statement.
728
+ If we look at (B), it says that ad hominem attacks really help your case, implying that ad hominem attacks are a positive thing. However, we stated previously that ad hominem attacks are often not useful or constructive. The speaker in this sentence therefore seems to mean the opposite of what they are saying; so, there appears to have a taste of irony and sarcasm in (B).
729
+ Above the above, the sarcastic option is (B). So the answer is (B).
730
+
731
+ Q: Which statement is sarcastic?
732
+ Options:
733
+ (A) Consistency in the league's punishments? What do you think this is supposed to be, politics?
734
+ (B) Consistency in the league's punishments? What do you think this is supposed to be, moral?
735
+ A: Let's think step by step.
736
+ If we look at (A), it likens the consistency in the league's punishments with that in politics. Because politics or political affairs are often not considered to be consistent or dependable, this sentence appears to be satirical.
737
+ If we look at (B), it likens the consistency in the league's punishments with that in morality. Discussing the consistency of the league's punishments in the context of morality, ethics, or law makes sense and does not appear to make a satirical point about anything.
738
+ Above the above, the sarcastic option is (A). So the answer is (A).""",
739
+
740
+
741
+ 'ruin_names': """Select the humorous edit that 'ruins' the input movie or musical artist name.
742
+
743
+ Q: Which of the following is a humorous edit of this artist or movie name: 'whitesnake'?
744
+ Options:
745
+ (A) whitesnape
746
+ (B) whitesnapke
747
+ (C) whitesnuake
748
+ (D) mwhitesnake
749
+ A: Let's think step by step.
750
+ The original name is "whitesnake". This is the name of an old English hard rock band. It is a compound word, formed by the words "white" and "snake".
751
+ (A) "whitesnape": It is formed by the combination of "white" and "snake"; therefore, "snake" has been changed to "snape". Snape makes a reference to the fictional character Severus Snape in the Harry Potter series, so (A) is indeed a meaningful and funny edit.
752
+ (B) "whitesnapke": It is formed by the combination of "white" and "snapke", but "snapke" is not an actual word; therefore, "whitesnapke" is not humorous.
753
+ (C) "whitesnuake": It is formed by the combination of "white" and "snuake", but "snuake" is not an actual word; therefore, "whitesnuake" is not humorous.
754
+ (D) "mwhitesnake": It is formed by the combination of "m", "white", and "snake", but the prefix "-m "seems arbitrary; therefore, "mwhitesnake" is not meaningful or humorous.
755
+ Above the above, the only humorous edit is (A). So the answer is (A).
756
+
757
+ Q: Which of the following is a humorous edit of this artist or movie name: 'one of our dinosaurs is missing'?
758
+ Options:
759
+ (A) ofne of our dinosaurs is missing
760
+ (B) one af our dinosaurs is missing
761
+ (C) one of our dinosaurs is pissing
762
+ (D) one of our dinosaur is missing
763
+ A: Let's think step by step.
764
+ The original name is "one of our dinosaurs is missing". This is the name of an old British movie.
765
+ (A) "ofne of our dinosaurs is missing": Here "one of" is changed to "ofne", but the word "ofne" is not an actual word.
766
+ (B) "one af our dinosaurs is missing": Here the word "of" is changed to "af", but the word "af" is not an actual word.
767
+ (C) "one of our dinosaurs is pissing": Here the word "missing" is changed to "pissing", and "one of our dinosaurs is pissing" is indeed a very whimsical and mischievous edit. This change truly ruins the original title of the movie.
768
+ (D) "one of our dinosaur is missing": Here the word "dinosaurs" is changed to "dinosaur", but "dinosaur" is singular but should be plural in the title; this change therefore feels arbitrary and not humorous.
769
+ Above the above, the only humorous edit is (C).
770
+ Above the above, the only humorous edit is (C). So the answer is (C).
771
+
772
+ Q: Which of the following is a humorous edit of this artist or movie name: 'counting crows'?
773
+ Options:
774
+ (A) countingy crows
775
+ (B) counting cows
776
+ (C) courting crows
777
+ (D) coutnting crows
778
+ A: Let's think step by step.
779
+ The original name is "counting crows". This is the name of an American rock band. Historically, the band name comes from the British nursery rhyme "One for Sorrow", which is about counting of magpies.
780
+ (A) "countingy crows": Here the word "counting" is changed to "countingy", but the word "countingy" is not an actual word.
781
+ (B) "counting cows": Here the word "crows" is changed to "cows", and this is indeed a playful and meaningful edit that ruins the original name of the band.
782
+ (C) "courting crows": Here the word "counting" is changed to "courting", and "courting" is an actual word; however, "courting crows" does not sound as humorous as "counting cows".
783
+ (D) "coutnting crows": Here the word "counting" is changed to "coutnting", but the word "coutnting" is not an actual word.
784
+ Above the above, the only humorous edit is (B). So the answer is (B).""",
785
+
786
+
787
+ 'tracking_shuffled_objects_seven_objects': """A task requiring determining the final positions of a set of objects given their initial positions and a description of a sequence of swaps.
788
+
789
+ Q: Alice, Bob, and Claire are playing a game. At the start of the game, they are each holding a ball: Alice has a yellow ball, Bob has a blue ball, and Claire has a pink ball.
790
+ As the game progresses, pairs of players trade balls. First, Claire and Alice swap balls. Then, Alice and Bob swap balls. Finally, Claire and Bob swap balls. At the end of the game, Bob has the
791
+ Options:
792
+ (A) yellow ball
793
+ (B) blue ball
794
+ (C) pink ball
795
+ A: Let's think step by step.
796
+ (0) At the start: Alice: yellow, Bob: blue, Claire: pink.
797
+ (1) Claire and Alice swap balls: Alice: pink, Bob: blue, Claire: yellow.
798
+ (2) Alice and Bob swap balls: Alice: blue, Bob: pink, Claire: yellow.
799
+ (3) Claire and Bob swap balls: Alice: blue, Bob: yellow, Claire: pink.
800
+ At the end of the game, Bob has the yellow ball. So the answer is (A).
801
+
802
+ Q: Alice, Bob, and Claire are playing a game. At the start of the game, they are each holding a ball: Alice has a white ball, Bob has a purple ball, and Claire has a pink ball.
803
+ As the game progresses, pairs of players trade balls. First, Bob and Alice swap balls. Then, Bob and Claire swap balls. Finally, Bob and Alice swap balls. At the end of the game, Alice has the
804
+ Options:
805
+ (A) white ball
806
+ (B) purple ball
807
+ (C) pink ball
808
+ A: Let's think step by step.
809
+ (0) At the start: Alice: white, Bob: purple, Claire: pink.
810
+ (1) Bob and Alice swap balls: Alice: purple, Bob: white, Claire: pink.
811
+ (2) Bob and Claire swap balls: Alice: purple, Bob: pink, Claire: white.
812
+ (3) Bob and Alice swap balls: Alice: pink, Bob: purple, Claire: white.
813
+ At the end of the game, Alice has the pink ball. So the answer is (C).
814
+
815
+ Q: Alice, Bob, and Claire are dancers at a square dance. At the start of a song, they each have a partner: Alice is dancing with Lola, Bob is dancing with Rodrigo, and Claire is dancing with Patrick.
816
+ Throughout the song, the dancers often trade partners. First, Alice and Bob switch partners. Then, Claire and Bob switch partners. Finally, Bob and Alice switch partners. At the end of the dance, Alice is dancing with
817
+ Options:
818
+ (A) Lola
819
+ (B) Rodrigo
820
+ (C) Patrick
821
+ A: Let's think step by step.
822
+ (0) At the start: Alice: Lola, Bob: Rodrigo, Claire: Patrick.
823
+ (1) Alice and Bob switch partners: Alice: Rodrigo, Bob: Lola, Claire: Patrick.
824
+ (2) Claire and Bob switch partners: Alice: Rodrigo, Bob: Patrick, Claire: Lola.
825
+ (3) Bob and Alice switch partners: Alice: Patrick, Bob: Rodrigo, Claire: Lola.
826
+ At the end of the dance, Alice is dancing with Patrick. So the answer is (C).""",
827
+
828
+
829
+ 'tracking_shuffled_objects_five_objects': """A task requiring determining the final positions of a set of objects given their initial positions and a description of a sequence of swaps.
830
+
831
+ Q: Alice, Bob, and Claire are playing a game. At the start of the game, they are each holding a ball: Alice has a yellow ball, Bob has a blue ball, and Claire has a pink ball.
832
+ As the game progresses, pairs of players trade balls. First, Claire and Alice swap balls. Then, Alice and Bob swap balls. Finally, Claire and Bob swap balls. At the end of the game, Bob has the
833
+ Options:
834
+ (A) yellow ball
835
+ (B) blue ball
836
+ (C) pink ball
837
+ A: Let's think step by step.
838
+ (0) At the start: Alice: yellow, Bob: blue, Claire: pink.
839
+ (1) Claire and Alice swap balls: Alice: pink, Bob: blue, Claire: yellow.
840
+ (2) Alice and Bob swap balls: Alice: blue, Bob: pink, Claire: yellow.
841
+ (3) Claire and Bob swap balls: Alice: blue, Bob: yellow, Claire: pink.
842
+ At the end of the game, Bob has the yellow ball. So the answer is (A).
843
+
844
+ Q: Alice, Bob, and Claire are playing a game. At the start of the game, they are each holding a ball: Alice has a white ball, Bob has a purple ball, and Claire has a pink ball.
845
+ As the game progresses, pairs of players trade balls. First, Bob and Alice swap balls. Then, Bob and Claire swap balls. Finally, Bob and Alice swap balls. At the end of the game, Alice has the
846
+ Options:
847
+ (A) white ball
848
+ (B) purple ball
849
+ (C) pink ball
850
+ A: Let's think step by step.
851
+ (0) At the start: Alice: white, Bob: purple, Claire: pink.
852
+ (1) Bob and Alice swap balls: Alice: purple, Bob: white, Claire: pink.
853
+ (2) Bob and Claire swap balls: Alice: purple, Bob: pink, Claire: white.
854
+ (3) Bob and Alice swap balls: Alice: pink, Bob: purple, Claire: white.
855
+ At the end of the game, Alice has the pink ball. So the answer is (C).
856
+
857
+ Q: Alice, Bob, and Claire are dancers at a square dance. At the start of a song, they each have a partner: Alice is dancing with Lola, Bob is dancing with Rodrigo, and Claire is dancing with Patrick.
858
+ Throughout the song, the dancers often trade partners. First, Alice and Bob switch partners. Then, Claire and Bob switch partners. Finally, Bob and Alice switch partners. At the end of the dance, Alice is dancing with
859
+ Options:
860
+ (A) Lola
861
+ (B) Rodrigo
862
+ (C) Patrick
863
+ A: Let's think step by step.
864
+ (0) At the start: Alice: Lola, Bob: Rodrigo, Claire: Patrick.
865
+ (1) Alice and Bob switch partners: Alice: Rodrigo, Bob: Lola, Claire: Patrick.
866
+ (2) Claire and Bob switch partners: Alice: Rodrigo, Bob: Patrick, Claire: Lola.
867
+ (3) Bob and Alice switch partners: Alice: Patrick, Bob: Rodrigo, Claire: Lola.
868
+ At the end of the dance, Alice is dancing with Patrick. So the answer is (C).""",
869
+
870
+
871
+ 'logical_deduction_three_objects': """A logical deduction task which requires deducing the order of a sequence of objects.
872
+
873
+ Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished above Amy. Eli finished below Amy.
874
+ Options:
875
+ (A) Amy finished last
876
+ (B) Eli finished last
877
+ (C) Eve finished last
878
+ A: Let's think step by step.
879
+ (1) Eve finished above Amy: "(above) ? Eve ? Amy ? (below)".
880
+ (2) Eli finished below Amy: "(above) ? Amy ? Eli ? (below)".
881
+ (3) Combining (1) and (2) we get the following ordering: "(above) Eve Amy Eli (below)".
882
+ According to this ordering, the person who finished last (the one at the bottom of this list) is Eli.
883
+ Eli finished last. So the answer is (B).
884
+
885
+ Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a white book, a green book, and an orange book. The green book is to the right of the white book. The orange book is the rightmost.
886
+ Options:
887
+ (A) The white book is the leftmost
888
+ (B) The green book is the leftmost
889
+ (C) The orange book is the leftmost
890
+ A: Let's think step by step.
891
+ (1) The green book is to the right of the white book: "(left) ? white ? green ? (right)".
892
+ (2) The orange book is the rightmost: "(left) ? white ? green orange (right)".
893
+ (3) Combining (1) and (2) we get the following ordering: "(left) white green orange (right)".
894
+ According to this ordering, the leftmost book is the white book.
895
+ The white book is the leftmost. So the answer is (A).
896
+
897
+ Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a red book, a gray book, and a white book. The white book is to the left of the gray book. The red book is the second from the left.
898
+ Options:
899
+ (A) The red book is the leftmost
900
+ (B) The gray book is the leftmost
901
+ (C) The white book is the leftmost
902
+ A: Let's think step by step.
903
+ (1) The white book is to the left of the gray book: "(left) ? white ? gray ? (right)".
904
+ (2) The red book is the second from the left: "(left) ? white red gray ? (right)".
905
+ (3) Combining (1) and (2) we get the following ordering: "(left) white red gray (right)".
906
+ According to this ordering, the leftmost book is the white book.
907
+ The white book is the leftmost. So the answer is (C).""",
908
+
909
+
910
+ 'hyperbaton': """Order adjectives correctly in English sentences.
911
+
912
+ Q: Which sentence has the correct adjective order:
913
+ Options:
914
+ (A) rubber terrible ship
915
+ (B) terrible rubber ship
916
+ A: Let's think step by step.
917
+ When there is more than one adjective before a noun, the adjectives need to respect the following order before a noun: "[1. opinion] [2. size] [3. age] [4. shape] [5. color] [6. origin] [7. material] [8. purpose] noun".
918
+ Option (A): "rubber terrible ship". (1) rubber" falls into the material category. (2) "terrible" falls into the opinion category. Option (A) has the following adjective order: [7. material] [1. opinion] (or, in numeric terms, 7 1). Because 7 < 1 is not correct, (A) does not have the correct ordering.
919
+ Option (B): "terrible rubber ship". Option (B) has the following adjective order: [1. opinion] [7. material] (or, in numeric terms, 1 7). Because 1 < 7 is correct, (B) has the correct ordering. So the answer is (B).
920
+
921
+ Q: Which sentence has the correct adjective order:
922
+ Options:
923
+ (A) repulsive small Brazilian exercise ship
924
+ (B) Brazilian repulsive exercise small ship
925
+ A: Let's think step by step.
926
+ When there is more than one adjective before a noun, the adjectives need to respect the following order before a noun: "[1. opinion] [2. size] [3. age] [4. shape] [5. color] [6. origin] [7. material] [8. purpose] noun".
927
+ Option (A): "repulsive small Brazilian exercise ship". (1) "repulsive" falls into the opinion category. (2) "small" falls into the size category. (3) "Brazilian" falls into the origin category. (4) "exercise" falls into the purpose category. Option (A) has the following adjective order: [1. opinion] [2. size] [6. origin] [8. purpose] (or, in numeric terms, 1 2 6 8). Because 1 < 2 < 6 < 8 is correct, (A) has the correct ordering.
928
+ Option (B): "Brazilian repulsive exercise small ship". Option (B) has the following adjective order: [6. origin] [1. opinion] [8. purpose] [2. size] (or, in numeric terms, 6 1 8 2). Because 6 < 1 < 8 < 2 is not correct, (B) does not have the correct ordering. So the answer is (A).
929
+
930
+ Q: Which sentence has the correct adjective order:
931
+ Options:
932
+ (A) blue gold wonderful square shoe
933
+ (B) wonderful square blue gold shoe
934
+ A: Let's think step by step.
935
+ When there is more than one adjective before a noun, the adjectives need to respect the following order before a noun: "[1. opinion] [2. size] [3. age] [4. shape] [5. color] [6. origin] [7. material] [8. purpose] noun".
936
+ Option (A): "blue gold wonderful square shoe". (1) "blue" falls into the color category. (2) "gold" falls into the material category. (3) "wonderful" falls into the opinion category. (4) "square" falls into the shape category. The adjective order that Option (A) has is [5. color] [7. material] [1. opinion] [4. shape] (or, in numeric terms, 5 7 1 4). Because 5 < 7 < 1 < 4 is not correct, (A) does not have the correct ordering.
937
+ Option (B): "wonderful square blue gold shoe". Option (B) has the following adjective order: [1. opinion] [4. shape] [5. color] [7. material] (or, in numeric terms, 1 4 5 7 ). Because 1 < 4 < 5 < 7 is correct, (B) has the correct ordering. So the answer is (B).""",
938
+
939
+
940
+ 'logical_deduction_five_objects': """A logical deduction task which requires deducing the order of a sequence of objects.
941
+
942
+ Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished above Amy. Eli finished below Amy.
943
+ Options:
944
+ (A) Amy finished last
945
+ (B) Eli finished last
946
+ (C) Eve finished last
947
+ A: Let's think step by step.
948
+ (1) Eve finished above Amy: "(above) ? Eve ? Amy ? (below)".
949
+ (2) Eli finished below Amy: "(above) ? Amy ? Eli ? (below)".
950
+ (3) Combining (1) and (2) we get the following ordering: "(above) Eve Amy Eli (below)".
951
+ According to this ordering, the person who finished last (the one at the bottom of this list) is Eli.
952
+ Eli finished last. So the answer is (B).
953
+
954
+ Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a white book, a green book, and an orange book. The green book is to the right of the white book. The orange book is the rightmost.
955
+ Options:
956
+ (A) The white book is the leftmost
957
+ (B) The green book is the leftmost
958
+ (C) The orange book is the leftmost
959
+ A: Let's think step by step.
960
+ (1) The green book is to the right of the white book: "(left) ? white ? green ? (right)".
961
+ (2) The orange book is the rightmost: "(left) ? white ? green orange (right)".
962
+ (3) Combining (1) and (2) we get the following ordering: "(left) white green orange (right)".
963
+ According to this ordering, the leftmost book is the white book.
964
+ The white book is the leftmost. So the answer is (A).
965
+
966
+ Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a red book, a gray book, and a white book. The white book is to the left of the gray book. The red book is the second from the left.
967
+ Options:
968
+ (A) The red book is the leftmost
969
+ (B) The gray book is the leftmost
970
+ (C) The white book is the leftmost
971
+ A: Let's think step by step.
972
+ (1) The white book is to the left of the gray book: "(left) ? white ? gray ? (right)".
973
+ (2) The red book is the second from the left: "(left) ? white red gray ? (right)".
974
+ (3) Combining (1) and (2) we get the following ordering: "(left) white red gray (right)".
975
+ According to this ordering, the leftmost book is the white book.
976
+ The white book is the leftmost. So the answer is (C).""",
977
+
978
+
979
+ 'logical_deduction_seven_objects': """A logical deduction task which requires deducing the order of a sequence of objects.
980
+
981
+ Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. In a golf tournament, there were three golfers: Amy, Eli, and Eve. Eve finished above Amy. Eli finished below Amy.
982
+ Options:
983
+ (A) Amy finished last
984
+ (B) Eli finished last
985
+ (C) Eve finished last
986
+ A: Let's think step by step.
987
+ (1) Eve finished above Amy: "(above) ? Eve ? Amy ? (below)".
988
+ (2) Eli finished below Amy: "(above) ? Amy ? Eli ? (below)".
989
+ (3) Combining (1) and (2) we get the following ordering: "(above) Eve Amy Eli (below)".
990
+ According to this ordering, the person who finished last (the one at the bottom of this list) is Eli.
991
+ Eli finished last. So the answer is (B).
992
+
993
+ Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a white book, a green book, and an orange book. The green book is to the right of the white book. The orange book is the rightmost.
994
+ Options:
995
+ (A) The white book is the leftmost
996
+ (B) The green book is the leftmost
997
+ (C) The orange book is the leftmost
998
+ A: Let's think step by step.
999
+ (1) The green book is to the right of the white book: "(left) ? white ? green ? (right)".
1000
+ (2) The orange book is the rightmost: "(left) ? white ? green orange (right)".
1001
+ (3) Combining (1) and (2) we get the following ordering: "(left) white green orange (right)".
1002
+ According to this ordering, the leftmost book is the white book.
1003
+ The white book is the leftmost. So the answer is (A).
1004
+
1005
+ Q: The following paragraphs each describe a set of three objects arranged in a fixed order. The statements are logically consistent within each paragraph. On a shelf, there are three books: a red book, a gray book, and a white book. The white book is to the left of the gray book. The red book is the second from the left.
1006
+ Options:
1007
+ (A) The red book is the leftmost
1008
+ (B) The gray book is the leftmost
1009
+ (C) The white book is the leftmost
1010
+ A: Let's think step by step.
1011
+ (1) The white book is to the left of the gray book: "(left) ? white ? gray ? (right)".
1012
+ (2) The red book is the second from the left: "(left) ? white red gray ? (right)".
1013
+ (3) Combining (1) and (2) we get the following ordering: "(left) white red gray (right)".
1014
+ According to this ordering, the leftmost book is the white book.
1015
+ The white book is the leftmost. So the answer is (C).""",
1016
+
1017
+
1018
+ 'movie_recommendation': """Recommend movies similar to the given list of movies.
1019
+
1020
+ Q: Find a movie similar to Star Wars Episode IV - A New Hope, Indiana Jones and the Last Crusade, Star Wars Episode V - The Empire Strikes Back, The Big Lebowski:
1021
+ Options:
1022
+ (A) Tetsuo
1023
+ (B) the Ironman
1024
+ (C) The Princess Bride
1025
+ (D) The Barkley Marathons The Race That Eats Its Young
1026
+ (E) Bug
1027
+ A: Let's think step by step.
1028
+ - Star Wars Episode IV - A New Hope (action, adventure, fantasy; 1977)
1029
+ - Indiana Jones and the Last Crusade (action, adventure; 1989)
1030
+ - Star Wars Episode V - The Empire Strikes Back (action, adventure, fantasy; 1980)
1031
+ - The Big Lebowski (action, drama, comedy; 1998)
1032
+ These are all famous classic American movies produced before 2000. Amongst all the options, the only movie similar to these ones seems to be The Princess Bride (1987). So the answer is (C).
1033
+
1034
+ Q: Find a movie similar to Twister, The Silence of the Lambs, Independence Day, Braveheart:
1035
+ Options:
1036
+ (A) They Shoot Horses
1037
+ (B) Don't They
1038
+ (C) Forrest Gump
1039
+ (D) The Salton Sea
1040
+ (E) Extreme Days
1041
+ A: Let's think step by step.
1042
+ - Twister (action, adventure, thriller; 1996)
1043
+ - The Silence of the Lambs (crime, drama, thriller; 1991)
1044
+ - Independence Day (action, science-fiction, drama; 1996)
1045
+ - Braveheart (biography, drama, epic; 1995)
1046
+ These are all famous Hollywood movies produced around the 1990s. Amongst all the options, the only movie similar to these ones seems to be Forrest Gump (comedy, drama, romance; 1994). So the answer is (C).
1047
+
1048
+ Q: Find a movie similar to Minority Report, Total Recall, Inside Out, Forrest Gump:
1049
+ Options:
1050
+ (A) Phenomena
1051
+ (B) Lilting
1052
+ (C) Catwoman
1053
+ (D) Edge of Tomorrow
1054
+ A: Let's think step by step.
1055
+ - Minority Report (action, crime, mystery; 2002)
1056
+ - Total Recall (action, adventure, science-fiction; 2012)
1057
+ - Inside Out (animation, family, comedy; 2015)
1058
+ - Forrest Gump (comedy, drama, romance; 1994)
1059
+ These are all famous movies produced in the past few decades.Amongst all the options, the only movie similar to these ones seems to be Edge of Tomorrow (action, adventure, crime, mystery; 2014), as it is also a science-fiction movie and features Tom Cruise. So the answer is (D).""",
1060
+
1061
+
1062
+ 'salient_translation_error_detection': """Detect the type of error in an English translation of a German source sentence.
1063
+
1064
+ Q: The following translations from German to English contain a particular error. That error will be one of the following types: Named Entities: An entity (names, places, locations, etc.) is changed to a different entity. Numerical Values: Numerical values (ordinals or cardinals), dates, and/or units are changed. Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are changed. Negation or Antonyms: Introduce or remove a negation or change comparatives to their antonyms. Facts: Trivial factual errors not pertaining to the above classes are introduced in the translations. Dropped Content: A significant clause in the translation is removed. Please identify that error. Source: In der Liste der Baudenkmale in Lenzen (Elbe) sind alle Baudenkmale der brandenburgischen Stadt Lenzen (Elbe) und ihrer Ortsteile aufgelistet.
1065
+ Translation: In the list of architectural monuments in Lenzen all architectural monuments of the Brandenburg city of Lenzen and its districts are listed.
1066
+ The translation contains an error pertaining to
1067
+ Options:
1068
+ (A) Modifiers or Adjectives
1069
+ (B) Numerical Values
1070
+ (C) Negation or Antonyms
1071
+ (D) Named Entities
1072
+ (E) Dropped Content
1073
+ (F) Facts
1074
+ A: Let's think step by step.
1075
+ We solve this question by first translating the source sentence to English and then by comparing our translation with the provided translation. According to Google Translate, the correct translation of the source sentence from German to English is "The list of monuments in Lenzen (Elbe) includes all the monuments in the Brandenburg town of Lenzen (Elbe) and its districts." On the other hand, the provided translation is "In the list of architectural monuments in Lenzen all architectural monuments of the Brandenburg city of Lenzen and its districts are listed." Note that Lenzen (Elbe) is changed to Lenzen in the original translation; so, there is a named entity error. Because an entity in the original source sentence is changed to a different entity in the translation, the translation contains an error pertaining to Named Entities. So the answer is (D).
1076
+
1077
+ Q: The following translations from German to English contain a particular error. That error will be one of the following types: Named Entities: An entity (names, places, locations, etc.) is changed to a different entity. Numerical Values: Numerical values (ordinals or cardinals), dates, and/or units are changed. Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are changed. Negation or Antonyms: Introduce or remove a negation or change comparatives to their antonyms. Facts: Trivial factual errors not pertaining to the above classes are introduced in the translations. Dropped Content: A significant clause in the translation is removed. Please identify that error. Source: Auf dieser Seite sind die Baudenkmäler der oberbayerischen Großen Kreisstadt Landsberg am Lech zusammengestellt.
1078
+ Translation: On this page are compiled the architectural monuments of the town of Landsberg am Lech.
1079
+ The translation contains an error pertaining to
1080
+ Options:
1081
+ (A) Modifiers or Adjectives
1082
+ (B) Numerical Values
1083
+ (C) Negation or Antonyms
1084
+ (D) Named Entities
1085
+ (E) Dropped Content
1086
+ (F) Facts
1087
+ A: Let's think step by step.
1088
+ We solve this question by first translating the source sentence to English and then by comparing our translation with the provided translation. According to Google Translate, the correct translation of the source sentence from German to English is "The monuments of the Upper Bavarian district town of Landsberg am Lech are compiled on this page." On the other hand, the provided translation is "On this page are compiled the architectural monuments of the town of Landsberg am Lech." Note that an important detail about the location of Landsberg am Lech is omitted in the original translation: The translation should have said "Upper Bavarian district town of Landsberg am Lech". Because a significant clause in the translation was removed, the translation contains an error pertaining to Dropped Content. So the answer is (E).
1089
+
1090
+ Q: The following translations from German to English contain a particular error. That error will be one of the following types: Named Entities: An entity (names, places, locations, etc.) is changed to a different entity. Numerical Values: Numerical values (ordinals or cardinals), dates, and/or units are changed. Modifiers or Adjectives: The modifiers and adjectives pertaining to a noun are changed. Negation or Antonyms: Introduce or remove a negation or change comparatives to their antonyms. Facts: Trivial factual errors not pertaining to the above classes are introduced in the translations. Dropped Content: A significant clause in the translation is removed. Please identify that error. Source: Łeba ist eine Kleinstadt und ein Badeort im Powiat Lęborski der polnischen Woiwodschaft Pommern.
1091
+ Translation: Eba is not a small town and seaside resort in the Powiat Léborski county of the Pomeranian Voivodeship of Poland.
1092
+ The translation contains an error pertaining to
1093
+ Options:
1094
+ (A) Modifiers or Adjectives
1095
+ (B) Numerical Values
1096
+ (C) Negation or Antonyms
1097
+ (D) Named Entities
1098
+ (E) Dropped Content
1099
+ (F) Facts
1100
+ A: Let's think step by step.
1101
+ We solve this question by first translating the source sentence to English and then by comparing our translation with the provided translation. According to Google Translate, the correct translation of the source sentence from German to English is "Łeba is a small town and seaside resort in the Powiat Lęborski of the Polish Pomeranian Voivodeship." On the other hand, the provided translation is "Łeba is not a small town and seaside resort in the Powiat Léborski county of the Pomeranian Voivodeship of Poland." Note that the provided sentence says, "Łeba is not a small town ..." However, the translation should have been "Łeba is a small town ..." Because a negation is introduced at the beginning of the sentence and has fundamentally changed the meaning of the original source, the translation contains an error pertaining to Negation or Antonyms. So the answer is (C).""",
1102
+
1103
+
1104
+ 'reasoning_about_colored_objects': """Answer extremely simple questions about the colors of objects on a surface.
1105
+
1106
+ Q: On the nightstand, there is a red pencil, a purple mug, a burgundy keychain, a fuchsia teddy bear, a black plate, and a blue stress ball. What color is the stress ball?
1107
+ Options:
1108
+ (A) red
1109
+ (B) orange
1110
+ (C) yellow
1111
+ (D) green
1112
+ (E) blue
1113
+ (F) brown
1114
+ (G) magenta
1115
+ (H) fuchsia
1116
+ (I) mauve
1117
+ (J) teal
1118
+ (K) turquoise
1119
+ (L) burgundy
1120
+ (M) silver
1121
+ (N) gold
1122
+ (O) black
1123
+ (P) grey
1124
+ (Q) purple
1125
+ (R) pink
1126
+ A: Let's think step by step.
1127
+ According to this question, the color of the stress ball is blue. So the answer is (E).
1128
+
1129
+ Q: On the table, you see a bunch of objects arranged in a row: a purple paperclip, a pink stress ball, a brown keychain, a green scrunchiephone charger, a mauve fidget spinner, and a burgundy pen. What is the color of the object directly to the right of the stress ball?
1130
+ Options:
1131
+ (A) red
1132
+ (B) orange
1133
+ (C) yellow
1134
+ (D) green
1135
+ (E) blue
1136
+ (F) brown
1137
+ (G) magenta
1138
+ (H) fuchsia
1139
+ (I) mauve
1140
+ (J) teal
1141
+ (K) turquoise
1142
+ (L) burgundy
1143
+ (M) silver
1144
+ (N) gold
1145
+ (O) black
1146
+ (P) grey
1147
+ (Q) purple
1148
+ (R) pink
1149
+ A: Let's think step by step.
1150
+ According to this question, the objects are arranged in a row, from left to right, as follows: (1) a purple paperclip, (2) a pink stress ball, (3) a brown keychain, (4) a green scrunchiephone charger, (5) a mauve fidget spinner, (6) a burgundy pen.
1151
+ The stress ball is the second object on the list, namely (2). The object that is to the right of the stress ball corresponds to (3), which is a brown keychain.
1152
+ The color of the keychain is brown. So the answer is (F).
1153
+
1154
+ Q: On the nightstand, you see the following items arranged in a row: a teal plate, a burgundy keychain, a yellow scrunchiephone charger, an orange mug, a pink notebook, and a grey cup. How many non-orange items do you see to the left of the teal item?
1155
+ Options:
1156
+ (A) zero
1157
+ (B) one
1158
+ (C) two
1159
+ (D) three
1160
+ (E) four
1161
+ (F) five
1162
+ (G) six
1163
+ A: Let's think step by step.
1164
+ According to this question, the objects are arranged in a row, from left to right, as follows: (1) a teal plate, (2) a burgundy keychain, (3) a yellow scrunchiephone charger, (4) an orange mug, (5) a pink notebook, (6) a grey cup.
1165
+ The teal plate is the first item, namely (1). There is no item to the left of the teal item.
1166
+ The number of non-orange items to the left of the teal item is zero. So the answer is (A).""",
1167
+
1168
+ 'multistep_arithmetic_two': """Solve multi-step arithmetic problems.
1169
+
1170
+ Q: ((-5 + 9 * -4 - 0) * (4 + -7 + 0 * -5)) =
1171
+ A: Let's think step by step.
1172
+ Let’s recall that the order of operations in mathematics is as follows: (1) Parentheses, (2) exponents, (3) multiplication and division (from left to right), (4) addition and multiplication (from left to right). So, remember to always compute the expressions inside parentheses or brackets first.
1173
+ This equation can be written as "A * B", where A = (-5 + 9 * -4 - 0) and B = (4 + -7 + 0 * -5).
1174
+ Let's calculate A = (-5 + 9 * -4 - 0) = (-5 + (9 * -4) - 0) = (-5 + (-36) - 0) = (-5 + -36 - 0) = -5 - 36 = -41.
1175
+ Let's calculate B = (4 + -7 + 0 * -5) = (4 + -7 + (0 * -5)) = (4 + -7 + 0) = (4 + -7) = (4 - 7) = -3.
1176
+ Then, the final equation is A * B = -41 * -3 = (-61) * (-3) = 123. So the answer is 123.
1177
+
1178
+ Q: ((-9 * 7 * 7 * -9) + (4 * -9 - 8 - -4)) =
1179
+ A: Let's think step by step.
1180
+ Let’s recall that the order of operations in mathematics is as follows: (1) Parentheses, (2) exponents, (3) multiplication and division (from left to right), (4) addition and multiplication (from left to right). So, remember to always compute the expressions inside parentheses or brackets first.
1181
+ This equation can be written as "A + B", where A = (-9 * 7 * 7 * -9) and B = (4 * -9 - 8 - -4).
1182
+ Let's calculate A = (-9 * 7 * 7 * -9) = ((-9 * 7) * (7 * -9)) = ((-63) * (-63)) = 3969.
1183
+ Let's calculate B = (4 * -9 - 8 - (-4)) = ((4 * -9) - 8 - (-4)) = ((-36) - 8 - (-4)) = ((-36 - 8) - (-4)) = (-44 - (-4)) = -40.
1184
+ Then, the final equation is A + B = 3969 + -40 = 3969 - 40 = 3929. So the answer is 3929.
1185
+
1186
+ Q: ((-3 + 5 * 8 * -4) - (9 - 8 * -7 + -9)) =
1187
+ A: Let's think step by step.
1188
+ Let’s recall that the order of operations in mathematics is as follows: (1) Parentheses, (2) exponents, (3) multiplication and division (from left to right), (4) addition and multiplication (from left to right). So, remember to always compute the expressions inside parentheses or brackets first.
1189
+ This equation can be written as "A - B", where A = (-3 + 5 * 8 * -4) and B = (9 - 8 * -7 + -9).
1190
+ Let's calculate A = (-3 + 5 * 8 * -4) = (-3 + (5 * 8) * -4) = (-3 + (40) * -4) = (-3 + (40 * -4)) = (-3 + -160) = -163.
1191
+ Let's calculate B = (9 - 8 * -7 + -9) = (9 - (8 * -7) + -9) = (9 - (-56) + -9) = ((9 - (-56)) + -9) = ((65) + -9)= (65 - 9) = 56.
1192
+ Then, the final equation is A - B = -163 - 56 = -219. So the answer is -219.""",
1193
+
1194
+
1195
+ 'navigate': """Given a series of navigation instructions, determine whether one would end up back at the starting point.
1196
+
1197
+ Q: If you follow these instructions, do you return to the starting point? Turn left. Turn around. Turn left. Take 7 steps. Take 2 steps. Take 4 steps. Take 8 steps.
1198
+ Options:
1199
+ - Yes
1200
+ - No
1201
+ A: Let's think step by step.
1202
+ We start at the origin (0, 0), facing the positive y-axis.
1203
+ (1) Turn left: (0, 0), facing the negative x-axis.
1204
+ (2) Turn around: (0, 0), facing the positive x-axis.
1205
+ (3) Turn left: (0, 0), facing the positive y-axis.
1206
+ (4) Take 7 steps: (0, 7), facing the positive y-axis.
1207
+ (5) Take 2 steps: (0, 9), facing the positive y-axis.
1208
+ (6) Take 4 steps: (0, 13), facing the positive y-axis.
1209
+ (7) Take 8 steps: (0, 21), facing the positive y-axis.
1210
+ Since (0, 21) is not (0, 0), we are not where we started. So the answer is No.
1211
+
1212
+ Q: If you follow these instructions, do you return to the starting point? Turn around. Take 1 step. Take 6 steps. Turn around. Take 6 steps. Take 9 steps. Take 1 step.
1213
+ Options:
1214
+ - Yes
1215
+ - No
1216
+ A: Let's think step by step.
1217
+ We start at the origin (0, 0), facing the positive y-axis.
1218
+ (1) Turn around: (0, 0), facing the negative y-axis.
1219
+ (2) Take 1 step: (0, -1), facing the negative y-axis.
1220
+ (3) Take 6 steps: (0, -7), facing the negative y-axis.
1221
+ (4) Turn around: (0, -7), facing the positive y-axis.
1222
+ (5) Take 6 steps: (0, -1), facing the positive y-axis.
1223
+ (6) Take 9 steps: (0, 8), facing the positive y-axis.
1224
+ (7) Take 1 step: (0, 9), facing the positive y-axis.
1225
+ Since (0, 9) is not (0, 0), we are not where we started. So the answer is No.
1226
+
1227
+ Q: If you follow these instructions, do you return to the starting point? Always face forward. Take 2 steps right. Take 9 steps left. Take 7 steps right.
1228
+ Options:
1229
+ - Yes
1230
+ - No
1231
+ A: Let's think step by step.
1232
+ We start at the origin (0, 0), facing the positive y-axis.
1233
+ (1) Always face forward: (0, 0), facing the positive y-axis.
1234
+ (2) Take 2 steps right: (0, 2), facing the positive y-axis.
1235
+ (3) Take 9 steps left: (0, -7), facing the positive y-axis.
1236
+ (4) Take 7 steps right: (0, 7), facing the positive y-axis.
1237
+ Since (0, 0) is (0, 0), we are indeed where we started. So the answer is Yes.""",
1238
+
1239
+
1240
+ 'dyck_languages': """Correctly close a Dyck-n word.
1241
+
1242
+ Q: Complete the rest of the sequence, making sure that the parentheses are closed properly. Input: [ { [
1243
+ A: Let's think step by step.
1244
+ We should process each input one by one and keep track of the stack configuration.
1245
+ 0: empty stack
1246
+ 1: [ ; stack: [
1247
+ 2: { ; stack: [ {
1248
+ 3: [ ; stack: [ { [
1249
+ Now, we have reached the end. The final stack is "[ { [".
1250
+ We will need to pop out "[", "{", "[" one by one in that order.
1251
+ So, we need "]", "}", "]". So the answer is ] } ].
1252
+
1253
+ Q: Complete the rest of the sequence, making sure that the parentheses are closed properly. Input: < > ( ( [ [ ( { } ) [ < > ] ]
1254
+ A: Let's think step by step.
1255
+ We should process each input one by one and keep track of the stack configuration.
1256
+ 0: empty stack
1257
+ 1: < ; stack: <
1258
+ 2: > ; stack: empty
1259
+ 3: ( ; stack: (
1260
+ 4: ( ; stack: ( (
1261
+ 5: [ ; stack: ( ( [
1262
+ 6: [ ; stack: ( ( [ [
1263
+ 7: ( ; stack: ( ( [ [ (
1264
+ 8: { ; stack: ( ( [ [ ( {
1265
+ 9: } ; stack: ( ( [ [ (
1266
+ 10: ) ; stack: ( ( [ [
1267
+ 11: [ ; stack: ( ( [ [ [
1268
+ 12: < ; stack: ( ( [ [ [ <
1269
+ 13: > ; stack: ( ( [ [ [
1270
+ 14: ] ; stack: ( ( [ [
1271
+ 15: ] ; stack: ( ( [
1272
+ Now, we have reached the end. The final stack is "( ( [".
1273
+ We will need to pop out "[", "(", "(" one by one in that order.
1274
+ So, we need "]", ")", ")". So the answer is ] ) ).
1275
+
1276
+ Q: Complete the rest of the sequence, making sure that the parentheses are closed properly. Input: < [ < [ { < [ ] < { } > > } ] > { { ( ) } { < [ < > ] > }
1277
+ A: Let's think step by step.
1278
+ We should process each input one by one and keep track of the stack configuration.
1279
+ 0: empty stack
1280
+ 1: < ; stack: <
1281
+ 2: [ ; stack: < [
1282
+ 3: < ; stack: < [ <
1283
+ 4: [ ; stack: < [ < [
1284
+ 5: { ; stack: < [ < [ {
1285
+ 6: < ; stack: < [ < [ { <
1286
+ 7: [ ; stack: < [ < [ { < [
1287
+ 8: ] ; stack: < [ < [ { <
1288
+ 9: < ; stack: < [ < [ { < <
1289
+ 10: { ; stack: < [ < [ { < < {
1290
+ 11: } ; stack: < [ < [ { < <
1291
+ 12: > ; stack: < [ < [ { <
1292
+ 13: > ; stack: < [ < [ {
1293
+ 14: } ; stack: < [ < [
1294
+ 15: ] ; stack: < [ <
1295
+ 16: > ; stack: < [
1296
+ 17: { ; stack: < [ {
1297
+ 18: { ; stack: < [ { {
1298
+ 19: ( ; stack: < [ { { (
1299
+ 20: ) ; stack: < [ { {
1300
+ 21: } ; stack: < [ {
1301
+ 22: { ; stack: < [ { {
1302
+ 23: < ; stack: < [ { { <
1303
+ 24: [ ; stack: < [ { { < [
1304
+ 25: < ; stack: < [ { { < [ <
1305
+ 26: > ; stack: < [ { { < [
1306
+ 27: ] ; stack: < [ { { <
1307
+ 28: > ; stack: < [ { {
1308
+ 29: } ; stack: < [ {
1309
+ Now, we have reached the end. The final stack is "< [ {".
1310
+ We will need to pop out "{", "[", "<" one by one in that order.
1311
+ So, we need "}", "]", ">". So the answer is } ] >.""",
1312
+
1313
+
1314
+ 'word_sorting': """Sort a list of words.
1315
+
1316
+ Q: Sort the following words alphabetically: List: oven costume counterpart
1317
+ A: Let's think step by step.
1318
+ The first letter: "oven": "o" (15). "costume": "c" (3). "counterpart": "c" (3). We now have: (3) ["costume" ? "counterpart"] < (15) "oven". Now let's sort this subpart ["costume" ? "counterpart"] by looking at their second letters.
1319
+ The second letter: "costume": "o" (15). "counterpart": "o" (15). We now have: (15) ["costume" ? "counterpart"]. Now let's sort this subpart ["costume" ? "counterpart"] by looking at their third letters.
1320
+ The third letter: "costume": "s" (19). "counterpart": "u" (21). We now have: (19) "costume" < (21) "counterpart". Hence, we have ["costume" < "counterpart"] < "oven". So the answer is costume counterpart oven.
1321
+
1322
+ Q: Sort the following words alphabetically: List: hypochlorite ponderosa phone credulity
1323
+ A: Let's think step by step.
1324
+ The first letter: "hypochlorite": "h" (8). "ponderosa": "p" (16). "phone": "p" (16). "credulity": "c" (3). We now have: (3) "credulity" < (8) "hypochlorite" < (16) ["ponderosa" ? "phone"]. Now let's sort this subpart ["ponderosa" ? "phone"] by looking at their second letters.
1325
+ The second letter: "ponderosa": "o" (15). "phone": "h" (8). We now have: (8) "phone" < (15) "ponderosa". Hence, we have "credulity" < "hypochlorite" < ["phone" <"ponderosa"]. So the answer is credulity hypochlorite phone ponderosa.
1326
+
1327
+ Q: Sort the following words alphabetically: List: newt arson parthia seismography mugho aspect census
1328
+ A: Let's think step by step.
1329
+ The first letter: "newt": "n" (14). "arson": "a" (1). "parthia": "p" (16). "seismography": "s" (19). "mugho": "m" (13). "aspect": "a" (1). "census": "c" (3). We now have: (1) ["arson" ? "aspect"] < (3) "census" < (13) "mugho" < (14) "newt" < (16) "parthia" < (19) "seismography". Now let's sort this subpart ["arson" ? "aspect"] by looking at their second letters.
1330
+ The second letter: "arson": "r" (18). "aspect": "s" (19). We now have: (18) "arson" < (19) "aspect". Hence, we have ["arson" < "aspect"] < "census" < "mugho" < "newt" < "parthia" < "seismography". So the answer is arson aspect census mugho newt parthia seismography.""",
1331
+
1332
+
1333
+ 'sports_understanding': """Determine whether an artificially constructed sentence relating to sports is plausible or not.
1334
+
1335
+ Q: Is the following sentence plausible? "Bam Adebayo scored a reverse layup in the Western Conference Finals."
1336
+ A: Let's think step by step. Bam Adebayo is an American basketball player. Scoring a reverse layup in the Western Conference Finals is part of the NBA Finals. So the answer is yes.
1337
+
1338
+ Q: Is the following sentence plausible? "Santi Cazorla scored a touchdown."
1339
+ A: Let's think step by step. Santi Cazorla is a soccer player. Touchdown is part of American football and rugby. So the answer is no.
1340
+
1341
+ Q: Is the following sentence plausible? "DeMar DeRozan was called for the goal tend."
1342
+ A: Let's think step by step. DeMar DeRozan is an American basketball player. Goal tending is part of basketball. So the answer is yes.""",
1343
+
1344
+
1345
+ 'boolean_expressions': """Evaluate the result of a random Boolean expression.
1346
+
1347
+ Q: not ( ( not not True ) ) is
1348
+ A: Let's think step by step.
1349
+ Remember that (i) expressions inside brackets are always evaluated first and that (ii) the order of operations from highest priority to lowest priority is "not", "and", "or", respectively.
1350
+ We first simplify this expression "Z" as follows: "Z = not ( ( not not True ) ) = not ( ( A ) )" where "A = not not True".
1351
+ Let's evaluate A: A = not not True = not (not True) = not False = True.
1352
+ Plugging in A, we get: Z = not ( ( A ) ) = not ( ( True ) ) = not True = False. So the answer is False.
1353
+
1354
+ Q: True and False and not True and True is
1355
+ A: Let's think step by step.
1356
+ Remember that (i) expressions inside brackets are always evaluated first and that (ii) the order of operations from highest priority to lowest priority is "not", "and", "or", respectively.
1357
+ We first simplify this expression "Z" as follows: "Z = True and False and not True and True = A and B" where "A = True and False" and "B = not True and True".
1358
+ Let's evaluate A: A = True and False = False.
1359
+ Let's evaluate B: B = not True and True = not (True and True) = not (True) = False.
1360
+ Plugging in A and B, we get: Z = A and B = False and False = False. So the answer is False.
1361
+
1362
+ Q: not not ( not ( False ) ) is
1363
+ A: Let's think step by step.
1364
+ Remember that (i) expressions inside brackets are always evaluated first and that (ii) the order of operations from highest priority to lowest priority is "not", "and", "or", respectively.
1365
+ We first simplify this expression "Z" as follows: "Z = not not ( not ( False ) ) = not not ( A )" where "A = not ( False )".
1366
+ Let's evaluate A: A = not ( False ) = not False = True.
1367
+ Plugging in A, we get: Z = not not ( A ) = not not (True) = not not False = True. So the answer is True.""",
1368
+
1369
+
1370
+ 'object_counting': """Questions that involve enumerating objects and asking the model to count them.
1371
+
1372
+ Q: I have a blackberry, a clarinet, a nectarine, a plum, a strawberry, a banana, a flute, an orange, and a violin. How many fruits do I have?
1373
+ A: Let's think step by step.
1374
+ We first identify the fruits on the list and include their quantity in parentheses:
1375
+ - blackberry (1)
1376
+ - nectarine (1)
1377
+ - plum (1)
1378
+ - strawberry (1)
1379
+ - banana (1)
1380
+ - orange (1)
1381
+ Now, let's add the numbers in parentheses: 1 + 1 + 1 + 1 + 1 + 1 = 6. So the answer is 6.
1382
+
1383
+ Q: I have an orange, a raspberry, two peaches, a blackberry, an apple, a grape, a nectarine, and three plums. How many fruits do I have?
1384
+ A: Let's think step by step.
1385
+ We first identify the fruits on the list and include their quantity in parentheses:
1386
+ - orange (1)
1387
+ - raspberry (1)
1388
+ - peaches (2)
1389
+ - blackberry (1)
1390
+ - apple (1)
1391
+ - grape (1)
1392
+ - nectarine (1)
1393
+ - plums (3)
1394
+ Now, let's add the numbers in parentheses: 1 + 1 + 2 + 1 + 1 + 1 + 1 + 3 = 11. So the answer is 11.
1395
+
1396
+ Q: I have a lettuce head, a head of broccoli, an onion, a stalk of celery, two carrots, a garlic, and a yam. How many vegetables do I have?
1397
+ A: Let's think step by step.
1398
+ We first identify the vegetables on the list and include their quantity in parentheses:
1399
+ - lettuce (1)
1400
+ - broccoli (1)
1401
+ - onion (1)
1402
+ - celery (1)
1403
+ - carrots (2)
1404
+ - garlic (1)
1405
+ - yam (1)
1406
+ Now, let's add the numbers in parentheses: 1 + 1 + 1 + 1 + 2 + 1 + 1 = 8. So the answer is 8.""",
1407
+
1408
+
1409
+ 'formal_fallacies': """Distinguish deductively valid arguments from formal fallacies.
1410
+
1411
+ Q: "It is not always easy to see who is related to whom -- and in which ways. The following argument pertains to this question: To begin with, Lesley is a close friend of Fernando. Moreover, being a close friend of Fernando or a schoolmate of Lowell is sufficient for being a great-grandfather of Leroy. It follows that Lesley is a great-grandfather of Leroy."
1412
+ Is the argument, given the explicitly stated premises, deductively valid or invalid?
1413
+ Options:
1414
+ - valid
1415
+ - invalid
1416
+ A: Let's think step by step.
1417
+ (1) Lesley is a close friend of Fernando: Lesley = friend(Fernando).
1418
+ (2) Being a close friend of Fernando or a schoolmate of Lowell is sufficient for being a great-grandfather of Leroy: If X = friend(Fernando) OR SCHOOLMATE(Lowell), then X = great-grandfather(Leroy).
1419
+ Hypothesis: Does it follow that Lesley is a great-grandfather of Leroy: Lesley = great-grandfather(Leroy)?
1420
+ Let’s see whether the Hypothesis can be deduced from the arguments (1) and (2) by logical reasoning?
1421
+ By (1), we have Lesley = friend(Fernando). By (2), we have if Lesley = friend(Fernando), then Lesley = great-grandfather(Leroy).
1422
+ So, it is true that Lesley is a great-grandfather of Leroy. So the answer is valid.
1423
+
1424
+ Q: "It is not always easy to see who is related to whom -- and in which ways. The following argument pertains to this question: Whoever is not a great-grandfather of Clyde is a stepbrother of Brian. Being an ancestor of Dana is sufficient for not being a great-grandfather of Clyde. We may conclude: Everyone who is an ancestor of Dana is a stepbrother of Brian, too."
1425
+ Is the argument, given the explicitly stated premises, deductively valid or invalid?
1426
+ Options:
1427
+ - valid
1428
+ - invalid
1429
+ A: Let's think step by step.
1430
+ (1) Whoever is not a great-grandfather of Clyde is a stepbrother of Brian: If X = NOT (great-grandfather(Clyde)), then X = stepbrother(Brian).
1431
+ (2): Being an ancestor of Dana is sufficient for not being a great-grandfather of Clyde: If X = ancestor(Dana), X = NOT (great-grandfather(Clyde)).
1432
+ Hypothesis: Does it follow that everyone who is an ancestor of Dana is a stepbrother of Brian, too: If X = ancestor(Dana), then X = stepbrother(Brian)?
1433
+ Let’s see whether the Hypothesis can be deduced from the arguments (1) and (2) by logical reasoning?
1434
+ By (2), we have if X = ancestor(Dana), X = NOT (great-grandfather(Clyde)).
1435
+ Furthermore, by (1), we have if X = NOT (great-grandfather(Clyde)), then X = stepbrother(Brian).
1436
+ By the transitive relation rule in first-order logic, we then have: if X = ancestor(Dana), then X = stepbrother(Brian).
1437
+ So, it is true that everyone who is an ancestor of Dana is a stepbrother of Brian. So the answer is valid.
1438
+
1439
+ Q: "It is not always easy to grasp who is consuming which products. The following argument pertains to this question: Every infrequent user of Paul Mitchell shampoo is either a rare consumer of Nioxin shampoo or a loyal buyer of Caress soap, or both. No regular consumer of Lush soap is a rare consumer of Nioxin shampoo and, in the same time, a loyal buyer of Caress soap. It follows that whoever is an infrequent user of Paul Mitchell shampoo is not a regular consumer of Lush soap."
1440
+ Is the argument, given the explicitly stated premises, deductively valid or invalid?
1441
+ Options:
1442
+ - valid
1443
+ - invalid
1444
+ A: Let's think step by step.
1445
+ (1) Every infrequent user of Paul Mitchell shampoo is either a rare consumer of Nioxin shampoo or a loyal buyer of Caress soap, or both: If X = infrequent-user(Paul Mitchell), then X = rare-consumer(Nioxin) OR X = loyal-buyer(Caress).
1446
+ (2): No regular consumer of Lush soap is a rare consumer of Nioxin shampoo and a loyal buyer of Caress soap at the same time. If X = regular-consumer(Lush), then X = NOT (rare-consumer(Nioxin) AND loyal-buyer(Caress)).
1447
+ Hypothesis: Does it follow that whoever is an infrequent user of Paul Mitchell shampoo is not a regular consumer of Lush soap: If X = infrequent-user(Paul Mitchell), then X = NOT (regular-consumer(Lush))?
1448
+ Let’s see whether the Hypothesis can be deduced from the arguments (1) and (2) by logical reasoning?
1449
+ By (1), we have if X = infrequent-user(Paul Mitchell), then X = rare-consumer(Nioxin) OR X = loyal-buyer(Caress). We need to consider both cases separately:
1450
+ The case X = rare-consumer(Nioxin) does not appear in (2).
1451
+ The case X = loyal-buyer(Caress) does not appear in (2), either.
1452
+ So, from (1) and (2), we cannot necessarily deduce the Hypothesis. So the answer is invalid.""",
1453
+
1454
+
1455
+ 'causal_judgement': """Answer questions about causal attribution.
1456
+
1457
+ Q: How would a typical person answer each of the following questions about causation?
1458
+ Frank T., had an ongoing dispute with his neighbor over a stretch of land and one day decided to shoot his neighbor in the body. Frank T. had no experience with guns, his hand slipped on the barrel of the gun, and the shot went wild. Nonetheless, the bullet bounced off a large boulder several feet away and hit the neighbor's body, causing significant injury. Did Frank T. intentionally shoot his neighbor in the body?
1459
+ Options:
1460
+ - Yes
1461
+ - No
1462
+ A: Let's think step by step.
1463
+ Here in this question, we are told that "Frank T. had no experience with guns, his hand slipped on the barrel of the gun, and the shot went wild." A typical person would assume that this passage suggests that Frank T. had no intention of shooting and injuring someone and that the bullet accidentally hit the neighbor's body; therefore, we conclude that Frank T. did not intentionally hit his neighbor. So the answer is No.
1464
+
1465
+ Q: How would a typical person answer each of the following questions about causation?
1466
+ Suzy and Billy are working on a project that is very important for our nation's security. The boss tells them both: "Be sure that you are here at exactly 9 am. It is absolutely essential that you arrive at that time." Both Billy and Suzy arrive at 9 am. As it happens, there was a motion detector installed in the room where they arrived. The motion detector was set up to be triggered if at least one person appeared in the room at the same time. So the motion detector went off. Did Billy cause the motion detector to go off?
1467
+ Options:
1468
+ - Yes
1469
+ - No
1470
+ A: Let's think step by step.
1471
+ Here in this question, we are told that the boss ordered them both to arrive at the meeting room at the same time and that the motion detector was set up to be triggered if at least one person appeared in the room at the same time." A typical person would assume that the person probably meant to say the detector was set up to be triggered if "both persons" appeared in the room at the same time, not at least one person, since otherwise the phrase "at the same time" would not make much sense in that sentence. Because the motion detector went off, a typical person would therefore come to the conclusion that both Suzy and Billy triggered the motion detector to go off; hence, Billy did indeed cause the motion detector to go off. So the answer is Yes.
1472
+
1473
+ Q: How would a typical person answer each of the following questions about causation?
1474
+ George and his sister Lena reunite at their parents' house for Thanksgiving. Whereas George just got into medical school, Lena is unhappy in her marriage and recently lost her job. Over the course of the day, George and Lena get into a number of heated arguments. Later in the afternoon they play a game of darts. They split the first two games, and the third game is close until the end. Who will win comes down to George's last shot. If he hits a high point region, he wins; if he hits a low point region, Lena wins. George thinks of the difficult time Lena is having, and he really wants to let her win. He aims the dart at the low point region. He sets up his shot and the dart lands in the low point region. After his shot, Lena wins the game and is very happy. Did George hit the low point region intentionally?
1475
+ Options:
1476
+ - Yes
1477
+ - No
1478
+ A: Let's think step by step.
1479
+ Here in this question, we are told that "He aims the dart at the low point region." A typical person might therefore think George did intentionally hit the low point region, because he wanted to lift up the spirit of his sister Lena. So the answer is Yes.""",
1480
+ 'web_of_lies': """Evaluate a random boolean function expressed as a word problem.
1481
+
1482
+ Q: Question: Fidel tells the truth. Jerry says Fidel tells the truth. Vina says Jerry tells the truth. Millicent says Vina lies. Raymond says Millicent lies. Does Raymond tell the truth?
1483
+ A: Let's think step by step.
1484
+ (1) Fidel tells the truth. So, we know that Fidel tells the truth.
1485
+ (2) Jerry says Fidel tells the truth. Since we know from (1) that Fidel tells the truth, if Jerry says that Fidel tells the truth, then Jerry tells the truth.
1486
+ (3) Vina says Jerry tells the truth. Since we know from (2) that Jerry tells the truth, if Vina says Jerry tells the truth, then Vine tells the truth.
1487
+ (4) Millicent says Vina lies. Since we know from (3) that Vina tells the truth, if Millicent says Vina lies, then Millicent lies.
1488
+ (5) Raymond says Millicent lies. Since we know from (4) that Millicent lies, if Raymond says Millicent lies, then Raymond tells the truth.
1489
+ Now, the question asks: Does Raymond tell the truth? We know from (5) that Raymond tells the truth. So the answer is Yes.
1490
+
1491
+ Q: Question: Kristian lies. Millie says Kristian lies. Maybelle says Millie tells the truth. Fidel says Maybelle lies. Leda says Fidel lies. Does Leda tell the truth?
1492
+ A: Let's think step by step.
1493
+ (1) Kristian lies. So, we know that Kristian lies.
1494
+ (2) Millie says Kristian lies. Since we know from (1) that Kristian lies, if Millie says Kristian lies, then Millie tells the truth.
1495
+ (3) Maybelle says Millie tells the truth. Since we know from (2) that Millie tells the truth, if Maybelle says Millie tells the truth, then Maybelle tells the truth.
1496
+ (4) Fidel says Maybelle lies. Since we know from (3) that Maybelle tells the truth, if Fidel says Maybelle lies, then Fidel lies.
1497
+ (5) Leda says Fidel lies. Since we know from (4) that Fidel lies, if Leda says Fidel lies, then Leda tells the truth.
1498
+ Now, the question asks: Does Leda tell the truth? We know from (5) that Leda tells the truth. So the answer is Yes.
1499
+
1500
+ Q: Question: Kristian tells the truth. Michaela says Kristian lies. Raymond says Michaela tells the truth. Osvaldo says Raymond tells the truth. Jamey says Osvaldo tells the truth. Does Jamey tell the truth?
1501
+ A: Let's think step by step.
1502
+ (1) Kristian tells the truth. So, we know that Kristian tells the truth.
1503
+ (2) Michaela says Kristian lies. Since we know from (1) that Kristian tells the truth, if Michaela says Kristian lies, then Michaela lies.
1504
+ (3) Raymond says Michaela tells the truth. Since we know from (2) that Michaela lies, if Raymond says Michaela tells the truth, then Raymond lies.
1505
+ (4) Osvaldo says Raymond tells the truth. Since we know from (3) that Raymond lies, if Osvaldo says Raymond tells the truth, then Osvaldo lies.
1506
+ (5) Jamey says Osvaldo tells the truth. Since we know from (4) that Osvaldo lies, if Jamey says Osvaldo tells the truth, then Jamey lies.
1507
+ Now, the question asks: Does Jamey tell the truth? We know from (5) that Jamey lies. So the answer is No.""",
1508
+ }
1509
+
1510
+
1511
+ def bbh_lib_prompt(category: str):
1512
+ return icl_prompts[category]
1513
+
1514
 
1515
  if __name__ == "__main__":
1516
  num = extract_numeric("the answer is -1.5")