Newton’s Law Builds GenAI-powered POC on AWS Foundational Models and Cloud Infrastructure
Challenge
Newton’s Law needed help creating a mobile app POC and backend environment on AWS that fulfilled three specific use cases and set the stage for future growth.
Solution
ClearScale conducted a thorough analysis of AWS’ Generative AI (GenAI) and cloud technologies and implemented the optimal solution to meet the client’s business requirements.
Benefits
ClearScale’s POC proved the viability of the solution and met all performance goals, allowing Newton’s Law to move forward with a broader deployment.
AWS Services
Amazon RDS, Amazon Bedrock
Executive Summary
Newton’s Law is a startup in the legal sector that leverages AI to provide high-quality legal information to everyday consumers. App users can ask Newton a wide range of questions related to jurisdictional law, case law, past verdicts, court case processes, and more. They can also access and hire attorneys through the platform.
The team behind Newton’s Law hired ClearScale to help build a proof-of-concept (POC) for a GenAI-powered mobile app with a subscription model to serve as a customer’s legal assistant. As an AWS Premier Tier Services partner with proven GenAI expertise, ClearScale was able to design and implement an intuitive mobile app experience, as well as robust backend architecture that aligned with the client’s business requirements.
The Challenge
The Newton’s Law leadership team had a clear vision of what it wanted to deliver through a mobile app. They saw the GenAI advancements in the market as an opportunity to revolutionize access to legal counsel for individuals and pro se litigants. Newton’s vision is to provide comprehensive legal counsel to everyone – not just those who could afford exorbitant legal fees. Members can be informed of their legal rights and obligations within a matter of minutes. Areas of practice include criminal law, family law and civil law.
However, before pursuing a full-scale build, the company wanted to prove the merits of its idea with a more limited POC. This POC had to fulfill three specific use cases:
- Answer questions related to a moving violation
- Assist in what-if legal scenarios
- Assist in combating lawsuits
Building a GenAI experience that could accomplish all three through a seamless mobile app experience required deep cloud and GenAI expertise. Newton’s Law also wanted to move quickly and decided the optimal path involved bringing an outside consultancy that knew how to work effectively with early-stage, high-growth companies.
With more than a decade of experience building on AWS, plus the SMB and SaaS competencies, a proven history of supporting startups, and a fast-growing GenAI services practice, ClearScale checked all the boxes.
The ClearScale Solution
Knowing that Newton’s Law wanted to expand on its POC, ClearScale first conducted a comprehensive review of all available technology options. Choosing the right combination of GenAI and cloud resources was crucial, as this foundation would serve as the go-forward environment for the startup’s disruptive solution.
The first key decision for the team was what large language model (LLM) to choose. ClearScale identified three solid options for the client’s use. After exploring each in detail, ClearScale chose an offered by Amazon Bedrock service. The selected LLM excels at tasks related to following instructions, generating creative content, and answering questions in a thoughtful manner.
On the database side, ClearScale identified two vector databases that would work for Newton’s Law and support a serverless approach. Because the MVP didn’t require advanced analytics in vector storage, ClearScale chose a database that offers high performance in terms of max QPS, ensuring that Newton’s Law had a simpler, faster, and less costly database in this initial rollout.
To connect the LLM to the vector database, ClearScale used the LangChain library. This functionality was critical for allowing a sequence of calls that would ultimately deliver a high-quality answer to an end user.
The final two key architecture components were:
- A Flask server to receive input from the application and handle Langchain workflows
- An Amazon EC2 machine for running Flask
Together, these elements combined to form an efficient and effective backend infrastructure for Newton’s Law’s mobile app. Each architecture decision involved careful consideration combined with subject matter expertise from ClearScale’s cloud architects. The final MVP solution struck the balance between short-term and long-term value, putting the startup in a strong position to acquire and retain customers in a fast-changing industry.
The Benefits
Thanks to ClearScale’s expert guidance and execution, Newton’s Law achieved its goals through the POC. The mobile app MVP performed well under testing on all three use cases and earned positive feedback from users. The app achieved:
- High response accuracy derived from ingested documents
- Minimization of hallucinations from the Gen AI model
- Reduced response time
- Lowered solution costs
With these results, Newton’s Law felt confident moving forward with additional use cases. Next, Newton’s Law will extend and improve its existing architecture by adding auto-scaling capabilities and better availability switching for its underlying database. The app itself will also evolve. For instance, the startup is interested in adding a speech-to-text capability to allow users to speak their questions and get answers. Incorporating these types of features will not be difficult given the infrastructure design choices ClearScale made as part of the POC project.