The 6 Guards of QWED-Legal
Each guard uses a deterministic engine to verify a specific aspect of legal documents.1. DeadlineGuard 📅
Purpose: Verify date calculations in contracts.The Problem
LLMs frequently miscalculate deadlines:- Confuse business days vs calendar days
- Ignore leap years
- Forget jurisdiction-specific holidays
The Solution
Features
| Feature | Description |
|---|---|
| Business vs Calendar | Automatically detects “business days” vs “days” |
| Holiday Support | 200+ countries via python-holidays |
| Leap Years | Handles Feb 29 correctly |
| Natural Language | Parses “2 weeks”, “3 months”, “1 year” |
2. LiabilityGuard 💰
Purpose: Verify liability cap and indemnity calculations.The Problem
LLMs get percentage math wrong:- “200% of 15M” ❌ (Should be $10M)
- Float precision errors on large amounts
- Tiered liability miscalculations
The Solution
Additional Methods
3. ClauseGuard ⚖️
Purpose: Detect contradictory clauses using formal logic.The Problem
LLMs miss logical contradictions:- “Seller may terminate with 30 days notice”
- “Neither party may terminate before 90 days”
The Solution
Detection Types
| Conflict Type | Description |
|---|---|
| Termination | Notice period vs minimum term |
| Permission/Prohibition | ”May” vs “May not” |
| Exclusivity | Multiple exclusive rights |
4. CitationGuard 📚
Purpose: Verify legal citations are properly formatted and potentially real.The Problem
The Mata v. Avianca scandal: Lawyers used ChatGPT, which cited 6 fake court cases. They were fined $5,000 and sanctioned.The Solution
Supported Reporters
| Category | Examples |
|---|---|
| Supreme Court | U.S., S.Ct., L.Ed., L.Ed.2d |
| Federal | F., F.2d, F.3d, F.4th, F.Supp. |
| State | Cal., N.Y., Tex., Ill., Pa. |
| Regional | A., N.E., N.W., P., S.E., S.W., So. |
Batch Verification
Statute Citations
5. JurisdictionGuard 🌍
Purpose: Verify choice of law and forum selection clauses.The Problem
LLMs miss jurisdiction conflicts:- Governing law in one country, forum in another
- Missing CISG applicability warnings
- Cross-border legal system mismatches
The Solution
Features
| Feature | Description |
|---|---|
| Choice of Law | Validates governing law makes sense for parties |
| Forum Selection | Checks forum vs governing law alignment |
| CISG Detection | Warns about international sale of goods conventions |
| Convention Check | Verifies Hague, NY Convention applicability |
Convention Check
6. StatuteOfLimitationsGuard ⏰
Purpose: Verify claim limitation periods by jurisdiction.The Problem
LLMs don’t track jurisdiction-specific limitation periods:- California breach of contract: 4 years
- New York breach of contract: 6 years
- Different periods for negligence, fraud, etc.
The Solution
Supported Jurisdictions
| Jurisdiction | Breach of Contract | Negligence | Fraud |
|---|---|---|---|
| California | 4 years | 2 years | 3 years |
| New York | 6 years | 3 years | 6 years |
| Texas | 4 years | 2 years | 4 years |
| UK/England | 6 years | 6 years | 6 years |
| Germany | 3 years | 3 years | 10 years |
| India | 3 years | 3 years | 3 years |
Compare Jurisdictions
All-in-One: LegalGuard
For convenience, use the unifiedLegalGuard class:
Next Steps
- Examples - Real-world scenarios
- Troubleshooting - Common issues