Redline
You clicked “I Agree.” But what actually changed?
Most of us have clicked “I Agree” hundreds of times without reading the terms underneath it.
The frustrating part is not that legal documents are long. It is that they can change quietly.
A company can update a clause about your content, personal data, arbitration, liability, or termination, and the next time you open the app, the only thing you see is:
Updated Terms. Please review and accept.
But what changed?
That question is what led us to build Redline.
Redline is a Git diff for the fine print. Instead of summarizing an entire Terms of Service document, it compares two versions structurally and finds the changes that actually matter.
The idea
Traditional document comparison breaks as soon as a company:
- moves a clause
- changes the wording
- reorganizes sections
- splits one clause into several
- rewrites something without changing its topic
A line-by-line diff is not enough.
So we built Redline around a different approach:
Old Policy New Policy
↓ ↓
Clause Segmentation Clause Segmentation
↓ ↓
Embeddings Embeddings
\ /
\ /
Semantic Alignment
↓
Lexical Diff
↓
Legal Signals
↓
Concept Extraction
↓
Direction + Severity
↓
Redline
The system semantically aligns clauses using pgvector embeddings and one-to-one Hungarian matching, so a clause can still be recognized even when its position or wording changes.
Then we inspect the actual textual change.
Redline detects signals such as:
- perpetual or sublicensable content licenses
- expanded data sharing
- broader tracking or profiling
- arbitration requirements
- class-action waivers
- increased liability protection
- stronger deletion rights
- narrower user rights
The result is not just:
“These paragraphs are different.”
It becomes:
“This changed in a way that is more favorable to the company. Here is the exact evidence.”
The moment that made the idea click
Imagine opening the comparison and seeing:
CRITICAL
COMPANY-FAVORABLE
User Content → License
OLD
You grant us a limited license to use your content...
NEW
You grant us a perpetual, worldwide, sublicensable license...
Redline highlights exactly what disappeared and what was added.
Then it tells you why:
The new version materially expands the company's rights over content you upload.
That is the moment we wanted the product to create.
Not another AI summary.
A moment of:
“Wait. They changed that?”
Why we did not build another summarizer
We deliberately avoided the obvious approach:
Document → LLM → Summary
A summary can tell you what a policy says.
It does not reliably tell you what changed between two versions.
Redline instead treats the problem as a combination of:
document structure + semantic retrieval + evidence extraction + classification
The LLM is not the entire product.
It acts as an adjudicator after the system has already gathered evidence.
That distinction matters.
What we built
1. Legal clause segmentation
Redline preserves hierarchical legal structure such as:
1.
1.1
2.3
(a)
(b)
I.
II.
and recognizes major sections such as:
Privacy
User Content
Arbitration
Liability
Termination
2. Semantic clause alignment
Each clause is embedded and stored using pgvector.
We construct a similarity matrix and use Hungarian one-to-one matching rather than simply matching each clause to its nearest neighbor.
That allows Redline to survive:
- reordered clauses
- rewritten sentences
- renamed headings
- structural changes
3. Evidence-first classification
Before an AI model makes a judgment, Redline extracts:
- lexical additions/removals
- legal signals
- legal concepts
- semantic similarity
- rule-based evidence
The classifier then receives that evidence as context.
4. Direction and severity
Every meaningful change is classified as:
USER-FAVORABLE
COMPANY-FAVORABLE
NEUTRAL
MIXED
UNCERTAIN
with severity:
LOW
MEDIUM
HIGH
CRITICAL
We also expose confidence instead of pretending every result is equally certain.
5. Provenance
A major challenge was avoiding a fake demo.
Redline preserves:
- original source
- source type
- retrieval time
- effective date
- SHA-256 fingerprint
- normalized document fingerprint
So the system can show not only what changed, but which documents were actually compared.
Building it was harder than expected
The first version looked deceptively simple:
Compare two documents.
In reality, legal text is messy.
A clause can move from section 4 to section 7.
A single sentence can become three clauses.
Formatting can introduce page numbers, repeated headers, broken paragraphs, or malformed HTML.
A scanned PDF can contain almost no machine-readable text at all.
Even worse, a semantic match can look convincing while still being wrong.
That forced us to build safeguards instead of hiding uncertainty.
For example, when Redline cannot reliably classify a change, it can say:
UNCERTAIN
rather than inventing a conclusion.
When a scanned PDF cannot be reliably extracted, it returns:
OCR_REQUIRED
rather than pretending it understood the document.
That behavior became one of the principles of the project:
Redline should never manufacture certainty just to look intelligent.
What we learned
The biggest lesson was that useful AI systems are often built by constraining the model, not giving it more freedom.
The strongest version of Redline is not:
“Here is an LLM. Read this contract.”
It is:
Structure the document.
Find the corresponding clauses.
Measure the textual difference.
Extract evidence.
Identify legal concepts.
Then let the model adjudicate.
The model becomes one component of a transparent pipeline rather than the pipeline itself.
Built with
Frontend
- React
- TypeScript
- Tailwind CSS
Backend
- Python
- FastAPI
- SQLAlchemy
Data / Search
- PostgreSQL
- pgvector
- semantic embeddings
AI
- Mistral structured adjudication
- Pydantic-validated JSON outputs
- deterministic legal rule engine fallback
Document Processing
- pypdf
- BeautifulSoup
- python-docx
- custom legal clause segmentation
- deterministic normalization pipeline
Engineering
- Docker
- pytest
- 82+ automated tests
- provenance and SHA-256 source fingerprinting
The result
Redline turns a wall of legal text into a much simpler question:
What changed, who benefits, and why should I care?
That is the product we wanted.
Not a lawyer.
Not a generic AI summarizer.
Not another chatbot.
A forensic diff engine for the fine print.
Because “Updated Terms” is not an explanation.
And “I Agree” should not mean “I never noticed.”
What's next
The natural next step is turning Redline into a continuous policy-change monitor that can watch selected policies over time and surface only the changes worth your attention.
Until then, the core idea remains simple:
Read less. Notice more.
Built With
- ai-agents
- docker
- document-processing
- embeddings
- fastapi
- legaltech
- llm
- machine-learning
- mistral
- natural-language-processing
- pgvector
- postgresql
- pytest
- python
- rag
- semantic-search
- sqlalchemy
Log in or sign up for Devpost to join the conversation.