Skip to content

Commit 34d712a

Browse files
tae898stephenbach
andauthored
finish qed (#707)
* finish qed * finish qed * Pass on qed. Co-authored-by: Stephen Bach <stephenhbach@gmail.com>
1 parent eb31653 commit 34d712a

File tree

1 file changed

+73
-53
lines changed

1 file changed

+73
-53
lines changed

promptsource/templates/qed/templates.yaml

Lines changed: 73 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -3,86 +3,106 @@ templates:
33
292db39d-b9e9-4113-b59d-6c5b93133563: !Template
44
answer_choices: null
55
id: 292db39d-b9e9-4113-b59d-6c5b93133563
6-
jinja: 'Give a suitable title to the following passage:
7-
8-
9-
{{paragraph_text}} |||
10-
11-
12-
{{title_text}}'
6+
jinja: "Give a suitable title to the following passage:\n\n{{paragraph_text}}\
7+
\ \n|||\n\n{{title_text}}"
138
metadata: !TemplateMetadata
14-
choices_in_prompt: null
15-
metrics: []
9+
choices_in_prompt: false
10+
metrics:
11+
- BLEU
12+
- ROUGE
1613
original_task: false
17-
name: title_prediction
14+
name: title-prediction
1815
reference: ''
1916
3578c1ee-8872-406f-be9f-b7e174aed92c: !Template
2017
answer_choices: null
2118
id: 3578c1ee-8872-406f-be9f-b7e174aed92c
22-
jinja: "Question: {{question}} \n\nAnswer: |||\n\n{{original_nq_answers[0][\"\
23-
string\"]}}"
19+
jinja: '{% set chosen = original_nq_answers | choice %}
20+
21+
Question: {{question}} ?
22+
23+
|||
24+
25+
{{ chosen["string"]}}'
2426
metadata: !TemplateMetadata
25-
choices_in_prompt: null
26-
metrics: []
27+
choices_in_prompt: false
28+
metrics:
29+
- BLEU
30+
- ROUGE
2731
original_task: false
28-
name: original_nq_answers
32+
name: closed-book-qa
2933
reference: ''
3034
383d06fe-d562-4883-8d29-b727d4c3877b: !Template
3135
answer_choices: null
3236
id: 383d06fe-d562-4883-8d29-b727d4c3877b
33-
jinja: "{% if annotation['selected_sentence']['string']!=\"\" %}\nQuestion: {{question}}\n\
34-
\nHint: {{paragraph_text}} \n\nAnswer: |||\n\n{{annotation['selected_sentence']['string']}}\n\
35-
{% endif %}\n"
37+
jinja: "{% set chosen = original_nq_answers | choice %}\n{% if annotation['selected_sentence']['string']!=\"\
38+
\" %}\nAnswer the following question given the hint.\n\nQuestion: {{question}}?\n\
39+
\nHint: {{paragraph_text}} \n\n|||\n{{ chosen[\"string\"]}}\n{% endif %}\n"
3640
metadata: !TemplateMetadata
37-
choices_in_prompt: null
38-
metrics: []
41+
choices_in_prompt: false
42+
metrics:
43+
- BLEU
44+
- ROUGE
3945
original_task: true
40-
name: basic
41-
reference: ''
42-
4cc7af61-ee7a-491f-b232-8ef3dc7d1415: !Template
43-
answer_choices: No ||| Yes
44-
id: 4cc7af61-ee7a-491f-b232-8ef3dc7d1415
45-
jinja: '{{paragraph_text}}
46-
47-
48-
Does the above passage contain the answer to the following question:
49-
50-
51-
{{question}} |||
52-
53-
{{answer_choices[annotation["explaination_type"]!="none"]}}'
54-
metadata: !TemplateMetadata
55-
choices_in_prompt: null
56-
metrics: []
57-
original_task: false
58-
name: is_answer_exist
46+
name: open-book-qa
5947
reference: ''
60-
5a1e57c7-39b2-486e-9112-d4311aee6bdc: !Template
48+
5b45c11d-bbea-45a1-a799-a77a56fe8e1d: !Template
6149
answer_choices: null
62-
id: 5a1e57c7-39b2-486e-9112-d4311aee6bdc
63-
jinja: 'I found the following Wikipedia article:
50+
id: 5b45c11d-bbea-45a1-a799-a77a56fe8e1d
51+
jinja: 'Please extract the title from the given URL (Uniform Resource Locator).
6452
6553
66-
"{{paragraph_text}}"
54+
URL: {{ url }}
6755
56+
|||
6857
69-
Can you predict its title? |||
70-
71-
{{title_text}}'
58+
{{ title_text }}'
7259
metadata: !TemplateMetadata
73-
choices_in_prompt: null
74-
metrics: []
60+
choices_in_prompt: false
61+
metrics:
62+
- Accuracy
7563
original_task: false
76-
name: topic_prompt
64+
name: extract-title-from-url
7765
reference: ''
7866
7d3746b5-52e6-4ce1-b441-007f271f477b: !Template
7967
answer_choices: null
8068
id: 7d3746b5-52e6-4ce1-b441-007f271f477b
8169
jinja: "I need to prepare for my upcoming test. Can you read the below passage\
82-
\ and ask me a reasonable question? \n\n{{paragraph_text}} ||| \n\n{{question}}"
70+
\ and ask me a reasonable question? \n\n{{paragraph_text}} \n||| \n\n{{question}}?"
8371
metadata: !TemplateMetadata
84-
choices_in_prompt: null
85-
metrics: []
72+
choices_in_prompt: false
73+
metrics:
74+
- BLEU
75+
- ROUGE
8676
original_task: false
87-
name: question_forming
77+
name: question-forming
78+
reference: ''
79+
86cffd6d-db04-4daf-ab30-f462fd1177e3: !Template
80+
answer_choices: null
81+
id: 86cffd6d-db04-4daf-ab30-f462fd1177e3
82+
jinja: '{% if annotation["selected_sentence"]["string"] != "" %}
83+
84+
Read the following paragraph and question A, and answer question B:
85+
86+
87+
Paragraph: {{ paragraph_text }}
88+
89+
90+
Question A: {{ question }}?
91+
92+
93+
Question B: What''s the most important sentence in Paragraph, in order to answer
94+
question A?
95+
96+
|||
97+
98+
{{ annotation["selected_sentence"]["string"] }}
99+
100+
{% endif %}'
101+
metadata: !TemplateMetadata
102+
choices_in_prompt: false
103+
metrics:
104+
- BLEU
105+
- ROUGE
106+
original_task: true
107+
name: select-sentence
88108
reference: ''

0 commit comments

Comments
 (0)