Recipe: Sentiment analysis at scale
Process millions of reviews, comments, and support tickets through a production-grade sentiment pipeline built on Meridian's inference fabric.
Batch inferenceNLPStreaming
Overview
This recipe walks through standing up a horizontally-scalable sentiment classifier. You'll ingest raw text from Kafka, classify polarity and intensity via Meridian endpoints, and write structured results to ClickHouse for real-time dashboards.
Prerequisites
- Meridian API key with
inference:writescope - Kafka cluster (MSK or Confluent) with topic
raw-reviews - ClickHouse instance for result storage
Pipeline architecture
Kafka→Worker pool→Meridian API→ClickHouse
Workers consume batches of 100 messages, call Meridian's classify endpoint, and flush results every 5 seconds.
Next steps
Deploy the worker pool on ECS or Kubernetes with auto-scaling triggered by Kafka consumer lag. Monitor throughput and latency via the Meridian dashboard at /dashboard.