-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconst.py
More file actions
56 lines (47 loc) · 3.54 KB
/
const.py
File metadata and controls
56 lines (47 loc) · 3.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# https://github.com/GIEBench/GIEBench
country_list = [
"China", "Japan",
"India", "Pakistan",
"Myanmar", "the Philippines",
"Iran", "Israel", "Palestine",
"Russia", "Ukraine",
"Germany", "France", "the United Kingdom",
"Nigeria", "Egypt",
"the United States", "Canada", "Mexico",
"Brazil", "Argentina",
]
group_mappings = {
"religion": ["a Christian", "a Muslim", "a Jew", "a Buddhist", "a Hindu"],
"ethnicity": [
"a white person", "a White person", "a Caucasian", "a White American", "a European American",
"a black person", "a Black person", "an African American", "a Black American",
"an Asian person", "an Asian American", "an Asian",
"a Hispanic person", "a Hispanic American", "a Latino American", "a Latino", "a Latina", "a Latinx"
],
"nationality": [f"a person from {country}" for country in country_list1],
}
crowd_enVent_emotions = ['anger', 'disgust', 'fear', 'guilt', 'sadness', 'shame', 'boredom',
'joy', 'pride', 'trust', 'relief', 'surprise']
# OBSERVER GROUP IDENTITY
persona_prompt_0 = "You are {persona}."
persona_prompt_1 = "You are {persona}. Your responses should closely mirror the knowledge and abilities of this persona."
persona_prompt_2 = "Adopt the identity of {persona}. Answer the questions while staying in strict accordance with the nature of this identity."
persona_prompt_3 = "Take the role of {persona}. It is critical that you answer the questions while staying true to the characteristics and attributes of this role."
system_prompt_0 = "{persona_prompt}\nYour task is to rate the intensity of the emotion on a scale from 0 (not at all) to 100 (extremely).\nOnly give the scale number. No explanation is needed."
system_prompt_1 = "{persona_prompt}\nYour task is to rate the intensity of the emotion on a scale from 0 (not at all) to 10 (extremely).\nOnly give the scale number. No explanation is needed."
# EXPERIENCER GROUP IDENTITY
crowd_enVent_user_input_1_person = "The following narrative is shared by {experiencer}.\n\"{sent}\"\nHow much {emotion} did the person feel while experiencing the event?\nEmotion intensity:"
crowd_enVent_user_input_3_person = "The following narrative is shared by {experiencer} and reframed in the third-person perspective.\n\"{sent}\"\nHow much {emotion} did the person feel while experiencing the event?\nEmotion intensity:"
# Suggested: “In the following narrative, a(n) {experiencer} describes a situation in which they felt(/experienced) {emotion}.“
crowd_enVent_user_input = "In the following narrative, {experiencer} describes a situation in which they felt {emotion}.\n\"{sent}\"\nHow much {emotion} did the person feel while experiencing the event?\nEmotion intensity:"
def get_prompt_pair(prompt_variation):
comb_dict = {
'origin': [system_prompt_0.format(persona_prompt=persona_prompt_0), crowd_enVent_user_input],
'persona-1': [system_prompt_0.format(persona_prompt=persona_prompt_1), crowd_enVent_user_input],
'persona-2': [system_prompt_0.format(persona_prompt=persona_prompt_2), crowd_enVent_user_input],
'persona-3': [system_prompt_0.format(persona_prompt=persona_prompt_3), crowd_enVent_user_input],
'1-person': [system_prompt_0.format(persona_prompt=persona_prompt_0), crowd_enVent_user_input_1_person],
'3-person': [system_prompt_0.format(persona_prompt=persona_prompt_0), crowd_enVent_user_input_3_person],
'10-scale': [system_prompt_1.format(persona_prompt=persona_prompt_0), crowd_enVent_user_input],
}
return comb_dict[prompt_variation]