By Mateusz Cebularz, Kevin Epstein, and Jeff Carson

AI is fast becoming a fundamental enabler for any startup trying to disrupt traditional industries. Newton’s Law, a startup in the LegalTech sector, embodies such innovation in using AI to help make legal advice more accessible. Newton’s Law partnered with ClearScale to build a proof-of-concept mobile app using Generative AI (GenAI).

This case study will analyze problems faced by Newton’s Law, the solution implemented with ClearScale through cloud-based GenAI, and the advantages thereof for scaling in the future.

The Challenge

Newton’s Law was founded on a lofty vision: democratizing access to legal expertise for all. The company wanted to enable the average consumer to ask deep questions about the law and get precise advice back in minutes.

But in advance of a full-scale rollout, Newton’s Law wanted to validate their concept through a proof-of-concept (POC). The PoC would ensure that the GenAI-powered legal app could serve as a legal assistant to customers. For that, the POC needed to focus on three use cases:

  • Answering questions about moving violations
  • Helping with “what-if” legal scenarios
  • Guiding users through the process and fighting lawsuits

Given the complexities of the law, especially when considering various jurisdictions, Newton’s Law needed to balance providing fast, reliable answers to its customers, with juggling its own internal requirements of developing a solution that was cost-effective, scalable, and easy to maintain. This was no small feat for a startup with limited resources

The Solution

Newton’s Law approached ClearScale, an AWS Premier Tier Services Partner, to support them in creating a scalable solution for their revolutionary legal assistant app. Having extensive experience in GenAI and cloud-native architectures, ClearScale developed a highly optimized solution by leveraging the power of Amazon Web Services (AWS) technologies. The central backbone of the approach contained three elements:

  • Generative AI Models: ClearScale performed a comprehensive analysis of the various LLMs that exist in AWS. From the several options analyzed, they chose one from Amazon Bedrock mainly due to its great ability to follow along with very complex directions, create creative content, and answer obtuse legal questions. It was this flexibility, high performance, and adaptability to the broad range of use cases that gave Newton’s Law the key to success in solving problems. The seamless integration with AWS also provided a path for Newton’s Law to scale on demand.
  • Integration of Vector Database: To efficiently process large sums of legal data and enable enhanced data retrieval, ClearScale implemented a vector database. This architecture allowed Newton’s Law to support a large number of queries per second with cost efficiency and without adding unnecessary complexity. The vector database made things easier to operate in the early days of the POC, affording agility to Newton’s Law, with rapid validation of their legal assistant product and guaranteed scalability and high-class performance in the future.
  • Backend Architecture: ClearScale developed a robust backend on top of Amazon EC2 using Flask. This system would process user inputs and orchestrate the workflows through the LangChain library to handle communications between the LLM and vector database. Leverage serverless technologies where applicable to reduce operational overhead, so the system would easily scale as Newton’s Law grew. This architecture supported both the immediate functionality but also laid out the base for auto-scaling in the near future and the integration of various features that would make user interactions easier, such as speech-to-text.

The Amazon Bedrock-based solution met the immediate technical needs of Newton’s Law and provided a foundation for future innovation, ensuring that the app will evolve to support even more advanced features and greater scalability in the long term.

Practical Application

The POC developed by ClearScale provided Newton’s Law with a valuable real-world test of the functionality and potential of their app. It should be designed in such a way so that three core use cases would be worked out by the app efficiently, providing what Newton’s Law had been working toward democratizing legal assistance. These use cases are crucial for ensuring that regular users can get quick and reliable legal consultation:

  • Moving Violations: Users could input their traffic citations and immediately receive personalized legal recommendations for next steps. For example, the application would analyze the details of the violation and jurisdictional laws to recommend whether the user should contest the ticket, pay the fine, or seek other legal remedies. This feature assured that users – even those somewhat unfamiliar with the flow of the law as it pertains to traffic – could manage the situation with ease.
  • “What-if” scenarios: The application allowed the users to explore what-if legal scenarios by asking questions like, “What would happen if…? ” The application generates possible scenarios that follow from such rules by considering legal precedent, case law, and arguments. This feature was helpful for users seeking to understand the possible results of different actions without necessarily resorting to the support of the legal system. It was a low-pressure method of delving into legal scenarios and understanding the risks and possible outcomes.
  • Lawsuit Assistance: The app comprehensively updated the users on how to prepare for lawsuits by advising them on how to gather evidence, understand the working law, and describe possible legal strategies. This has been particularly helpful to those litigants known as pro se litigants, who represent themselves and usually face many difficulties in performing complicated court procedures and processes. This application helped level the playing field by equipping the user with active knowledge to confidently move forward in their legal issue.

