Sriganesh Srinivasan
← All work

Legal AI.

Agents and data pipelines for a law firm

2026 · AI Data Engineer Intern · Fenwick & West · Shipped

Legal AI
Problem
The firm's client data was spread across a CRM, third-party funding and litigation databases, and a document system. Answering "which clients should we talk to now?" or "what's in this contract?" meant hours of manual digging.
Built
Agentic AI systems where the agent is one part of an engineered pipeline. Language models handle plain-language requests and write summaries; parallelized API calls, JSON schemas and normalized data models do the rest.
Stack
Python, Spark SQL, Databricks, Writer agents, Salesforce API, iManage API, Lex Machina, JSON Schema
Outcome
Each run of the scoring engine surfaces $5M+ in cross-sell opportunities, two existing automations got 50% faster, and attorneys get case briefings in under 5 minutes.

I spent the summer on the Marketing Operations team treating each AI project as an engineering problem first. Prompting a model was the easy part. The value came from what I built around it: rate limits and access control, parallel API calls, schemas for structured input and output, and version control throughout.

The signal-scoring engine

Partners want to know which existing clients are about to need more legal work. I took a hardcoded Python script written for one practice area, Life Sciences, and turned it into a configurable pipeline that works for any of them.

Signal-scoring engine architectureA user asks in plain language. A Writer agent compiles the request into a JSON-schema scoring configuration. A Python pipeline reads that configuration, calls Salesforce, PitchBook, Lex Machina and ClinicalTrials.gov in parallel, scores each client on 14 or more weighted signals, and writes a tier-ranked Excel report.USERAsks a questionin plain languageWRITER AGENTCompiles a configsignals and weightsJSON SCHEMAPYTHON PIPELINEScore every client14+ weighted signalsEXCEL REPORTClients ranked by tierT1 Priority · T2 Act Now · T3 WatchPARALLEL CALLSCRMSalesforceFUNDINGPitchBookLITIGATIONLex MachinaTRIALSClinicalTrials.gov
Dashed: live external data. The agent only writes the config; the scoring is plain, deterministic Python.

I validated it with a live production run on real clients, then packaged it as a Writer skill with documentation and a configuration guide so other teams could run it.

Contract intelligence pipeline

A pipeline from the firm’s document management system, iManage, into Databricks. It pulls contracts, extracts their key terms and writes a briefing for each, and lands everything as tables people can query. I adapted a standalone parsing script into something that runs top to bottom on a fresh Databricks cluster with no manual setup.

Contract intelligence pipelineContracts are pulled from the iManage document system over its REST API with OAuth. On Databricks, a Python pipeline parses DOCX and PDF files in memory, reads iManage metadata, extracts contract terms with deterministic rules, sends each document to a Claude model on Databricks model serving for a briefing, and writes the results to query-ready tables. Credentials live in Databricks secret scopes.IMANAGE DMSContractsREST APIDATABRICKS · PYTHON · SECRETS IN SCOPESContract pipeline01Parse in memoryDOCX and PDF · tables kept · signed vs template02Read metadatadocument ID, client, matter, workspace03Extract terms with rulestype, counterparty, dates, renewal, pricing model04Write a briefingsummary, obligations, critical dates05Land as tablesquery-ready in DatabricksOAUTHMODEL SERVINGClaude endpointreal-time inference
Dashed: the firm's document system. Rules pull the facts; the model only writes the briefing.

A live run on real signed agreements (SaaS, master service and enterprise vendor contracts) correctly picked out counterparties, contract values and renewal-notice deadlines.

Smaller systems

Next projectSmartRoomThing →