@@ -405,20 +405,34 @@ instruction_prompt = """
405405Classify the sentiment of each conversation in >>>>>CONTENT<<<<<
406406with "🔥" 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<<<<<
450464as "negative" and "positive".
451465Return 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<<<<<
510537as "negative" and "positive".
511538Return 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.
515542You diligently complete tasks as instructed.
516543You never make up any information that isn't there."""
517544positive_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."""
525555positive_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"""
540568negative_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+ """
548579negative_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```
0 commit comments