Skip to content

Commit 4f0051f

Browse files
authored
Add HuffPost (#750)
* add username to INCLUDED_USERS list * add 5 prompts * change prompt name * add choices_in_prompt and fix minor issues * add labels and fix a prompt * title case answer choices * fix grammatical error * add other metrics * remove file * fix issues * Update templates.py * Update templates.py * set choices_in_prompt to false * add answer_choices in the prompts * fix minor issues * make prompts more natural
1 parent 1178ced commit 4f0051f

File tree

3 files changed

+99
-1
lines changed

3 files changed

+99
-1
lines changed

promptsource/.app.py.swp

1 KB
Binary file not shown.

promptsource/templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
# These are users whose datasets should be included in the results returned by
2828
# filter_english_datasets (regardless of their metadata)
29-
INCLUDED_USERS = {"Zaid", "craffel", "GEM", "aps"}
29+
INCLUDED_USERS = {"Zaid", "craffel", "GEM", "aps", "khalidalt"}
3030

3131

3232
def highlight(input):
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
dataset: khalidalt/HuffPost
2+
templates:
3+
19d2449b-1a52-4079-aaec-301517ee6ee1: !Template
4+
answer_choices: Politics||| Wellness||| Entertainment||| Travel||| Style &
5+
Beauty||| Parenting||| Healthy Living||| Queer Voices||| Food & Drink||| Business||| Comedy||| Sports||| Black
6+
Voices||| Home & Living||| Parents||| The Worldpost||| Weddings||| Women||| Impact||| Divorce||| Crime||| Media||| Weird
7+
News||| Green||| Worldpost||| Religion||| Style||| Science||| World News||| Taste||| Tech||| Money||| Arts||| Fifty||| Good
8+
News||| Arts & Culture||| Environment||| College||| Latino Voices||| Culture
9+
& Arts||| Education
10+
id: 19d2449b-1a52-4079-aaec-301517ee6ee1
11+
jinja: "Given these headline and description, what category can you infer this\
12+
\ piece of news belongs to? Headline: {{headline}}, Short description: {{short_description}}\
13+
\ \n||| {{answer_choices[label]}}"
14+
metadata: !TemplateMetadata
15+
choices_in_prompt: false
16+
metrics:
17+
- Accuracy
18+
- Other
19+
original_task: true
20+
name: infer_from
21+
reference: ''
22+
21973a70-f643-4172-a5f3-624aaf0d339a: !Template
23+
answer_choices: Politics||| Wellness||| Entertainment||| Travel||| Style &
24+
Beauty||| Parenting||| Healthy Living||| Queer Voices||| Food & Drink||| Business||| Comedy||| Sports||| Black
25+
Voices||| Home & Living||| Parents||| The Worldpost||| Weddings||| Women||| Impact||| Divorce||| Crime||| Media||| Weird
26+
News||| Green||| Worldpost||| Religion||| Style||| Science||| World News||| Taste||| Tech||| Money||| Arts||| Fifty||| Good
27+
News||| Arts & Culture||| Environment||| College||| Latino Voices||| Culture
28+
& Arts||| Education
29+
id: 21973a70-f643-4172-a5f3-624aaf0d339a
30+
jinja: "Given the following news headline and short description: \n{{headline}}\n\
31+
{{short_description}} \nWhat is a correct category? Please choose from the list\
32+
\ of options below: \n\u2022 {{answer_choices | join(\",\") |replace(\",\",\"\
33+
\\n\u2022 \") }} \n||| {{answer_choices[label]}}"
34+
metadata: !TemplateMetadata
35+
choices_in_prompt: true
36+
metrics:
37+
- Accuracy
38+
- Other
39+
original_task: true
40+
name: class
41+
reference: ''
42+
3a782f3e-7a67-4e46-ad46-57d4491a91c5: !Template
43+
answer_choices: Politics||| Wellness||| Entertainment||| Travel||| Style &
44+
Beauty||| Parenting||| Healthy Living||| Queer Voices||| Food & Drink||| Business||| Comedy||| Sports||| Black
45+
Voices||| Home & Living||| Parents||| The Worldpost||| Weddings||| Women||| Impact||| Divorce||| Crime||| Media||| Weird
46+
News||| Green||| Worldpost||| Religion||| Style||| Science||| World News||| Taste||| Tech||| Money||| Arts||| Fifty||| Good
47+
News||| Arts & Culture||| Environment||| College||| Latino Voices||| Culture
48+
& Arts||| Education
49+
id: 3a782f3e-7a67-4e46-ad46-57d4491a91c5
50+
jinja: "Given the following list of news categories: \n- {{answer_choices | join(\"\
51+
,\") |replace(\",\",\"\\n- \") }}\nClassify the following news to the correct\
52+
\ category: \n{{headline}}\n{{short_description}} \n||| {{answer_choices[label]}}"
53+
metadata: !TemplateMetadata
54+
choices_in_prompt: true
55+
metrics:
56+
- Accuracy
57+
- Other
58+
original_task: true
59+
name: Classify_category
60+
reference: ''
61+
ab757ddf-0c94-49b4-89a6-e7ead4ab5a58: !Template
62+
answer_choices: Politics||| Wellness||| Entertainment||| Travel||| Style &
63+
Beauty||| Parenting||| Healthy Living||| Queer Voices||| Food & Drink||| Business||| Comedy||| Sports||| Black
64+
Voices||| Home & Living||| Parents||| The Worldpost||| Weddings||| Women||| Impact||| Divorce||| Crime||| Media||| Weird
65+
News||| Green||| Worldpost||| Religion||| Style||| Science||| World News||| Taste||| Tech||| Money||| Arts||| Fifty||| Good
66+
News||| Arts & Culture||| Environment||| College||| Latino Voices||| Culture
67+
& Arts||| Education
68+
id: ab757ddf-0c94-49b4-89a6-e7ead4ab5a58
69+
jinja: "{{headline}}\n{{date}}\n{{short_description}}\nWhat is a correct category\
70+
\ for this news from the following list of options: \n- {{answer_choices |\
71+
\ join(\",\") |replace(\",\",\"\\n- \") }} |||\n{{answer_choices[label]}}"
72+
metadata: !TemplateMetadata
73+
choices_in_prompt: true
74+
metrics:
75+
- Accuracy
76+
- Other
77+
original_task: true
78+
name: correct_category
79+
reference: ''
80+
deac9d78-f784-47f6-8cac-3cc6bbdf9f1a: !Template
81+
answer_choices: Politics||| Wellness||| Entertainment||| Travel||| Style &
82+
Beauty||| Parenting||| Healthy Living||| Queer Voices||| Food & Drink||| Business||| Comedy||| Sports||| Black
83+
Voices||| Home & Living||| Parents||| The Worldpost||| Weddings||| Women||| Impact||| Divorce||| Crime||| Media||| Weird
84+
News||| Green||| Worldpost||| Religion||| Style||| Science||| World News||| Taste||| Tech||| Money||| Arts||| Fifty||| Good
85+
News||| Arts & Culture||| Environment||| College||| Latino Voices||| Culture
86+
& Arts||| Education
87+
id: deac9d78-f784-47f6-8cac-3cc6bbdf9f1a
88+
jinja: "Given the following article headline and short passage of the article,\
89+
\ what is the category of this news report? \nArticle headline: {{headline}}\n\
90+
Short passage: \"{{short_description}}\" \n ||| {{answer_choices[label]}}"
91+
metadata: !TemplateMetadata
92+
choices_in_prompt: false
93+
metrics:
94+
- Accuracy
95+
- Other
96+
original_task: true
97+
name: category_of
98+
reference: ''

0 commit comments

Comments
 (0)