Combine real-time analytics with semantic search using MongoDB Atlas Vector Search to detect and prevent fraud.
- Use cases: Fraud Prevention, Gen AI 
- Industries: Insurance, Financial Services, Retail 
- Products and tools: MongoDB Atlas, MongoDB Atlas Vector Search, MongoDB Change Streams 
Solution Overview
Fraud and anti-money laundering (AML) are major concerns for businesses and consumers and impact financial services institutions across commercial banking and capital markets. Traditional methods of tackling these issues, such as rule-based systems and machine learning methods, are limited by the engineering overhead that is necessary to keep models updated, resulting in outdated technologies.
MongoDB Atlas Vector Search can improve fraud detection and AML efforts by addressing these limitations. This solution uses real-time analytics and continuous monitoring with Atlas Vector Search to detect and prevent emerging threats.
Reference Architectures
This solution aggregates fraud and AML data, creates vector embeddings, and performs semantic search to detect similar transactions. The following diagram details this solution's architecture:
Figure 1. High level architecture of a fraud detection/AML system
- Voyage AI for embeddings: First, the solution generates embeddings by using an embedding model on transaction data. The fraud embedding is composed from text, transactions, and data from counterparties involved in a transaction. The AML embedding is created based on transactions, relationships between counterparties, and their risk profiles. You can use Voyage AI to create your embeddings. You can also configure the choice of data sources used to create your embeddings. - The solution demo pre-populates the database with synthetically-generated test data for fraud and AML embeddings. You can also generate embeddings by using historical transaction data and customer profiles. 
- MongoDB Atlas as an operational data store: MongoDB Atlas allows users to simultaneously store their operation data, metadata, and vector embeddings. This eliminates the need for niche technologies, such as a dedicated vector database. With a scalable architecture and the option to deploy dedicated search node(s) for workload isolation, MongoDB helps organizations scale with growing datasets and adapy dynamically to new fraud or money laundering patterns. 
- Atlas Vector Search powers the application: Atlas Vector Search searches the database for transactions based on the percentage of previous transactions with similar characteristics that were flagged for suspicious activity. This simulates how human analysts would evaluate transactions or suspicious cases. - If a transaction is flagged as fraudulent or suspicious, the solution declines the transaction request. Otherwise, it completes the transaction successfully and shows a confirmation message. For rejected transactions, users can contact case management services with the transaction reference number for details. 
Benefits of Atlas Vector Search
Using Atlas Vector Search for fraud detection and prevention has the following benefits:
- Improved fraud detection accuracy: Atlas Vector Search captures complex, high-dimensional patterns that rule-based and machine learning models often overlook. By analyzing the full context of transactions, Atlas Vector Search also uncovers subtle fraud signals, which improves the detection of sophisticated schemes that simpler models can miss. 
- Detect new fraud schemes faster: With real-time anomaly detection, Atlas Vector Search can help identify novel fraud or money laundering tactics more quickly, reducing the risk of emerging threats without the need for constant model retraining. 
- Store structured and unstructured data: MongoDB stores vector embeddings next to source data and metadata. When you insert or update a vector in the database, it is automatically indexed. 
Build the Solution
This GitHub repository presents a demo where a customer accesses a bank's website to perform transactions. It focuses on the clearing stage of the transaction, where the bank goes through a series of verifications to combat fraud and uphold sanctions and AML laws. The demo includes an API that flags sanctioned customers, AML, and fraudulent transactions.
This solution requires an embedding model to generate vector embeddings. The demo linked above does not include provider credentials. You can use Voyage AI as your embedding service.
Key Learnings
- Build intelligent applications powered by semantic search and generative AI systems that use diverse datatypes. 
- Store vector embeddings with source data and metadata. If you insert or update vectors, they are automatically synchronized to the vector index. 
- Optimize resource consumption, improve performance, and enhance availability with Search Nodes. 
- Remove operational overhead with MongoDB Atlas.