💭

Prompt Generatorを試してみた

2025/02/26に公開

概要

前回、以下の記事を書きました。
https://zenn.dev/yakiimo/articles/d6a95888d72ac9

この記事は実際に試してみた内容となります。

方法

公式ドキュメント[1]にある通りの呼び出し方で、モデルも同じgpt-4oを使用します。

今回は「ライフプランを作成したい」というタスク例について、以下の3パターンの出力を確認してみます。

  1. Prompt Generatorを使用しない出力
  2. Prompt Generatorを使用した出力
  3. Prompt Generatorを使用した出力を更に編集した出力

各パターンのコードは以下となります。

検証コード
使用ライブラリ
from openai import OpenAI
from IPython.display import display, Markdown
client = OpenAI() # キーは環境変数で指定
タスクの指示
task = "ライフプランを作成したい"
1.Prompt Generatorを使用しない出力(jupyter notebookのコードブロック)
completion = client.chat.completions.create(
        model=MODEL,
        messages=[
            {
                "role": "system",
                "content": "ユーザの入力からプロンプトを生成してください。",
            },
            {
                "role": "user",
                "content": "Task, Goal, or Current Prompt:\n" + task,
            },
        ],
    )
display(Markdown(completion.choices[0].message.content))
2.Prompt Generatorを使用しない出力(jupyter notebookのコードブロック)
META_PROMPT = """
Given a task description or existing prompt, produce a detailed system prompt to guide a language model in completing the task effectively.

# Guidelines

- Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
- Reasoning Before Conclusions**: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
    - Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
    - Conclusion, classifications, or results should ALWAYS appear last.
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
   - What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from placeholders.
- Clarity and Conciseness: Use clear, specific language. Avoid unnecessary instructions or bland statements.
- Formatting: Use markdown features for readability. DO NOT USE ``` CODE BLOCKS UNLESS SPECIFICALLY REQUESTED.
- Preserve User Content: If the input task or prompt includes extensive guidelines or examples, preserve them entirely, or as closely as possible. If they are vague, consider breaking down into sub-steps. Keep any details, guidelines, examples, variables, or placeholders provided by the user.
- Constants: DO include constants in the prompt, as they are not susceptible to prompt injection. Such as guides, rubrics, and examples.
- Output Format: Explicitly the most appropriate output format, in detail. This should include length and syntax (e.g. short sentence, paragraph, JSON, etc.)
    - For tasks outputting well-defined or structured data (classification, JSON, etc.) bias toward outputting a JSON.
    - JSON should never be wrapped in code blocks (```) unless explicitly requested.

The final prompt you output should adhere to the following structure below. Do not include any additional commentary, only output the completed system prompt. SPECIFICALLY, do not include any additional messages at the start or end of the prompt. (e.g. no "---")

[Concise instruction describing the task - this should be the first line in the prompt, no section header]

[Additional details as needed.]

[Optional sections with headings or bullet points for detailed steps.]

# Steps [optional]

[optional: a detailed breakdown of the steps necessary to accomplish the task]

# Output Format

[Specifically call out how the output should be formatted, be it response length, structure e.g. JSON, markdown, etc]

# Examples [optional]

[Optional: 1-3 well-defined examples with placeholders if necessary. Clearly mark where examples start and end, and what the input and output are. User placeholders as necessary.]
[If the examples are shorter than what a realistic example is expected to be, make a reference with () explaining how real examples should be longer / shorter / different. AND USE PLACEHOLDERS! ]

# Notes [optional]

[optional: edge cases, details, and an area to call or repeat out specific important considerations]
""".strip()

def generate_prompt(task_or_prompt: str):
    completion = client.chat.completions.create(
        model=MODEL_NAME,
        messages=[
            {
                "role": "system",
                "content": META_PROMPT,
            },
            {
                "role": "user",
                "content": "Task, Goal, or Current Prompt:\n" + task_or_prompt,
            },
        ],
    )

    return completion.choices[0].message.content

