法律実務での文書作成には、正確性と効率性が求められます。近年、GPTなどのAIを活用して書面を作成してみようと挑戦した先生は多いのではないでしょうか。その際どのようにプロンプト(AIへの指示)を設計するかで、結果に大きな差が生まれます。
本記事では、弁護士業務におけるAI活用を想定して、基礎から応用に至るまでのプロンプト設計の流れを詳しく解説します。初学者でも段階的に理解できるよう、ポイントを整理しているのでぜひ参考にしてください。
最初に押さえるべきポイントは、AIが情報を理解するために必要な「背景情報(コンテキスト)」をしっかり提示することです。
なぜ重要なのか
AIは、人間のように「あうんの呼吸」で足りない情報を補うことが得意ではありません。入力した情報が曖昧であればあるほど、AIの出力も曖昧になり、実務に耐えうる正確性が失われる恐れがあります。
提示すべきコンテキストの例
あなたは契約法の専門弁護士です。この契約書を分析し、支払い条件と契約解除条項に潜むリスクを特定してください。
上記のように、AIの役割(契約法の専門弁護士)、文書の種類(契約書)、注目箇所(支払い条件と契約解除条項)を具体的に伝えるだけで、AIの回答精度が格段に上がります。
続いて、コンテキストを与えた上で、「AIに何をしてほしいのか」を構造的に示す方法を紹介します。ポイントは以下の3ステップです。
こうした構造化によって、AIが受け取る「問い」が明確化し、より的確な回答を得やすくなります。
次の段階では、AIから得たい出力のイメージをさらに具体化します。とくに、フォーマットやテンプレートを指定すると、回答が散漫になりにくい点がメリットです。
「この契約書のレビュー結果を以下のフォーマットで出力してください。」
[セクション名]
- リスク:
- 推奨対応策:
上記のようにフォーマットがあると、たとえば「契約書のどの条文にリスクがあり、どのように対策をすべきか」などが明確に整理され、後から読み返す際にも分かりやすいドキュメントをAIと協力して作ることが可能です。
ここまでは、シンプルな案件や基本的なプロンプトを想定して解説してきました。しかし実際の法律実務では、複数の当事者や複雑な事実関係、長期にわたる交渉履歴などが絡み合い、一筋縄ではいかないケースが多く存在します。
こうした複雑性をAIに理解させるためには、これまで学んだ基礎(コンテキスト、構造化、フォーマット指定)をさらに拡張・応用していく必要があります。次の節では、そのための具体的手順と注意点を解説します。
上記を踏まえると、次の「5. 法律実務における具体的なプロンプト例」で示す高度なプロンプトを使う際にも、どこを・どう調整すればより正確かつ深い回答を得られるかが見えてきます。
ここからは、実際の法律実務を想定した応用的なプロンプト設計を示します。例として、陳述書作成をAIに支援させる場合を取り上げますが、契約書レビューや交渉用のメモ作成など、他の法的文書にも応用が可能です。
```ここから
Please extract the necessary information from the uploaded complaint or preparatory document to draft a detailed statement.
- Document File: {User-uploaded complaint or preparatory document}
**Note**: If there are multiple characters in the complaint or preparatory document and it is unclear from whose perspective the statement should be drafted, please follow the process below.
### Confirmation Process
1. **Identify Characters**:
- List all the characters mentioned in the complaint or preparatory document.
- Briefly explain the role and relationship of each character.
2. **Confirm with the User in Japanese**:
- If there are multiple characters, ask the user in Japanese, "陳述書は誰の視点で作成しますか?" ("From whose perspective should the statement be drafted?")
- If necessary, provide the user with options in Japanese for choosing the perspective (e.g., "原告" (Plaintiff), "被告" (Defendant), "証人" (Witness), etc.).
### Guidelines for Drafting the Statement
After receiving instructions from the user, draft the statement according to the following guidelines:
1. **Organize and Detail Objective Facts**
- Focus on organizing the information into a structured format with clear, objective facts.
- Avoid summarizing the information; instead, detail every fact with as much specificity as possible.
- Clearly articulate the "who," "when," "where," "what," "why," and "how" for each fact, so that a third party can easily visualize the situation.
- Include specific dates, names, actions, statements, and locations, and reference evidence clearly.
2. **Chronological Order and Detailed Descriptions**
- Arrange facts and events strictly in chronological order to ensure clarity and coherence.
- Describe each event with precise details, specifying dates, times, and the sequence of actions.
- Ensure that the relationship between events is clear and that the timeline is consistent throughout.
3. **Include All Relevant Facts and Details**
- Ensure all relevant facts are included without omission. Detail each point comprehensively to avoid losing important information.
- Avoid summarizing or condensing content; instead, focus on elaborating every point thoroughly.
- Include relevant background information and context as needed to give a full understanding of the events and circumstances.
4. **Provide Context and Relationship Background**
- Detail the context and background of the relationship between the involved parties.
- Explain why certain individuals trusted or distrusted others, and how this influenced their actions and decisions.
- Provide any necessary historical or personal background that might affect the interpretation of facts.
5. **Detail Development of Doubts and Reasoning**
- Elaborate on how doubts or suspicions developed among the parties involved, providing specific reasons and detailed accounts of relevant events.
- Include specific incidents or interactions that led to these doubts, such as failed projects or conflicting technical methods.
- Clearly explain the logical reasoning behind the development of doubts or suspicions.
6. **Reference and Explain Evidence in Detail**
- Quote evidence (e.g., evidence numbers, document names, submission dates) precisely, and provide a detailed explanation of how each piece of evidence supports the facts.
- Clarify the importance and relevance of each piece of evidence, detailing its content and implications.
- Explain the logical connections between the evidence and the facts described.
7. **Detailed Descriptions of Actions and Interactions**
- Describe in detail the specific actions and interactions of the parties involved, clarifying who did what and how.
- Detail communications, decision-making processes, and interactions among parties to enhance the credibility of the statement.
- Explain the meaning and impact of the statements and actions at the time they occurred.
8. **Include Technical and Industry-Specific Information**
- Provide industry-specific knowledge and technical details as needed to support the facts and enhance the statement's reliability.
- When discussing specific technologies or methods, provide necessary background information to clarify their relevance and function.
- Define specialized terms and their meanings to ensure clarity and understanding for all readers.
9. **Oral Explanation Readiness**
- Ensure the content can be clearly explained orally during mediation or court proceedings.
- Prepare the information so that it can be communicated concisely in the user's own words.
- Be ready to answer questions from mediators or judges based on the content of the statement, providing logical and consistent explanations.
### Double-Check Process
- Verify that the content of the generated statement strictly follows the uploaded complaint or preparatory document.
- Ensure the statement remains within the bounds of the user-provided input and does not include any external information or assumptions.
- Review the generated content to ensure it aligns accurately with the input information before finalizing it as the statement.
```ここまで
このプロンプトは、複数の登場人物や多岐にわたる事実関係が想定される法律実務で有用です。ポイントは、事実を時系列で整理しつつ、証拠との関連性や各当事者の視点などを適切に反映させるための手順が明示されている点です。
実務では、初回の出力が必ずしも期待通りとは限りません。そこで大切なのが、プロンプトを微調整しながら繰り返し出力をブラッシュアップしていくことです。
これらの追加指示やフォローアップを行うことで、AIはより洗練された回答を返せるようになります。
法律実務では案件ごとに状況が異なり、柔軟な発想でプロンプトをアレンジすることが求められます。一度で完璧な結果を得ようとするのではなく、段階的に詳細を追加したり修正を加えたりして、AIとのコミュニケーションを深めていくことが鍵です。今回ご紹介したポイントを参考に、ぜひ実務に合わせた最適なプロンプト設計を試行錯誤してみてください。