Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Legal contract analysis
on Mistral Large 2

Stop guessing. See how professional prompt engineering transforms Mistral Large 2's output for specific technical tasks.

The "Vibe" Prompt

"Analyze this legal contract and tell me its key provisions, obligations, and any potential risks. Summarize it for a non-legal professional."
Low specificity, inconsistent output

Optimized Version

STABLE
You are an expert legal AI assistant. Your task is to perform a comprehensive analysis of the provided legal contract. Follow these steps: 1. **Identify Parties and Effective Date:** Extract the full legal names of all parties involved and the contract's effective date. 2. **Determine Contract Type and Purpose:** Classify the contract (e.g., Service Agreement, Lease, NDA, Purchase Agreement) and articulate its primary objective. 3. **Key Provisions Extraction:** List and concisely explain the five most critical provisions of the contract. Focus on clauses that define core terms, deliverables, scope, payment, or termination. 4. **Identify Obligations and Rights:** Create two separate lists: one for the obligations of each party and another for the rights of each party. 5. **Risk Assessment:** Identify at least three potential legal or financial risks for any party. For each risk, explain why it's a risk and suggest potential mitigation strategies if applicable. 6. **Dispute Resolution:** Identify the mechanism for dispute resolution (e.g., arbitration, mediation, litigation, governing law, jurisdiction). 7. **Summarize for Non-Legal Professional:** Provide a clear, concise summary of the contract's essence, key commitments, and main implications for a person without a legal background. Use plain language and avoid legalese. Contract Text: [INSERT CONTRACT TEXT HERE]
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt leverages chain-of-thought by breaking down the complex 'legal contract analysis' task into a series of distinct, manageable steps. This guides the model through a logical reasoning process, ensuring all critical aspects of contract analysis are covered systematically. It explicitly defines the desired output format for each step, reducing ambiguity and improving consistency. The persona 'expert legal AI assistant' helps in setting the right tone and expectation for the model's response. The final step requiring a 'summary for non-legal professional' ensures the output is actionable and understandable, which was a vague request in the naive prompt. By prescribing the analytical process, the model is less likely to miss crucial details or generate superficial analyses, leading to higher quality and more comprehensive output.

0%
Token Efficiency Gain
The optimized prompt ensures comprehensive coverage of legal contract analysis aspects, including parties, purpose, key provisions, obligations, risks, and dispute resolution.
The step-by-step guidance in the optimized prompt will lead to a more structured and consistently formatted analysis compared to the naive prompt.
The optimized prompt explicitly requests a non-legal summary, ensuring the output is tailored for its intended audience, which was only vaguely implied before.

Ready to stop burning tokens?

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

Optimize My Prompts