一行要約
hallucination 対策の中核は「わからないと言う許可を明示的に与える」ことと「先に逐語引用を抽出させてから作業させる」ことで、どちらも prompt 1行の追加で効く。
要点
基本の3手
1. 「わからない」と言う許可を与える
Explicitly give Claude permission to admit uncertainty. This simple technique can drastically reduce false information. 「わからない」と認めてよいと、Claude に明示的に許可せよ。この単純な手法で誤情報を劇的に減らせる。
2. 逐語引用で事実に接地させる
20k トークンを超える長文書を扱うタスクでは、作業の前に関連箇所を一字一句そのまま抽出させる。これで応答が実際のテキストに接地する。
3. 引用で検証可能にする
各主張に引用と出典を付けさせる。さらに一歩進めて、応答を生成した後に各主張を裏づける引用を探させ、見つからなければその主張を撤回させる。
発展的な技法
| 技法 | 内容 |
|---|---|
| Chain-of-thought verification | 最終回答の前に段階的な推論を説明させる。誤った論理や前提が露見する |
| Best-of-N verification | 同じプロンプトを複数回走らせて出力を比較する。出力間の不一致は hallucination の兆候 |
| Iterative refinement | 出力を次のプロンプトの入力にし、前の発言を検証・拡張させる。不整合を捕まえて直せる |
| External knowledge restriction | 一般知識ではなく、与えた文書の情報だけを使うよう明示的に指示する |
Remember, while these techniques significantly reduce hallucinations, they don’t eliminate them entirely. Always validate critical information, especially for high-stakes decisions. これらの手法は hallucination を大幅に減らすが、完全になくすわけではないことを忘れるな。重要な情報は常に検証せよ。影響の大きい判断では特にそうである。
そのまま使える具体例
不確実性を認める許可(M&A レポートの分析):
As our M&A advisor, analyze this report on the potential acquisition of AcmeCo by ExampleCorp.
<report>{{REPORT}}</report>
Focus on financial projections, integration risks, and regulatory hurdles. If you're unsure about any aspect or if the report lacks necessary information, say "I don't have enough information to confidently assess this."引用の先行抽出(プライバシーポリシーの監査)。「引用が見つからない場合の逃げ道」と「引用のみに基づけ」の2点が要点:
As our Data Protection Officer, review this updated privacy policy for GDPR and CCPA compliance.
<policy>{{POLICY}}</policy>
1. Extract exact quotes from the policy that are most relevant to GDPR and CCPA compliance. If you can't find relevant quotes, state "No relevant quotes found."
2. Use the quotes to analyze the compliance of these policy sections, referencing the quotes by number. Only base your analysis on the extracted quotes.生成後の自己検証と撤回(プレスリリースの起草)。**裏づけのない主張を「削除して痕跡を残す」**のが巧い:
Draft a press release for our new cybersecurity product, AcmeSecurity Pro, using only information from these product briefs and market reports.
<documents>{{DOCUMENTS}}</documents>
After drafting, review each claim in your press release. For each claim, find a direct quote from the documents that supports it. If you can't find a supporting quote for a claim, remove that claim from the press release and mark where it was removed with empty [] brackets.原典で言及されている関連文書
- claude-prompting-best-practices — 「引用で接地させる」long context prompting、agentic coding での
<investigate_before_answering> - develop-tests — 主張の検証を eval に落とす方法(groundedness check)
- demystifying-evals-for-ai-agents — リサーチエージェントの groundedness / coverage / source quality チェック