in ccai-insights-sample-data/synthetic-convo-insights.py [0:0]
def generate_lists():
# Prompts for Gemini to generate lists (CHANGE PROMPTS AS NEEDED BASED ON YOUR CUSTOMER)
service_prompt = """I work for Ulta Beauty. Can you list out 5 common Ulta Beauty related issues customers may call customer support about? Feel free to use the https://www.ulta.com/ website for inspiration on common products or services or to learn more about the company. Make sure to be very specific about the exact product or service a customer is calling Ulta Beauty about. Your output should mirror this structure.
Example output: ["Service1","Service2","Service3","Service4","Service5"].Do not generate anything else other than the list"""
problem_prompt = """List 5 common problems Ulta Beauty customers might have with their experience at Ulta Beauty. Be as specific and detailed as possible with customer responses, product types, issues, etc. Make sure to be very specific about the exact product, service, or issue a customer is calling about. Here is a website that give examples on common complaints Ulta Beauty customers may have: https://www.reddit.com/r/Ulta/. Here is another website that give examples on common complaints Ulta Beauty customers may have: https://www.bbb.org/us/il/bolingbrook/profile/retail-stores/ulta-beauty-0654-27005363/customer-reviews. Your output should mirror this structure.
Example output: ["Problem1","Problem2","Problem3","Problem4","Problem5"].Do not generate anything else other than the list"""
greeting_prompt = """List 5 different realistic ways an Ulta Beauty customer service representative might greet a customer on the phone, ensuring each greeting uses a UNIQUE and DISTINCT agent name. Include both a greeting and an offer to assist, mirroring Ulta Beauty's professional style. Replace '[Agent Name]' with a diverse range of realistic first names (both female and male). The agent names should be diverse, representing various genders and cultural backgrounds.
Example output: ["Hello, thank you for calling Ulta Beauty. My name is Jose. How may I help you today?", "Welcome to Ulta Beauty! This is Ahmad. How can I assist you?", "Good morning/afternoon/evening! Thank you for contacting Ulta Beauty. This is David. What can I do for you today?","Hello, this is Ava with Ulta Beauty. How can I assist help you beautify your day?","It's a pleasure to assist you at Ulta Beauty. My name is Priya. How may I help you today?"]
Do not generate anything else other than the list."""
agent_name_prompt = """Generate a list of 50 DISTINCT and culturally diverse names that could be used for Ulta Beauty customer service representatives. Include names that are uncommon or less frequent, representing a wide range of ethnicities and genders. Ensure no repetition or similarity.
Example output: ["Jessica", "Priya", "Zaid", "Diego", "Luis"]."""
closing_prompt = """List 5 different ways an Ulta Beauty customer service representative might end a call with a customer.Your output should mirror this structure.
Example output: ["Closing greeting1","Closing greeting2","Closing greeting3","Closing greeting4","Closing greeting5"].Do not generate anything else other than the list"""
closing_response_prompt = """List 5 different ways a customer might respond to an Ulta Beauty customer service representative ending a call based off the last closing prompt message from the agent.
Example output: ["Thank you for your help. Have a great day!", "You're welcome. Goodbye.", "No problem. Thanks for your time."]
Do not generate anything else other than the list."""
# Get responses from Gemini and clean up the output for CCAI Insights formatting
services = model.generate_content(service_prompt)
services_text = services.text.strip()[1:-1].replace('"', '').split(",")
problems = model.generate_content(problem_prompt)
problems_text = problems.text.strip()[1:-1].replace('"', '').replace("\n", "").split(",")
greetings = model.generate_content(greeting_prompt)
greetings_text = greetings.text.strip()[1:-1].replace('"', '').split(",")
# Filter out unprofessional greetings and ensure Ulta Beauty is mentioned in the initial agent greeting
greetings_text = list(
filter(
lambda g: "ulta beauty" in g.lower() and any(keyword in g.lower() for keyword in ["help", "assist", "welcome"]),
greetings_text
)
)
agent_names = model.generate_content(agent_name_prompt)
agent_names_text = agent_names.text.strip()[1:-1].replace('"', '').split(",")
closing_remarks = model.generate_content(closing_prompt)
closing_remarks_text = closing_remarks.text.strip()[1:-1].replace('"', '').split(",")
closing_responses = model.generate_content(closing_response_prompt)
closing_responses_text = closing_responses.text.strip()[1:-1].replace('"', '').replace('-', '').split(",")
#Parse with ast.literal_eval
return services_text, problems_text, greetings_text, closing_remarks_text, closing_responses_text, agent_names_text