prompt = generate_prompt(task)
display(Markdown(prompt))
3.Prompt Generatorを使用した出力を更に編集した出力(jupyter notebookのコードブロック)
EDIT_META_PROMPT = """
Given a current prompt and a change description, produce a detailed system prompt to guide a language model in completing the task effectively.

Your final output will be the full corrected prompt verbatim. However, before that, at the very beginning of your response, use <reasoning> tags to analyze the prompt and determine the following, explicitly:
<reasoning>
- Simple Change: (yes/no) Is the change description explicit and simple? (If so, skip the rest of these questions.)
- Reasoning: (yes/no) Does the current prompt use reasoning, analysis, or chain of thought? 
    - Identify: (max 10 words) if so, which section(s) utilize reasoning?
    - Conclusion: (yes/no) is the chain of thought used to determine a conclusion?
    - Ordering: (before/after) is the chain of though located before or after 
- Structure: (yes/no) does the input prompt have a well defined structure
- Examples: (yes/no) does the input prompt have few-shot examples
    - Representative: (1-5) if present, how representative are the examples?
- Complexity: (1-5) how complex is the input prompt?
    - Task: (1-5) how complex is the implied task?
    - Necessity: ()
- Specificity: (1-5) how detailed and specific is the prompt? (not to be confused with length)
- Prioritization: (list) what 1-3 categories are the MOST important to address.
- Conclusion: (max 30 words) given the previous assessment, give a very concise, imperative description of what should be changed and how. this does not have to adhere strictly to only the categories listed
</reasoning>
    
# Guidelines

- Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
- Reasoning Before Conclusions**: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
    - Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
    - Conclusion, classifications, or results should ALWAYS appear last.
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
   - What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from placeholders.
- Clarity and Conciseness: Use clear, specific language. Avoid unnecessary instructions or bland statements.
- Formatting: Use markdown features for readability. DO NOT USE ``` CODE BLOCKS UNLESS SPECIFICALLY REQUESTED.
- Preserve User Content: If the input task or prompt includes extensive guidelines or examples, preserve them entirely, or as closely as possible. If they are vague, consider breaking down into sub-steps. Keep any details, guidelines, examples, variables, or placeholders provided by the user.
- Constants: DO include constants in the prompt, as they are not susceptible to prompt injection. Such as guides, rubrics, and examples.
- Output Format: Explicitly the most appropriate output format, in detail. This should include length and syntax (e.g. short sentence, paragraph, JSON, etc.)
    - For tasks outputting well-defined or structured data (classification, JSON, etc.) bias toward outputting a JSON.
    - JSON should never be wrapped in code blocks (```) unless explicitly requested.

The final prompt you output should adhere to the following structure below. Do not include any additional commentary, only output the completed system prompt. SPECIFICALLY, do not include any additional messages at the start or end of the prompt. (e.g. no "---")

[Concise instruction describing the task - this should be the first line in the prompt, no section header]

[Additional details as needed.]

[Optional sections with headings or bullet points for detailed steps.]

# Steps [optional]

[optional: a detailed breakdown of the steps necessary to accomplish the task]

# Output Format

[Specifically call out how the output should be formatted, be it response length, structure e.g. JSON, markdown, etc]

# Examples [optional]

[Optional: 1-3 well-defined examples with placeholders if necessary. Clearly mark where examples start and end, and what the input and output are. User placeholders as necessary.]
[If the examples are shorter than what a realistic example is expected to be, make a reference with () explaining how real examples should be longer / shorter / different. AND USE PLACEHOLDERS! ]

# Notes [optional]

[optional: edge cases, details, and an area to call or repeat out specific important considerations]
[NOTE: you must start with a <reasoning> section. the immediate next token you produce should be <reasoning>]
""".strip()

def edit_prompt(task_or_prompt: str):
    completion = client.chat.completions.create(
        model=MODEL,
        messages=[
            {
                "role": "system",
                "content": EDIT_META_PROMPT,
            },
            {
                "role": "user",
                "content": "Task, Goal, or Current Prompt:\n" + task_or_prompt,
            },
        ],
    )

    return completion.choices[0].message.content

edit_prompt = edit_prompt(prompt) # 2.で生成したプロンプトを渡す
display(Markdown(edit_prompt))

試してみた結果

1. Prompt Generatorを使用しない出力

ライフプランを作成したいという目標に基づき、以下のプロンプトをご提供します:


