Skip to content

Add PIAF #774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions promptsource/templates/piaf/templates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
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
- Squad
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
- Squad
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
- Squad
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
- Squad
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
- Squad
original_task: true
name: after_reading
reference: ''