IdeaCredIdeaCred

Psukhe777/LexRisk

71

The AI Safety Gauge for Legal Contracts. ⚖️ Scans PDFs, detects predatory clauses, and scores risk using Llama-3 & Cosine Similarity.

What's novel

The AI Safety Gauge for Legal Contracts. ⚖️ Scans PDFs, detects predatory clauses, and scores risk using Llama-3 & Cosine Similarity.

Code Analysis

7 files read · 3 rounds

A Streamlit-based contract risk analysis tool that uses NLP semantic pre-filtering (100-clause predatory pattern library with sentence-transformer embeddings) to reduce LLM API calls, then routes high-risk chunks to Groq/OpenAI for legal analysis with jurisdiction-specific rule overlays (Federal/Cal

Strengths

The NLP pre-filtering engine with a curated 100-clause predatory pattern library and cosine similarity matching is a genuinely useful optimization that reduces LLM costs. The jurisdictional rules engine with real legal citations (CCPA, GDPR, TCPA, FTC) and the deterministic liability calculator show real domain knowledge and non-trivial implementation depth.

Weaknesses

The flat file structure with 47 top-level modules and no package organization makes the codebase hard to navigate and maintain. The redliner's fuzzy matching uses O(n*m) sliding window with SequenceMatcher which will be extremely slow on large contracts, and the overall architecture lacks proper error recovery for LLM JSON parsing failures.

Score Breakdown

Innovation
5 (25%)
Craft
67 (35%)
Traction
6 (15%)
Scope
72 (25%)

Signal breakdown

Innovation

Not Fork+1
Code Novelty+1
Concept Novelty+1

Craft

Ci+0
Tests+8
Polish+0
Releases+0
Has License+5
Code Quality+20
Readme Quality+15
Recent Activity+7
Structure Quality+5
Commit Consistency+2
Has Dependency Mgmt+5

Traction

Forks+0
Stars+6
Hn Points+0
Watchers+0
Early Traction+0
Devto Reactions+0
Community Contribs+0

Scope

Commits+8
Languages+5
Subsystems+10
Bloat Penalty+0
Completeness+7
Contributors+5
Authored Files+8
Readme Code Match+3
Architecture Depth+5
Implementation Depth+8

Evidence

Commits

66

Contributors

1

Files

21

Active weeks

3

TestsCI/CDREADMELicenseContributing

Repository

Language

Python

Stars

1

Forks

0

License

MIT