Fraud and anti-money laundering (AML) are major concerns for both businesses and consumers, affecting areas like financial services and e-commerce. Traditional methods of tackling these issues, such as rule-based systems and predictive artificial intelligence (AI), have been useful over the years but can be outsmarted by clever fraudsters who are constantly leveraging new techniques. Enter generative AI, the next step in the evolution of machine learning and AI for fraud detection. This technology brings real-time analysis and adaptive learning to the table, greatly improving how we spot and react to fraud.
This GitHub repository presents a demo in which we walk in the shoes of a customer who accesses a bank's website to perform transactions. We will focus on the clearing stage of the transaction, where the bank goes through a series of verifications to combat fraud and uphold sanctions and anti money laundering (AML) laws.
The demo will therefore present a Know Your Customer (KYC) API, to be able to flag Sanctioned accounts and an innovative process to flag both AML and fraud cases. These processes include AI embeddings as well as MongoDB functionalities such as full-text and vector search, Atlas App Services and others. for a high level technical overview feel free to reference the architecture below.
Note
As the title of the demo indicates, we will be using an OpenAI model and therefore you will need an OpenAI API KEY. This is not included in the GitHub. You can also decide to change to an open-source model but this will require some light code changes.
The installation is divided into 5 parts:
- Provisioning an M0 Atlas instance and creating your own App Services application.
- Installation of the dataset
- Installation of the serverless function
- Installation of the backend
- Installation of the frontend
To build the Docker images and start the services, run the following command:
make build
To stop all running services, use the command:
make stop
To remove all images and containers associated with the application, execute:
make clean
This demonstration serves as an interesting example for clearing transactions using innovative technologies such as OpenAI embeddings and MongoDB search capabilities.
In the previous sections, we explored how to:
- Create your own dataset
- Set up your own microservice with MongoDB's app services
- Set up your collection for both full-text and vector search.
Are you prepared to harness these capabilities for your projects? Should you encounter any roadblocks or have questions, our vibrant developer forums are here to support you every step of the way. Or if you prefer to contact us directly at [email protected].
You can also dive into the following resources:
This is an alpha version of the proposed idea at .Local NYC and is an example solution and should be treated as such. Main focus of this solution is to showcase Vector search.
This product is not a MongoDB official product. Use at your own risk!
- Shiv Pullepu, Principal, Financial Industry Solutions, MongoDB
- Paul Claret, Senior Specialist, Industry Solutions, MongoDB