From ec05c350cfb26bccbb3410c52f40579871f5301e Mon Sep 17 00:00:00 2001 From: KhalidAlt Date: Tue, 17 May 2022 18:37:36 +0300 Subject: [PATCH 1/2] add original prompts --- promptsource/templates/piaf/templates.yaml | 75 ++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 promptsource/templates/piaf/templates.yaml diff --git a/promptsource/templates/piaf/templates.yaml b/promptsource/templates/piaf/templates.yaml new file mode 100644 index 000000000..bdf6520f2 --- /dev/null +++ b/promptsource/templates/piaf/templates.yaml @@ -0,0 +1,75 @@ +dataset: piaf +templates: + 4bac0d14-ac52-442c-9364-ea7add071af4: !Template + answer_choices: null + id: 4bac0d14-ac52-442c-9364-ea7add071af4 + jinja: 'Extract from the passage the answer to this question: {{question}} + + Passage about {{title}}: {{context}} ||| {{answers[''text''][0]}}' + metadata: !TemplateMetadata + choices_in_prompt: false + metrics: + - Accuracy + original_task: true + name: extract_the_answer + reference: '' + 723aa38b-c671-457c-96ee-bf449184f57f: !Template + answer_choices: null + id: 723aa38b-c671-457c-96ee-bf449184f57f + jinja: '{{title}} + + {{context}} + + Q: {{question}} + + + A: ||| {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: false + metrics: + - Accuracy + original_task: true + name: context_follow_q + reference: '' + 9f4bf5cd-070c-46a1-9098-2ad1ef63d806: !Template + answer_choices: null + id: 9f4bf5cd-070c-46a1-9098-2ad1ef63d806 + jinja: "Given the following passage answer the question that follows: \n{{context}}\n\ + {{question}} ||| {{answers.text[0]}}" + metadata: !TemplateMetadata + choices_in_prompt: false + metrics: + - Accuracy + original_task: true + name: given_passage_answer + reference: '' + bdeaa285-287f-44de-9bff-49dbf533be89: !Template + answer_choices: null + id: bdeaa285-287f-44de-9bff-49dbf533be89 + jinja: '{{context}} + + + Given the above context, {{question}} ||| {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: false + metrics: + - Accuracy + original_task: true + name: Given_above_context + reference: '' + ec70d9f8-edd5-4b8c-b18a-a5a7fb962b9a: !Template + answer_choices: null + id: ec70d9f8-edd5-4b8c-b18a-a5a7fb962b9a + jinja: 'After reading the following paragraph, please answer the question that + follows: + + {{context}} + + {{question}} ||| {{answers.text[0]}}' + metadata: !TemplateMetadata + choices_in_prompt: false + metrics: + - Accuracy + original_task: true + name: after_reading + reference: '' From 7662e68da32c05819989f9c3780017c7e03d2f7b Mon Sep 17 00:00:00 2001 From: KhalidAlt Date: Mon, 23 May 2022 18:25:48 +0300 Subject: [PATCH 2/2] update metrics --- promptsource/templates/piaf/templates.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/promptsource/templates/piaf/templates.yaml b/promptsource/templates/piaf/templates.yaml index bdf6520f2..5cc44dbcb 100644 --- a/promptsource/templates/piaf/templates.yaml +++ b/promptsource/templates/piaf/templates.yaml @@ -10,6 +10,7 @@ templates: choices_in_prompt: false metrics: - Accuracy + - Squad original_task: true name: extract_the_answer reference: '' @@ -28,6 +29,7 @@ templates: choices_in_prompt: false metrics: - Accuracy + - Squad original_task: true name: context_follow_q reference: '' @@ -40,6 +42,7 @@ templates: choices_in_prompt: false metrics: - Accuracy + - Squad original_task: true name: given_passage_answer reference: '' @@ -54,6 +57,7 @@ templates: choices_in_prompt: false metrics: - Accuracy + - Squad original_task: true name: Given_above_context reference: '' @@ -70,6 +74,7 @@ templates: choices_in_prompt: false metrics: - Accuracy + - Squad original_task: true name: after_reading reference: ''