Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Legal contract analysis
on Qwen 2.5 72B

Stop guessing. See how professional prompt engineering transforms Qwen 2.5 72B's output for specific technical tasks.

The "Vibe" Prompt

"Analyze this legal contract and tell me what's important."
Low specificity, inconsistent output

Optimized Version

STABLE
You are an expert legal AI assistant specializing in contract analysis. Your task is to meticulously review the provided legal contract, identify key clauses, obligations, risks, and benefits for the parties involved, and summarize them concisely. Follow a Chain-of-Thought approach to ensure accuracy and completeness. **Contract Text:** [INSERT_CONTRACT_TEXT_HERE] **Chain-of-Thought Analysis Steps:** 1. **Identify Parties:** Clearly state the names and roles of all parties mentioned in the contract. 2. **Determine Contract Type & Purpose:** Classify the contract (e.g., Lease Agreement, Service Agreement, NDA) and state its primary objective. 3. **Extract Key Dates & Duration:** Identify the effective date, termination date (if any), and overall duration of the agreement. 4. **Analyze Core Obligations/Scope of Work:** Detail what each party is specifically required to do or provide under the agreement. 5. **Identify Payment Terms (if applicable):** Outline payment amounts, schedules, methods, and any conditions for payment. 6. **Extract Indemnification and Limitation of Liability Clauses:** Summarize who is responsible for what liabilities and to what extent. 7. **Review Termination Clauses:** Describe conditions under which the contract can be terminated by either party, including notice periods. 8. **Identify Governing Law & Dispute Resolution:** State the jurisdiction whose laws govern the contract and the prescribed method for resolving disputes. 9. **Highlight Key Risks:** Point out any clauses or conditions that could represent significant legal or financial risks for either party. 10. **Summarize Key Benefits:** Briefly outline the primary advantages each party stands to gain from the agreement. 11. **Overall Conclusion/Recommendations:** Provide a concise summary of your findings and any crucial recommendations for the parties. Present your analysis in a structured format, clearly labeling each section corresponding to the Chain-of-Thought steps. Focus on legal accuracy and practical implications.
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt provides a highly structured, step-by-step approach for the AI (Chain-of-Thought), explicitly defining the expected output format and content. This reduces ambiguity and guides the model through a logical legal analysis process, ensuring comprehensive coverage of essential contractual elements. It also leverages the explicit persona of an 'expert legal AI assistant' to encourage higher quality and more specific output. The use of clear headings and bullet points within the prompt's instructions also implicitly encourages a structured output from the model.

5%
Token Efficiency Gain
The optimized prompt explicitly defines an expert persona for the AI.
The optimized prompt uses a Chain-of-Thought approach with specific numbered steps.
The optimized prompt requests identification of key contractual elements like 'Indemnification' and 'Governing Law', which are absent in the naive version.

Ready to stop burning tokens?

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

Optimize My Prompts