How It Works
From user input to fraud verdict in 6 steps. Complete analysis in under 2 seconds.
User Submits Data
User uploads a PDF, receipt photo, or DICOM study — or fills the form by hand
LangGraph Routes Request
Intelligent orchestration layer analyzes sector and routes to optimal LLM
- Parse input sector (banking/medical/ecommerce/supply_chain)
- Map sector to specialized LLM
- Initialize workflow state
- Retrieve external context via MCP (blockchain, credentials, reputation)
- Prepare context for RAG retrieval
RAG + document fingerprints
Pinecone matches similar fraud patterns — and recycled documents via perceptual hash
- Convert input to embedding vector
- Query Pinecone index for sector
- Retrieve top 5 similar patterns by cosine similarity
- pHash the upload into the dochash namespace (duplicate catch)
- Enrich LLM prompt with fraud pattern examples
AI Analyzes Fraud
Cost-optimized fraud-specialized LLM with RAG-enhanced context
Generate Score & Explanation
Returns 0-100% fraud probability with human-readable reasoning
{
"fraud_score": 87,
"risk_level": "high",
"explanation": "Analysis identifies high risk. Red flags: high amount, OFAC high-risk country, new device, odd hour, young account.",
"model_used": "Qwen3-32B (HF Inference)",
"processing_time_ms": 1847,
"similar_patterns": 5
}Display Results
Frontend receives response and displays interactive fraud report
- Animated circular progress for fraud score
- Color-coded risk level badge
- Detailed explanation with bullet points
- Model attribution
- Processing time metrics
Technical Architecture Flow
Key Technologies Explained
LangGraph
Workflow orchestration framework that manages multi-step AI processes. Routes requests, coordinates MCP context retrieval, RAG retrieval, and handles model selection.
Pinecone
Cloud vector database for semantic search. Stores fraud pattern embeddings and enables fast similarity matching with scalable infrastructure.
MCP Server
Model Context Protocol tool stage for external context (wallets, credentials, seller reputation). Demo ships a free deterministic MCP server so the decision trace shows live tool calls.