ベストプラクティスガードレールの強化
ハルシネーションを減らす
不確実性を認めることを許可し、直接引用によって応答を根拠づけ、引用によって主張を検証することで、Claudeの出力におけるハルシネーションを最小限に抑えます。
Claudeのような最先端の言語モデルであっても、事実として誤っていたり、与えられたコンテキストと矛盾するテキストを生成してしまうことがあります。この現象は「hallucination」(ハルシネーション)として知られており、AI駆動のソリューションの信頼性を損なう可能性があります。 このガイドでは、ハルシネーションを最小限に抑え、Claudeの出力が正確で信頼できるものになるようにするためのテクニックを紹介します。
基本的なハルシネーション最小化戦略
- Claudeに「わかりません」と言うことを許可する: 不確実性を認めることをClaudeに明示的に許可します。このシンプルなテクニックにより、誤った情報を大幅に減らすことができます。
User
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."- 事実の根拠づけに直接引用を使用する: 長いドキュメント(20kトークン超)を扱うタスクでは、タスクを実行する前に、まず一語一句そのままの引用を抽出するようClaudeに依頼します。これにより応答が実際のテキストに根拠づけられ、ハルシネーションが減少します。
User
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.- 引用で検証する:それぞれの主張について引用と出典を示させることで、Claudeの応答を監査可能にします。また、応答を生成した後に、各主張を裏付ける引用を見つけさせることでClaudeに検証させることもできます。引用が見つからない場合は、その主張を撤回しなければなりません。
User
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.高度なテクニック
-
思考の連鎖(chain-of-thought)による検証:最終的な回答を出す前に、推論をステップバイステップで説明するようClaudeに依頼します。これにより、誤った論理や前提が明らかになることがあります。
-
Best-of-N検証:同じプロンプトでClaudeを複数回実行し、出力を比較します。出力間の不一致はハルシネーションを示している可能性があります。
-
反復的な改善:Claudeの出力をフォローアップのプロンプトの入力として使用し、以前の記述を検証または拡張するよう依頼します。これにより、不一致を発見して修正できます。
-
外部知識の制限:提供されたドキュメントの情報のみを使用し、一般的な知識は使用しないようClaudeに明示的に指示します。
Was this page helpful?