AI integration for Relativity is not about replacing the platform but extending its core surfaces—Processing, Analytics, Review, and Workspace management—through its robust API and event system. The primary integration points are: 1) Relativity Scripts and Event Handlers to inject AI logic into document processing and review workflows; 2) the REST API to create and update custom objects, push AI-generated tags, and enrich document fields; and 3) Custom Pages to build reviewer-facing AI copilots and dashboards. This allows AI to act as a co-processor, analyzing content as it moves through the EDRM pipeline.
Integration
AI Integration for Relativity

Where AI Fits into the Relativity Stack
A practical guide to extending Relativity's native analytics, custom objects, and review workflows with custom AI agents and LLMs.
High-impact implementations focus on augmenting specific, manual-heavy workflows. For example, an AI agent can be triggered via an Event Handler on document ingestion to perform initial PII/PHI detection, automatically applying redaction placeholders or tagging documents for privilege review. Another agent, invoked from a Relativity Script in a review batch, can summarize deposition transcripts or extract key clauses from contracts, writing the results to a custom object linked to the source document. For continuous active learning, a custom model can analyze reviewer coding decisions via the API to prioritize the review queue or suggest new concept clusters beyond Relativity's native analytics.
Rollout requires a governed, phased approach. Start with a pilot workspace, using a service account with appropriate permissions to call external AI services. Implement audit logging for all AI-generated actions and maintain a human-in-the-loop for critical decisions like privilege calls. Performance hinges on structuring prompts with Relativity's fielded data (metadata, extracted text) and managing API rate limits and token windows for long documents. The goal is a seamless layer where AI accelerates tasks, but all outputs remain traceable, editable, and within Relativity's security and review protocols.
Key Integration Surfaces in Relativity
Extending the Relativity Data Model
Relativity's custom objects and fields are the primary surface for injecting AI-generated insights directly into the review workspace. This is where you store structured outputs from LLMs—like extracted entities, summaries, sentiment scores, or issue codes—making them searchable, reportable, and actionable for reviewers.
Common Integration Patterns:
- Create a "Document Intelligence" custom object with fields for
AI_Summary,Key_Topics,Critical_Dates, andPredicted_Relevance_Score. - Use Relativity's REST API or Relativity Scripts to populate these fields after AI processing. For example, after a batch of documents is processed through an external AI service, a script can map the JSON response to the corresponding custom object fields.
- This surface enables AI to act as a pre-review assistant, tagging documents before human eyes see them, which dramatically accelerates early case assessment and review prioritization.
High-Value AI Use Cases for Relativity
Practical AI integration patterns that extend Relativity's native analytics, custom objects, and review workflows via its API and event handlers to accelerate document intelligence and legal operations.
Predictive Coding & Assisted Review Enhancement
Augment Relativity Assisted Review (RAR) with custom models for niche data types (e.g., technical patents, financial chats). Use the Relativity Scripts API to inject model scores as custom fields, enabling hybrid ranking and continuous active learning feedback loops that adapt to specific matter nuances.
Privilege Log Automation
Automate privilege identification and log generation. An AI agent analyzes document content and metadata against legal privilege criteria, then uses the Relativity REST API to create custom objects for privileged documents and auto-populate a privilege log spreadsheet (CSV/Excel) for attorney review, syncing status back to the workspace.
Deposition & Transcript Intelligence
Integrate LLM-powered Q&A and summarization for deposition transcripts. After transcript load files are ingested, an event handler triggers an AI service to generate speaker-attributed summaries, key topic tags, and a searchable Q&A index. Results are written back as extracted text fields or linked custom objects for integration into case chronologies.
Early Case Assessment Workflow
Accelerate initial data triage for scope and cost forecasting. Upon data ingestion, an AI pipeline performs rapid concept clustering, key custodian identification, and risk scoring. Insights are pushed to a Relativity dashboard via the API, populating custom layout fields to guide collection strategy and reviewer allocation from day one.
Production Set QC Agent
Automate quality control for production sets. Before final export, an AI agent validates Bates numbering consistency, family relationships, and redaction integrity by comparing native files to processed images. It flags anomalies via the Relativity API, creating QC tickets in a custom object grid for the production manager to review and resolve.
Multimedia & Foreign Language Analysis
Extend review to non-textual and non-English content. Integrate speech-to-text and translation services for audio/video files and foreign documents. The AI service processes files, generates searchable transcripts/translations, and ingests them as new document families. Key moment tags or translated issue codes are applied as Relativity choices for reviewer workflow integration.
Example AI-Powered Workflows
These workflows illustrate how custom AI agents and LLMs connect to Relativity's API surfaces and data model to automate high-effort tasks, accelerate review, and surface hidden insights. Each pattern is designed for production, considering triggers, data context, agent actions, and system updates.
This workflow uses AI to analyze tagged privileged documents and auto-generate the privilege log spreadsheet, reducing a manual, error-prone process from days to hours.
- Trigger: A reviewer or batch process applies a "Privileged" tag to a document in a Relativity workspace.
- Context/Data Pulled: An event handler or scheduled agent queries the Relativity REST API for all documents with the new tag, fetching:
- Document text (extracted text field)
- Metadata (Custodian, Date, File Type)
- Associated family document IDs
- Any existing reviewer notes on privilege rationale
- Model/Agent Action: A specialized LLM prompt analyzes each document to:
- Classify the privilege type (e.g., Attorney-Client, Work Product, Common Interest).
- Extract the privilege rationale in plain English, citing specific passages.
- Identify the author and recipient from the text and metadata.
- Flag potential inconsistencies (e.g., a non-attorney author on an A-C communication).
- System Update: The agent uses the Relativity API to:
- Create or update a custom object (e.g., "Privilege Log Entry") for each document, storing the AI-generated fields.
- Populate a reporting workspace with a grid view of these objects, ready for final attorney review and export to Excel.
- Optionally, apply a secondary tag (e.g., "AI-Reviewed Privilege") to the original document for tracking.
- Human Review Point: A senior attorney or reviewer audits the generated log entries in the reporting workspace, makes any necessary edits, and approves the final export. The AI handles the bulk summarization and structuring; the human ensures legal accuracy.
Implementation Architecture & Data Flow
A production-ready integration connects custom AI models to Relativity's REST API, Event Handlers, and custom objects to enrich documents and automate workflows without disrupting reviewer operations.
The core integration pattern uses Relativity's REST API and Event Handlers to inject AI processing into existing workflows. A typical flow begins when documents reach a specific review stage or receive a particular tag. An Event Handler triggers, sending document metadata (Control Number, extracted text, native file path) via a secure queue to an external AI service. This service—hosted in your Azure, AWS, or private cloud—processes the batch, running models for classification, summarization, or entity extraction. Results are written back to Relativity as custom objects (e.g., AI Analysis Results) or populate fields on the base Document object, making them instantly available for searching, reporting, and viewer integration.
For real-time or reviewer-initiated actions, the architecture supports Relativity Scripts or a custom HTML page embedded in the viewer. When a reviewer clicks "Summarize Email Thread," a frontend call passes the document ID to a backend agent. This agent retrieves the full thread via Relativity's API, calls an LLM for summarization, and returns the result to the reviewer's interface in seconds, logging the action for audit. This keeps AI as an assistive layer, not a replacement for the platform's native tools. Data flows are governed by Relativity's security model—AI services only receive data the calling user has permission to access, and all outputs are stored within the case workspace, maintaining the chain of custody.
Rollout follows a phased approach: start with a single, high-volume workflow like privilege log generation or issue coding prioritization. Deploy the Event Handler and AI service in a monitoring mode, comparing AI suggestions to human reviewer decisions to calibrate confidence thresholds. Use Relativity's Reporting API to build dashboards tracking AI accuracy and reviewer adoption. For governance, all AI prompts, model versions, and data inputs are logged to a separate audit database, enabling explainability for QC and compliance. This architecture ensures AI augments Relativity's strengths—its robust data model and review workflows—while keeping legal teams in control of final decisions.
Code & Payload Examples
Enrich Documents with AI Tags
Use Relativity's REST API to fetch document batches, process them with an external AI service, and write results back as custom fields or choice lists. This pattern is ideal for batch processing during ingestion or review.
Example Python payload for a batch enrichment job:
pythonimport requests # 1. Query Relativity for documents needing analysis relativity_query = { "condition": "('Processing Status' == 'OCR Complete')", "fields": ["Document Identifier", "Extracted Text", "Control Number"], "start": 0, "length": 50 } # 2. Send to your AI service for analysis ai_payload = { "documents": [ { "id": doc["Control Number"], "text": doc["Extracted Text"][:5000] # First 5k chars } for doc in query_results ], "tasks": ["sentiment", "key_entities", "privilege_indicators"] } # 3. Map AI results back to Relativity field updates update_payload = { "requests": [ { "artifactTypeID": 10, # Document artifact type "artifactID": result["id"], "fieldValues": { "AI Sentiment Score": result["sentiment_score"], "Key Entities": "; ".join(result["entities"]), "Privilege Flag": "Yes" if result["privilege_confidence"] > 0.8 else "No" } } for result in ai_results ] }
This creates an auditable, asynchronous enrichment pipeline that scales with your review set.
Realistic Time Savings & Operational Impact
This table outlines the measurable impact of integrating custom AI agents into core Relativity workflows, based on typical implementations. It focuses on reducing manual effort, accelerating review cycles, and improving consistency.
| Workflow / Task | Before AI Integration | After AI Integration | Implementation Notes |
|---|---|---|---|
Initial Document Prioritization | Manual sampling and keyword search to seed review | AI-driven concept clustering and relevance scoring | AI surfaces hot documents 2-3x faster for first-pass review |
Privilege Log Generation | Manual review and spreadsheet entry per privileged doc | AI auto-identifies privilege triggers, drafts log entries | Human attorney reviews and finalizes AI-generated log; cuts drafting time by 60-80% |
Email Thread Analysis | Reviewer manually reconstructs conversations | AI identifies key messages, participants, and sentiment shifts | Analysis added as custom fields; reduces threading review time by ~50% |
Deposition Transcript Summarization | Manual reading and note-taking for key points | AI provides speaker-attributed summaries and Q&A extraction | Summaries ingested as Relativity documents; enables same-day case strategy updates |
Quality Control (QC) Sampling | Random or rule-based sampling of reviewer decisions | AI targets QC on low-confidence or anomalous coding decisions | Focuses QC effort on highest-risk items, improving defect catch rate |
Production Set Validation | Manual checks for family relationships and Bates sequences | AI agent runs automated checks, flags inconsistencies | Integrated via Relativity Event Handler; prevents errors before final export |
Custodian Identification & Ranking | Manual analysis of communication volume and org charts | AI analyzes content and patterns to rank custodians by relevance | Outputs to Relativity custom objects; informs legal hold scope in hours, not days |
Governance, Security & Phased Rollout
A secure, governed rollout is critical for AI in sensitive legal matters. This blueprint details how to implement AI in Relativity with appropriate controls.
Integrating AI into Relativity requires a security-first architecture that respects the platform's existing RBAC and audit trails. Your implementation should treat the AI as a privileged service account, calling Relativity's REST API or triggering Relativity Scripts and Event Handlers. All AI-generated tags, custom objects, or summaries must be written back with clear provenance metadata (e.g., GeneratedBy: AI_Agent_Name, ModelVersion: 1.2, ConfidenceScore: 0.87). For sensitive workflows like privilege review or internal investigations, consider a human-in-the-loop design where AI suggestions are written to a staging custom object or a dedicated "AI Suggestions" field, requiring reviewer approval before being promoted to production fields like Privilege Designation or Responsiveness.
A phased rollout mitigates risk and builds trust. Start with a non-dispositive, high-volume workflow such as email threading enhancement or near-duplicate detection, where AI output is used for reviewer prioritization but not final coding. Phase two could introduce AI for first-pass issue spotting, applying tags to a AI_Issue_Candidate field for secondary review. The final phase deploys AI for direct workflow automation, such as auto-populating privilege log entries or generating chronology events, but only after establishing high confidence through rigorous QC. Each phase should be scoped to a single matter or a controlled pilot workspace, with performance tracked via Relativity's built-in reporting or a custom dashboard.
Governance is enforced through technical and procedural controls. Implement a model registry to track which AI model (e.g., GPT-4, Claude 3, custom NER) is used for each workflow and matter. Use Relativity's audit log to record all AI-initiated data modifications. For data leaving the environment (e.g., to an external LLM API), ensure a data anonymization or redaction layer is in place, and maintain a record of prompts and payloads for compliance. Finally, establish a rollback protocol to quickly revert AI-applied tags if model drift or an error is detected, leveraging Relativity's mass operations or saved searches to identify affected documents.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Frequently Asked Questions
Common technical and operational questions for integrating custom AI agents and LLMs into the Relativity platform, covering architecture, security, and workflow automation.
A production integration uses Relativity's REST API with service accounts and OAuth 2.0 for authentication. The AI service should run in a secure, private environment (e.g., your VPC or Azure/AWS private subnet).
Typical secure data flow:
- An Event Handler or scheduled Relativity Script triggers on a defined condition (e.g., a batch of documents reaches a "To Be Analyzed" status).
- The script pulls only the necessary document text and metadata fields via the API, using the service account's token. No PII/PHI should be sent unless the AI model is specifically trained and authorized for it.
- Data is sent to the AI service over a private endpoint or VPN. The AI service processes the request.
- Results (e.g., predictions, tags, generated text) are written back to Custom Objects or native fields in Relativity via the API, creating a full audit trail.
Key security controls:
- Implement strict RBAC on the service account, granting only the minimum necessary permissions (e.g.,
Readon Documents,Writeon specific Custom Objects). - All data in transit must be encrypted (TLS 1.2+).
- Log all API calls and data processing events for compliance audits.
- For highly sensitive data, consider an air-gapped model deployment where the AI model is containerized and run within the same secure environment as your Relativity instance.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us