Inspiration

Fraud costs businesses billions annually, and traditional rule-based systems often fail to detect subtle, emerging patterns. I wanted to build a system that goes beyond simple rule-matching: one that learns semantic patterns, detects anomalies in real-time, and explains its reasoning in a way humans can act on.

The goal was to create a multi-step, AI-powered fraud detection agent that combines cutting-edge technologies like TiDB vector search, OpenAI embeddings, and realtime alerts to turn raw data into actionable insights.


What it does

FraudLens AI is an end-to-end fraud detection platform that allows users to:

  • Upload CSV/JSON datasets or send data through a REST API.
  • Detect suspicious transactions or patterns using AI embeddings and TiDB vector search.
  • Receive real-time alerts via dashboard or webhooks (Slack, Teams, Discord).
  • Generate human-readable explanations for flagged transactions using OpenAI AI models.
  • Securely integrate with external apps through API keys for automated fraud monitoring.

FraudLens AI essentially acts as an AI assistant for fraud analysts, processing large datasets asynchronously and providing insights faster than traditional methods.


How we built it

FraudLens AI was built using a modern, scalable architecture:

  1. Frontend (Next.js + Tailwind) – dashboard for uploads, real-time alerts, and AI explanations.
  2. Backend (Node.js + Express + Prisma) – handles file ingestion, REST APIs, AI embeddings, and fraud detection pipelines.
  3. Async Job Processing (RabbitMQ) – queues large data files to prevent server timeouts.
  4. Vector Search (TiDB Cloud) – detects similar transactions and patterns using semantic embeddings.
  5. Realtime Notifications (Redis Pub/Sub) – updates the dashboard and triggers webhooks for external apps.
  6. AI-powered Explanation (OpenAI API / Local AI) – provides human-friendly explanations for suspicious activity.
  7. Security (JWT & API Keys) – allows secure access and integration with other applications.

The architecture is fully cloud-based, leveraging managed TiDB, Redis, and RabbitMQ for scalability, reliability, and speed.


Challenges we ran into

  • Large file processing: Preventing server timeouts required designing an async worker system using RabbitMQ.
  • Realtime updates: Maintaining live alerts without overloading the backend involved Redis Pub/Sub and throttling mechanisms.
  • Semantic fraud detection: Mapping raw transaction data into AI embeddings that capture meaningful patterns was non-trivial.
  • Explainability: Ensuring AI outputs were human-readable and actionable required crafting smart prompts for OpenAI.
  • Integration complexity: Coordinating multiple cloud services (TiDB, Redis, RabbitMQ, Cloudinary, OpenAI) seamlessly was challenging.

Accomplishments that we're proud of

  • Built a multi-step AI agent capable of ingesting, analyzing, and explaining fraud data.
  • Achieved real-time fraud alerts via dashboard and webhooks to Slack/Teams.
  • Successfully leveraged TiDB vector search for semantic similarity detection across thousands of transactions.
  • Developed API key authentication and integration, enabling other applications to securely consume fraud insights.
  • Created AI-generated explanations for flagged transactions, improving interpretability and trust.

What we learned

  • How to design multi-step, agentic AI workflows that chain multiple technologies together.
  • Best practices for asynchronous processing and scalable architecture using cloud services.
  • How to combine vector search and AI embeddings for actionable analytics.
  • How to design systems that are both AI-driven and human-centered, providing clear, interpretable insights.

What's next for FraudLens AI

  • Enhanced AI models: Support for multi-lingual and cross-domain fraud detection.
  • User-defined alert rules: Allow analysts to customize thresholds and alert types.
  • Advanced analytics dashboards: Include trend analysis, visualization of anomalies, and historical comparisons.
  • Extended webhook support: Add more integrations for Teams, Discord, SMS, and email.
  • Open-source contribution: Provide a community edition with extensible plugins for domain-specific fraud detection.

FraudLens AI is designed as a foundation for modern, explainable fraud detection — combining AI, vector search, and real-time workflows to empower businesses and analysts in the fight against fraud.

🏁 Submission Info for Hackathon

TiDB Cloud Email: rwubakwanayoolivier@gmail.com.

Public Repository URL: https://github.com/RWUBAKWANAYO/FraudLens-AI.

Open Source License: MIT License.

Demo Video: https://youtu.be/fraudlens-ai-video.

Built With

Share this project:

Updates