Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Legal contract analysis
on Gemini 2.0 Flash

Stop guessing. See how professional prompt engineering transforms Gemini 2.0 Flash's output for specific technical tasks.

The "Vibe" Prompt

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

Optimized Version

STABLE
You are an expert legal analyst specializing in contract review. Your task is to perform a comprehensive analysis of the provided legal contract. Follow these steps: 1. **Identify Parties and Purpose:** State the parties involved and the overarching purpose of the contract. 2. **Summarize Key Obligations and Rights:** For each primary party, list their main obligations and corresponding rights. 3. **Identify Critical Clauses (and their implications):** Pinpoint and briefly explain the significance of the following clause types if present: a. **Term and Termination:** Duration, renewal, and conditions for ending the agreement. b. **Governing Law and Jurisdiction:** Applicable legal framework and dispute resolution forum. c. **Indemnification/Limitation of Liability:** Provisions regarding financial responsibility for damages. d. **Confidentiality:** Requirements for protecting sensitive information. e. **Payment Terms (if applicable):** Specifics on compensation, schedule, and currency. f. **Force Majeure:** Events excusing performance due to unforeseeable circumstances. g. **Representations and Warranties:** Factual statements and guarantees made by parties. 4. **Assess Key Risks:** Identify potential legal, financial, or operational risks for each party based on the contract's terms. Categorize them as high, medium, or low. 5. **Propose Mitigation Strategies:** For each identified high or medium risk, suggest actionable strategies to mitigate or address it. 6. **Overall Conclusion and Recommendations:** Provide a concise summary of the contract's strengths and weaknesses and offer overall recommendations for review or revision. Contract Text: [INSERT CONTRACT TEXT HERE]
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt leverages a structured, chain-of-thought approach, breaking down the complex task into manageable, sequential steps. It explicitly assigns a persona ('expert legal analyst') to guide the model's response style and depth. By specifying critical clause types and requiring risk assessment with mitigation, it directs the model to perform a thorough, actionable analysis rather than a vague overview. The explicit numbering and bolding improve readability and ensure all required aspects are addressed, leading to more consistent and comprehensive output. It also anticipates common legal contract elements, making the analysis more targeted.

0%
Token Efficiency Gain
The optimized prompt will consistently produce a more detailed and structured analysis than the naive prompt.
The optimized prompt will be less prone to hallucination of irrelevant details due to its focused instructions.
The optimized prompt will explicitly address risk mitigation, which the naive prompt may omit.

Ready to stop burning tokens?

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

Optimize My Prompts