admissions@cyberlawacademy.com
Part 1 of 5

Prompt Engineering for Legal Documents

Master the art and science of crafting effective prompts that consistently produce high-quality legal document drafts. Learn prompt patterns, context-setting techniques, and document-specific strategies.

~90 minutes5 Sections50+ Prompt Templates

5.1 Prompt Engineering Fundamentals

Prompt engineering is the discipline of designing inputs that elicit desired outputs from AI systems. For legal drafting, effective prompts must convey context, constraints, format requirements, and quality standards to produce usable drafts.

The CRAFT Framework for Legal Prompts

  1. Context: Provide background - jurisdiction, parties, purpose, legal framework
  2. Role: Define the AI's role - "Act as an experienced Indian litigation lawyer"
  3. Action: Specify the task - "Draft a plaint for recovery of money"
  4. Format: Describe output format - structure, length, style, numbering
  5. Tone: Set the appropriate tone - formal court language, client-friendly, etc.
Example: CRAFT Framework Applied
CONTEXT: Indian civil litigation; District Court jurisdiction; suit between two businesses for breach of supply contract dated 15.01.2024; contract value Rs. 25 lakhs; defendant failed to deliver goods despite advance payment of Rs. 10 lakhs. ROLE: Act as an experienced civil litigation advocate practicing in Indian courts with expertise in contract law and CPC procedures. ACTION: Draft a plaint for recovery of Rs. 10 lakhs (advance payment) plus damages of Rs. 5 lakhs for breach of contract. FORMAT: Follow Order VII CPC structure with numbered paragraphs. Include: title, parties, cause of action, jurisdiction, limitation, valuation, and prayer. Use formal court language. TONE: Formal legal language appropriate for filing in District Court. Clear, precise, and assertive.

Prompt Components Deep Dive

ComponentPurposeLegal Drafting Example
System ContextSet overall behavior"You are a legal drafting assistant trained on Indian law"
Task DefinitionSpecify what to do"Draft a demand notice under Section 138 NI Act"
ConstraintsSet boundaries"Do not exceed 2 pages; use only established legal principles"
ExamplesShow desired output"Structure similar to the attached template"
Output FormatDefine structure"Use hierarchical numbering 1.1, 1.1.1"

5.2 Prompt Patterns for Legal Documents

Different document types require different prompt patterns. Understanding these patterns helps you craft prompts that consistently produce high-quality drafts.

Pattern 1: Template Completion

Best for: Standard documents with established formats (contracts, notices, applications)

Template Completion Prompt
Complete the following Non-Disclosure Agreement template by filling in the bracketed sections. Maintain the existing structure and formatting. PARTIES: Party A: [Company name: ABC Technologies Pvt. Ltd., Address: Mumbai] Party B: [Company name: XYZ Solutions Ltd., Address: Bangalore] PURPOSE: [Business discussions regarding potential software development collaboration] CONFIDENTIAL INFORMATION: [Technical specifications, source code, business plans, customer data] TERM: [2 years from execution] Ensure all filled sections are consistent with Indian Contract Act and maintain professional drafting standards.

Pattern 2: Issue-Analysis-Document

Best for: Complex matters requiring analysis before drafting (petitions, written statements)

Issue-Analysis-Document Prompt
STEP 1 - ISSUE IDENTIFICATION: Based on these facts [describe facts], identify all legal issues relevant to filing a writ petition. STEP 2 - LEGAL ANALYSIS: For each issue identified, provide: - Applicable constitutional provision - Relevant Supreme Court precedents - Strength of argument (strong/moderate/weak) STEP 3 - DOCUMENT DRAFTING: Based on the above analysis, draft the GROUNDS section of a writ petition under Article 226. Include only grounds with strong or moderate strength. Structure each ground as: Legal principle + Application to facts + Precedent support.

Pattern 3: Adversarial Review

Best for: Quality improvement and identifying weaknesses

Adversarial Review Prompt
Review the following draft plaint as if you were the opposing counsel. Identify: 1. WEAKNESSES: Points where the cause of action is inadequately pleaded 2. AMBIGUITIES: Language that could be interpreted against the plaintiff 3. MISSING ELEMENTS: Essential averments that are absent 4. PROCEDURAL ISSUES: Non-compliance with CPC requirements 5. COUNTER-ARGUMENTS: How a defendant might respond to each allegation After identifying issues, provide a revised draft addressing each weakness. [Insert draft plaint here]
Pro Tip: Chain-of-Thought

For complex legal analysis, use chain-of-thought prompting: "Think through this step by step. First, identify the applicable law. Then, analyze how the facts match each element. Finally, draft the relevant provision." This produces more reasoned and accurate outputs.

5.3 Document-Specific Prompt Strategies

Each type of legal document has unique requirements. Tailoring your prompts to document type dramatically improves output quality.

Contracts and Agreements

