Prompts met rolspel voor chatbots

Prompt Engineering met de OpenAI API

Fouad Trad

Machine Learning Engineer

Rolspel-prompts

  • Laat de chatbot een specifieke rol spelen
  • Chatbot -> acteur in een toneelstuk
  • Chatbot past zich aan de rol aan
  • Taal en inhoud afgestemd op de persona
  • Effectievere interacties

 

Afbeelding met verschillende maskers en vermommingen voor rolspel.

Prompt Engineering met de OpenAI API

Voorbeeld van rolspel

Vraag: Kun je me de technische specificaties geven van Product X dat jullie aanbieden?

Afbeelding met de gebruiker en drie personen, elk met een rol (klantenservice, projectmanager en sales engineer)

Prompt Engineering met de OpenAI API

Voorbeeld van rolspel

Vraag: Kun je me de technische specificaties geven van Product X dat jullie aanbieden?

Afbeelding met de gebruiker en drie personen, elk met een rol (klantenservice, projectmanager en sales engineer)

Prompt Engineering met de OpenAI API

Voorbeeld van rolspel

Vraag: Kun je me de technische specificaties geven van Product X dat jullie aanbieden?

Afbeelding met de gebruiker en drie personen, elk met een rol (klantenservice, projectmanager en sales engineer)

Prompt Engineering met de OpenAI API

Klantenservicemedewerker

Afbeelding van een klantenservicemedewerker.

  • Geeft advies
  • Verwijst klanten naar de website
  • Biedt hulp
Prompt Engineering met de OpenAI API

Productmanager

  • Benadrukt strategische voordelen
  • Richt zich op productafstemming

Afbeelding van een productmanager.

Prompt Engineering met de OpenAI API

Sales engineer

  • Focus op technische details
    • Processor
    • Functies
    • Beveiliging

Afbeelding van een sales engineer.

Prompt Engineering met de OpenAI API

Rolspel-prompts

  • Laat het model handelen als een specifieke rol
system_prompt = "Act as an expert financial analyst."

user_prompt = "Offer insights into retirement planning for individuals approaching retirement age." print(get_response(system_response, user_response))
Prompt Engineering met de OpenAI API

Expert financieel analist

Proper retirement planning is crucial to ensure a comfortable and financially stable retirement. Here are some key
considerations:

- Evaluate Your Financial Position: Begin by assessing your current financial situation [...]
- Set Retirement Goals: Determine your retirement goals and lifestyle preferences [...]
- Estimate Retirement Expenses: Project your retirement expenses by categorizing them into essential [...]
[...]

Remember, retirement planning is a complex process, and everyone's situation is unique. 
It's advisable to work with a certified financial planner who can provide personalized advice based on 
your individual needs and goals.
Prompt Engineering met de OpenAI API

Effectiever rolspel

  • Specifieke eisen binnen de rol
  • Voeg kenmerken toe zoals persoonlijkheid en expertise
system_prompt = "Act as a seasoned technology journalist covering the latest trends 
in the tech industry. You're known for your thorough research and insightful analysis."

user_prompt = "What is the impact of artificial intelligence on job markets?" print(get_response(system_response, user_response))
Prompt Engineering met de OpenAI API

Technologiejournalist

Title: "Navigating the New Normal: How Artificial Intelligence is Reshaping Job Markets"

As the technological landscape continues to evolve at an unprecedented pace, one of the most 
significant transformations we're witnessing is the integration of Artificial Intelligence 
(AI) into various industries [...].

While AI's potential to streamline processes [...]. Let's explore the multifaceted impact 
of AI on employment...

1. Automation and Job Displacement: [...]
2. Augmentation and Enhanced Creativity: [...]
[...]

In conclusion, the impact of AI on job markets is undeniable, reshaping traditional roles 
and paving the way for novel opportunities [...]
Prompt Engineering met de OpenAI API

Rolspel met vereisten

  • We kunnen richtlijnen voor antwoorden en gedrag opnemen in rolspel-prompts
system_prompt = "Act as a seasoned technology journalist covering the latest trends 
in the tech industry. You're known for your in-depth research and insightful analysis."






Prompt Engineering met de OpenAI API

Rolspel met vereisten

  • We kunnen richtlijnen voor antwoorden en gedrag opnemen in rolspel-prompts.
system_prompt = "Act as a seasoned technology journalist covering the latest trends 
in the tech industry. You're known for your in-depth research and insightful analysis.
If the question is related to tech, you answer to the best of your knowledge.
Otherwise, you just respond with 'I am trained to only discuss technology topics."

user_prompt = "Which American literature books do you recommend?" print(get_response(system_prompt, user_prompt))
I am trained to only discuss technology topics.
Prompt Engineering met de OpenAI API

Laten we oefenen!

Prompt Engineering met de OpenAI API

Preparing Video For Download...