Skip to content

Commit 61a4bd1

Browse files
committed
Update prompts
1 parent d81d623 commit 61a4bd1

File tree

2 files changed

+118
-84
lines changed

2 files changed

+118
-84
lines changed

prompt-engineering/README.md

Lines changed: 77 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -405,20 +405,34 @@ instruction_prompt = """
405405
Classify the sentiment of each conversation in >>>>>CONTENT<<<<<
406406
with "🔥" for negative and "✅" for positive.
407407
408+
Follow these steps when classifying the conversations:
409+
1. Does the customer use swear words or 😤?
410+
2. Does the customer seem aggravated or angry?
411+
412+
If you answer "Yes" to one of the above questions,
413+
then classify the conversation as negative with "🔥".
414+
Otherwise classify the conversation as positive with "✅".
415+
416+
Let's think step by step
417+
408418
#### START EXAMPLES
409419
410420
------ Example Inputs ------
411421
[Agent] 2023-07-24 : What can I help you with?
412422
[Customer] 2023-07-24 : I CAN'T CONNECT TO MY 😤 ACCOUNT
413423
[Agent] 2023-07-24 : Are you sure it's not your caps lock?
414424
[Customer] 2023-07-24 : 😤! You're right!
415-
The customer uses the 😤 emoji and seems aggravated, so the sentiment is negative. 🔥
425+
- Does the customer use swear words or 😤? Yes
426+
- Does the customer seem aggravated or angry? Yes
427+
- Sentiment: 🔥
416428
417429
[Agent] 2023-06-15 : Hello! How can I assist you today?
418430
[Customer] 2023-06-15 : I can't seem to find the download link for my purchased software.
419-
[Agent] 2023-06-15 : No problem, ********. Let me find that for you. Can you please provide your order number?
420-
[Customer] 2023-06-15 : It's ********. Thanks for helping me out!
421-
The customer does not use any swear words or 😤 emoji and does not seem aggravated or angry, so the sentiment is positive. ✅
431+
[Agent] 2023-06-15 : No problem, ****. Let me find that for you. Can you please provide your order number?
432+
[Customer] 2023-06-15 : It's ****. Thanks for helping me out!
433+
- Does the customer use swear words or 😤? No
434+
- Does the customer seem aggravated or angry? No
435+
- Sentiment: ✅
422436
423437
------ Example Outputs ------
424438
🔥
@@ -430,8 +444,8 @@ The customer does not use any swear words or 😤 emoji and does not seem aggrav
430444
431445
[Agent] 2023-06-15 : Hello! How can I assist you today?
432446
[Customer] 2023-06-15 : I can't seem to find the download link for my purchased software.
433-
[Agent] 2023-06-15 : No problem, ********. Let me find that for you. Can you please provide your order number?
434-
[Customer] 2023-06-15 : It's ********. Thanks for helping me out!
447+
[Agent] 2023-06-15 : No problem, ****. Let me find that for you. Can you please provide your order number?
448+
[Customer] 2023-06-15 : It's ****. Thanks for helping me out!
435449
436450
#### END EXAMPLES
437451
"""
@@ -450,21 +464,34 @@ Classify the sentiment of each conversation in >>>>>CONTENT<<<<<
450464
as "negative" and "positive".
451465
Return the output as valid JSON.
452466
453-
#### START EXAMPLES
467+
Follow these steps when classifying the conversations:
468+
1. Does the customer use swear words or 😤?
469+
2. Does the customer seem aggravated or angry?
470+
471+
If you answer "Yes" to one of the above questions,
472+
then classify the conversation as "negative".
473+
Otherwise classify the conversation as "positive".
474+
475+
Let's think step by step
454476
455-
------ Example Input ------
477+
#### START EXAMPLES
456478
479+
------ Example Inputs ------
457480
[Agent] 2023-07-24 : What can I help you with?
458481
[Customer] 2023-07-24 : I CAN'T CONNECT TO MY 😤 ACCOUNT
459482
[Agent] 2023-07-24 : Are you sure it's not your caps lock?
460483
[Customer] 2023-07-24 : 😤! You're right!
461-
The customer uses the 😤 emoji and seems aggravated, so the sentiment is negative.
484+
- Does the customer use swear words or 😤? Yes
485+
- Does the customer seem aggravated or angry? Yes
486+
- Sentiment: "negative"
462487
463488
[Agent] 2023-06-15 : Hello! How can I assist you today?
464489
[Customer] 2023-06-15 : I can't seem to find the download link for my purchased software.
465-
[Agent] 2023-06-15 : No problem, ********. Let me find that for you. Can you please provide your order number?
466-
[Customer] 2023-06-15 : It's ********. Thanks for helping me out!
467-
The customer does not use any swear words or 😤 emoji and does not seem aggravated or angry, so the sentiment is positive.
490+
[Agent] 2023-06-15 : No problem, ****. Let me find that for you. Can you please provide your order number?
491+
[Customer] 2023-06-15 : It's ****. Thanks for helping me out!
492+
- Does the customer use swear words or 😤? No
493+
- Does the customer seem aggravated or angry? No
494+
- Sentiment: "positive"
468495
469496
------ Example Output ------
470497
@@ -486,8 +513,8 @@ The customer does not use any swear words or 😤 emoji and does not seem aggrav
486513
"conversation": [
487514
"A: Hello! How can I assist you today?",
488515
"C: I can't seem to find the download link for my purchased software.",
489-
"A: No problem, ********. Let me find that for you. Can you please provide your order number?",
490-
"C: It's ********. Thanks for helping me out!"
516+
"A: No problem, ****. Let me find that for you. Can you please provide your order number?",
517+
"C: It's ****. Thanks for helping me out!"
491518
]
492519
}
493520
]
@@ -510,54 +537,56 @@ Classify the sentiment of each conversation in >>>>>CONTENT<<<<<
510537
as "negative" and "positive".
511538
Return the output as valid JSON.
512539
"""
513-
role_prompt = """You are a thoroughly trained machine learning model
514-
that is an expert at sentiment classification.
540+
role_prompt = """You are a thoroughly trained machine learning
541+
model that is an expert at sentiment classification.
515542
You diligently complete tasks as instructed.
516543
You never make up any information that isn't there."""
517544
positive_example = """
518545
[Agent] 2023-06-15 : Hello! How can I assist you today?
519546
[Customer] 2023-06-15 : I can't seem to find the download link for my purchased software.
520-
[Agent] 2023-06-15 : No problem, ********. Let me find that for you. Can you please provide your order number?
521-
[Customer] 2023-06-15 : It's ********. Thanks for helping me out!
547+
[Agent] 2023-06-15 : No problem, ****. Let me find that for you. Can you please provide your order number?
548+
[Customer] 2023-06-15 : It's ****. Thanks for helping me out!
549+
"""
550+
positive_reasoning = """
551+
- Does the customer use swear words or 😤? No
552+
- Does the customer seem aggravated or angry? No
553+
- Sentiment: "positive"
522554
"""
523-
positive_reasoning = """The customer does not use any swear words or 😤 emoji
524-
and does not seem aggravated or angry, so the sentiment is positive."""
525555
positive_output = """
526-
{
527-
"positive": [
528-
{
529-
"date": "2023-06-15",
530-
"conversation": [
531-
"A: Hello! How can I assist you today?",
532-
"C: I can't seem to find the download link for my purchased software.",
533-
"A: No problem, ********. Let me find that for you. Can you please provide your order number?",
534-
"C: It's ********. Thanks for helping me out!"
535-
]
536-
}
537-
]
538-
}
556+
"positive": [
557+
{
558+
"date": "2023-06-15",
559+
"conversation": [
560+
"A: Hello! How can I assist you today?",
561+
"C: I can't seem to find the download link for my purchased software.",
562+
"A: No problem, ****. Let me find that for you. Can you please provide your order number?",
563+
"C: It's ****. Thanks for helping me out!"
564+
]
565+
}
566+
]
539567
"""
540568
negative_example = """
541569
[Agent] 2023-07-24 : What can I help you with?
542570
[Customer] 2023-07-24 : I CAN'T CONNECT TO MY 😤 ACCOUNT
543571
[Agent] 2023-07-24 : Are you sure it's not your caps lock?
544572
[Customer] 2023-07-24 : 😤! You're right!
545573
"""
546-
negative_reasoning = """The customer uses the 😤 emoji and seems aggravated,
547-
so the sentiment is negative."""
574+
negative_reasoning = """
575+
- Does the customer use swear words or 😤? Yes
576+
- Does the customer seem aggravated or angry? Yes
577+
- Sentiment: "negative"
578+
"""
548579
negative_output = """
549-
{
550-
"negative": [
551-
{
552-
"date": "2023-07-24",
553-
"conversation": [
554-
"A: What can I help you with?",
555-
"C: I CAN'T CONNECT TO MY 😤 ACCOUNT",
556-
"A: Are you sure it's not your caps lock?",
557-
"C: 😤! You're right!"
558-
]
559-
}
560-
]
561-
}
580+
"negative": [
581+
{
582+
"date": "2023-07-24",
583+
"conversation": [
584+
"A: What can I help you with?",
585+
"C: I CAN'T CONNECT TO MY 😤 ACCOUNT",
586+
"A: Are you sure it's not your caps lock?",
587+
"C: 😤! You're right!"
588+
]
589+
}
590+
]
562591
"""
563592
```

prompt-engineering/settings-final.toml

Lines changed: 41 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,54 +5,59 @@ temperature = 0
55

66
[prompts]
77
instruction_prompt = """
8-
Classify the sentiment of each conversation in >>>>>CONTENT<<<<< as "negative" and "positive".
8+
Classify the sentiment of each conversation in >>>>>CONTENT<<<<<
9+
as "negative" and "positive".
910
Return the output as valid JSON.
1011
"""
11-
role_prompt = """You are a thoroughly trained machine learning model that is an expert at sentiment classification.
12-
You diligently complete tasks as instructed. You never make up any information that isn't there."""
12+
role_prompt = """You are a thoroughly trained machine learning
13+
model that is an expert at sentiment classification.
14+
You diligently complete tasks as instructed.
15+
You never make up any information that isn't there."""
1316
positive_example = """
1417
[Agent] 2023-06-15 : Hello! How can I assist you today?
1518
[Customer] 2023-06-15 : I can't seem to find the download link for my purchased software.
16-
[Agent] 2023-06-15 : No problem, ********. Let me find that for you. Can you please provide your order number?
17-
[Customer] 2023-06-15 : It's ********. Thanks for helping me out!
19+
[Agent] 2023-06-15 : No problem, ****. Let me find that for you. Can you please provide your order number?
20+
[Customer] 2023-06-15 : It's ****. Thanks for helping me out!
21+
"""
22+
positive_reasoning = """
23+
- Does the customer use swear words or 😤? No
24+
- Does the customer seem aggravated or angry? No
25+
- Sentiment: "positive"
1826
"""
19-
positive_reasoning = """The customer does not use any swear words or 😤 emoji
20-
and does not seem aggravated or angry, so the sentiment is positive."""
2127
positive_output = """
22-
{
23-
"positive": [
24-
{
25-
"date": "2023-06-15",
26-
"conversation": [
27-
"A: Hello! How can I assist you today?",
28-
"C: I can't seem to find the download link for my purchased software.",
29-
"A: No problem, ********. Let me find that for you. Can you please provide your order number?",
30-
"C: It's ********. Thanks for helping me out!"
31-
]
32-
}
33-
]
34-
}
28+
"positive": [
29+
{
30+
"date": "2023-06-15",
31+
"conversation": [
32+
"A: Hello! How can I assist you today?",
33+
"C: I can't seem to find the download link for my purchased software.",
34+
"A: No problem, ****. Let me find that for you. Can you please provide your order number?",
35+
"C: It's ****. Thanks for helping me out!"
36+
]
37+
}
38+
]
3539
"""
3640
negative_example = """
3741
[Agent] 2023-07-24 : What can I help you with?
3842
[Customer] 2023-07-24 : I CAN'T CONNECT TO MY 😤 ACCOUNT
3943
[Agent] 2023-07-24 : Are you sure it's not your caps lock?
4044
[Customer] 2023-07-24 : 😤! You're right!
4145
"""
42-
negative_reasoning = """The customer uses the 😤 emoji and seems aggravated,
43-
so the sentiment is negative."""
44-
negative_output = """
45-
{
46-
"negative": [
47-
{
48-
"date": "2023-07-24",
49-
"conversation": [
50-
"A: What can I help you with?",
51-
"C: I CAN'T CONNECT TO MY 😤 ACCOUNT",
52-
"A: Are you sure it's not your caps lock?",
53-
"C: 😤! You're right!"
54-
]
55-
}
56-
]
57-
}
46+
negative_reasoning = """
47+
- Does the customer use swear words or 😤? Yes
48+
- Does the customer seem aggravated or angry? Yes
49+
- Sentiment: "negative"
5850
"""
51+
negative_output = """
52+
"negative": [
53+
{
54+
"date": "2023-07-24",
55+
"conversation": [
56+
"A: What can I help you with?",
57+
"C: I CAN'T CONNECT TO MY 😤 ACCOUNT",
58+
"A: Are you sure it's not your caps lock?",
59+
"C: 😤! You're right!"
60+
]
61+
}
62+
]
63+
"""

0 commit comments

Comments
 (0)