All these various use cases were made possible by one easy-to-use, straightforward interface: the ability this application provided to ask in plain language any legal questions the user might have and receive actionable, easy-to-understand guidance as to how to address them, even in areas where there was no knowledge about the law. Newton’s Law provides an application that empowers people with knowledge through which they would be able to make appropriate decisions regarding their situations. The POC proved the concept but also demonstrated growth and expanded features for the future.

Ready to plan your next cloud project?

The Benefits

The POC for Newton’s Law developed by ClearScale brings immediate and long-term benefits, made possible with the power brought by a well-designed architecture and through the strategic use of AWS technologies.

  • High Response Accuracy: The application was very accurate in providing legal advice, mainly because of the thoughtful embedding of a very capable LLM in a way that most accurately curates the relevant legal data. A high degree of accuracy is important for gaining and retaining user trust since legal matters are sensitive to reliable information. This allowed users to be advised on legal matters with the assurance that the answers they were given could be current, accurate, and representative of present legal standards.
  • Minimizing AI hallucinations: One of the most prevalent issues that exist with models of AI involves “hallucinations,” where bad or misleading information is created by the AI. To overcome this, ClearScale did a lot of work comparing model functionality and prompt engineering, employing the LangChain framework to regulate how the user queries would be asked and structured. By doing this, most hallucinations were avoided, and high-quality legal advice could be derived from the app corresponding with the users’ expectations. The capability of the system to mitigate this common problem further cemented its reliability.
  • Performance Optimization: ClearScale made sure that the volume of queries that this app would support wasn’t at the cost of speed or accuracy. ClearScale optimized the underlying infrastructure so Newton’s Law could strike with speed and responsiveness into their user experience. This is something quite indispensable when retaining users for a time-sensitive legal advice application. This also set things up so resources would be used only when needed, hence keeping operational costs at a minimum-cost efficiency coupled with no compromise in performance.
  • Scalability and Future Growth: The architecture that ClearScale implemented allowed scalability due to the fact that Newton’s Law does not face any problem in increasing its platform. It will enable auto-scaling at the vector database, which means increased user demands are handled with the app without requiring major infrastructure changes. Similarly, the architecture would support enhancements in the future that might include more advanced capabilities, such as speech-to-text, among other complex legal use cases.

This innovative design allowed Newton’s Law to scale the functionality of its GenAI-powered legal app and grow with the changing needs of a growing user base. In the end, ClearScale’s PoC not only met the current technical requirements of Newton’s Law but also underpinned later scaling.

Accuracy, reliability, performance, and scalability are the driving reasons behind the positioning of this application for long-term success. That means Newton’s Law can scale its platform with growing users without worrying about performance degradation or increased costs while being competitive in the legal tech market.

Conclusion – GenAI Powered Legal App

By leveraging ClearScale’s expertise in GenAI and cloud-native solutions, Newton’s Law built a POC to validate its vision of providing affordable, accessible legal counsel on a mobile application. The combination of AWS technologies like Amazon Bedrock with architecture designed by ClearScale ensured this app was both performant and scalable. With the POC’s success, Newton’s Law is prepared to disrupt the legal industry, servicing a dire need for consumers in the legal space.

As Newton’s Law implements its roadmap and speech-to-text capabilities, more legal scenarios will be added to its app. With the help of ClearScale, Newton’s Law is ready to address the exponentially increasing demand for accessible legal services, making the case that AI can change how people interact with the law.

Benefits Summary:

  • More Legal Accessibility: AI-driven legal assistance extends legal advice to consumers who cannot afford regular services.
  • Future-Proof Infrastructure: With scalability in mind, Newton’s Law has been developed for rapid growth.
  • Improved User Experience: The responses are given out much quicker and the accuracy is higher, hence increasing user satisfaction is critical in gaining and retaining customers.

Ready to learn how ClearScale can help with your Gen AI project on AWS? Contact us today to speak with one of our experts.

Call us at 1-800-591-0442
Send us an email at sales@clearscale.com
Fill out a Contact Form
Read our Customer Case Studies