Use cases / Legal & Compliance

Memory for legal & compliance

In legal work, a contract amendment signed years later changes the active terms without editing the original PDF. Standard search pulls both files and confuses the model. / ml tracks which clause is active, filters by effective date, and cites the exact section.

Main Problem Solved Amendments overriding base contracts
Version History Full change log & date filters
Token Savings 96% fewer tokens vs full-PDF dumps
Lookup Speed ~10 ms

What you are building

How it works
1. Contracts
MSAs, SOWs, Addenda
Signed agreements and newer amendments
2. / ml Memory
Tracks every version
Knows which clause replaced an older one and when
3. Legal review
Exact clause & date
Cites the active terms, section, and effective date

A specialized AI copilot for in-house legal counsel, procurement teams, contract managers, and compliance auditors. It conducts high-stakes contract diligence and regulatory review:

  • "What is our aggregate liability cap under the Acme Master Agreement, taking into account all subsequent addenda?"
  • "Which enterprise customers have non-standard data processing terms that prohibit subprocessor transfers without 30 days prior written notice?"
  • "What were our data retention obligations under the European vendor agreements on June 15, 2024, prior to the GDPR schedule update?"
  • "Does this newly proposed vendor statement of work (SOW) conflict with governing warranty provisions in the parent MSA?"

Legal analysis demands precision: every assertion must cite the exact governing agreement, amendment number, section, and effective execution date.

Why memory decides whether it works

Standard RAG fails on legal contracts because later amendments override earlier terms:

  • Amendments get buried: A 2024 addendum overrides a 2021 MSA liability cap, but vector search returns both and the model cites the older base contract.
  • No historical date filtering: Static vector indexes cannot filter which clauses were in force on a specific past date.
  • Cross-matter leaks: Client and counterparty records must stay strictly isolated by matter and entity.
  • Uncited paraphrases: Counsel cannot rely on a summary unless it cites the exact agreement, section, and effective date.

What / ml provides

Full Clause Change Log

When an amendment updates a clause, / ml serves the new wording while keeping every earlier version and date in the history log.

Filter by Date & Client

Search clauses by effective date, client, or contract status so you can check either current terms or what applied on a past date.

Locked Records & Auto-Expiry

Lock signed clauses so they cannot be edited by mistake, and set expiration dates for automatic retention cleanup.

Private Cloud or Self-Hosted

Run / ml sovereign as a single binary inside your own AWS or GCP VPC, or use isolated vaults on / ml Cloud.

Cost and token economics

Enterprise contracts and addenda often span 100+ pages per client. Pasting full PDFs into every prompt costs dollars per question and makes models miss key details.

Tokens Used Per Contract Question

Pasting full contract PDFs: ~42,000 tokens ($0.21 per question)

/ ml matching clauses only: ~1,450 tokens ($0.0072 per question)

Result: 96% lower token cost with exact clause citations.

Across 5,000 contract reviews a month, / ml cuts model spend from $1,050 to under $36 while keeping answers grounded in the actual contract text.

Getting there

1

Save signed agreements with effective dates

Send contract clauses and schedules to / ml along with the client name, document title, section number, and effective date.

2

Update clauses when amendments are signed

When a new addendum changes an existing section, update that clause in / ml so live searches return the new terms while the history log keeps the original text.

3

Filter by active status or past date

Filter your search by status: active for current obligations, or filter by effective_date to see what was in force at an earlier date.

4

Require exact citations in the reply

Have your assistant cite the contract filename, section number, and effective date for every answer it gives.

Code example

Ingesting an MSA and amendment, then querying operative or historical terms via Boolean metadata filters:

import os
from slashml import Memory

mem = Memory(api_key=os.environ["SLASHML_API_KEY"])

# 1. Ingest base Master Services Agreement signed in 2023
mem.add(
    "Section 12.1 (Limitation of Liability): Neither party shall be liable for indirect damages. Aggregate liability shall not exceed $1,000,000 USD.",
    user_id="contract-acme-corp",
    metadata={
        "document": "Acme-MSA-2023.pdf",
        "clause": "12.1",
        "effective_date": "2023-05-10",
        "status": "superseded"
    }
)

# 2. Ingest Amendment No. 1 signed in 2025 modifying Section 12.1
mem.add(
    "Amendment No. 1, Section 3 (replaces Section 12.1): Aggregate liability shall not exceed $5,000,000 USD, except for data breaches which are uncapped.",
    user_id="contract-acme-corp",
    metadata={
        "document": "Acme-Amendment-1-2025.pdf",
        "clause": "12.1",
        "effective_date": "2025-01-15",
        "status": "active"
    }
)

# 3. Query current operative liability cap
current = mem.search(
    "What is the aggregate liability cap for Acme Corp?",
    user_id="contract-acme-corp",
    filters={"status": "active"}
)
print("Current Term:", current["results"][0]["memory"])

# 4. Historical audit: filter clauses effective on or before 2024-06-01
audit_2024 = mem.search(
    "What is the aggregate liability cap for Acme Corp?",
    user_id="contract-acme-corp",
    filters={"effective_date": {"lte": "2024-06-01"}}
)
print("Historical Term (2024):", audit_2024["results"][0]["memory"])

Frequently asked questions

Q Can / ml track past clause versions for audits?

Yes. Every update saves the previous text and timestamp in the change history, and you can also filter clauses by effective date.

Q Can we lock signed clauses so they cannot be edited by mistake?

Yes. You can mark signed clauses as immutable when saving them to block accidental edits, and set an expiration_date for automatic retention rules.

Q Is our legal data ever used to train models?

No. Customer data is never used to train models. Each API key has its own isolated vault, deletions finish in 6.41 ms, and / ml sovereign can run entirely inside your own private VPC.

Q Can we export memory records for legal discovery?

Yes. You can export filtered memory records as JSON at any time, or receive real-time webhooks whenever records are added, updated, or deleted.

Bring precision memory to legal workflows

Eliminate contract amendment confusion and build auditable legal copilots with / ml.