Danielfonseca1212/Benchmark
0
πΈοΈ GraphRAG vs Vector RAG β Live Fraud Detection Benchmark
By [Daniel Fonseca](https://linkedin.com/in/daniel-fonsecaai) Β· AI/ML Engineer Β· Graph Neural Networks Β· Fraud Detection
  
What this demo shows
A live benchmark comparing two RAG architectures on fraud detection queries:
Core insight: Fraud lives in connections. A device shared by 3 customers, a money mule chain with 3 hops, 6 accounts from the same IP β these patterns are invisible to embeddings but trivially discoverable with a single Cypher traversal.
Architecture
User question (natural language)
β
βΌ
Groq/Llama 3.1 βββΊ Cypher query generation
β
βΌ
Neo4j Aura βββΊ Graph traversal (2-5 hops)
β
βΌ
Structured records βββΊ Groq/Llama βββΊ Fraud analysis answerGraph schema
(Customer)-[:HAS_ACCOUNT]->(Account)
(Customer)-[:USED]->(Device)
(Account)-[:ACCESSED_FROM]->(IP)
(Account)-[:TRANSFER {amount, date}]->(Account)
(Account)-[:TRANSACTION {amount, type}]->(Merchant)Fraud patterns detectable:
- π΄ Shared device cluster β emulator farms, identity theft
- π΄ IP overlap β account opening fraud
- π΄ Money mule chain β layering (A-102 β A-445 β A-667 β A-890)
- π΄ Card testing β micro-transactions on merchants
Setup (add to HF Secrets)
After adding secrets: click "Seed fraud graph" in the sidebar to populate Neo4j.
Without credentials the app runs in demo mode with realistic simulated responses.
Related projects
Built with Neo4j Aura Β· Groq Β· Llama 3.1 Β· Streamlit Β· PyVis Β· Plotly
