-
Notifications
You must be signed in to change notification settings - Fork 155
/
templates.py
10585 lines (10551 loc) · 437 KB
/
templates.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2022 The FLAN Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Templates/Prompts."""
import copy
import dataclasses
from flan.v2 import flan_templates_branched as flan_templates
# pylint: disable=implicit-str-concat
# Zero-shot patterns.
PATTERNS = {
"rte": [
("{premise}\n\nQuestion with options: Based on the paragraph above can"
" we conclude that \"{hypothesis}\"?\n\n{options_}", "{answer}"),
("{premise}\n\nBased on that paragraph can we conclude that the "
"sentence below is true?\n{hypothesis}\n\n{options_}", "{answer}"),
("{premise}\n\nQ with options: Can we draw the following "
"conclusion?\n{hypothesis}\n\n{options_}", "{answer}"),
("{premise}\nDoes this next sentence follow, given the preceding "
"text?\n{hypothesis}\n\n{options_}", "{answer}"),
("{premise}\n{options_}\nQuestion: Can we infer the "
"following?\n{hypothesis}", "{answer}"),
("Read the following paragraph and determine if the hypothesis is "
"true. Select from options at the end:\n\n{premise}\n\nHypothesis: "
"{hypothesis}\n{options_}\nThe answer is", "{answer}"),
("Read the text and determine if the sentence is "
"true:\n\n{premise}\n\nSentence: {hypothesis}\n{options_}\nA:",
"{answer}"),
("Question with options: can we draw the following hypothesis from the"
" context? \n\nContext:\n\n{premise}\n\nHypothesis: "
"{hypothesis}\n{options_}\nA:", "{answer}"),
("Determine if the sentence is true based on the text below. Choose "
"from options.\n{hypothesis}\n\n{premise}\n{options_}", "{answer}"),
("Generate a context and a hypothesis.",
"Context: {premise}\n\nHypothesis: {hypothesis}"),
],
"wsc": [
("{context}\n\nWhich option(s) below is/are correct for question: are "
"\"{text1}\" and \"{text2}\" the same entity?\n\n{options_}",
"{answer}"),
("{context}\n\nMulti-choice question: Do \"{text1}\" and \"{text2}\" "
"have the same meaning?\n\n{options_}", "{answer}"),
("Multi-choice problem: Given the following "
"context\n\n{context}\n\nAre \"{text1}\" and \"{text2}\" the "
"same?\n\n{options_}\nA:", "{answer}"),
("Choose your answer.{options_}.\n\n{context}\n\nDo \"{text2}\" and "
"\"{text1}\" mean the same thing?", "{answer}"),
("{context}\n\nAre \"{text2}\" and \"{text1}\" the same thing in the "
"aforementioned sentence (choose from options)?\n\n{options_}",
"{answer}"),
("Context:{context}\n\nIs \"{text2}\" the same as \"{text1}\"? "
"Possible answers:{options_}\n\nAnswer:", "{answer}"),
("Consider this sentence: {context}\n\nAre \"{text2}\" and \"{text1}\""
" the same (see options)?\n\n{options_}", "{answer}"),
("Are \"{text1}\" and \"{text2}\" the same in this "
"sentence?\n{context}\n\n{options_}\nThe answer is:", "{answer}"),
("See context followed by options. Is \"{text1}\" the same as "
"\"{text2}\" in this sentence?\n{context}\n\n{options_}", "{answer}"),
("Choose your answer: Do \"{text1}\" and \"{text2}\" point to the same"
" thing in the following sentence?\n\n{context}\n\n{options_}",
"{answer}"),
],
"wsc273": [
("Multi-choice problem: {context}\n{options_}", "{answer}"),
("Complete the passage.\n\n{context}\n{options_}", "{answer}"),
("How does this following sentence end (see "
"options)?\n\n{context}\n{options_}", "{answer}"),
("What is the most logical completion for the following text (see "
"options)?\n\n{context}\n{options_}", "{answer}"),
("Multi-choice problem: How does this text "
"end?\n\n{context}\n{options_}", "{answer}"),
("Choose from the options on what happens "
"next.\n\n{context}\n{options_}", "{answer}"),
("Complete the following sentence.\n\n{context}\n{options_}",
"{answer}"),
("Choose from options: Fill in the remainder of the "
"sentence.\n\n{context}\n{options_}", "{answer}"),
("What is the next event listed in the options is "
"correct?\n\n{context}\n{options_}\nA:", "{answer}"),
("Complete the rest of the sentence by choosing from "
"options.\n\n{context}\n{options_}", "{answer}"),
],
"wic": [
("{sentence1}\n{sentence2}\nChoose your answer: Does the word "
"\"{word}\" mean the same thing in the above two "
"sentences?\n{options_}", "{answer}"),
("Sentence 1: {sentence1}\nSentence 2: {sentence2}\nMulti-choice "
"problem: Does {word} mean the same thing in these two "
"sentences?\n{options_}", "{answer}"),
("Here is one sentence: {sentence1}\nHere is another sentence: "
"{sentence2}\nQ: Does the term {word} mean the same thing in both "
"these sentences?\n{options_}", "{answer}"),
("In these two sentences (1) {sentence1} (2) {sentence2}, does the "
"word {word} mean the same thing?\n{options_}.... A:", "{answer}"),
("Multi-choice problem: does word \"{word}\" have the same meaning in "
"the following two "
"sentences?\n\n{sentence1}\n\n{sentence2}\n\n{options_}", "{answer}"),
("This question has options. Is the word \"{word}\" used in the same "
"way in the following two "
"sentences?\n\n{sentence1}\n\n{sentence2}\n\n{options_}", "{answer}"),
("This question has options. Does the word \"{word}\" have the same "
"definition in the next two "
"sentences?\n\n{sentence1}\n\n{sentence2}\n\n{options_}", "{answer}"),
("Is {word} used to mean the same thing in the next two sentences (see"
" options)?\n\n{sentence1}\n\n{sentence2}\n\n{options_}", "{answer}"),
("Does \"{word}\" mean the same thing in these two sentences? See "
"options at the end. \n{sentence1}\n{sentence2}\n{options_}..Answer:",
"{answer}"),
("(options at the end). Does the word \"{word}\" mean the same thing "
"in \"{sentence1}\" and \"{sentence2}\"?\n{options_}", "{answer}"),
],
"record": [
("Complete the passage: pick from possible "
"candidates.\n\n{passage}\n\n{query}\n\n{options_str}\n\n",
"{answer}"),
("{passage}\n\n{query}\n\n{options_str}\n\n", "{answer}"),
("Find the right ending to this "
"passage.\n\n{passage}\n\n{query}\n\n{options_str}\n\n", "{answer}"),
("What's the most logical way to complete this "
"passage?\n\n{passage}\n\n{query}\n\n{options_str}\n\n", "{answer}"),
("Choose the next sentence."
"{passage}\n\n{query}\n\n{options_str}\n\n", "{answer}"),
("Choose how you want this story to "
"end.\n\n{passage}\n\n{query}\n\n{options_str}\n\n", "{answer}"),
("Write the last sentence in this "
"story.\n\n{passage}\n\n{query}\n\n{options_str}\n\n", "{answer}"),
("Choose the next sentence for this "
"paragraph.\n\n{passage}\n\n{query}\n\n{options_str}\n\n", "{answer}"),
("What is the most logical completion of this news "
"story?.\n\n{passage}\n\n{query}\n\n{options_str}\n\n", "{answer}"),
("How does the sentence end?\n\n"
"{passage}\n\n{query}\n\n{options_str}\n\n", "{answer}"),
],
"natural_questions": [
("Question: {question}?\nAnswer:", "{answer}"),
("{question}?", "{answer}"),
("Answer the following question:\n\n{question}", "{answer}"),
("Answer this question:\n\n{question}?", "{answer}"),
("Please answer this question: {question}", "{answer}"),
("Answer the question...{question}?", "{answer}"),
("What is the answer to this question? {question}\n\n", "{answer}"),
("Can you tell me the answer to {question}?", "{answer}"),
("Next question: {question}\n\n", "{answer}"),
("Q: {question} A:", "{answer}"),
],
# Not in FLAN Templates (flan_templates):
"synth_cot_natural_questions": [
("Question: {question}?\nCoT:", "{cot}\nThe answer is {answer}"),
("{question}? Let's think step by step.",
"{cot}\n\nThe answer is {answer}"),
("Answer the following question carefully:\n\n{question}",
"\n{cot}\nThe answer is {answer}"),
("Answer this question:\n\n{question}? Think out loud!",
"{cot}\nSo, the answer is {answer}"),
("Please answer this question: {question}\nGive your reasons first.",
"{cot}\n\nThe answer: {answer}"),
("Answer the question...{question}? Give your explanation afterwards",
"The answer: {answer}\nExplanation: {cot}"),
("What is the answer to this question? {question}\nLet's think...",
"{cot}. So the answer is {answer}."),
("Can you tell me the logic and answer to {question}?",
"logic: {cot}\n\nThe final answer: {answer}"),
("Next question: {question}\n\nSolution:",
"{cot}\nThe answer is {answer}"),
("Q: {question} Step-by-step reasoning process:",
"{cot} The answer is {answer}"),
],
"trivia_qa": [
("Please answer this question: {question}", "{answer}"),
("{question}", "{answer}"),
("Write the answer: {question}", "{answer}"),
("What is the answer: {question}", "{answer}"),
("Answer this question.\n\n{question}", "{answer}"),
("Answer the following question. {question}", "{answer}"),
("Question: {question}\nAnswer:", "{answer}"),
("{question}???", "{answer}"),
("Trivia question: {question}\nAnd the answer is?", "{answer}"),
("{question}\nWhat is the answer?", "{answer}"),
],
"math_dataset": [
("{question}", "{answer}"),
("Solve this math problem\n\n{question}", "{answer}"),
("What is the solution?\n\n{question}", "{answer}"),
("Math Problem\n{question}", "{answer}"),
("Write down the solution for this math problem: {question}",
"{answer}"),
("What is the solution to this math problem?\n{question}", "{answer}"),
("Math problem: {question}\nWhat is the solution?", "{answer}"),
("{question}\nSolve this problem.", "{answer}"),
("Problem: {question}\nAnd the answer is...", "{answer}"),
("{question}. What is the answer??", "{answer}"),
],
"aeslc": [
("What is the subject line for this email?\n\n{body}\n\nSubject Line:",
"{subject}"),
("Write a subject line for this message:\n\n{body}\n\nSubject Line:",
"{subject}"),
("{body}\nWrite a subject line for this email.", "{subject}"),
("Here is an email: {body}\nWhat is a potential subject line for this "
"email?", "{subject}"),
("{body}\nPropose a subject line for this email?", "{subject}"),
("This is the content of an email: {body}\nWhat was the subject line "
"for this email?", "{subject}"),
("This is an email\n{body}\n\nWhat is the subject of this email?",
"{subject}"),
("{body}\n\nGenerate a subject line for this email.", "{subject}"),
("Write an email with the following subject:\n\n{subject}\n\nEmail:",
"{body}"),
("Write an email with the subject line \"{subject}\".", "{body}"),
],
"cnn_dailymail": [
("Write highlights for this article:\n\n{text}\n\nHighlights:",
"{highlights}"),
("Write some highlights for the following "
"article:\n\n{text}\n\nHighlights:", "{highlights}"),
("{text}\n\nWrite highlights for this article.", "{highlights}"),
("{text}\n\nWhat are highlight points for this article?",
"{highlights}"),
("{text}\nSummarize the highlights of this article.", "{highlights}"),
("{text}\nWhat are the important parts of this article?",
"{highlights}"),
("{text}\nHere is a summary of the highlights for this article:",
"{highlights}"),
("Write an article using the following "
"points:\n\n{highlights}\n\nArticle:", "{text}"),
("Use the following highlights to write an "
"article:\n\n{highlights}\n\nArticle:", "{text}"),
("{highlights}\n\nWrite an article based on these highlights.",
"{text}"),
],
"gigaword": [
("Write a short summary for this text: {text}\n\nSummary:",
"{summary}"),
("Briefly summarize this sentence: {text}\n\nSummary:", "{summary}"),
("Generate a short summary this sentence:\n{text}\n\nSummary:",
"{summary}"),
("What is a shorter version of this:\n\n{text}\n\nSummary:",
"{summary}"),
("{text}\n\nWrite a brief summary in a sentence or less.", "{summary}"),
("{text}\n\nWhat is a very short summary of the above text?",
"{summary}"),
("{text}\nSummarize the aforementioned text in a single phrase.",
"{summary}"),
("{text}\nCan you generate a short summary of the above paragraph?",
"{summary}"),
("Write a text based on this summary: {summary}\n\nText:", "{text}"),
("Write a text based on \"{summary}\"\n\nText:", "{text}"),
],
"multi_news": [
("Summarize this article:\n\n{text}\n\nSummary:", "{summary}"),
("Write a summary based on this article:\n\n{text}\n\nSummary:",
"{summary}"),
("Article:\n\n{text}\nWhat is a summary?", "{summary}"),
("{text}\nWhat is a one-paragraph summary of the above article?",
"{summary}"),
("Here is a news article: {text}\nA summary of this is?", "{summary}"),
("News article:\n\n{text}\nWhat is a shorter version of the above "
"article?", "{summary}"),
("{text}\n\nWrite a summary.", "{summary}"),
("Article:\n{text}Summary:", "\n{summary}"),
("Write an article based on this summary:\n\n{summary}\n\nArticle:",
"\n{text}"),
("{summary}\n\nExpand this summary.", "{text}"),
],
"newsroom": [
("{title}\n\n{text}\n\nWrite a one or two sentence summary.",
"{summary}"),
("Please write a short summary for the following "
"article:\n\n{title}\n\n{text}\n\nSummary:", "{summary}"),
("Please briefly summarize this news "
"article:\n\n{title}\n\n{text}\n\nSummary:", "{summary}"),
("{title}\n{text}\nWhat was this article about?", "{summary}"),
("{title}\n{text}\nWhat is a short summary of the above article?",
"{summary}"),
("{title}\n\n{text}\nWhat are the most important parts of this text?",
"{summary}"),
("News article: {title}\n\n{text}\nWhat are the most important parts "
"of this news article?", "{summary}"),
("Write an article with the title: \"{title}\"\n\nArticle:",
"\n{text}"),
("Write a title for this article:\n\n{text}\n\nTitle:", "{title}"),
("Here is an article:\n\n{text}\n\nWrite a title for it.", "{title}"),
],
"samsum": [
("{dialogue}\n\nBriefly summarize that dialogue.", "{summary}"),
("Here is a dialogue:\n{dialogue}\n\nWrite a short summary!",
"{summary}"),
("Dialogue:\n{dialogue}\n\nWhat is a summary of this dialogue?",
"{summary}"),
("{dialogue}\n\nWhat was that dialogue about, in two sentences or less?",
"{summary}"),
("Here is a dialogue:\n{dialogue}\n\nWhat were they talking about?",
"{summary}"),
("Dialogue:\n{dialogue}\nWhat were the main points in that "
"conversation?", "{summary}"),
("Dialogue:\n{dialogue}\nWhat was going on in that conversation?",
"{summary}"),
("Write a dialog about anything you want.", "{dialogue}"),
("Write a dialog based on this summary:\n{summary}.", "{dialogue}"),
("Write a dialog with this premise \"{summary}\".", "{dialogue}"),
],
"xsum": [
("Summarize:\n\n{text}\n\nSummary:", "{summary}"),
("Summarize this article:\n\n{text}\n\nSummary:", "{summary}"),
("Summarize this article in one sentence.\n\n{text}\n\nSummary:",
"{summary}"),
("{text}\nWhat is a summary of this text?", "{summary}"),
("{text}\nWhat was that article about?", "{summary}"),
("{text}\n\nThis article was about:", "{summary}"),
("Article:{text}\n\nA summary of the above article is?", "{summary}"),
("Article:{text}\n\nSummarize the main points of that article.",
"{summary}"),
("Write an article based on this summary:\n\n{summary}\n\nArticle:",
"{text}"),
("Write an article based on this \"{summary}\"\n\nArticle:", "{text}"),
],
"squad_v1": [
("Please answer a question about the following article about "
"{title}:\n\n{context}\n\n{question}", "{answer}"),
("Read this and answer the question\n\n{context}\n\n{question}",
"{answer}"),
("{context}\n{question}", "{answer}"),
("Answer a question about this article:\n{context}\n{question}",
"{answer}"),
("Here is a question about this article: {context}\nWhat is the answer"
" to this question: {question}", "{answer}"),
("Article: {context}\n\nQuestion: {question}", "{answer}"),
("Article: {context}\n\nNow answer this question: {question}",
"{answer}"),
("{title}\n{context}\n\nQ: {question}", "{answer}"),
("Ask a question about {title}.", "{question}"),
("What is the title of this article:\n\n{context}\n\nTitle:",
"{title}"),
],
"squad_v2": [
("{title}:\n\n{context}\n\nPlease answer a question about this "
"article. If the question is unanswerable, say \"unanswerable\". "
"{question}", "{answer}"),
("Read this and answer the question. If the question is unanswerable, "
"say \"unanswerable\".\n\n{context}\n\n{question}", "{answer}"),
("What is a question about this article? If the question is "
"unanswerable, say \"unanswerable\".\n\n{context}\n\n{question}",
"{answer}"),
("{context}\n{question} (If the question is unanswerable, say "
"\"unanswerable\")", "{answer}"),
("{context}\nTry to answer this question if possible (otherwise reply "
"\"unanswerable\"): {question}", "{answer}"),
("{context}\nIf it is possible to answer this question, answer it for "
"me (else, reply \"unanswerable\"): {question}", "{answer}"),
("{context}\n\nAnswer this question, if possible (if impossible, reply"
" \"unanswerable\"): {question}", "{answer}"),
("Read this: {context}\n\n{question}\nWhat is the answer? (If it "
"cannot be answered, return \"unanswerable\")", "{answer}"),
("Read this: {context}\nNow answer this question, if there is an "
"answer (If it cannot be answered, return \"unanswerable\"): "
"{question}", "{answer}"),
("{context}\nIs there an answer to this question (If it cannot be "
"answered, say \"unanswerable\"): {question}", "{answer}"),
],
"drop": [
("Answer based on context:\n\n{context}\n\n{question}", "{answer}"),
("{context}\n\nAnswer this question based on the article: {question}",
"{answer}"),
("{context}\n\n{question}", "{answer}"),
("{context}\nAnswer this question: {question}", "{answer}"),
("Read this article and answer this question {context}\n{question}",
"{answer}"),
("{context}\n\nBased on the above article, answer a question. "
"{question}", "{answer}"),
("Context: {context}\n\nQuestion: {question}\n\nAnswer:", "{answer}"),
("Write an article that answers the following question: {question}",
"{context}"),
("Write a question about the following article: {context}\n\nQuestion "
"about the article:", "{question}"),
("{context}\n\nAsk a question about this article.", "{question}"),
],
# Not in FLAN Templates (flan_templates):
"synth_cot_drop": [
("Answer based on context:\n\n{context}\n\n{question}.\n\n"
"Let's think step by step:", "{cot}\nThe answer is {answer}"),
("{context}\n\nAnswer this question by reasoning step-by-step based on "
"the article: {question}", "{cot} The answer is {answer}"),
("{context}\n\n{question}\nStep-by-step reasoning process:",
"\n{cot} The answer is {answer}"),
("{context}\nAnswer this question: {question}. Now, let me think...",
"\n{cot}\nThe answer is {answer}"),
("Read the following article then answer the question. "
"Explain your answer afterwards.\n{context}\n{question}\n",
"The answer is {answer}.\nExplanation: {cot}"),
("{context}\n\nBased on the above article, answer a question. "
"{question}\nI need you to give me your thought process first.",
"{cot}\nThe answer is {answer}"),
("Context: {context}\n\nQuestion: {question}\n\nYour thought:",
"{cot} The answer is {answer}"),
("{context}\n{question}\nWhat do you think? I think:",
"{cot} The answer is {answer}"),
("{context} {question} Chain-of-thought:",
"{cot} The answer is {answer}"),
("{context} {question}\n Let's think step by step:\n",
"{cot} The answer is {answer}"),
],
"quac": [
("{background}\n\n{context}\n\nAnswer the following question by taking"
" a quote from the article: {question}", "{answer}"),
("{background}\n\n{context}\n\nUsing a quote from the above article, "
"answer the following question: {question}", "{answer}"),
("Answer by taking a quote from the following "
"article:\n\n{background}\n\n{context}\n\n{question}", "{answer}"),
("{background}\n\n{context}\n\n{question}", "{answer}"),
("Background: {background}\nContext: {context}\nQuestion: "
"{question}\n\nAnswer:", "{answer}"),
("Background: {background}\nContext: {context}\nQuestion: {question}. "
"Whats the answer?", "{answer}"),
("{context}\n\nAnswer this question \"{question}\" by extracting the "
"answer from the text above.", "{answer}"),
("{background}\n\n{context} Answer this question using a quote from"
" the following article:\n\n{question}", "{answer}"),
("Which entity is this text "
"about?\n\n{background}\n\n{context}\n\nEntity:", "{title}"),
("{background}\n\n{context}\n\nAsk a question about this article.",
"{question}"),
],
"para_crawl": [
("How do you say \"{sent1}\" in {lang2}?", "{sent2}"),
("{sent2} How do you say this sentence in {lang1}?", "{sent1}"),
("{sent1} Say this using {lang2}.", "{sent2}"),
("Translate from {lang1} to {lang2}:\n\n{sent1}\n\n{lang2}:",
"{sent2}"),
("Translate from {lang2} to {lang1}:\n\n{sent2}\n\n{lang1}:",
"{sent1}"),
("Translate \"{sent2}\" from {lang2} to {lang1}.", "{sent1}"),
("Translate \"{sent1}\" to {lang2}.", "{sent2}"),
("Translate the following.\n\n{lang1}: {sent1}\n\n{lang2}:", "{sent2}"),
("Write a sentence in {lang1}.", "{sent1}"),
("Write a sentence in {lang2}.", "{sent2}"),
],
"wmt16_translate": [
("{sent1}\n\nTranslate to {lang2}\n\n{lang2}:", "{sent2}"),
("{sent2}\n\nTranslate to {lang1}\n\n{lang1}:", "{sent1}"),
("{sent2}\n\nCould you please translate this to {lang1}?", "{sent1}"),
("{sent2}\n\nTranslate this to {lang1}?", "{sent1}"),
("Translate to {lang2}:\n\n{sent1}\n\n{lang2}:", "{sent2}"),
("Translate the following sentence to {lang2}:\n{sent1}\n\n{lang2}:",
"{sent2}"),
("How is \"{sent1}\" said in {lang2}?", "{sent2}"),
("Translate \"{sent1}\" to {lang2}?", "{sent2}"),
("Write a sentence not in {lang1}.", "{sent2}"),
("{sent2}\n\nWhich language is this?", "{lang2}"),
],
"wmt14_enfr": [
("{sent1}\n\nTranslate to {lang2}.", "{sent2}"),
("{sent2}\n\nTranslate to {lang1}.", "{sent1}"),
("{sent2}\n\nCould you please translate this to {lang1}?", "{sent1}"),
("{sent2}\n\nTranslate this to {lang1}?", "{sent1}"),
("Translate to {lang2}:\n\n{sent1}\n\n", "{sent2}"),
("Translate the following sentence to {lang2}:\n{sent1}\n\n",
"{sent2}"),
("How is \"{sent1}\" said in {lang2}?", "{sent2}"),
("Translate \"{sent1}\" to {lang2}?", "{sent2}"),
("Write a sentence not in {lang1}.", "{sent2}"),
("{sent2}\n\nWhich language is this?", "{lang2}"),
],
"true_case": [
("{lower}\n\nPlease write the text above using proper case.",
"{answer}"),
("{lower}\n\nWrite the above sentence using proper case.", "{answer}"),
("{lower}\n\nHow would the previous sentence be correctly capitalized?",
"{answer}"),
("{lower}\nCapitalize this past sentence correctly.", "{answer}"),
("{lower}\nRepeat this setence, but with the correct capitalization.",
"{answer}"),
("{lower}\nCan you repeat this sentence, but capitalize it correctly?",
"{answer}"),
("{lower}\n\nThis is all lower case. Can you fix that?", "{answer}"),
("{lower}\n\nMake this proper case.", "{answer}"),
("Please capitalize where necessary: {lower}", "{answer}"),
("{answer}\n\nMake this lower case.", "{lower}"),
],
"fix_punct": [
("{no_punct}\n\nAdd punctuation.", "{answer}"),
("{no_punct}\n\nCan you repeat this sentence, but add in punctuation?",
"{answer}"),
("{no_punct}\n\nWhat is the correctly punctuated version of this "
"sentence?", "{answer}"),
("{no_punct}\n\nPlease fix the punctuation.", "{answer}"),
("{no_punct}\n\nCould you correct the punctuation please?", "{answer}"),
("Please add punctuation to this: {no_punct}\n\nPunctuation version:",
"{answer}"),
("Add punctuation: {no_punct}\n\n", "{answer}"),
("Add punctuation to the following sentence: {no_punct}\n\n",
"{answer}"),
("Generate a correctly punctuated version of the following text: "
"{no_punct}\n\n", "{answer}"),
("What is the version of the following sentence with correct "
"punctuation?\n\n{no_punct}\n\n", "{answer}"),
],
"word_segment": [
("{no_space}\nGenerate a sentence using the above characters:",
"{answer}"),
("{no_space}\nWhat's a sentence that uses these characters?",
"{answer}"),
("{no_space}\n\nPlease segment the words:", "{answer}"),
("Add spaces: {no_space}\n\n", "{answer}"),
("Please add spaces between words: {no_space}\n\n", "{answer}"),
("This text is missing some spaces, please add them: {no_space}\n\n",
"{answer}"),
("Add spaces between the words in the following text: {no_space}\n\n",
"{answer}"),
("Write the following list of characters into a correctly formed "
"sentence: {no_space}\n\n", "{answer}"),
("{answer}\n\nPlease remove spaces between words.", "{no_space}"),
("Remove the spaces from the following sentence: {answer}",
"{no_space}"),
],
"cosmos_qa": [
("{context}\n\nQuestion with options to choose from: "
"{question}\n{options_}", "{answer}"),
("{context}\n\n{options_}\nQ: {question}", "{answer}"),
("{context}\n\n{options_}\nAnswer the following question: {question}\n",
"{answer}"),
("{context}\n\nBased on the preceding passage, choose your answer for "
"question {question}\n{options_}\nThe answer is:", "{answer}"),
("{context}\n\nQ with options: Give answer the following question "
"using evidence from the above passage: {question}\n{options_}",
"{answer}"),
("Context: {context}\nQuestion {question}\nPossible "
"answers:\n{options_}\nThe answer:", "{answer}"),
("Read the following article and answer the question by choosing from "
"the options.\n\n{context}\n\n{question}\n{options_}...A:",
"{answer}"),
("This question has options. Answer the question about "
"text:\n\n{context}\n\n{question}\n{options_}", "{answer}"),
("Write a question about the following article."
"\n\n{context}\n\nQuestion:", "{question}\n{options_}"),
("{context}\n\nGenerate a question about the above context.",
"{question}\n{options_}"),
],
# Not in FLAN Templates (flan_templates):
"synth_cot_cosmos_qa": [
("{context}\n\nQuestion: {question}\n{options_}\n"
"Let's answer step by step.", "{cot} So the answer is {answer}"),
("{context}\n\n{options_}\nQ: {question}\nStep by step reasoning:",
"{cot} The answer is {answer}"),
("{context}\n\n{options_}\nLet's answer this carefully: {question}\n",
"{cot}\nThe answer is {answer}"),
("{context}\n\nBased on the preceding passage, answer question "
"{question}\n{options_}\nLet's solve slowly:",
"{cot} The answer is {answer}"),
("{context}\nSolve the following question "
"thinking out loud: {question}\n{options_}",
"{cot} So, the answer is {answer}"),
("Context: {context}\nQuestion: {question}\n"
"\n{options_}\nLet's think:", "{cot}... So the answer is {answer}"),
("Read the following article and answer the question."
"\n{context}\n\n{question}\n{options_}..."
"Chain-of-thought:", "{cot}\nThe answer is {answer}"),
("Answer the question about text:\n\n{context}\n\n{question}\n"
"{options_}\nCoT:", "{cot} The answer is {answer}"),
("{context}\nQuestion: {question}\n{options_}\nChain-of-thought:",
"{cot} The answer is {answer}"),
("Context: {context}\nQ: {question}\n{options_}\nStep-by-step "
"reasoning process:", "{cot}\nThe answer is {answer}"),
],
"ag_news_subset": [
("{title}\n\n{text}\n\nMulti-choice problem: What is this text "
"about?\n{options_}", "{answer}"),
("Choose your answer. {title}\n\n{text}\n\nWhich topic is this article"
" about?\n{options_}", "{answer}"),
("{text}\nQ: Which is the best summary of this article?\n{options_}\nI"
" think the answer is", "{answer}"),
("{text}\nChoose your answer. What is this text "
"about?\n{options_}\nAnswer:", "{answer}"),
("{text}\n\nWhat best summarizes the content of the above "
"article?\n{options_}", "{answer}"),
("Select your answer: Which is this about?\n\n{text}\n\n{options_}",
"{answer}"),
("Select the correct answer: Which is an appropriate title for this "
"article?\n\n{text}\n\n{options_}", "{answer}"),
("Note the options at the end. Select the topic that this "
"about:\n\n{text}\n\n{options_}", "{answer}"),
("Write a title:\n{text}\nTitle:", "{title}"),
("{text}\n\nWhat is a good title for this?", "{title}"),
],
"bool_q": [
("{text}\n\nSee options at the end. Can we conclude that "
"{question}?\n\n{options_}", "{answer}"),
("{text}\n\nMulti-choice problem: Is it true that "
"{question}?\n\n{options_}\nThe answer is:", "{answer}"),
("{text}\n\n{question}?\n\n{options_}", "{answer}"),
("Text: {text}\n\nQuestion: {question}?\n\n{options_}", "{answer}"),
("{text}\n\nWhat's the best answer to this question: "
"{question}?\n\n{options_}...A:", "{answer}"),
("{text}\nBased on the above text, what's the best answer to this "
"question: {question}?\n\n{options_}", "{answer}"),
("{text}\nAnswer this question, making sure that the answer is "
"supported by the text: {question}?\n\n{options_}", "{answer}"),
("{text}\n\nChoose your answer: Is the following statement correct "
"based on the text\n\n{question}\n\n{options_}", "{answer}"),
("{title}\n\n{text}\n\n{options_}\nIs this statement correct "
"\"{question}\"?", "{answer}"),
("Is it true that {question} based on the following "
"text?\n\n{text}\n\n{options_}", "{answer}"),
],
# Not in FLAN Templates (flan_templates):
"synth_cot_bool_q": [
("{passage}\n\nThink out loud. Can we conclude that "
"{question}?\n\n{options_}", "{cot}. The answer is {answer}"),
("{passage}\n\nIs it true that {question}?\n\n{options_}\n"
"Your thought:", "{cot}. The answer is {answer}"),
("{passage}\n\n{question}?\n\n{options_}\nLet's think step by step.",
"{cot}\nThe answer is {answer}"),
("Answer the following question carefully. Think out loud.\n"
"passage: {passage}\n\nQuestion: {question}?\n\n{options_}",
"{cot}\nThe answer is {answer}"),
("Give the reasoning before answering any question.\n{passage}\n\n"
"What's the best answer to this question: {question}?\n{options_}...",
"{cot}. The answer is {answer}"),
("{passage}\nBased on the above text, what's the best answer to this "
"question: {question}?\n{options_}\nLet's think.",
"{cot}. Final answer: {answer}"),
("{passage}\nAnswer this question carefully, making sure that the "
"answer is supported by the text: {question}?\n\n{options_}"
"Step-by-step reasoning process:",
"{cot}. I think the answer is {answer}"),
("{passage}\n\nChoose your answer: Is the following statement correct "
"based on the passage\n\n{question}\n\n{options_}\nChain-of-thought:",
"{cot}\nThe answer is {answer}"),
("{title}\n\n{passage}\n\n{options_}\nIs this statement correct "
"\"{question}\"? Chain-of-thought:", "{cot}\nThe answer is {answer}"),
("Is it true that {question} based on the following "
"passage?\n\n{passage}\n\n{options_}\nSay why you think so.",
"{cot}. The answer is {answer}"),
],
"definite_pronoun_resolution": [
("{sentence}\n\n{options_}\nWho is {pronoun} referring to?",
"{answer}"),
("{sentence}\n\nWho is \"{pronoun}\" in this prior sentence(see "
"options)?\n{options_}", "{answer}"),
("{sentence}\n\nWho is {pronoun} referring to in this "
"sentence?\n{options_}", "{answer}"),
("Choose your answer: {sentence}\nTell me who {pronoun} is.\n{options_}",
"{answer}"),
("{sentence}\nBased on this sentence, who is {pronoun}?\n\n{options_}",
"{answer}"),
("Choose your answer: Who is {pronoun} in the following "
"sentence?\n\n{sentence}\n\n{options_}", "{answer}"),
("Multi-choice problem: Which entity is {pronoun} this "
"sentence?\n\n{sentence}\n\n{options_}", "{answer}"),
("Who is {pronoun} referring to in the following "
"sentence?\n{sentence}\n\n{options_}", "{answer}"),
("Note that this question lists possible answers. Which person is "
"{pronoun} referring to in the following "
"sentence?\n{sentence}\n\n{options_}", "{answer}"),
("{sentence}\nWho is \"{pronoun}\"?\n{options_}", "{answer}"),
],
"glue_mrpc": [
("Here are two sentences:\n{sentence1}\n{sentence2}\nDo they have the "
"same meaning?\n{options_}", "{answer}"),
("Here are two sentences:\n\n{sentence1}\n\n{sentence2}\nChoose your "
"answer: are the two sentences saying the same thing?\n{options_}",
"{answer}"),
("{sentence1}\n\n{sentence2}\n\nSelect from the options at the end. Do"
" the above sentences mean the same thing?\n{options_}", "{answer}"),
("{sentence1}\n\n{sentence2}\n\nPlease tell me if the sentences above "
"mean the same.\n{options_}", "{answer}"),
("{sentence1}\n{sentence2}\nSelect from the options at the end. Are "
"these sentences conveying the same meaning?\n{options_}", "{answer}"),
("{sentence1}\n{sentence2}\n(See options at the end). If the first "
"sentence is true, is the second one also true?\n{options_}",
"{answer}"),
("{sentence1}\n{sentence2}\nAre these two sentences paraphrases of "
"each other?\n{options_}", "{answer}"),
("Do the following two sentences have the same "
"meaning?\n{sentence1}\n{sentence2}\n\n{options_}\nThe answer is:",
"{answer}"),
("Do these two sentences mean the same "
"thing?\n{sentence1}\n{sentence2}\n\n{options_}...I think the answer "
"is", "{answer}"),
("Do these sentences have the same "
"meaning?\n{sentence1}\n{sentence2}\n\n{options_}", "{answer}"),
],
"glue_qqp": [
("{question1}\n{question2}\nMulti-choice problem: Would you say that "
"these questions are the same?\n{options_}", "{answer}"),
("{question1}\n{question2}\nDo those questions have the same "
"meaning?\n{options_}", "{answer}"),
("{question1}\n{question2}\n\nMulti-choice problem: Are these two "
"questions inquiring about the same information?\n{options_}",
"{answer}"),
("{question1}\n\n{question2}\n\nPlease tell me if those questions are "
"the same.\n{options_}", "{answer}"),
("{question1}\n\n{question2}\n\nChoose your answer. Are these two "
"questions paraphrases of each other?\n{options_}", "{answer}"),
("First question: {question1}\nSecond question: {question2}\nAre these"
" two questions asking the same thing?\n{options_}", "{answer}"),
("Question 1: {question1}\nQuestion 2: {question2}\n{options_}\nAre "
"questions 1 and 2 asking the same thing?", "{answer}"),
("Question 1: {question1}\nQuestion 2: {question2}\n{options_}\nWould "
"the answer to these two questions be the same?", "{answer}"),
("Choose from the options at the end. Are the following two questions "
"the same?\n{question1}\n{question2}\n\n{options_}\nThe answer is:",
"{answer}"),
("Do these questions have the same "
"meaning?\n{question1}\n{question2}\n\n{options_}", "{answer}"),
],
"imdb_reviews": [
("{text}\nChoose your answer. What is the sentiment of this "
"review?\n{options_}", "{answer}"),
("{text}\nWould you say this review is positive or "
"negative?\n{options_}", "{answer}"),
("{text}\nChoose your answer. How would you describe the sentiment of "
"this review?\n{options_}", "{answer}"),
("{text}\n\nIs the sentiment of this review positive or "
"negative?\n{options_}", "{answer}"),
("{text}\n\nDid this review think positively or negatively of the "
"movie (see options below)?\n{options_}...I think the answer is",
"{answer}"),
("Select the correct sentiment of the following review: "
"{text}\n{options_}", "{answer}"),
("Choose the correct sentiment from "
"candidates:\n{options_}\n\nTEXT:{text}\n\n", "{answer}"),
("Review: {text}\nWhat is the sentiment of this review?\n{options_}",
"{answer}"),
("Review: {text}\nNow, what is this review like?\n{options_}\n",
"{answer}"),
("What's an example of a movie review?", "{text}"),
],
"paws_wiki": [
("{sentence1}\n{sentence2}\n\nSelect your answer from the options. Do "
"these sentences mean the same thing?\n{options_}", "{answer}"),
("{sentence1}\n{sentence2}\n\nAre these two sentences paraphrases of "
"each other?\n{options_}", "{answer}"),
("1. {sentence1}\n2. {sentence2}\n\nSelect your answer from the "
"options. Are these two sentences paraphrases of each "
"other?\n{options_}...I think the answer is", "{answer}"),
("(1) {sentence1}\n(2) {sentence2}\n\nDo these two sentences mean the "
"same thing?\n\n{options_}", "{answer}"),
("Sentence 1: {sentence1}\nSentence 2: {sentence2}\n\nDo these two "
"sentences convey the same information?\n\n{options_}", "{answer}"),
("Do these two sentences from wikipedia have the same "
"meaning?\n{sentence1}\n{sentence2}\n\n{options_}\nThe answer is:",
"{answer}"),
("Multi-choice question: Same "
"meaning?\n{sentence1}\n{sentence2}\n\n{options_}", "{answer}"),
("Are these paraphrases?\n{sentence1}\n{sentence2}\n\n{options_}",
"{answer}"),
("Do these mean the same?\n{sentence1}\n{sentence2}\n\n{options_}",
"{answer}"),
("Please check if these have the same meaning. {options_}"
"\n{sentence1}\n{sentence2}", "{answer}"),
],
# Not in FLAN Templates (flan_templates):
"synth_cot_paws_wiki": [
("{sentence1}\n{sentence2}\n\nExplain your answer, do "
"these sentences mean the same thing?\n{options_}\n"
"Step-by-step reasoning process:", "{cot} So the answer is {answer}"),
("{sentence1}\n{sentence2}\n\nAre these two sentences paraphrases of "
"each other?\n{options_}\nLet's see.",
"{cot} So the answer is {answer}"),
("1. {sentence1}\n2. {sentence2}\n\n"
"Are these two sentences paraphrases of each "
"other?\n{options_}...I think the logic is:",
"{cot} The answer is {answer}"),
("(1) {sentence1}\n(2) {sentence2}\n\nDo these two sentences mean the "
"same thing?\n\n{options_}\nAhh.", "{cot}. The answer: {answer}"),
("Sentence 1: {sentence1}\nSentence 2: {sentence2}\n\nDo these two "
"sentences convey the same information?\n\n{options_}\nLet's think.",
"{cot} The answer is {answer}"),
("Do these two sentences from wikipedia have the same "
"meaning?\n{sentence1}\n{sentence2}\n\n{options_}\nThoughts:",
"{cot}\nAnswer: {answer}"),
("Think before you answer: Same "
"meaning?\n{sentence1}\n{sentence2}\n\n{options_}",
"{cot}\nThe answer: {answer}"),
("Are these paraphrases?\n{sentence1}\n{sentence2}\n\n{options_}\nCoT:",
"Answer: {answer}"),
("Let's carefully answer this question: do these mean the same?\n"
"{sentence1}\n{sentence2}\n\n{options_}",
"{cot}\nThe final answer: {answer}"),
("Please check if these have the same meaning.\n{options_}\n"
"{sentence1}\n{sentence2}\nYour thought?",
"{cot}\nThe answer is {answer}"),
],
"sentiment140": [
("{text}\nSelect your answer from the options. What is the sentiment "
"of this tweet?\n{options_}...I think the answer is", "{answer}"),
("{text}\n\nHow would the sentiment of this tweet be "
"described?\n{options_}", "{answer}"),
("{text}\n\nDescribe the sentiment embodied by this "
"tweet.\n{options_}\nI think the answer is", "{answer}"),
("Tweet: {text}\nPredict the sentiment of this tweet.\n{options_}",
"{answer}"),
("Multi-choice question: What is the sentiment of the following "
"tweet?\nTweet: {text}\n{options_}", "{answer}"),
("Select your answer from the options. How would one describe the "
"sentiment of this tweet?\n{text}\n{options_}", "{answer}"),
("Possible tweet sentiments: {options_}\nWrite a tweet that is "
"{answer}.", "{text}"),
("What is an example of a tweet?", "{text}"),
("Write a {answer} tweet. Possible tweet types: {options_}", "{text}"),
("Sentiment possibilities {options_}. Generate a tweet that has the "
"following sentiment: {answer} ", "{text}"),
],
# Not in FLAN Templates (flan_templates):
"synth_cot_sentiment140": [
("{text}\nWhat is the sentiment of this tweet?\n{options_}..."
"I think the solution should be:", "{cot} The answer is {answer}"),
("{text}\n\nHow would the sentiment of this tweet be "
"described?\n{options_}\nStep-by-step reasoning process:",
"{cot} So the answer is {answer}"),
("{text}\n\nDescribe the sentiment embodied by this "
"tweet.\n{options_}\nThoughts:", "{cot}\nAnswer: {answer}"),
("Tweet: {text}\nEXPLAIN the sentiment of this tweet.\n{options_}",
"Explanation: {cot}\nAnswer: {answer}"),
("Think out loud: What is the sentiment of the following "
"tweet?\nTweet:{text}\n{options_}\n", "{cot} The answer is {answer}"),
("Let's think step-by-step to solve this: How would one describe the "
"sentiment of this tweet?\n{text}\n{options_}\n",
"Step-by-step reasoning: {cot}\nAnswer: {answer}"),
("{text}\nSentiment?\n{options_}\nCoT:", "{cot}\nAnswer: {answer}"),
("{text}\nHow is sentiment of the text above?\n{options_}\n"
"Chain-of-thought:", "{cot}\nAnswer: {answer}"),
("{text}\nIs this text positive or negative?\n{options_}\n"
"Well, I think:", "{cot}\nSo the answer is: {answer}"),
("Text: {text}\nIs the text above positive or negative in terms of "
"sentiment?\n{options_}\nHmm...", "{cot}\nThe answer is: {answer}"),
],
"story_cloze": [
("{context}\n{options_}\nWhich option is the next sentence?",
"{answer}"),
("{context}\n\nWhat is the next sentence?\n{options_}", "{answer}"),
("{context}\n\nWhat is a natural next sentence?\n{options_}",
"{answer}"),
("{context}\n\nWrite the next sentence, by choosing from:\n{options_}",
"{answer}"),
("Context: {context}\n\nNow do a next sentence "
"writing task.\n{options_}", "{answer}"),
("Story: {context}\n\nIn the options below, what is the most likely to"
" happen next?\n{options_}", "{answer}"),
("Write the next sentence in this story.\n\n{context}\n{options_}",
"{answer}"),
("Choose from options. Continue the following "
"story.\n\n{context}\n{options_}", "{answer}"),
("{options_}\nWrite a story that ends with: {answer}",
"{context} {answer}"),
("Write a plausible story that ends with this sentence?\n\nLast "
"sentence: {answer}\n{options_}", "{context} {answer}"),
],
"copa": [
("{premise} What is the {question}?\n\n{options_}", "{answer}"),
("Here is a premise: {premise}\n\nWhat is the {question}?\n\n{options_}",
"{answer}"),
("{premise}\n\nWhat is the {question} of the preceding "
"sentence?\n\n{options_}", "{answer}"),
("{premise}\n\nWhat is a plausible {question}?\n\n{options_}",
"{answer}"),
("Based on the following sentence, what is the "
"{question}?\n\n{premise}\n\n{options_}", "{answer}"),
("{premise}\n\n{question}: \n\n{options_}", "{answer}"),
("What is the {question} of the following "
"sentence?\n\n{premise}\n\n{options_}\nThe answer is:", "{answer}"),
("Answer the following question about this "
"sentence:\n\n{premise}\n\nWhat is the {question}?\n\n{options_}",
"{answer}"),
("Write a sentence.", "{premise}"),
("Premise: {premise}\nWhat is the {question}?\n{options_}", "{answer}"),
],
"winogrande": [
("How does the sentence end? See options at the "
"end\n\n{context}\n\n{options_}", "{answer}"),
("Write the next sentence.\n\n{context}\n\n{options_}\nAnswer:",
"{answer}"),
("Choose your story that continues the following "
"story.\n\n{context}\n\n{options_}", "{answer}"),
("{options_}\nComplete the following sentence.\n\n{context}\n\n",
"{answer}"),
("Continue writing the following text.\n\n{context}\n\n{options_}",
"{answer}"),
("How does the sentence end?\n\n{context}\n{options_}", "{answer}"),
("Write the next sentence.\n\n{context}\n{options_}", "{answer}"),
("Continue the following story.\n\n{context}\n{options_}", "{answer}"),
("Complete the following sentence.\n\n{context}\n{options_}",
"{answer}"),
("Continue writing the following text.\n\n{context}\n{options_}",
"{answer}"),
],
# Not in FLAN Templates (flan_templates):
"synth_cot_winogrande": [
("How does the sentence end? Let's give some reasoning before you "
"answer\n\n{context}\n\n{options_}\n", "{cot} The answer is {answer}"),
("Write the next sentence.\n\n{context}\n\n{options_}\n"
"Chain-of-thought:", "{cot}\nThe answer is {answer}"),
("Choose your story that continues the following "
"story.\n\n{context}\n\n{options_}\nYour thought first:",
"Thoughts: {cot}\nThe answer is {answer}"),
("{options_}\nComplete the following sentence.\n\n{context}\n\nCoT:",
"{cot}\nThe answer is {answer}"),
("Continue writing the following text.\n\n{context}\n\n{options_}\n"
"Well...", "{cot} So the answer is {answer}"),
("How does the sentence end?\n{context}\n{options_}\n"
"Let's reason step-by-step:", "{cot}... The answer is {answer}"),
("Write the next sentence.\n{options_}\n{context}\nStep-by-step "
"reasoning process:", "{cot}\nThe answer is {answer}"),
("Continue the following story. Explain your choice first"
"\n\n{context}\n{options_}", "{cot}\nThe answer is {answer}"),
("Complete the following sentence.\n\n{context}\nLet's think "
"step-by-step {options_}", "{cot} The answer is {answer}"),
("Continue writing the following text. EXPLANATION first!\n{context} "
"{options_}", "{cot} The answer is {answer}"),
],
"yelp_polarity_reviews": [
("{text}\nIs this review positive or negative?\n{options_}\nAnswer:",
"{answer}"),
("{text}\nChoose the sentiment of this review?\n{options_}",
"{answer}"),
("{text}\nChoose: was this review given positively or "
"negatively?\n{options_}", "{answer}"),
("{text}\nHow would this review be described in terms of "
"sentiment?\n{options_}", "{answer}"),
("Choose your answer: is the following review positive or "
"negative?\n\n{text}\n\n{options_}", "{answer}"),
("What is the sentiment of the following review?\n{text}\n{options_}",
"{answer}"),
("How might one describe the sentiment of this review?\n{text}..."
"{options_} I think the answer is", "{answer}"),
("Write a {answer} yelp review ({options_}).", "{text}"),
("Possible review types:\n{options_}.\nGenerate a {answer} review "
"for a place", "{text}"),
("{options_} What would be an example of an {answer} review?",
"{text}"),
],
"arc": [
("{question}\n\n{options_}", "{answer}"),
("Question: {question}\n{options_}\nAnswer:", "{answer}"),
("Question: {question}\n\nWhat is the correct answer to the question "
"from the following choices?\n{options_}", "{answer}"),
("Q: {question}\nWhat is the correct answer to this "
"question?\n{options_}...A:", "{answer}"),
("Choose your answer?\n\n{question}\n\n{options_}", "{answer}"),
("Answer the question\n\n{question}\n{options_}", "{answer}"),
("{question}\n\nPick the answer from these options\n\n{options_}",
"{answer}"),
("Write a question you would see in a school textbook.", "{question}"),
("What's an example of a grad-school level question?", "{question}"),
("I just took a test in school today. What question was I asked?",
"{question}"),
],
"anli": [
("{context}\n\nChoose your answer: based on the paragraph above can we"
" conclude that \"{hypothesis}\"?\n\n{options_}\nI think the answer "
"is", "{answer}"),
("{context}\n\nBased on that paragraph can we conclude that this "
"sentence is true?\n{hypothesis}\n\n{options_}", "{answer}"),
("{context}\n\nCan we draw the following "
"conclusion?\n{hypothesis}\n\n{options_}", "{answer}"),
("{context}\nDoes this next sentence follow, given the preceding "
"text?\n{hypothesis}\n\n{options_}", "{answer}"),
("{context}\nCan we infer the "
"following?\n{hypothesis}\n\n{options_}\nThe answer is:", "{answer}"),
("Read the following paragraph and determine if the hypothesis is "
"true:\n\n{context}\n\n{options_}\nHypothesis: {hypothesis}\n\n\n",
"{answer}"),
("Read the text and determine if the sentence is true (see options at "
"the end):\n\n{context}\n\nSentence: {hypothesis}\n{options_}",
"{answer}"),
("Can we draw the following hypothesis from the context (see options)?"
" \n\nContext:\n\n{context}\n\nHypothesis: {hypothesis}\n{options_}",
"{answer}"),
("Choose from options: Determine if the sentence is true based on the "
"text below:\n{hypothesis}\n\n{context}\n{options_}", "{answer}"),
("Generate a context and a hypothesis.",
"Context: {context}\n\nHypothesis: {hypothesis}"),
],
# Not in FLAN Templates (flan_templates):
"synth_cot_anli": [
("{premise}\n\nBased on the paragraph above can we"
" conclude that \"{hypothesis}\"?\n\n{options_}\nI think the chain-of"
"-thought is", "{cot}. The answer is {answer}"),
("{premise}\n\nBased on that paragraph can we conclude that this "
"sentence is true?\n{hypothesis}\n\n{options_}\nLet's think step by "
"step:", "{cot} The answer is {answer}"),
("{premise}\n\nCan we draw the following "
"conclusion?\n{hypothesis}\n\n{options_}\nHmmm, let's see.",
"{cot} The answer is {answer}"),
("{premise}\nDoes this next sentence follow, given the preceding "
"text?\n{hypothesis}\n\n{options_}\nLet me think first.",
"{cot} The answer is {answer}"),