Get startedGet started for free

Customer support chatbot

You are tasked with developing a customer support chatbot for an e-commerce company specializing in electronics. This chatbot will assist users with inquiries, order tracking, and troubleshooting common issues. You aim to create a system prompt that clearly defines the chatbot's purpose and provides response guidelines that set the tone for interactions and specify the intended audience. A sample user prompt is provided.

The OpenAI package and the get_response() function have been pre-loaded for you.

This exercise is part of the course

Prompt Engineering with the OpenAI API

View Course

Exercise instructions

  • Write out who this chatbot is for and what it should do and save this as the chatbot_purpose.
  • Define the target audience as tech-savvy individuals interested in purchasing electronic gadgets and save to audience_guidelines.
  • Define the tone_guidelines that ask the chatbot to use a professional and user-friendly tone while interacting with customers.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

client = OpenAI(api_key="")

# Define the purpose of the chatbot
chatbot_purpose = "____"

# Define audience guidelines
audience_guidelines = "____"

# Define tone guidelines
tone_guidelines = "____"

system_prompt = chatbot_purpose + audience_guidelines + tone_guidelines
response = get_response(system_prompt, "My new headphones aren't connecting to my device")
print(response)
Edit and Run Code