Improving the performance and response time of a legal-tech software enables it to handle millions of documents in milliseconds. 

A Norwegian legal-tech start-up developed an e-discovery software designed specifically for the local legal market, utilising a proprietary AI algorithm to streamline handling of extensive data in the context of a legal case, such as documents, emails, and attachments. This software allows legal professionals to conduct text searches for specific words or phrases, identify patterns, and understand relationships amongst key stakeholders involved in the legal case. The software performs the following critical functions:

  • Document Search: Locating documents containing relevant information (words, text, etc.)
  • Relationship Mapping: Identifying and managing relationships between words within the context of the data (and add/remove them from the search criteria)
  • Document Previewing: Allowing users to preview various document formats (PDF, text, CSV) and annotate them with metadata.

However, it faced significant challenges while users were making certain text-search queries on the product, of which it could be attributed to the system’s performance. The legal-tech start-up collaborated with Sahaj Software to help improve performance. 

The Technical Challenge

We started with a discovery exercise that led us through an understanding of the different use-cases that the user of the product dealt with on a day-to-day basis. During this exercise, we also observed some features of the product that were malfunctioning during a demo. We recorded each issue and addressed them individually as separate tasks. These technical challenges are detailed below:

  • Slow Set-up Process: The software’s set-up process was slow and manual. Each deployment was on the client-side, where code was manually compiled, binaries were shared, and the complete infrastructure had to be set up manually before the use. Since the manual deployment required extensive steps on client-side machines, lacking proper documentation and updates, it was a challenge to set up the software.
  • Inefficient Case Set-up: Establishing each case involved creating a knowledge graph to identify relationships between words, which was slow and cumbersome. 
  • Tedious User Experience: The overall user experience of navigating the software was tedious. Critical operations took a significant amount of time to complete, with some of them needing approximately 30 seconds to complete. 

The Solution

To address the above technical challenges, several solutions were implemented:

  • Deployment Strategy and Automation: Transitioned from single machine deployments to a distributed model, enhancing scalability and availability.
    • Introduced a DEV > UAT > PROD deployment cycle with versioning for better bug tracking.
  • Automated Deployment Scripts: Created scripts using Ansible to automate the build and deployment process, allowing for immediate updates upon code changes.
  • Enhanced API Performance: Replaced SQLite with ElasticSearch for text search capabilities. This change improved filtering processes and reduced search latency significantly.
  • API Redesign: Transitioned critical APIs from asynchronous to synchronous design to improve response times.
  • Pagination for Search APIs: Implemented pagination in search results to optimise database operations and enhance user experience.
  • Cost Reduction Strategies: Developed scripts for managing GPU instances efficiently, reducing unnecessary costs associated with idle resources.
  • Code Guidelines Documentation: Provided a coding guidelines document outlining best practices for both front-end and back-end development.

The Outcome and Impact

The collaborative effort led to substantial improvements within just six weeks:

  • The system’s overall speed increased dramatically; search latency for 100K documents reduced from 30 seconds to 300 milliseconds.
  • The platform now supports millions of documents and is cloud-ready, significantly enhancing the user experience and operational efficiency for legal professionals.

This comprehensive approach not only resolved existing issues but also positioned the software for future growth and scalability in the legal tech industry.