Skip to content

Tidy tydiqa #803

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

Open
wants to merge 4 commits into
base: eval-hackathon
Choose a base branch
from
Open
Show file tree
Hide file tree
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
199 changes: 199 additions & 0 deletions promptsource/templates/khalidalt/tydiqa-goldp/english/templates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
dataset: khalidalt/tydiqa-goldp
subset: english
templates:
047ed162-f58b-42d5-81aa-0a17a9750230: !Template
answer_choices: null
id: 047ed162-f58b-42d5-81aa-0a17a9750230
jinja: "Snippet:\
\ {{passage_text}}\nI know that the answer to \"{{question_text}}\" appears somewhere\
\ in the text snippet about {{document_title}}. Can you answer the question?\n|||\n{{answers.text\
\ | choice}}"
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- Squad
original_task: true
name: en_can_you_answer_the_question
reference: Ask question with Context
05c99237-0e03-4ec9-95f3-dfde8ae25605: !Template
answer_choices: null
id: 05c99237-0e03-4ec9-95f3-dfde8ae25605
jinja: '{% set _blank2 = ["title", "context", "topic" ] %}

{% set _blank1 = ["guess", "generate", "determine"] %}

{% set _blank=["passage", "text", "text snippet", "info"]|random %}

{% set _position = ["above", "following"] |random %}

{% if _position == "above" %}

{{passage_text}}{{"\n"}}

{% endif %}

Can you {{_blank1|random}} the {{_blank2|random}} of the {{_position}} passage.

{% if _position == "following" %}

{{"\n"}}{{passage_text}}

{% endif %}

|||

{{document_title}}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: false
name: en_title_generation
reference: Generate title from a passage
1f4728ba-b25e-450e-975f-6dc8c0cb4bb1: !Template
answer_choices: null
id: 1f4728ba-b25e-450e-975f-6dc8c0cb4bb1
jinja: '

Could you generate a question whose answer is {{answers.text | choice}} based
on the following context: {{passage_text}}

|||

{{question_text}}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: false
name: en_end_to_end_question_generation
reference: generate end-to-end question from a passage.
3d7ee9fe-ac53-4cf3-9913-431425225a5c: !Template
answer_choices: null
id: 3d7ee9fe-ac53-4cf3-9913-431425225a5c
jinja: '
I am trying to figure out the answer to the question "{{question_text}}"

I found this text about {{document_title}} on Wikipedia and I think it contains the answer.
Can you tell me the answer?

Text: {{passage_text}}

|||

{{answers.text | choice}}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- Squad
original_task: true
name: en_can_you_tell_me_the_answer
reference: Ask question with Context
696c888c-3419-4e4c-b559-1d9772fa60ab: !Template
answer_choices: null
id: 696c888c-3419-4e4c-b559-1d9772fa60ab
jinja: "Extract\
\ in the passage the answer to the question: {{question_text}}\nPassage about {{document_title}}:\
\ {{passage_text}}\n|||\n{{answers.text | choice}}"
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- Squad
original_task: true
name: en_extract_answer
reference: Ask question with Context
c2356ac6-7761-43b8-9fb9-38ed25c0db9b: !Template
answer_choices: null
id: c2356ac6-7761-43b8-9fb9-38ed25c0db9b
jinja: '
I am testing my students'' knowledge about {{document_title}}.

Based on the context ({{passage_text}}), here''s the question to answer: {{question_text}}.
The answer is in the context.

|||

{{answers.text | choice}}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- Squad
original_task: true
name: en_testing_students
reference: ''
d0966d12-6d15-4138-b273-5fe2e1619ff9: !Template
answer_choices: null
id: d0966d12-6d15-4138-b273-5fe2e1619ff9
jinja: '
Could you generate a question about {{document_title}} and whose answer is {{answers.text
| choice}} based on the following context: {{passage_text}}

|||

{{question_text}}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: false
name: en_end_to_end_question_generation_with_title
reference: generate end-to-end question from a passage with a title
f276815f-f7c0-4dab-b12e-08e76da6d760: !Template
answer_choices: null
id: f276815f-f7c0-4dab-b12e-08e76da6d760
jinja: '{{question_text}}

Answer the question above.

|||

{{answers.text | choice}}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- Squad
original_task: false
name: en_simple_question_odqa
reference: Ask question without Context
fcf0920f-5599-44a6-bf2a-9ef6bbbe1e64: !Template
answer_choices: null
id: fcf0920f-5599-44a6-bf2a-9ef6bbbe1e64
jinja: 'I''ve always wondered: {{question_text}}

I searched Wikipedia and I found the following text snippet about {{document_title}}.

Snippet: {{passage_text}}

What''s the answer?

|||

{{answers.text | choice}}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- Squad
original_task: true
name: en_whats_the_answer
reference: Ask question with Context
Loading