<p><meta/>
{“expert_role”: “Prompt Engineering Specialist”, “focus”: “LLM-as-a-Judge / Evaluation Reliability”, “version”: “1.0”}
本記事は<strong>Geminiの出力をプロンプト工学で整理した業務ドラフト(未検証)</strong>です。</p>
<h1 class="wp-block-heading">LLM評価の客観性を担保する「ルーブリック型フォーム入力」プロンプト設計</h1>
<h3 class="wp-block-heading">【ユースケース定義と課題】</h3>
<p>AIチャットボットの回答品質を自動評価したいが、採点基準が曖昧でLLMの出力が不安定になる課題を、詳細なルーブリックと理由記述の義務化により解決する。</p>
<ul class="wp-block-list">
<li><p><strong>入力:</strong> ユーザーの質問、AIの回答、正解/参照情報</p></li>
<li><p><strong>出力:</strong> 指定された評価項目ごとのスコアと根拠(Markdownフォーマット)</p></li>
</ul>
<h3 class="wp-block-heading">【プロンプト設計のループ】</h3>
<div class="wp-block-merpress-mermaidjs diagram-source-mermaid"><pre class="mermaid">
graph TD
A["ルーブリック定義"] --> B["思考プロセス(CoT)の強制"]
B --> C["フォーム形式での抽出"]
C --> D["人間による評価一致度検証"]
D -->|不一致箇所の基準修正| A
</pre></div>
<ol class="wp-block-list">
<li><p><strong>ルーブリック定義</strong>: 1〜5点の各点数に具体的な「どのような状態か」を定義。</p></li>
<li><p><strong>思考プロセス(CoT)の強制</strong>: 採点前に「なぜその点数になるか」を分析させる。</p></li>
<li><p><strong>フォーム形式での抽出</strong>: 出力揺れを防ぐため、Markdownの表形式や特定のKeyを定めた形式で出力。</p></li>
</ol>
<h3 class="wp-block-heading">【プロンプトの実装案】</h3>
<div class="codehilite">
<pre data-enlighter-language="generic"># Role
あなたは高品質なカスタマーサポートの品質管理(QA)担当者です。
以下の「評価ルーブリック」に基づき、AIの回答を厳格に評価してください。
# 評価ルーブリック
- 1点(不適切): 誤情報を含んでいる、または質問を無視している。
- 2点(不十分): 致命的な誤りはないが、重要な情報が欠けている。
- 3点(許容範囲): 質問に最低限答えているが、説明が不親切。
- 4点(良好): 正確で親切。必要な情報がすべて含まれている。
- 5点(卓越): 完璧な回答に加え、ユーザーの潜在的な懸念にも配慮している。
# 評価ステップ
1. [Analysis]: ユーザーの意図とAIの回答を比較し、相違点や不足点を箇条書きで抽出せよ。
2. [Evidence]: ルーブリックのどの基準に該当するか、回答の具体的一節を引用して説明せよ。
3. [Score]: 1-5の整数で採点せよ。
# Input Data
- ユーザーの質問: {{user_query}}
- AIの回答: {{ai_response}}
# Output Format
## 評価レポート
- 分析:
- 根拠:
- スコア:
</pre>
</div>
<h3 class="wp-block-heading">【評価指標と誤り分析】</h3>
<p>LLM-as-a-Judgeを運用する際、以下の「幻覚」や「バイアス」に注意が必要です。</p>
<figure class="wp-block-table"><table>
<thead>
<tr>
<th style="text-align:left;">失敗パターン</th>
<th style="text-align:left;">内容</th>
<th style="text-align:left;">対策</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left;"><strong>中心化傾向</strong></td>
<td style="text-align:left;">すべての回答に「3」や「4」を付けてしまう</td>
<td style="text-align:left;">偶数スケール(1-4)の採用や、極端な例をFew-shotで提示</td>
</tr>
<tr>
<td style="text-align:left;"><strong>後光効果</strong></td>
<td style="text-align:left;">文体が丁寧なだけで内容の誤りを見逃す</td>
<td style="text-align:left;">「正確性」と「丁寧さ」の評価項目を完全に分離する</td>
</tr>
<tr>
<td style="text-align:left;"><strong>様式崩れ</strong></td>
<td style="text-align:left;">理由を書かずにスコアだけ出力する</td>
<td style="text-align:left;"><code>Score</code>を最後に出力させるプロンプト順序の徹底</td>
</tr>
</tbody>
</table></figure>
<h3 class="wp-block-heading">【改良後の最適プロンプト】</h3>
<p>分析結果に基づき、バイアスを排除し構造化出力を保証する「最強プロンプト」です。</p>
<div class="codehilite">
<pre data-enlighter-language="generic"># Instructions
Evaluate the AI response based on the following specific criteria.
You must fill out the form step-by-step. Logical reasoning is mandatory before final scoring.
# Criteria
1. Accuracy (1-5): Does the response align with factual truth?
2. Completeness (1-5): Are all parts of the user's question addressed?
3. Tone (1-5): Is the language professional and helpful?
# Evaluation Form (Must be filled)
## Step 1: Internal Thought Process
(Analyze the input and identify any discrepancies, missing info, or excellent points.)
## Step 2: Scoring Rubric Application
- Accuracy Score: [1-5]
- Accuracy Justification: (Max 2 sentences)
- Completeness Score: [1-5]
- Completeness Justification: (Max 2 sentences)
- Tone Score: [1-5]
- Tone Justification: (Max 2 sentences)
## Step 3: Final Judgment
- Overall Grade: [S/A/B/C/D]
- Improvement Suggestion: (Specific advice for the AI)
# Data
- User: {{user_query}}
- Response: {{ai_response}}
</pre>
</div>
<h3 class="wp-block-heading">【まとめ】</h3>
<p>実務でLLM-as-a-judgeを運用するための3つの鉄則:</p>
<ol class="wp-block-list">
<li><p><strong>Reasoning-First</strong>: スコアを出す前に必ず「分析」と「根拠」を言語化させる(Chain-of-Thoughtの適用)。</p></li>
<li><p><strong>分離評価</strong>: 「正確性」「簡潔さ」「トーン」など、複数の独立した指標で個別に採点させる。</p></li>
<li><p><strong>アンカー提示</strong>: 満点(5点)と最低点(1点)の具体例をFew-shotとしてプロンプトに組み込む。</p></li>
</ol>
{“expert_role”: “Prompt Engineering Specialist”, “focus”: “LLM-as-a-Judge / Evaluation Reliability”, “version”: “1.0”}
本記事はGeminiの出力をプロンプト工学で整理した業務ドラフト(未検証) です。
LLM評価の客観性を担保する「ルーブリック型フォーム入力」プロンプト設計
【ユースケース定義と課題】
AIチャットボットの回答品質を自動評価したいが、採点基準が曖昧でLLMの出力が不安定になる課題を、詳細なルーブリックと理由記述の義務化により解決する。
【プロンプト設計のループ】
graph TD
A["ルーブリック定義"] --> B["思考プロセス(CoT)の強制"]
B --> C["フォーム形式での抽出"]
C --> D["人間による評価一致度検証"]
D -->|不一致箇所の基準修正| A
ルーブリック定義 : 1〜5点の各点数に具体的な「どのような状態か」を定義。
思考プロセス(CoT)の強制 : 採点前に「なぜその点数になるか」を分析させる。
フォーム形式での抽出 : 出力揺れを防ぐため、Markdownの表形式や特定のKeyを定めた形式で出力。
【プロンプトの実装案】
# Role
あなたは高品質なカスタマーサポートの品質管理(QA)担当者です。
以下の「評価ルーブリック」に基づき、AIの回答を厳格に評価してください。
# 評価ルーブリック
- 1点(不適切): 誤情報を含んでいる、または質問を無視している。
- 2点(不十分): 致命的な誤りはないが、重要な情報が欠けている。
- 3点(許容範囲): 質問に最低限答えているが、説明が不親切。
- 4点(良好): 正確で親切。必要な情報がすべて含まれている。
- 5点(卓越): 完璧な回答に加え、ユーザーの潜在的な懸念にも配慮している。
# 評価ステップ
1. [Analysis]: ユーザーの意図とAIの回答を比較し、相違点や不足点を箇条書きで抽出せよ。
2. [Evidence]: ルーブリックのどの基準に該当するか、回答の具体的一節を引用して説明せよ。
3. [Score]: 1-5の整数で採点せよ。
# Input Data
- ユーザーの質問: {{user_query}}
- AIの回答: {{ai_response}}
# Output Format
## 評価レポート
- 分析:
- 根拠:
- スコア:
【評価指標と誤り分析】
LLM-as-a-Judgeを運用する際、以下の「幻覚」や「バイアス」に注意が必要です。
失敗パターン
内容
対策
中心化傾向
すべての回答に「3」や「4」を付けてしまう
偶数スケール(1-4)の採用や、極端な例をFew-shotで提示
後光効果
文体が丁寧なだけで内容の誤りを見逃す
「正確性」と「丁寧さ」の評価項目を完全に分離する
様式崩れ
理由を書かずにスコアだけ出力する
Scoreを最後に出力させるプロンプト順序の徹底
【改良後の最適プロンプト】
分析結果に基づき、バイアスを排除し構造化出力を保証する「最強プロンプト」です。
# Instructions
Evaluate the AI response based on the following specific criteria.
You must fill out the form step-by-step. Logical reasoning is mandatory before final scoring.
# Criteria
1. Accuracy (1-5): Does the response align with factual truth?
2. Completeness (1-5): Are all parts of the user's question addressed?
3. Tone (1-5): Is the language professional and helpful?
# Evaluation Form (Must be filled)
## Step 1: Internal Thought Process
(Analyze the input and identify any discrepancies, missing info, or excellent points.)
## Step 2: Scoring Rubric Application
- Accuracy Score: [1-5]
- Accuracy Justification: (Max 2 sentences)
- Completeness Score: [1-5]
- Completeness Justification: (Max 2 sentences)
- Tone Score: [1-5]
- Tone Justification: (Max 2 sentences)
## Step 3: Final Judgment
- Overall Grade: [S/A/B/C/D]
- Improvement Suggestion: (Specific advice for the AI)
# Data
- User: {{user_query}}
- Response: {{ai_response}}
【まとめ】
実務でLLM-as-a-judgeを運用するための3つの鉄則:
Reasoning-First : スコアを出す前に必ず「分析」と「根拠」を言語化させる(Chain-of-Thoughtの適用)。
分離評価 : 「正確性」「簡潔さ」「トーン」など、複数の独立した指標で個別に採点させる。
アンカー提示 : 満点(5点)と最低点(1点)の具体例をFew-shotとしてプロンプトに組み込む。
ライセンス :本記事のテキスト/コードは特記なき限り
CC BY 4.0 です。引用の際は出典URL(本ページ)を明記してください。
利用ポリシー もご参照ください。
コメント