IdeaCredIdeaCred

aarushi211/Summarization-of-TOS

69

This is a legal AI system that generates executive summaries and clause-grounded answers from long TOS documents. It is optimized for CPU-only deployement

What's novel

This is a legal AI system that generates executive summaries and clause-grounded answers from long TOS documents. It is optimized for CPU-only deployement

Code Analysis

15 files read · 4 rounds

A RAG-based legal document analysis system that ingests Terms of Service PDFs, performs structure-aware chunking, hybrid retrieval (dense + BM25 with RRF fusion), cross-encoder reranking, and grounded Q&A with legal safety guards, served via a FastAPI backend with SSE streaming and a Next.js fronten

Strengths

Genuinely production-oriented engineering: structured JSON logging with request correlation, SSRF-safe URL validation, streaming error boundaries that prevent client hangs, dual-mode (desktop/server) vector store abstraction, and a thoughtful two-stage extract-then-synthesize QA pipeline with legal safety regexes and abstention logic. The evaluation suite (faithfulness LLM-as-judge with NLI fallback, adversarial red-team testing) shows real depth beyond a typical RAG demo.

Weaknesses

The core RAG pipeline (hybrid retrieval + reranking + grounded QA) is a well-executed but standard pattern — the novelty lies in the legal-domain-specific touches (structure-aware chunking for legal headers, query expansion synonyms, safety guards) rather than algorithmic innovation. The engine.py file at 34KB is a monolith that could benefit from further decomposition, and the two-stage QA prompt engineering, while thoughtful, is brittle to model changes.

Score Breakdown

Innovation
6 (25%)
Craft
56 (35%)
Traction
8 (15%)
Scope
77 (25%)

Signal breakdown

Innovation

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

Craft

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

Traction

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

Scope

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

Evidence

Commits

137

Contributors

3

Files

133

Active weeks

10

TestsCI/CDREADMELicenseContributing

Repository

Language

Python

Stars

3

Forks

0

License