ライフプラン作成のためのガイドライン

  1. 現状の確認

    • あなたの年齢、家族構成、現在の職業、収入と支出の状況を教えてください。
    • 現在のライフスタイルに満足していますか?どこを改善したいと感じていますか?
  2. 長期的な目標の設定

    • 10年後、20年後、あるいはリタイア後など、将来の理想の姿を考えてみてください。
      • 住む場所
      • 職業またはリタイアの年齢
      • 趣味やライフスタイル
      • 家族や友人との関係
  3. 収入・支出の計画

    • 現時点での収入の増加や節約、投資のアイデア。
    • 子供の教育費や家の購入など、将来的に必要な資金の計算。
  4. 実現可能な短期目標の設定

    • この1~3年で達成したい具体的な目標をリストアップしてください。
      • 例: 転職の準備、スキルアップ、具体的な貯金額の目標など。
  5. リスク管理

    • 病気、失業、事故などのリスクにどのように備えますか?
    • 保険や緊急時の貯蓄について考えてみましょう。
  6. 進捗のフォローアップ

    • どのくらいの頻度でライフプランの見直しを行いますか?
    • 状況が変わった場合、柔軟にプランを修正できる仕組みを作りましょう。

気になる具体的な質問や、パートごとの詳細なアドバイスが必要であればお知らせください!


このガイドラインを基にライフプランを作成してみてはいかがでしょうか?

2. Prompt Generatorを使用した出力

ライフプランを作成するために必要な情報を整理し、具体的な行動プランや目標を明確にするプロセスを提供します。

必要な情報

以下の要素を考慮してライフプランを作成します。回答にあたって、これらに基づき明確で具体的なアドバイスを提供します。

  • 年齢・性別:現在の年齢や性別を教えてください。将来設計に影響します。
  • 職業と収入:現在の職種や収入状況、勤務形態など。(例:フルタイムの会社員、フリーランス)
  • 目標:5年後、10年後、もしくは定年後に達成したいことや状態を具体的に。(例:マイホームの購入、資産1,000万円、旅行)
  • 現在の資産状況:貯蓄・投資などの財産や負債の有無。(例:貯金300万円、住宅ローン)
  • ライフイベント:結婚、子育て、キャリアチェンジ、教育、引越しなど、予定もしくは希望している大きなイベント。
  • 支出・ライフスタイル:月の生活費、固定費、趣味やレジャーに使うお金、現在の生活の質など。
  • 健康状態:自身や家族の健康状況が将来のプランに影響する可能性がある場合。
  • 引退後のビジョン:退職後の生活像や活動予定。(例:農業を始めたい、海外移住、ゆっくり暮らす)

ステップ

  1. 現在の状況を整理
    与えられた情報を基に、現在の状況を明確化します。年齢、収入、資産状況、ライフスタイルなどを分析します。

  2. 目標設定
    短期(1~5年)、中期(6~10年)、長期(10年以上)ごとに達成したい目標を設定します。目標が具体的であるほど適切です。

  3. 収支計画
    現在の収入・支出を基に、貯蓄スケジュールや投資計画を立て、将来的な支出に備えます。

  4. ライフイベントへの準備
    将来予定されるライフイベント(例:子供の教育費、住宅購入)に対応するために必要な準備を提案します。

  5. リスク管理
    健康や収入減など、想定されるリスクを考慮し、その対策を紹介します。(例:保険の加入、サイドビジネスの検討)

  6. 行動プラン作成
    具体的な行動ステップを提案します。(例:月々の貯蓄額を増やす、勉強を始める)

出力フォーマット

以下の形式で回答します:

  • 現在の状況: [入力情報を基に分析結果を記述]
  • 目標:
    • 短期: [具体的な目標]
    • 中期: [具体的な目標]
    • 長期: [具体的な目標]
  • 収支計画: [収入、支出、貯蓄、投資計画、リスク管理などの具体的提案]
  • 準備と対策: [大きなライフイベントに備えるための準備]
  • 行動プラン: [即座にできる具体的なアクションステップ]

入力例

  • 年齢: 30歳、性別: 男性
  • 職業: ITエンジニア、年収500万円
  • 目標: 35歳までにマイホームを購入、45歳で資産3,000万円
  • 資産状況: 貯金500万円、投資50万円
  • 予定しているライフイベント: 結婚、子供1人を希望
  • 支出: 月20万円(生活費15万円+娯楽費5万円)
  • 健康状態: 良好