Contract Drafting Prompt
Draft a Software Development Agreement between: Client: [Name, details] Developer: [Name, details] Include these specific clauses: 1. Scope of Work - [describe deliverables] 2. Payment Terms - [milestone-based, amounts] 3. Timeline - [start date, milestones, delivery] 4. IP Ownership - [work-for-hire, client owns all IP] 5. Confidentiality - [mutual, 3-year term] 6. Warranties - [developer warrants code is original] 7. Limitation of Liability - [cap at contract value] 8. Termination - [30 days notice, termination for cause] 9. Dispute Resolution - [arbitration in Mumbai under A&C Act] 10. Governing Law - [Indian law] Use defined terms consistently. Include a definitions section. Follow Indian Contract Act requirements. Make the agreement balanced but slightly favor the client.

Pleadings

Plaint Drafting Prompt
Draft a plaint for specific performance of contract. Apply these requirements: PARTIES: Plaintiff: [Name, address, description] Defendant: [Name, address, description] FACTS (in chronological order): 1. [Agreement dated ___] 2. [Plaintiff's performance/readiness] 3. [Defendant's breach] 4. [Demands made] LEGAL REQUIREMENTS: - Comply with Order VII CPC - Plead each material fact separately - Include cause of action paragraph with date and place - State territorial and pecuniary jurisdiction grounds - Calculate limitation under Article 54 of Limitation Act - Value the suit for court fees (market value of property) PRAYERS: - Specific performance - Alternative: Refund with interest - Damages - Costs OUTPUT FORMAT: Use standard plaint format with numbered paragraphs. Include verification at the end.

Legal Notices

Legal Notice Prompt
Draft a legal notice for [purpose]. Use this structure: FROM: [Client details] TO: [Recipient details] DATE: [Current date] REQUIREMENTS: 1. Opening - Formal introduction identifying the sender 2. Background - Brief context of relationship/transaction 3. Grievance - Specific facts constituting the wrong 4. Legal Position - Applicable law and violation 5. Demand - Clear, specific, time-bound demand 6. Consequence - Legal action that will follow 7. Closing - Reservation of rights TONE: Firm but professional. Assert rights without being aggressive. SPECIFIC FACTS: [Insert facts] If this is a Section 138 NI Act notice, ensure: - Cheque details (number, date, amount, bank) - Dishonour date and reason - Demand for cheque amount specifically - 15-day deadline for payment - Warning of criminal prosecution

5.4 Iterative Refinement Techniques

Rarely does a single prompt produce a perfect document. Iterative refinement - progressively improving outputs through targeted follow-up prompts - is essential for high-quality results.

Refinement Workflow

  1. Initial Draft: Generate first version with comprehensive prompt
  2. Structural Review: "Review the structure. Is anything missing per CPC requirements?"
  3. Legal Accuracy: "Verify all legal citations and principles are current and correct"
  4. Language Polish: "Improve clarity and precision. Replace vague terms with specifics"
  5. Adversarial Review: "Identify weaknesses from opposing counsel's perspective"
  6. Final Revision: "Incorporate all feedback into a final polished version"

Common Refinement Prompts

  • "Make it more specific": "Replace all instances of 'reasonable time' with exact days/dates"
  • "Add authority": "Add relevant case citations supporting each legal argument"
  • "Improve structure": "Reorganize for better logical flow from issue to conclusion"
  • "Simplify": "Rewrite complex sentences for clarity without losing legal precision"
  • "Expand": "Elaborate on the cause of action with more specific facts"
  • "Condense": "Reduce to essential points without losing material facts"
Avoid Prompt Drift

In long iterative sessions, AI may "forget" earlier instructions. Periodically remind it of core requirements: "Remember: this is for Indian courts, use formal language, follow CPC structure."

5.5 Building Your Prompt Library

Effective legal AI users build and maintain a library of proven prompts. This saves time and ensures consistency across similar matters.

Organizing Your Prompt Library

CategoryDocument TypesKey Variations
ContractsNDA, Service Agreement, Employment, SaleBy industry, complexity, jurisdiction
PleadingsPlaint, WS, Counter Claim, RejoinderBy cause of action, court level
PetitionsWrit, Bail, Quashing, RevisionBy writ type, offence category
ApplicationsInterim, Stay, Discovery, ExecutionBy relief sought, stage of proceedings
NoticesDemand, Section 138, Section 80, C&DBy statutory requirement, purpose
Client CommsEngagement, Opinion, Status, AdvisoryBy complexity, client type

Prompt Template Best Practices

  • Use Placeholders: Mark variable inputs clearly: [CLIENT NAME], [AMOUNT], [DATE]
  • Version Control: Date your prompts and track what works
  • Document Results: Note which prompts produce best outputs
  • Share Knowledge: Create team-wide prompt libraries for consistency
  • Regular Updates: Update prompts when law changes or better techniques emerge

Key Takeaways

  • CRAFT Framework: Context, Role, Action, Format, Tone for comprehensive prompts
  • Prompt Patterns: Template completion, issue-analysis-document, adversarial review
  • Document-Specific: Tailor prompts to document type requirements
  • Iterative Refinement: Use targeted follow-ups to improve outputs
  • Prompt Library: Build and maintain organized collection of proven prompts