Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Prompt Engineering with the OpenAI API

Cursus bekijken

Oefeninstructies

  • 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.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

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)
Code bewerken en uitvoeren