Skip to content

fix empty documents - multi_news #793

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 2 commits into from
Jul 3, 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
36 changes: 30 additions & 6 deletions promptsource/templates/multi_news/templates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ templates:
jinja: '{% set docs = document.split("3ed2dface8203c4c9dfb1a5dc58e41e0||") | reject("equalto",
"") | list %}

{% if document != "" %}

What are the key points across these news articles:

{% for doc in docs %}
Expand All @@ -17,7 +19,9 @@ templates:

|||

{{summary[2:]}}'
{{summary[2:]}}

{% endif %}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
Expand All @@ -32,6 +36,8 @@ templates:
jinja: '{% set docs = document.split("3ed2dface8203c4c9dfb1a5dc58e41e0||") | reject("equalto",
"") | list %}

{% if document != "" %}

Synthesize these documents into a single one:

{% for doc in docs %}
Expand All @@ -43,7 +49,9 @@ templates:

|||

{{summary[2:]}}'
{{summary[2:]}}

{% endif %}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
Expand All @@ -58,6 +66,8 @@ templates:
jinja: '{% set docs = document.split("3ed2dface8203c4c9dfb1a5dc58e41e0||") | reject("equalto",
"") | list %}

{% if document != "" %}

I want to edit the following articles into a more concise summary:

{% for doc in docs %}
Expand All @@ -69,7 +79,9 @@ templates:

|||

{{summary[2:]}}'
{{summary[2:]}}

{% endif %}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
Expand All @@ -84,6 +96,8 @@ templates:
jinja: '{% set docs = document.split("3ed2dface8203c4c9dfb1a5dc58e41e0||") | reject("equalto",
"") | list %}

{% if document != "" %}

Write a summary of the following articles:

{% for doc in docs %}
Expand All @@ -95,7 +109,9 @@ templates:

|||

{{summary[2:]}}'
{{summary[2:]}}

{% endif %}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
Expand All @@ -110,13 +126,17 @@ templates:
jinja: '{% set docs = document.split("3ed2dface8203c4c9dfb1a5dc58e41e0||") | reject("equalto",
"") | list%}

{% if document != "" %}

Write an expanded news article with plausible details from the following summary:

{{summary[2:]}}

|||

{{docs | choice}}'
{{docs | choice}}

{% endif %}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
Expand All @@ -131,6 +151,8 @@ templates:
jinja: '{% set docs = document.split("3ed2dface8203c4c9dfb1a5dc58e41e0||") | reject("equalto",
"") | list %}

{% if document != "" %}

I''m trying to distill these articles down into one:

{% for doc in docs %}
Expand All @@ -142,7 +164,9 @@ templates:

|||

{{summary[2:]}}'
{{summary[2:]}}

{% endif %}'
metadata: !TemplateMetadata
choices_in_prompt: false
metrics:
Expand Down