Optimization of Web Service for Extracting Facts from Legal Documents

  • This project involved the development of a web service designed to extract key facts from legal documents. The solution significantly accelerated document processing, which is critical for the timely approval of credit applications.
Legal Documents
Fact Extraction
Process Automation
Performance Optimization
Machine Learning

Client

Industry:
FinTech, Banking
Location:
USA
Client since:
2022
  • The customer is one of the largest and most influential financial institutions in the region, with a strong focus on innovation in financial services. They provide a wide range of banking products, including personal loans, mortgages, and business financing. The company has been a pioneer in adopting digital transformation strategies, seeking to streamline its internal processes and improve overall customer experience.

  • Due to confidentiality agreements, specific details about the client cannot be shared.

Challenge

  • The challenge was to accelerate the decision-making process for credit approvals. Lawyers required between 1 to 5 business days to process documents, depending on their volume, leading to significant delays in credit approval workflows.

Objective

To reduce the document processing time and expedite the approval process for credit applications by implementing an automated solution to extract key facts from legal documents.

Solutions Implemented:

Entity and Fact Extraction:

The solution included support for extracting entities from documents using a large language model (LLM), Gigachat. This improved the fact extraction accuracy with a 0.1 increase in the F1 score for each document type.

Application Refactoring:

Optimized model configurations and upgraded to the latest version of AllenNLP, which reduced model initialization times and training durations.

Results Achieved:

0.1

in the F1 score

increase of fact extraction accuracy

40%

improvement of application performance

3

minutes

document processing time

Entity Extraction with LLM:

Fact extraction accuracy improved with an increase of 0.1 in the F1 score across all document types.

Application Refactoring:

The application performance improved by 30-40% due to optimizations in model configurations and the use of the updated AllenNLP version. Document processing time was reduced from 1-5 business days to less than 3 minutes, significantly speeding up the credit approval process.

Team

The team consisted of 5 backend developers specializing in Python and microservices architecture.

3

Back-end Engineers

1

Database Engineers

1

Technical Lead

Technical Stack:

Backend

Python
Flask
aiohttp
SQLAlchemy

Database

PostgreSQL

Models and Libraries

AllenNLP

Integrations

Kafka