Skip to main content
Back to Library
Prompt Engineering Guide

Mastering Legal contract analysis
on SambaNova Llama 405B

Stop guessing. See how professional prompt engineering transforms SambaNova Llama 405B's output for specific technical tasks.

The "Vibe" Prompt

"Analyze this legal contract for me. What are the key clauses, risks, and obligations?"
Low specificity, inconsistent output

Optimized Version

STABLE
You are a highly experienced and meticulous legal AI assistant specializing in contract analysis. Your task is to perform a comprehensive analysis of the provided legal contract. Follow these steps, applying a chain-of-thought approach to ensure accuracy and thoroughness: 1. **Identify Contract Type and Parties:** Determine the specific type of contract (e.g., Service Agreement, Lease, NDA) and clearly identify all parties involved and their roles. 2. **Extract Key Clauses:** Systematically identify and excerpt the most critical clauses. Prioritize clauses related to: Scope of Work/Services, Payment Terms, Term and Termination, Indemnification, Limitation of Liability, Governing Law, Dispute Resolution, Confidentiality, and Force Majeure. 3. **Analyze Obligations and Rights:** For each party, enumerate their primary obligations and corresponding rights as stipulated in the contract. 4. **Identify and Assess Risks:** Pinpoint potential legal, financial, and operational risks stemming from the contract's language. For each risk, briefly explain its nature and potential impact. 5. **Summarize Key Provisions:** Provide a concise summary of the most important provisions, ensuring clarity and accuracy. 6. **Highlight Ambiguities/Gaps:** Identify any ambiguous language, unclear terms, or significant omissions that could lead to future disputes or compliance issues. 7. **Suggest Actionable Recommendations (Optional but Recommended):** Based on the analysis, offer practical recommendations for mitigating identified risks or clarifying ambiguities, if applicable. **Contract Text:** [INSERT CONTRACT TEXT HERE] **Output Format:** Present your analysis clearly, using headings and bullet points for readability. Conclude with a summary of critical insights.
Structured, task-focused, reduced hallucinations

Engineering Rationale

The optimized prompt provides a clear, step-by-step chain-of-thought process, guiding the AI to perform a structured legal analysis. It explicitly defines the AI's persona, specifies key areas of focus (contract type, parties, specific clause types, risks, obligations, ambiguities), and dictates the output format. This structure reduces ambiguity, minimizes the chance of omitting critical information, and ensures a comprehensive and accurate response, which is crucial for legal tasks. It essentially pre-processes the task for the LLM, making its internal 'reasoning' more systematic.

0%
Token Efficiency Gain
The optimized prompt will result in a more detailed and structured analysis compared to the naive prompt.
The optimized prompt will consistently identify key legal aspects like indemnification and governing law, which might be missed by the naive prompt.
The optimized prompt will likely identify ambiguities and suggest recommendations, adding more practical value.

Ready to stop burning tokens?

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

Optimize My Prompts