Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Role and Context Prompting | Techniques and Strategies
Prompt Engineering Basics

bookRole and Context Prompting

メニューを表示するにはスワイプしてください

Assigning a role in your prompt means telling the AI to respond as a specific expert, character, or profession. Adding context provides background information or a scenario for the AI to consider. Together, these techniques help the AI generate more relevant and accurate responses. Compare these two prompts:

  • Without role/context: Explain photosynthesis;
  • With role/context: You are a high school biology teacher. Explain photosynthesis to a group of 15-year-old students using simple language.

The second prompt guides the AI to use an appropriate tone and level of detail, resulting in an explanation that is better tailored to the intended audience.

Note
Note

Avoid vague roles like "expert" or "professional". Be specific, such as "as a pediatrician" or "as a travel guide".

Assigning a clear role and context helps the AI avoid generic or overly technical answers.

question mark

Which of the following best describes context prompting?

正しい答えを選んでください

すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 2.  1

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

セクション 2.  1
some-alt