I designed and implemented a real-time spam detection service to address the growing spam issues faced by our clients. The service leverages Redis for response caching, a finetuned Mistral AI for detection, and FastAPI for the API endpoints. By calculating the temporal correlations and similarity index between messages, the service efficiently identified and filtered out spam content within 100ms while minimizing costs.