A legal process in electronic discovery (eDiscovery) where machine learning algorithms are used to prioritize, classify, and review large volumes of documents for relevance and privilege.
Using AI to read and sort through millions of legal documents during a lawsuit to find the important ones, instead of forcing human lawyers to read every single page. You teach the AI what you are looking for, and it finds the rest.
Technology-Assisted Review (TAR), often referred to as “predictive coding,” fundamentally changes the economics of litigation. Instead of linear, manual review, TAR uses supervised machine learning. A senior attorney reviews a small “seed set” of documents, coding them as relevant or not. The algorithm learns these patterns and applies them to the entire document corpus.
A highly trained librarian. Instead of reading every book in a library of millions to find a specific topic, you give the librarian 100 examples of what you want. The librarian learns the pattern and instantly pulls the exact books you need from the millions of shelves.
# Conceptual: Simulating a TAR 1.0 workflow using scikit-learn
# Training a model on a "seed set" to classify the rest of the document corpus.
import pandas as pd
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.svm import LinearSVC
from sklearn.pipeline import make_pipeline
# 1. The "Seed Set": A small batch of documents manually coded by a senior attorney
seed_data = pd.DataFrame({
'text': ["Contract breach on page 4", "Lunch menu for Tuesday", "Email regarding the merger NDA", "Office supply order"],
'relevant': [1, 0, 1, 0] # 1 = Relevant to the case, 0 = Not relevant
})
# 2. Build the TAR pipeline (TF-IDF + Support Vector Machine)
tar_model = make_pipeline(TfidfVectorizer(stop_words='english'), LinearSVC())
# 3. Train the model on the seed set
tar_model.fit(seed_data['text'], seed_data['relevant'])
# 4. Apply to the massive document corpus
corpus = ["Memo about the merger", "Gym membership receipt", "Draft of the settlement agreement"]
predictions = tar_model.predict(corpus)
for doc, pred in zip(corpus, predictions):
print(f"Relevant: {bool(pred)} | Document: {doc}")