Skip to content

Commit 3de4cab

Browse files
Updated the existing prompts for onestop_english and (#700)
* Updated the existing prompts for onestop_english and scientific_papers/pubmed Add new prompts for both of these datasets. * minor fixes * add metrics Co-authored-by: Victor Sanh <[email protected]>
1 parent 9352073 commit 3de4cab

File tree

2 files changed

+78
-22
lines changed

2 files changed

+78
-22
lines changed

promptsource/templates/onestop_english/templates.yaml

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ templates:
1717
{{ answer_choices [label] }}'
1818
metadata: !TemplateMetadata
1919
choices_in_prompt: true
20-
metrics: []
20+
metrics:
21+
- Accuracy
2122
original_task: true
2223
name: esl_context
2324
reference: ''
@@ -28,7 +29,7 @@ templates:
2829
2930
3031
How would you rate the difficulty level of the passage above for automatic readability
31-
assessment? {{"Elementary"}}, {{"Intermediate"}} or {{"Advanced"}} level?
32+
assessment? {{"Elementary"}}, {{"Intermediate"}} or {{"Advanced"}} level?
3233
3334
3435
|||
@@ -37,10 +38,36 @@ templates:
3738
{{ answer_choices [label] }}'
3839
metadata: !TemplateMetadata
3940
choices_in_prompt: true
40-
metrics: []
41+
metrics:
42+
- Accuracy
4143
original_task: true
4244
name: ara_context
4345
reference: ''
46+
b0b076b8-b72b-4b71-8dd0-0b20877e001c: !Template
47+
answer_choices: Elementary ||| Intermediate ||| Advanced
48+
id: b0b076b8-b72b-4b71-8dd0-0b20877e001c
49+
jinja: 'Look at the first three sentences of a story shown here: {{text.strip().split(''\n'')[:3]|join("\n")}}
50+
51+
52+
53+
Based on these three sentences alone, can you predict whether the entire story
54+
is on the {{"Elementary"}}, {{"Intermediate"}} or {{"Advanced"}} level?
55+
56+
57+
58+
59+
60+
|||
61+
62+
63+
{{ answer_choices [label] }}'
64+
metadata: !TemplateMetadata
65+
choices_in_prompt: true
66+
metrics:
67+
- Accuracy
68+
original_task: false
69+
name: determine_reading_level_from_the_first_three_sentences
70+
reference: ''
4471
de75ccb8-c0ba-4510-abf8-649b42019cd5: !Template
4572
answer_choices: Elementary ||| Intermediate ||| Advanced
4673
id: de75ccb8-c0ba-4510-abf8-649b42019cd5
@@ -60,7 +87,8 @@ templates:
6087
{{ answer_choices [label] }}'
6188
metadata: !TemplateMetadata
6289
choices_in_prompt: true
63-
metrics: []
90+
metrics:
91+
- Accuracy
6492
original_task: true
6593
name: esl_variation
6694
reference: ''
@@ -80,20 +108,22 @@ templates:
80108
{{ answer_choices [label] }}'
81109
metadata: !TemplateMetadata
82110
choices_in_prompt: true
83-
metrics: []
111+
metrics:
112+
- Accuracy
84113
original_task: true
85114
name: assess
86115
reference: ''
87116
fdc96a76-6415-437b-bf61-ef6d1d1b8645: !Template
88117
answer_choices: Elementary ||| Intermediate ||| Advanced
89118
id: fdc96a76-6415-437b-bf61-ef6d1d1b8645
90119
jinja: "Consider the following text passage: \n\n\"{{text}}\"\n\nHow would you\
91-
\ assess the difficulty level for the task of generating a simplified version\
92-
\ of the text passage above? Would it be at the {{\"Elementary\"}}, {{\"Intermediate\"\
93-
}} or {{\"Advanced\"}} level?\n\n|||\n\n{{ answer_choices [label] }}"
120+
\ assess the difficulty level for the task of simplifying the text passage above?\
121+
\ Would it be at the {{\"Elementary\"}}, {{\"Intermediate\"}} or {{\"Advanced\"\
122+
}} level?\n\n|||\n\n{{ answer_choices [label] }}"
94123
metadata: !TemplateMetadata
95124
choices_in_prompt: true
96-
metrics: []
125+
metrics:
126+
- Accuracy
97127
original_task: true
98128
name: ats
99129
reference: ''

promptsource/templates/scientific_papers/pubmed/templates.yaml

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ templates:
1212
{{ section_names.strip().split(''\n'')|join('', '')}}'
1313
metadata: !TemplateMetadata
1414
choices_in_prompt: null
15-
metrics: []
15+
metrics:
16+
- BLEU
17+
- ROUGE
18+
- Other
1619
original_task: false
1720
name: get_section_names_from_abstract
1821
reference: Given the abstract, get the section names.
1922
7ef28be4-382c-46ee-9fd5-1c4d83aab433: !Template
2023
answer_choices: null
2124
id: 7ef28be4-382c-46ee-9fd5-1c4d83aab433
22-
jinja: 'Prepare the first three sentences of a scientific article for the following
25+
jinja: 'Write the first three sentences of a scientific article for the following
2326
abstract:
2427
2528
{{abstract}}
@@ -28,41 +31,62 @@ templates:
2831
2932
{{article.strip().split(''\n'')[:3]|join("\n")}}'
3033
metadata: !TemplateMetadata
31-
choices_in_prompt: null
32-
metrics: []
34+
choices_in_prompt: false
35+
metrics:
36+
- BLEU
37+
- ROUGE
3338
original_task: false
3439
name: generate_first_three_sentences_of_an_article_from_abstract
3540
reference: Given the abstract, generate first three sentences of the article.
3641
a34723df-0c10-4553-8323-99c4cfb53544: !Template
3742
answer_choices: null
3843
id: a34723df-0c10-4553-8323-99c4cfb53544
39-
jinja: 'What would be the first line of scientific article for the following abstract:
40-
{{ abstract }}
44+
jinja: 'What would be the first line of a scientific article for the following
45+
abstract: {{ abstract }}
4146
4247
|||
4348
4449
{{ article.strip().split(''\n'')[0] }}'
4550
metadata: !TemplateMetadata
46-
choices_in_prompt: null
47-
metrics: []
51+
choices_in_prompt: false
52+
metrics:
53+
- BLEU
54+
- ROUGE
4855
original_task: false
4956
name: generate_first_line_from_abstract
5057
reference: Given the abstract, generate the first line of the article.
5158
a8992de1-443f-4f6a-983a-99e10a34b328: !Template
5259
answer_choices: null
5360
id: a8992de1-443f-4f6a-983a-99e10a34b328
54-
jinja: 'Write the first 100 words for a scientific article with following abstract
55-
: {{ abstract }}
61+
jinja: 'Write the first 100 words for a scientific article with the following
62+
abstract : {{ abstract }}
5663
5764
|||
5865
5966
{{ article.strip().split('' '')[:100] |join('' '')}}'
6067
metadata: !TemplateMetadata
61-
choices_in_prompt: null
62-
metrics: []
68+
choices_in_prompt: false
69+
metrics:
70+
- BLEU
71+
- ROUGE
6372
original_task: false
6473
name: generate_first_100_words_for_article
6574
reference: Given the abstract, generate the first 100 words of the article.
75+
e5a41fa1-3e81-4c74-ad73-6aab5e4855c7: !Template
76+
answer_choices: null
77+
id: e5a41fa1-3e81-4c74-ad73-6aab5e4855c7
78+
jinja: "Suppose that you have an abstract for a scientific paper: {{abstract}}\
79+
\ \nand you have already written the first three sentences of the full article:\
80+
\ {{article.strip().split('\\n')[:3]}}. \nPlease generate the next two sentences\
81+
\ of the article.\n|||\n{{article.strip().split('\\n')[3:5]|join(\"\\n\")}}"
82+
metadata: !TemplateMetadata
83+
choices_in_prompt: false
84+
metrics:
85+
- BLEU
86+
- ROUGE
87+
original_task: false
88+
name: write_sentences_4_and_5_from_sentences_1_2_3_and_abstract
89+
reference: ''
6690
ff694788-2e84-49e7-8df3-2665b8c687f1: !Template
6791
answer_choices: null
6892
id: ff694788-2e84-49e7-8df3-2665b8c687f1
@@ -74,7 +98,9 @@ templates:
7498
{{ abstract.strip().split(''\n'')[0]}}'
7599
metadata: !TemplateMetadata
76100
choices_in_prompt: null
77-
metrics: []
101+
metrics:
102+
- BLEU
103+
- ROUGE
78104
original_task: false
79105
name: generate_first_line_abstract_from_first_three_lines_article
80106
reference: Given the first three lines of an article, write the first line of

0 commit comments

Comments
 (0)