What is an example of using roles in prompt engineering?

What is an example of using roles in prompt engineering?

A) Summarize the history of China in no more than 5000 words

B) Describe the feature of a new smartphone to a non-technical user

C) Write a horror story about a haunted mansion in a remote forest

D) Create a chart that shows monthly sales totals over the past four years

Answer: B) Describe the feature of a new smartphone to a non-technical user

Explanation:

The option “Describe the feature of a new smartphone to a non-technical user” correctly illustrates the concept of using roles in prompt engineering by specifying that the AI should adopt the role of explaining technical information to a non-technical audience. By assigning this role, the prompt guides the AI to adapt its explanation to a specific audience, which is a key aspect of role-based prompting.

Why the other options are wrong?

  • A) Summarize the history of China in no more than 5000 words: This option focuses on summarizing a broad topic. It does not specify a role for the AI to assume, nor does it tailor the task to a specific perspective or audience. Therefore, it does not illustrate the use of roles in prompt engineering.
  • C) Write a horror story about a haunted mansion in a remote forest: Although this option asks for a specific type of writing (a horror story), it does not assign a particular role to the AI. It specifies the genre and setting but does not guide the AI to adopt a particular role or perspective, so it does not illustrate the use of roles in prompt engineering.
  • D) Create a chart that shows monthly sales totals over the past four years: This option is about creating a chart, which involves data visualization. It does not involve assigning a role to the AI but rather specifies a data-related task. Therefore, it does not demonstrate the use of roles in prompt engineering.

Hence, option B is correct.

You may also go through series of MCQs/Quizzes on Prompt Engineering.