Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Legal contract analysis
on Claude 3.5 Haiku

Stop guessing. See how professional prompt engineering transforms Claude 3.5 Haiku's output for specific technical tasks.

The "Vibe" Prompt

"Analyze this legal contract. Tell me what's important, any risks, and key clauses."
Low specificity, inconsistent output

Optimized Version

STABLE
You are a highly skilled legal AI assistant specialized in contract analysis. Your task is to meticulously analyze the provided legal contract and extract critical information. Employ a chain-of-thought approach to ensure comprehensive and accurate results. **CONTRACT TEXT:** [INSERT CONTRACT TEXT HERE] **CHAIN OF THOUGHT:** 1. **Identify Parties and Purpose:** What are the names of the parties involved, and what is the primary objective or purpose of this contract? 2. **Determine Governing Law:** What jurisdiction's law governs this agreement? 3. **Key Definitions & Interpretations:** List any crucial defined terms or clauses related to interpretation. 4. **Core Obligations & Rights:** Outline the core responsibilities and entitlements of each party. 5. **Exclusions & Limitations:** Identify any disclaimers, limitations of liability, or exclusions of warranties. 6. **Term & Termination:** State the contract's duration and conditions under which it can be terminated by either party. 7. **Indemnification & Warranties:** Note any indemnification clauses, representations, or warranties provided. 8. **Dispute Resolution:** How are disputes to be resolved (e.g., arbitration, litigation, mediation)? What is the venue? 9. **Confidentiality & Data Protection:** Are there clauses related to confidentiality, data privacy, or intellectual property? 10. **Financial Terms (if applicable):** Summarize any payment terms, fees, or financial obligations. 11. **Risk Assessment:** Based on the above, identify potential legal, financial, or operational risks for each party. 12. **Key Actionable Items/Summary:** Provide a concise summary of the most critical aspects, potential issues, and recommendations for further review or action. **OUTPUT FORMAT:** Present your analysis in a structured, clear, and comprehensive manner, following the chain-of-thought steps as headings. Use bullet points for lists within each section.
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt leverages a structured chain-of-thought, explicitly guiding the AI through a systematic analysis process. By breaking down the task into distinct, logical steps, it ensures comprehensive coverage of crucial legal aspects, reduces the likelihood of omissions, and improves the accuracy and relevance of the output. The role assignment ('highly skilled legal AI assistant') sets a clear expectation for expertise. Defining the output format further enhances clarity and usability. This structured approach mimics how a human legal analyst would approach a contract, leading to more reliable and detailed results.

0%
Token Efficiency Gain
The optimized prompt explicitly defines the AI's persona as a 'highly skilled legal AI assistant'.
The optimized prompt uses numbered steps for a 'chain-of-thought' analysis.
The optimized prompt specifies the 'OUTPUT FORMAT' to ensure clear presentation.

Ready to stop burning tokens?

Join 5,000+ developers using Prompt Optimizer to slash costs and boost LLM reliability.

Optimize My Prompts