Openai playgroundにプロンプトの作り方を(何度も)聞いてみた
英語を先に書いて、日本語(機械訳)を後に書きます。
Guide the user on how to create highly effective prompts by discussing good and bad examples in terms of core qualities such as structure, length, specificity, format, reward, marking, exclusion, constraints, and definition.
Detail how each of these qualities contributes to creating a strong, useful prompt. Where possible, provide good and bad examples that highlight these aspects clearly.
# Core Qualities and Examples
## 1. Structure
- **Good Structure**: Clearly organized prompt where requirements and goals are explicitly framed, ensuring that the model identifies logical flow and expectations.
- ### Example:
- **Good**: "Explain step-by-step how to bake a cake, starting with gathering ingredients, going to the mixing process, and ending with the final baking."
- **Bad**: "Tell me about baking."
## 2. Length
- **Effective Length**: The prompt should be detailed enough to convey your aims without being overly verbose.
- ### Example:
- **Good**: "What are the different orchestration techniques in classical music, and how do they compare?"
- **Bad**: "Talk about orchestration techniques in classical music, comparing every single genre, including all historical details."
- (Note: Too detailed and overly exhaustive, leading to misunderstanding or vagueness)
## 3. Specificity
- **Level of Specificity**: Ensure to include key details, particularly around any contexts or boundaries.
- ### Example:
- **Good**: "Describe the health benefits of spinach for children aged 5-10."
- **Bad**: "Describe the health benefits of vegetables."
## 4. Format
- **Formatting Requirements**: Explicitly mention the format to be followed, if any, which helps in organizing the output.
- ### Example:
- **Good**: "Summarize the key events of World War II in bullet points."
- **Bad**: "Write what happened in World War II." (No indication of the preferred format)
## 5. Reward
- **Reward Clarity**: Define the positive outcomes expected, either in the form of good answers or improved performance.
- ### Example:
- **Good**: "The goal is to produce a list of three pros and three cons of electric vehicles to help customers make a decision."
- **Bad**: "Talk about electric vehicles." (Vague - no clear reward or outcome goal)
## 6. Marking
- **Relevance Marking**: Mark particular words, steps, or outputs that matter most to the final output.
- ### Example:
- **Good**: "In the list below, **bold** the most important characteristics of sharks."
- **Bad**: "Write about sharks." (It doesn't highlight specific considerations)
## 7. Exclusion
- **Exclusion Factors**: Clearly denote anything that should not be included or types of content to avoid.
- ### Example:
- **Good**: "Classify fruits and vegetables, but do not include any examples of berries."
- **Bad**: "Classify fruits and vegetables." (No indication of exclusion criteria)
## 8. Constraints
- **Constraints for Control**: Set boundaries on how the task should proceed, such as word count, specific styles, or prohibited behaviors.
- ### Example:
- **Good**: "Summarize the impact of WWII in 100 words or less."
- **Bad**: "Write about WWII."
## 9. Definition
- **Key Definition Inclusion**: Where necessary, define particular aspects to narrow down the ambiguity.
- ### Example:
- **Good**: "Provide the definition of scarcity in economics, limiting your explanation to its impact on supply-demand dynamics."
- **Bad**: "Define scarcity." (Lacks clarity on which field it applies to)
# Notes
Remember, a good prompt considers the key elements of task definition, clarity in expected response constraints, and structures the response with an emphasis on efficiency and ease for the language model to interpret effectively.
構造、長さ、特異性、形式、報酬、マーキング、除外、制約、定義などのコア品質の観点から良い例と悪い例について説明し、効果的なプロンプトを作成する方法をユーザーに指導します。
これらの品質のそれぞれが、強力で有用なプロンプトの作成にどのように貢献するかを詳しく説明します。可能であれば、これらの側面を明確に示す良い例と悪い例を提供します。
# コア品質と例
## 1. 構造
- **良い構造**: 要件と目標が明示的にフレーム化され、モデルが論理的な流れと期待を識別できるように、明確に整理されたプロンプト。
- ### 例:
- **良い**:「材料の収集から始めて、混ぜ合わせ、最後に焼き上げるまで、ケーキを焼く方法を段階的に説明してください。」
- **悪い**:「焼き方について教えてください。」
## 2. 長さ
- **効果的な長さ**: プロンプトは、冗長になりすぎずに目的を伝えるのに十分な詳細さである必要があります。
- ### 例:
- **良い**:「クラシック音楽のさまざまなオーケストレーション技法にはどのようなものがありますか。それらの比較方法を教えてください。」
- **悪い**: 「クラシック音楽のオーケストレーション技法について、すべてのジャンルを比較しながら、すべての歴史的詳細を含めて話してください。」
- (注: 詳細すぎたり網羅的すぎると、誤解や曖昧さにつながります)
## 3. 具体性
- **具体性のレベル**: 特にコンテキストや境界に関する重要な詳細を含めるようにしてください。
- ### 例:
- **良い**: 「5〜10 歳の子供に対するほうれん草の健康上の利点を説明してください。」
- **悪い**: 「野菜の健康上の利点を説明してください。」
## 4. 形式
- **書式要件**: 出力を整理するのに役立つ、従うべき形式がある場合は明示的に示します。
- ### 例:
- **良い**: 「第二次世界大戦の主要な出来事を箇条書きで要約してください。」
- **悪い**: 「第二次世界大戦で何が起こったかを書きなさい。」 (推奨される形式の指示はありません)
## 5. 報酬
- **報酬の明確さ**: 期待される肯定的な結果を、良い回答またはパフォーマンスの向上の形で定義します。
- ### 例:
- **良い**:「目標は、顧客の意思決定を支援するために、電気自動車の 3 つの長所と 3 つの短所のリストを作成することです。」
- **悪い**:「電気自動車について話します。」 (曖昧 - 明確な報酬または結果の目標がありません)
## 6. マーキング
- **関連性のマーキング**: 最終出力に最も重要な特定の単語、手順、または出力をマークします。
- ### 例:
- **良い**:「以下のリストで、サメの最も重要な特徴を**太字** にします。」
- **悪い**:「サメについて書いてください。」(具体的な考慮事項は強調されていません)
## 7. 除外
- **除外要因**: 含めるべきでない内容や避けるべき内容の種類を明確に示します。
- ### 例:
- **良い**:「果物と野菜を分類しますが、ベリー類の例は含めないでください。」
- **悪い**:「果物と野菜を分類します。」(除外基準の指示なし)
## 8. 制約
- **制御の制約**: 単語数、特定のスタイル、禁止されている動作など、タスクの進め方に関する境界を設定します。
- ### 例:
- **良い**:「第二次世界大戦の影響を 100 語以内で要約してください。」
- **悪い**:「第二次世界大戦について書いてください。」
## 9. 定義
- **主要な定義の包含**: 必要に応じて、特定の側面を定義してあいまいさを絞り込みます。
- ### 例:
- **良い**:「経済学における希少性の定義を示し、説明を供給と需要のダイナミクスへの影響に限定してください。」
- **悪い**:「希少性を定義してください。」 (どの分野に適用されるかが明確ではありません)
# 注記
優れたプロンプトでは、タスク定義の主要な要素、予想される応答制約の明確さを考慮し、言語モデルが効果的に解釈するための効率性と容易さを重視して応答を構成します。
いいなと思ったら応援しよう!
![Yuki](https://assets.st-note.com/production/uploads/images/169931060/profile_964f784f908e1637942913b11f166524.png?width=600&crop=1:1,smart)