コンテンツまでスキップ
「法曹」と「AI」の " 今 " を届ける。

法律実務で効果的なプロンプトを書くためのコツ

法律実務におけるAI活用とプロンプト設計の重要性

法律実務での文書作成には、正確性と効率性が求められます。近年、GPTなどのAIを活用して書面を作成してみようと挑戦した先生は多いのではないでしょうか。その際どのようにプロンプト(AIへの指示)を設計するかで、結果に大きな差が生まれます。

本記事では、弁護士業務におけるAI活用を想定して、基礎から応用に至るまでのプロンプト設計の流れを詳しく解説します。初学者でも段階的に理解できるよう、ポイントを整理しているのでぜひ参考にしてください。

1. コンテキストの重要性

最初に押さえるべきポイントは、AIが情報を理解するために必要な「背景情報(コンテキスト)」をしっかり提示することです。

  • なぜ重要なのか

    AIは、人間のように「あうんの呼吸」で足りない情報を補うことが得意ではありません。入力した情報が曖昧であればあるほど、AIの出力も曖昧になり、実務に耐えうる正確性が失われる恐れがあります。

  • 提示すべきコンテキストの例

    • 事件の種類: 離婚、損害賠償、契約トラブルなど
    • 基本的な事実: 当事者、日時、場所、関連する法律や条文
    • 書面の種類: 契約書、証拠リスト、準備書面など
    • 注目すべきポイント: 契約解除条項、支払い条件、損害賠償責任の範囲など

例:簡単なコンテキスト提示

あなたは契約法の専門弁護士です。この契約書を分析し、支払い条件と契約解除条項に潜むリスクを特定してください。

上記のように、AIの役割(契約法の専門弁護士)、文書の種類(契約書)、注目箇所(支払い条件と契約解除条項)を具体的に伝えるだけで、AIの回答精度が格段に上がります。

2. 構造化されたプロンプトを作成する方法

続いて、コンテキストを与えた上で、「AIに何をしてほしいのか」を構造的に示す方法を紹介します。ポイントは以下の3ステップです。

  1. 意図を明確にする
    • 例)「この契約書のリスクを評価してください。」
  2. コンテキストを再度整理して提供する
    • 例)「新規ビジネスパートナーとの契約書で、支払い条件と契約解除条項にリスクがないかを特に確認したいです。」
  3. 具体的な指示を与える
    • 例)「リスクを特定したうえで、具体的な事例と推奨対応策を3つ挙げてください。」

こうした構造化によって、AIが受け取る「問い」が明確化し、より的確な回答を得やすくなります。

3. 具体例の提示とフォーマットの指定

次の段階では、AIから得たい出力のイメージをさらに具体化します。とくに、フォーマットやテンプレートを指定すると、回答が散漫になりにくい点がメリットです。

例:フォーマット指定

「この契約書のレビュー結果を以下のフォーマットで出力してください。」

[セクション名]

  • リスク:
  • 推奨対応策:

上記のようにフォーマットがあると、たとえば「契約書のどの条文にリスクがあり、どのように対策をすべきか」などが明確に整理され、後から読み返す際にも分かりやすいドキュメントをAIと協力して作ることが可能です。

4. 基礎から応用へ移行するためのポイント

ここまでは、シンプルな案件や基本的なプロンプトを想定して解説してきました。しかし実際の法律実務では、複数の当事者や複雑な事実関係、長期にわたる交渉履歴などが絡み合い、一筋縄ではいかないケースが多く存在します。

4.1 なぜ応用が必要なのか

  • 複数の論点を同時に扱う: たとえば、支払い条件・解除条項・損害賠償責任など、複数の条項を一度に検討する必要がある。
  • 背景事情の重要性: 過去にトラブルが発生していた場合、その経験が今後の契約条項の見直しに強く影響する。
  • 文書の形式や視点が多様: 原告・被告・第三者など、どの立場から書面を作成するかによって、必要な情報や語り口が異なる。

こうした複雑性をAIに理解させるためには、これまで学んだ基礎(コンテキスト、構造化、フォーマット指定)をさらに拡張・応用していく必要があります。次の節では、そのための具体的手順と注意点を解説します。

4.2 応用へステップアップするときの具体的対処法

  1. コンテキストを多層的に提示
    • 「この契約は、前回の取引で違約金が発生した背景があるため、同様のリスクを回避することが最重要課題です。」など、従来より深掘りした背景説明を付加。
  2. AIへの専門家ロール付与と指示の細分化
    • 「あなたはIT法に特化したパートナー弁護士で、SaaS契約を中心に扱っています。まず支払い条件とデータの取り扱いについて、想定されるリスクを洗い出してください。その後、リスク緩和策を3案提示してください。」のように段階的な指示を出す。
  3. 追加質問や再確認のためのプロンプトを準備
    • 初回の回答に対して、「リスクが曖昧に列挙されているので、もっと具体的な事例を提示してください。」といったフォローアップ質問を行う。
    • 必要に応じて、事件関係者や関連法規を追加で提示し、AIの理解をアップデート。

上記を踏まえると、次の「5. 法律実務における具体的なプロンプト例」で示す高度なプロンプトを使う際にも、どこを・どう調整すればより正確かつ深い回答を得られるかが見えてきます。

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.

```ここまで

このプロンプトは、複数の登場人物や多岐にわたる事実関係が想定される法律実務で有用です。ポイントは、事実を時系列で整理しつつ、証拠との関連性や各当事者の視点などを適切に反映させるための手順が明示されている点です。

6. プロンプトの繰り返し改善

実務では、初回の出力が必ずしも期待通りとは限りません。そこで大切なのが、プロンプトを微調整しながら繰り返し出力をブラッシュアップしていくことです。

例:追加の指示や改善例

  • 「ここでは事実の列挙に留まっているので、それぞれの事実に対する法的評価も付け加えてください。」
  • 「出力が長すぎるため、要点のみ3つの箇条書きにまとめたバージョンもください。」
  • 「技術的な用語が多いので、弁護士以外にもわかりやすい説明を追加してください。」

これらの追加指示やフォローアップを行うことで、AIはより洗練された回答を返せるようになります。

まとめ

法律実務では案件ごとに状況が異なり、柔軟な発想でプロンプトをアレンジすることが求められます。一度で完璧な結果を得ようとするのではなく、段階的に詳細を追加したり修正を加えたりして、AIとのコミュニケーションを深めていくことが鍵です。今回ご紹介したポイントを参考に、ぜひ実務に合わせた最適なプロンプト設計を試行錯誤してみてください。