Anthropic finds over 10,000 vulnerabilities with Project GlasswingSynthID expands to Google Search and ChromeGoal mode now available across all Codex platformsCodex Thursday adds remote Mac controlAnthropic publishes early Project Glasswing resultsAnthropic updates vulnerability disclosure dashboardReleases new science-focused AI skills toolGemini 3.5 Flash released with enhanced research toolsGoogle launches ADK for Kotlin and Android 0.1.0Gemini 3.5 Flash officially launchedAI solves long-standing open math problem for first timeGoogle announces Gemini Omni for video creationUse multiple agents with Gemini OmniOpenAI Introduces Guaranteed Capacity for Long-Term ComputeGemini for Science assists with research tasksSynthID watermark and verification tool added to AI imagesGoogle I/O 2026 to unveil new AI breakthroughsOpenAI boosts image provenance and verificationKPMG rolls out Claude globally, starting with taxGoogle adds Managed Agents to the Gemini APIAnthropic finds over 10,000 vulnerabilities with Project GlasswingSynthID expands to Google Search and ChromeGoal mode now available across all Codex platformsCodex Thursday adds remote Mac controlAnthropic publishes early Project Glasswing resultsAnthropic updates vulnerability disclosure dashboardReleases new science-focused AI skills toolGemini 3.5 Flash released with enhanced research toolsGoogle launches ADK for Kotlin and Android 0.1.0Gemini 3.5 Flash officially launchedAI solves long-standing open math problem for first timeGoogle announces Gemini Omni for video creationUse multiple agents with Gemini OmniOpenAI Introduces Guaranteed Capacity for Long-Term ComputeGemini for Science assists with research tasksSynthID watermark and verification tool added to AI imagesGoogle I/O 2026 to unveil new AI breakthroughsOpenAI boosts image provenance and verificationKPMG rolls out Claude globally, starting with taxGoogle adds Managed Agents to the Gemini API
🔒 公式発表のみ掲載。噂・リーク・情報商材は載せません。
← Back to glossary

Few-shot Prompting

少数例プロンプティング

しょうすうれいぷろんぷてぃんぐ

Definition

Few-shot prompting is a technique that includes a small number of input–output examples to teach the model the desired format and decision criteria. It often improves consistency without fine-tuning.

「このメールは緊急?通常?」という分類をLLMにやらせたいとき、言葉で判断基準を説明するより、実例を2〜3個見せるほうが圧倒的に伝わりやすいことがあります。少数例プロンプティング(Few-shot Prompting)とは、プロンプト内に少数の入力と期待される出力のペアを含めることで、モデルにタスクのパターンを学習させる手法です。

なぜ例示が効果的なのか

LLMは大量のテキストで事前学習されており、文脈からパターンを読み取る能力に優れています。Few-shotプロンプティングは、この「文脈内学習(In-Context Learning)」の能力を活用します。モデルのパラメータを一切変更せず(ファインチューニングなしで)、プロンプトに含まれた例だけで、出力の形式・判断基準・トーンをコントロールできます。例は「暗黙の仕様書」として機能するのです。

効果的な例の作り方

例を作る際のポイントは3つあります。第一に多様性です。似たような例ばかりではなく、異なるパターンやエッジケースを含めます。感情分析なら、ポジティブ・ネガティブ・中立の各カテゴリから1つずつ用意します。第二に一貫性です。すべての例で出力形式を統一します。あるものは「ポジティブ」、別のものは「良い評価です」では混乱のもとです。第三に代表性です。実際の運用で遭遇する典型的な入力に近い例を選びます。

何例あればよいのか

一般的には2〜5個の例が推奨されます。1個では偶然と区別がつきにくく、6個以上になるとトークン数が増えてコストが上がるうえ、改善効果が頭打ちになります。ただし最適な数はタスクの複雑さに依存します。単純な分類なら2例で十分ですが、複雑な変換タスクでは5例以上が必要な場合もあります。まず2例で試し、精度が不十分なら例を増やすというアプローチが効率的です。

ファインチューニングとの使い分け

Few-shotプロンプティングは「手軽なカスタマイズ」、ファインチューニングは「本格的なカスタマイズ」と捉えることができます。Few-shotは準備が容易で柔軟に変更できますが、コンテキストウィンドウを消費し、大量の例は入れられません。一方、ファインチューニングはモデル自体を調整するためプロンプトに例を入れる必要がなくなりますが、学習データの準備やコストがかかります。まずFew-shotで検証し、本番運用で安定した品質が必要になったらファインチューニングを検討するのが一般的な流れです。

実務での活用例

Few-shotプロンプティングは、カスタマーサポートの回答テンプレート生成、コードの命名規則チェック、議事録からのアクションアイテム抽出など、「ルールが暗黙的で言語化しにくいが、例を見ればわかる」タスクに特に有効です。チーム内でプロンプトを共有する際、例を含めておくことで属人化を防ぎ、誰が使っても同じ品質の出力が得られるようになります。

h
hayami

Stay on top of OpenAI, Google & Anthropic updates. An AI digest for business professionals.

Source Policy

We use only official sources. Each article links to the original announcement so you can verify it yourself.

© 2026 hayami. All rights reserved.