Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
13 changes: 12 additions & 1 deletion promptsource/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,18 @@
# These are users whose datasets should be included in the results returned by
# filter_english_datasets (regardless of their metadata)

INCLUDED_USERS = {"Zaid", "craffel", "GEM", "aps", "khalidalt", "shanya", "rbawden", "BigScienceBiasEval", "gsarti"}
INCLUDED_USERS = {
"Zaid",
"craffel",
"GEM",
"aps",
"khalidalt",
"shanya",
"rbawden",
"BigScienceBiasEval",
"gsarti",
"tau",
}

# These are the metrics with which templates can be tagged
METRICS = {
Expand Down
87 changes: 87 additions & 0 deletions promptsource/templates/tau/scrolls/gov_report/templates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
dataset: tau/scrolls
subset: gov_report
templates:
2edf0297-e3d4-4870-bd95-178411e52e09: !Template
answer_choices: null
id: 2edf0297-e3d4-4870-bd95-178411e52e09
jinja: 'Summary: {{ output }}

Full Document: ||| {{ input }}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- ROUGE
- BLEU
original_task: false
name: summary_doc
reference: ''
3bd082cb-4e28-4eb7-1ea2-dd03f1f86219: !Template
answer_choices: null
id: 3bd082cb-4e28-4eb7-1ea2-dd03f1f86219
jinja: 'Read the following document:

{{ output }}

The following is a concise summary of the document: ||| {{ input }}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still weirded out that you can have trailing "\n"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry where's the trailing "\n"? Maybe I'm missing something

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry *can't I would expect the generation to be "below" the "The following is a concise summary of the document:" instead of to the right.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see. Yeah does promptsource allow for that? Not too familiar with the convention in PS / why it can't have a trailing "\n"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't allow for it; \n & whitespace is stripped

metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: false
name: read_following
reference: ''
52ffecee-4298-4611-a3dd-cc0ee3856259: !Template
answer_choices: null
id: 52ffecee-4298-4611-a3dd-cc0ee3856259
jinja: 'The following is a summary taken from a government report.

Summary: {{ output }}

The contents of that report were likely as follows: ||| {{ input }}'
Comment on lines +41 to +45
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what that brings compared to previous prompt

metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: false
name: reconstruct_report
reference: ''
af4d550e-54b8-471e-97af-2b2c50a1382e: !Template
answer_choices: null
id: af4d550e-54b8-471e-97af-2b2c50a1382e
jinja: 'Document: {{ input }}

Summary: ||| {{ output }}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: true
name: doc_summary
reference: ''
af4d550e-54b8-471e-97af-2b2c50a1382e: !Template
answer_choices: null
id: af4d550e-54b8-471e-97af-2b2c50a1382e
jinja: 'Here is a government report: {{ input }}

I will now summarize it: ||| {{ output }}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: true
name: summarize_report
reference: ''
59 changes: 59 additions & 0 deletions promptsource/templates/tau/scrolls/qmsum/templates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
dataset: tau/scrolls
subset: qmsum
templates:
2edf0197-e3d4-4870-bd95-178411e52e09: !Template
answer_choices: null
id: 2edf0197-e3d4-4870-bd95-178411e52e09
jinja: 'This is a summary of a meeting based on a query.

Summary: {{ output }}

The query given and the original meeting transcript\
are as follows: ||| {{ input }}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto with "\n" issue

metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- ROUGE
- BLEU
original_task: false
name: write_meeting
reference: ''
3bd082cb-4e28-4eb7-9fa2-dd03f1f86219: !Template
answer_choices: null
id: 3bd082cb-4e28-4eb7-9fa2-dd03f1f86219
jinja: 'Here is a summary of a meeting:

{{ output }}

The following is the question used to create the summary,\
followed by the meeting transcript itself: ||| {{ input }}'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really different from the previous one no?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can remove these duplicate prompts!

metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: false
name: meeting_following
reference: ''
af4d550e-54b8-471e-97af-2b2c50a1382e: !Template
answer_choices: null
id: af4d550e-54b8-471e-97af-2b2c50a1382e
jinja: 'The following is a question followed by a meeting transcript:

{{ input }}

How would you best summarize the meeting based on the question? ||| {{ output }}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: true
name: summarize_by_query
reference: ''
75 changes: 75 additions & 0 deletions promptsource/templates/tau/scrolls/summ_screen_fd/templates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
dataset: tau/scrolls
subset: summ_screen_fd
templates:
2edf0197-e3d4-4870-bd95-178411e52e09: !Template
answer_choices: null
id: 2edf0197-e3d4-4870-bd95-178411e52e09
jinja: 'Given the following television episode recap, please write a transcript of the episode.

Recap: {{ output }}

Transcript: ||| {{ input }}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- ROUGE
- BLEU
original_task: false
name: write_transcript
reference: ''
3bd082cb-4e28-4eb7-9fa2-dd03f1f86219: !Template
answer_choices: null
id: 3bd082cb-4e28-4eb7-9fa2-dd03f1f86219
jinja: 'Here is a summary of a TV episode:

{{ output }}

The following is the full screenplay of that TV episode: ||| {{ input }}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: false
name: provide screenplay
reference: ''
52ffecee-4298-4611-a3dd-cc0ee3856259: !Template
answer_choices: null
id: 52ffecee-4298-4611-a3dd-cc0ee3856259
jinja: 'I will provide a TV episode synopsis below.

Synopsis: {{ output }}

I will now start writing that TV episode from scratch: ||| {{ input }}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: false
name: write_from_synopsis
reference: ''
af4d550e-54b8-471e-97af-2b2c50a1382e: !Template
answer_choices: null
id: af4d550e-54b8-471e-97af-2b2c50a1382e
jinja: 'The following is a television episode transcript:

{{ input }}

How would you best summarize the above episode? ||| {{ output }}'
metadata: !TemplateMetadata
choices_in_prompt: false
languages:
- en
metrics:
- BLEU
- ROUGE
original_task: true
name: summarize episode
reference: ''