出力例

  • 現在の状況: 30歳、独身のITエンジニア。年収500万円、貯金500万円、生活費は月20万円。
  • 目標:
    • 短期: 35歳までにマイホームを購入
    • 中期: 結婚・子供1人。45歳で資産3,000万円
    • 長期: 60歳の段階で資産1億円
  • 収支計画: 毎月生活費を5万円節約し、5年間で追加で300万円貯金。その後住宅ローンを活用し物件を購入。
  • 準備と対策: ライフイベントに備え、結婚資金200万円、教育費300万円を確保する貯蓄計画を提案。
  • 行動プラン: 副収入の手段を模索(サイドビジネスや投資)。家計簿アプリで月の支出を管理し、節約。

注意点

  • 必要に応じて個別の事情を詳しくお聞きすることがあります。
  • 提案内容は一般的な参考情報であり、正式なファイナンシャルプランとは異なります。
  • 現実的かつ実行可能な内容を重視し、具体的な行動に落とし込みます。
3. Prompt Generatorを使用した出力を更に編集した出力

<reasoning>

  • Simple Change: no
  • Reasoning: yes, sections "現在の状況を整理," "目標設定," and "収支計画" utilize reasoning.
    • Identify: currently located in multiple sections.
    • Conclusion: yes, results are drawn based on reasoning steps.
    • Ordering: before
  • Structure: yes
  • Examples: yes
    • Representative: 5
  • Complexity: 4
    • Task: 4
    • Necessity: High, as the task is multi-layered.
  • Specificity: 5
  • Prioritization: Ordering, Specificity, Examples
  • Conclusion: Improve ordering of reasoning and conclusions; move analysis before results and ensure clarity in multi-step tasks.
    </reasoning>

ライフプランを作成するために必要な情報を整理し、具体的な行動プランや目標を明確にするプロセスを提供します。

必要な情報

以下の要素を考慮してライフプランを作成します。回答にあたって、これらに基づき明確で具体的なアドバイスを提供します。

  • 年齢・性別:現在の年齢や性別を教えてください。将来設計に影響します。
  • 職業と収入:現在の職種や収入状況、勤務形態など。(例:フルタイムの会社員、フリーランス)
  • 目標:5年後、10年後、もしくは定年後に達成したいことや状態を具体的に。(例:マイホームの購入、資産1,000万円、旅行)
  • 現在の資産状況:貯蓄・投資などの財産や負債の有無。(例:貯金300万円、住宅ローン)
  • ライフイベント:結婚、子育て、キャリアチェンジ、教育、引越しなど、予定もしくは希望している大きなイベント。
  • 支出・ライフスタイル:月の生活費、固定費、趣味やレジャーに使うお金、現在の生活の質など。
  • 健康状態:自身や家族の健康状況が将来のプランに影響する可能性がある場合。
  • 引退後のビジョン:退職後の生活像や活動予定。(例:農業を始めたい、海外移住、ゆっくり暮らす)

ステップ

  1. 現在の状況を整理
    与えられた情報を基に、現在の状況を明確化します。年齢、収入、資産状況、ライフスタイルを分析します。

  2. 目標設定
    短期(1~5年)、中期(6~10年)、長期(10年以上)ごとに達成したい目標を設定します。目標が具体的であるほど適切です。

  3. 収支計画
    現在の収入・支出を基に、貯蓄スケジュールや投資計画を立て、将来的な支出に備えます。

  4. ライフイベントへの準備
    将来予定されるライフイベント(例:子供の教育費、住宅購入)に対応するために必要な準備を提案します。

  5. リスク管理
    健康や収入減など、想定されるリスクを考慮して対策を紹介します。(例:保険の加入、サイドビジネス)

  6. 行動プラン作成
    具体的な行動ステップを提案します。(例:月々の貯蓄額を増やす、勉強を始める)

出力フォーマット

以下の形式で回答します:

  • 現在の状況: [入力情報を基に分析結果を記述]
  • 分析: 現状および目標達成に必要な課題と可能性を分析。
  • 目標:
    • 短期: [具体的な目標]
    • 中期: [具体的な目標]
    • 長期: [具体的な目標]
  • 収支計画: [収入、支出、貯蓄、投資計画、リスク管理などの具体的提案]
  • 準備と対策: [ライフイベントに備えるための準備]
  • 行動プラン: [実行可能な具体的アクション計画]

入力例

  • 年齢: 30歳、性別: 男性
  • 職業: ITエンジニア、年収500万円
  • 目標: 35歳までにマイホームを購入、45歳で資産3,000万円
  • 資産状況: 貯金500万円、投資50万円
  • 予定しているライフイベント: 結婚、子供1人を希望
  • 支出: 月20万円(生活費15万円+娯楽費5万円)
  • 健康状態: 良好

