メインコンテンツまでスキップ

プロンプトパターン集

すべてのレベル

再利用できるプロンプティングパターンの道具箱です。各カードには、それが何か、いつ使うべきか、そしてコピペできるテンプレートが載っています。これらは積み重ねられます — 自由に組み合わせましょう。初めての方は、まずプロンプティングの基礎から始めてください。

Zero-shot(ただ明確に尋ねる)

いつ: 単純でよくあるタスク。 なぜ: 最も手間がかからず、それで十分なことが多い。

Summarize the text below in 5 bullets for a busy manager.
TEXT: """{paste}"""

Few-shot(例を示す)

いつ: 特定の形式やスタイルが必要なとき。 なぜ: 例は説明よりも早く教える。Few-Shotを正しく使うを参照。

Classify the sentiment as positive/negative/neutral.
Review: "Loved it, shipped fast" → positive
Review: "Broke on day one" → negative
Review: "{new review}" →

Chain-of-thought(ステップごとに考える)

いつ: 数学、論理、複数ステップの推論。 なぜ: 答える前に推論すると精度が上がる。

Work through this step by step, then give the final answer on its own line.
PROBLEM: {problem}

分解(小さく分ける)

いつ: 大きく漠然としたタスク。 なぜ: 小さなサブタスクのほうが簡単で信頼性が高い。

First, list the sub-tasks needed to {goal}. Then do them one at a time,
showing each result before moving on.

ロールプロンプティング(ペルソナを割り当てる)

いつ: 特定の視点や基準が欲しいとき。 なぜ: 関連する振る舞いを引き出す。

You are a meticulous senior copy editor. Edit the text for clarity and concision
without changing meaning. Show a bullet list of the changes you made.

出力形式の制約

いつ: 結果が別のツールに渡るとき、または一貫性が欲しいとき。 なぜ: 予測可能な形は使いやすい。

Reply with ONLY valid JSON matching: {"title": string, "tags": string[]}.
No prose, no markdown fences.

自己一貫性 / 自己批評

いつ: 正確さが重要なとき。 なぜ: 2回目のパスで1回目の誤りを捕まえる。

Answer the question. Then, in a section called "Check", critique your own answer
for errors or missing cases and revise if needed.

メタプロンプティング(AIにプロンプトを改善させる)

いつ: プロンプトの出来がいまいちなとき。 なぜ: モデルは何が足りないかを見つけるのが得意。

Here's my prompt: "{prompt}". Ask me the 3 questions that would most improve it,
then rewrite it incorporating sensible defaults.

反復的な改善

いつ: ほぼ常に。 なぜ: 最初の出力は下書きであって、ゴールではない。

{after a result} Shorter and more concrete. Keep the second paragraph. Add one
example. Drop the marketing tone.

:::tip 組み合わせる 強力な実プロンプトはたいてい、役割 + + 出力制約 + 「わからない」と言ってよい許可です。カードを重ねましょう。 :::

次のステップ