Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

第11回制約設定

プロンプト講座

「〜禁止」ルールでAIをしつける

1. 制約設定とは?

AIに文章を書かせるとき、「〜しないで」とルールを加えることで、不要な出力を防ぐことができます。
これを 「制約設定」 と呼びます!

💡 ポイント
不要な単語や話題をブロックできる!
専門用語や難しい言葉を避けられる!
「ただし」「禁止」というキーワードが有効!

2. 制約設定の例

同じプロンプトでも、制約設定の有無でAIの出力が変わります。

例:「スマートフォンのメリットを説明して!」

制約なしの場合

「スマートフォンはSNSで友人とつながることができるほか、情報検索やナビゲーションなど便利な機能があります。」
→ SNSについて話している 🤔

制約ありの場合

「スマートフォンのメリットを説明してください。ただし『SNS』という単語は使わないで。」
📱 AIの回答(例):
「スマートフォンは情報検索が簡単にできたり、スケジュール管理や天気予報の確認が便利です。」
→ SNSについて言及せず、他のメリットにフォーカス!🎉

3. 使える制約設定の例!

制約の種類指示の例効果
単語の禁止「〇〇という単語を使わないで説明して」不要な話題を避ける
専門用語の禁止「専門用語を使わずに簡単に説明して」難解な説明を避ける
特定の話題禁止「〇〇の話題には触れないでください」不適切な話題を防ぐ
文字数制限「100文字以内で答えて」簡潔な回答を得る
感情表現の禁止「主観的な表現を使わないで」客観的な説明を促す

4. 実践してみよう!

次のテーマから1つ選び、制約を設定したプロンプトを考えてみよう!

  1. 「日本の文化について説明してください。ただし『和食』については触れないで。」
  2. 「自分の将来の夢について話してください。ただし専門用語は使わないで。」
  3. 「あなたが好きな本を紹介してください。ただし感情的な表現は使わないで。」

👉 ノートに書いて、どんな回答になるか想像してみよう!

5. 自由に制約設定を試してみよう!

今度は自由に制約を設定して、AIに不要な出力を防ぐプロンプトを考えてみよう!
以下のヒントを参考にしてみてね。

  • スポーツの説明(ただし専門用語禁止)
  • 歴史上の人物紹介(ただし敬称なし)
  • 旅行プランの提案(ただし予算上限を設定)
  • 新商品の紹介(ただしポジティブ表現禁止)

👉 自分で作ったプロンプトをChatGPTで試してみよう!

まとめ

制約設定を使うと、不要な出力を防げる!
「ただし」「禁止」といったキーワードが効果的!
単語や話題、専門用語、文字数などの制約を活用しよう!
倫理的な使用にも役立つ重要なテクニック!


このテクニックを使えば、AIに「交通ルール」を教えるように正しい出力を促すことができます!

コメント

タイトルとURLをコピーしました