-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add templates for riddle_sense dataset (#723)
* add templates for riddle_sense dataset Use almost identical templates as commonsense_qa because the two datasets are very similar. * moving `{% if answerKey != "" %}` to the target Co-authored-by: Victor Sanh <[email protected]>
- Loading branch information
1 parent
3bb12cf
commit 8bb489c
Showing
1 changed file
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
dataset: riddle_sense | ||
templates: | ||
3df2405b-4a0e-4fcf-8600-b7f4843b945a: !Template | ||
answer_choices: null | ||
id: 3df2405b-4a0e-4fcf-8600-b7f4843b945a | ||
jinja: 'Use the following options to predict a possible question for them: | ||
{% for i in range(choices[''text'']|length) %} | ||
- {{choices[''text''][i]}} | ||
{% endfor %} ||| | ||
{{question}}' | ||
metadata: !TemplateMetadata | ||
choices_in_prompt: false | ||
metrics: | ||
- BLEU | ||
- ROUGE | ||
original_task: false | ||
name: answer_to_question | ||
reference: '' | ||
8b44338c-f635-47fc-86fb-3135ef2a76ae: !Template | ||
answer_choices: '{{choices.text | join("|||")}}' | ||
id: 8b44338c-f635-47fc-86fb-3135ef2a76ae | ||
jinja: 'Given the options below, select the most suitable answer for the following | ||
question: | ||
{{question}} | ||
Options: | ||
- {{answer_choices | join("\n- ")}}||| | ||
{% if answerKey != "" %} | ||
{{answer_choices[choices["label"].index(answerKey)]}} | ||
{% endif %}' | ||
metadata: !TemplateMetadata | ||
choices_in_prompt: true | ||
metrics: | ||
- Accuracy | ||
original_task: true | ||
name: most_suitable_answer | ||
reference: '' | ||
ac002734-5b1f-4478-9ffc-f16d9ca2f70e: !Template | ||
answer_choices: '{{choices.text | join("|||")}}' | ||
id: ac002734-5b1f-4478-9ffc-f16d9ca2f70e | ||
jinja: 'Answer the following question: | ||
{{question}} ||| | ||
{% if answerKey != "" %} | ||
{{ answer_choices[choices[''label''].index(answerKey)] }} | ||
{% endif %}' | ||
metadata: !TemplateMetadata | ||
choices_in_prompt: false | ||
metrics: | ||
- Accuracy | ||
original_task: true | ||
name: answer_given_question_without_options | ||
reference: '' | ||
bf3f7bd2-91c6-455c-b9f7-42ce265fa2db: !Template | ||
answer_choices: A ||| B ||| C ||| D ||| E | ||
id: bf3f7bd2-91c6-455c-b9f7-42ce265fa2db | ||
jinja: 'Given the following options, what do you think is the correct answer to | ||
the question below: | ||
{{question}} | ||
Options: | ||
{% for letter, t in zip(answer_choices, choices.text) %} | ||
- {{letter}}: {{t}} | ||
{% endfor %} ||| | ||
{% if answerKey != "" %} | ||
{{answerKey}} | ||
{% endif %}' | ||
metadata: !TemplateMetadata | ||
choices_in_prompt: true | ||
metrics: | ||
- Accuracy | ||
original_task: true | ||
name: question_to_answer_index | ||
reference: '' | ||
bf7d7cbc-aa05-4aca-97ff-29eb34502019: !Template | ||
answer_choices: '{{choices.text | join("|||")}}' | ||
id: bf7d7cbc-aa05-4aca-97ff-29eb34502019 | ||
jinja: '{{question}} | ||
- {{answer_choices | join("\n- ")}} ||| | ||
{% if answerKey != "" %} | ||
{{answer_choices[choices[''label''].index(answerKey)] }} | ||
{% endif %}' | ||
metadata: !TemplateMetadata | ||
choices_in_prompt: true | ||
metrics: | ||
- Accuracy | ||
original_task: true | ||
name: question_answering | ||
reference: '' |