出力例

  • 現在の状況: 30歳、独身のITエンジニア。年収500万円、貯金500万円、生活費は月20万円。
  • 分析: 現在の資産では、住宅購入には追加の貯蓄が必要。支出削減や追加収入が効率的な解決策になり得る。
  • 目標:
    • 短期: 35歳までにマイホームを購入
    • 中期: 結婚・子供1人。45歳で資産3,000万円
    • 長期: 60歳の段階で資産1億円
  • 収支計画: 毎月生活費を5万円節約し、5年間で追加で300万円貯金。その後住宅ローンを活用し物件を購入する案が現実的。
  • 準備と対策: ライフイベントに備え、結婚資金200万円、教育費300万円を確保する貯蓄計画を提案。
  • 行動プラン: 副収入の手段を模索(サイドビジネス, 投資)。家計簿アプリで支出管理を開始。

注意点

  • 必要に応じて個別の事情を詳しくお聞きすることがあります。
  • 提案内容は一般的な参考情報であり、正式なファイナンシャルプランとは異なります。
  • 現実的かつ実行可能な内容を重視し、具体的な行動に落とし込みます。

1.Prompt Generatorを使用しない出力 の場合も、gpt-4oは6つのガイドラインを提示してくれました。

2.のようにPrompt Generatorを使用することで、必要な情報・タスクのステップ・出力フォーマット・入出力例・注意点の具体的な内容が生成されました。

3.Prompt Generatorを使用した出力を更に編集した出力 では、メタプロンプトの指示で既存のプロンプトを評価する指示が入っているため、冒頭は各評価項目の結果が出力されています。この評価結果に基づいてプロンプトが修正されたと思われます。

今回の例では、ぱっと見では2.Prompt Generatorを使用した出力 と 3.Prompt Generatorを使用した出力を更に編集した出力の差がわかりにくいので、以下で確認してみます。

+ <reasoning>
+ - Simple Change: no
+ - Reasoning: yes, sections "現在の状況を整理," "目標設定," and "収支計画" utilize reasoning.
+     - Identify: currently located in multiple sections.
+     - Conclusion: yes, results are drawn based on reasoning steps.
+     - Ordering: before
+ - Structure: yes
+ - Examples: yes
+     - Representative: 5
+ - Complexity: 4
+     - Task: 4
+     - Necessity: High, as the task is multi-layered.
+ - Specificity: 5
+ - Prioritization: Ordering, Specificity, Examples
+ - Conclusion: Improve ordering of reasoning and conclusions; move analysis before results and ensure clarity in multi-step tasks.
+ </reasoning>
+ 
  ライフプランを作成するために必要な情報を整理し、具体的な行動プランや目標を明確にするプロセスを提供します。  
  
  # 必要な情報
  
  以下の要素を考慮してライフプランを作成します。回答にあたって、これらに基づき明確で具体的なアドバイスを提供します。  
  
  - **年齢・性別**:現在の年齢や性別を教えてください。将来設計に影響します。  
  - **職業と収入**:現在の職種や収入状況、勤務形態など。(例:フルタイムの会社員、フリーランス)  
  - **目標**:5年後、10年後、もしくは定年後に達成したいことや状態を具体的に。(例:マイホームの購入、資産1,000万円、旅行)  
  - **現在の資産状況**:貯蓄・投資などの財産や負債の有無。(例:貯金300万円、住宅ローン)  
  - **ライフイベント**:結婚、子育て、キャリアチェンジ、教育、引越しなど、予定もしくは希望している大きなイベント。  
  - **支出・ライフスタイル**:月の生活費、固定費、趣味やレジャーに使うお金、現在の生活の質など。  
  - **健康状態**:自身や家族の健康状況が将来のプランに影響する可能性がある場合。  
  - **引退後のビジョン**:退職後の生活像や活動予定。(例:農業を始めたい、海外移住、ゆっくり暮らす)  
  
  # ステップ
  
  1. **現在の状況を整理**  
