We all know that writing a good prompt greatly improves the output that an AI generates (as they say, garbage in garbage out). The problem is that it takes time and iterations to learn what makes a good prompt for a given task. OpenAI recently launched a solution: the Prompt Optimizer tool. In short, it's a way to use AI to tell you you how to best interact with AI. After testing this tool on various legal tasks, I believe it is a game-changer.
The tool essentially takes your rough, conversational prompt and transforms it into something that follows OpenAI's internal best practices for GPT-5. The AI reviews your instructions and rewrites them for maximum effectiveness. For litigators who are already stretched thin, this means spending less time iterating on prompts and more time reviewing substantive outputs.
What the Optimizer Actually Does
According to OpenAI's prompting guide, the optimizer restructures prompts to leverage the following key principles that GPT-5 was specifically trained on:
Structured Planning Requirements: The optimizer adds explicit instructions for the AI to create checklists and rubrics before executing tasks. This mirrors how senior associates train juniors—outline your approach first, then execute.
Clear Output Specifications: Instead of leaving format ambiguous, optimized prompts define exactly how information should be presented. This eliminates the back-and-forth of "can you reformat this as..."
Validation Steps: The tool adds instructions for the AI to verify its own work—checking for gaps, confirming all requirements were met, and noting any limitations. This is essentially building quality control directly into the prompt.
Context Preservation: For complex tasks, the optimizer ensures the AI maintains awareness of all relevant information throughout its analysis, preventing the common problem of the model "forgetting" earlier instructions.
Real-World Example: Contract Breach Analysis
Let's walk through an actual optimization I ran.
The Original Prompt
I started with this straightforward instruction:
"You are a senior litigation associate at an Amlaw 50 international firm. You are defending a client who is being sued for breach of contract. Your task is to analyze the claims in the attached complaint, understand them thoroughly, and then analyze the attached employment contract that is at stake in the litigation. Please provide a detailed summary of the plaintiffs' claims as they relate to the contract and evaluate all of plaintiffs' interpretations of the contract against your reading of the actual language of the contract. Please let me know if you have any clarifying questions before beginning."
This prompt seems comprehensive enough, right? It establishes role, context, and deliverables. But watch what the optimizer does with it.
The Optimized Version
After running it through the optimizer, here's what emerged:
Developer: # Role and Objective
- Act as a senior litigation associate at an Amlaw 50 international firm tasked with analyzing a breach of contract case.
# Checklist
- Begin with a concise checklist (3-7 bullets) of the steps you will take; keep items conceptual, not implementation-level.
# Instructions
- Carefully review and understand the claims set out in the attached complaint.
- Analyze the attached employment contract that is the subject of the litigation.
- Provide a comprehensive summary of the plaintiffs' claims, focusing specifically on how each claim relates to the contract in question.
- Critically evaluate each of the plaintiffs' interpretations of the contract clauses, referencing and comparing them to your own reading of the contract’s actual language.
- If any aspect of the complaint, claims, or contract is unclear or requires further information, request clarification before proceeding with the analysis.
# Context
- Attached documents: Complaint and Employment Contract.
- Litigation involves allegations of breach of contract.
# Reasoning Steps
- Thoroughly review both documents.
- Map each plaintiff claim to the relevant contractual provisions.
- Assess the validity of each claim based on the contract language.
# Output Validation
- After summarizing claims or providing analysis, briefly validate each finding and indicate whether further clarification is needed or if the review is complete.
# Output Format
- Summarize the plaintiffs' claims as they pertain to the contract.
- Provide a side-by-side evaluation of the plaintiffs' contract interpretations versus your analysis.
- Highlight any areas requiring clarification before you proceed.
# Stop Conditions
- Provide initial analysis only after all clarifications are resolved, or state outstanding questions if more information is required before continuing.
# Reasoning Effort
- Set reasoning_effort=medium to balance thorough analysis and efficiency; outputs should be detailed yet concise.
Key Lessons: What Makes a Better Prompt
Add Process Before Product

The optimized prompt starts with "Begin with a concise checklist..." forcing the AI to plan before executing. This improves the coherence of complex analyses. In legal work, this mirrors how we're trained: issue-spot first, then analyze.
Handle Edge Cases Explicitly
Notice how the optimized version addresses what to do if documents are unclear or unreadable? The original prompt assumed everything would work perfectly. The optimizer adds contingency planning—essential for real-world legal work where documents are often partially redacted or poorly scanned.
Structure the Output Upfront

Instead of asking for "a detailed summary," the optimized prompt specifies exact sections with clear headers. This isn't just about aesthetics; it ensures comprehensive coverage and makes the output immediately usable for legal memos or client communications.
Build in Quality Control

The "Output Validation" section forces the AI to double-check its work and explicitly flag any gaps. This self-verification step catches oversights that might otherwise require multiple rounds of prompting.
Stop Conditions

The optimized prompt includes a condition that requires the AI to provide its initial analysis "only after all clarifications are resolved" or to "state outstanding questions if more information is required before continuing." This clarity prevents the AI from conducting substantial analysis and potentially making assumptions when it lacks necessary data.
Practical Tips for Litigation Use Cases
Start Specific, Not Generic: Feed the optimizer prompts with concrete legal contexts rather than abstract instructions. "Analyze this deposition for inconsistencies" becomes much more powerful when you specify the claims at issue and the witness's role.
Include Domain Context: The optimizer respects legal terminology and concepts. Use terms like "burden of proof," "material breach," or "choice of law provision." The optimizer will maintain this specificity.
Request Reasoning Visibility: Add instructions like "explain your reasoning" before optimization. The tool often transforms this into structured analytical frameworks that mirror legal reasoning patterns.
Iterate on Complex Tasks: For multi-document review or complex litigation strategy, run the optimizer multiple times with variations. Each iteration reveals different structural improvements you can combine.
Test with Representative Data: Before deploying an optimized prompt on sensitive client materials, test it with public court filings in similar matters. This validates that the optimization actually improves output quality for your specific use case.
The Bottom Line
OpenAI's Prompt Optimizer is a force multiplier for legal professionals already using GPT, or a wrapper that utilizes a GPT model (such as Harvey or Legora). By understanding what the optimizer does and why it works, you can craft better initial prompts and recognize when optimization will provide the most value.
The transformation from my original contract analysis prompt to the optimized version illustrates a broader principle: effective AI use in legal practice requires structured thinking, explicit instructions, and built-in quality control. The optimizer teaches us these patterns while immediately improving our outputs.
For BigLaw litigators constantly balancing efficiency with accuracy, this tool offers something invaluable: a systematic way to ensure AI assistance meets professional standards without extensive prompt engineering expertise. The key is understanding not just how to use the optimizer, but what it's teaching us about effective AI interaction.
Remember—the optimizer works best when you start with clear intent and specific requirements. It won't fix a fundamentally confused prompt, but it will transform a good prompt into a better one. Give it a shot and let me know what you think. Here's the link again: https://platform.openai.com/chat/edit?models=gpt-5&optimize=true