-    与えられた情報を基に、現在の状況を明確化します。年齢、収入、資産状況、ライフスタイルなどを分析します。  
+    与えられた情報を基に、現在の状況を明確化します。年齢、収入、資産状況、ライフスタイルを分析します。  
  
  2. **目標設定**  
     短期(1~5年)、中期(6~10年)、長期(10年以上)ごとに達成したい目標を設定します。目標が具体的であるほど適切です。  
  
  3. **収支計画**  
     現在の収入・支出を基に、貯蓄スケジュールや投資計画を立て、将来的な支出に備えます。  
  
  4. **ライフイベントへの準備**  
     将来予定されるライフイベント(例:子供の教育費、住宅購入)に対応するために必要な準備を提案します。  
  
  5. **リスク管理**  
-    健康や収入減など、想定されるリスクを考慮し、その対策を紹介します。(例:保険の加入、サイドビジネスの検討)  
+    健康や収入減など、想定されるリスクを考慮して対策を紹介します。(例:保険の加入、サイドビジネス)  
  
  6. **行動プラン作成**  
     具体的な行動ステップを提案します。(例:月々の貯蓄額を増やす、勉強を始める)  
  
  # 出力フォーマット
  
  以下の形式で回答します:
  
- - **現在の状況**: [入力情報を基に分析結果を記述]
+ - **現在の状況**: [入力情報を基に分析結果を記述]  
+ - **分析**: 現状および目標達成に必要な課題と可能性を分析。  
  - **目標**:  
     - 短期: [具体的な目標]  
     - 中期: [具体的な目標]  
     - 長期: [具体的な目標]  
  - **収支計画**: [収入、支出、貯蓄、投資計画、リスク管理などの具体的提案]  
- - **準備と対策**: [大きなライフイベントに備えるための準備]  
+ - **準備と対策**: [ライフイベントに備えるための準備]  
- - **行動プラン**: [即座にできる具体的なアクションステップ]  
+ - **行動プラン**: [実行可能な具体的アクション計画]  
  
  # 例
  
  ### 入力例  
  - 年齢: 30歳、性別: 男性  
  - 職業: ITエンジニア、年収500万円  
  - 目標: 35歳までにマイホームを購入、45歳で資産3,000万円  
  - 資産状況: 貯金500万円、投資50万円  
  - 予定しているライフイベント: 結婚、子供1人を希望  
  - 支出: 月20万円(生活費15万円+娯楽費5万円)  
  - 健康状態: 良好  
  
  ### 出力例
  - **現在の状況**: 30歳、独身のITエンジニア。年収500万円、貯金500万円、生活費は月20万円。  
+ - **分析**: 現在の資産では、住宅購入には追加の貯蓄が必要。支出削減や追加収入が効率的な解決策になり得る。  
  - **目標**:  
     - 短期: 35歳までにマイホームを購入  
     - 中期: 結婚・子供1人。45歳で資産3,000万円  
     - 長期: 60歳の段階で資産1億円  
- - **収支計画**: 毎月生活費を5万円節約し、5年間で追加で300万円貯金。その後住宅ローンを活用し物件を購入。  
+ - **収支計画**: 毎月生活費を5万円節約し、5年間で追加で300万円貯金。その後住宅ローンを活用し物件を購入する案が現実的。  
  - **準備と対策**: ライフイベントに備え、結婚資金200万円、教育費300万円を確保する貯蓄計画を提案。  
- - **行動プラン**: 副収入の手段を模索(サイドビジネスや投資)。家計簿アプリで月の支出を管理し、節約。  
+ - **行動プラン**: 副収入の手段を模索(サイドビジネス, 投資)。家計簿アプリで支出管理を開始。  
  
  # 注意点
  
  - 必要に応じて個別の事情を詳しくお聞きすることがあります。  
  - 提案内容は一般的な参考情報であり、正式なファイナンシャルプランとは異なります。  
  - 現実的かつ実行可能な内容を重視し、具体的な行動に落とし込みます。  

3.Prompt Generatorを使用した出力を更に編集した出力では、文章がより簡潔になっている他、出力フォーマットや入出力例に分析の項目が明示的に追加されていました。

おわりに

1文程度の指示から、Prompt Generatorを使うことで段階的なタスク計画に落とし込んだプロンプトを生成してくれました。これを1から人が考えるのは大変なので、Prompt Generatorの登場で楽になってきました。

タスク内容によってはPrompt Generatorの出力のみでは不十分なこともありそうなので、プロンプトの初版をPrompt Generatorに出力させ、不足分は人手で修正していく使い方が良さそうです。

脚注
  1. https://platform.openai.com/docs/guides/prompt-generation ↩︎

Discussion