How harishchand83077/ml-insight-platform works
ML Insight Platform serves synthetic telecom churn predictions through an authenticated API and React chat assistant. The main user flow is browser authentication, then chat or prediction requests; the agent can invoke prediction, explanation, what-if, retention, customer-query, and document-retrieval tools. Supporting product stages include event ingestion, feature construction, model training and serving, feedback, and drift monitoring. The serving route and internal calls are evidenced by excerpts or README statements; local MLOps and several unsampled feature links are documented in the README, so those edges cite it.
Main entry points: api.py FastAPI routes · tools.py Agent tools · prediction.py Churn prediction · train_baseline.py Model training
Components 28
Chat client
- React chat UI
frontend/src/App.jsx - HTTP client
frontend/src/api.js - Login and signup
frontend/src/components/AuthScreen.jsx
Serving
- FastAPI routes
src/serving/api.py - JWT authentication
src/serving/auth.py - Churn prediction
src/serving/prediction.py - Risk explanation
src/serving/explain.py - Feedback storage
src/serving/feedback.py
Agent and retrieval
- LangGraph agent
src/agent/agent.py - Agent tools
src/agent/tools.py - Hybrid document retrieval
src/agent/hybrid_retriever.py - Knowledge index builder
src/agent/build_knowledge_base.py - Semantic response cache
src/agent/semantic_cache.py
Shared services
- Feature cache
src/serving/feature_cache.py - Shared embedder
src/common/embedding_model.py - Production model loader
src/common/production_model.py - Feature preparation
src/models/inference.py - PostgreSQL
- Redis
Local MLOps
- Synthetic event generator
src/data_gen/generate_events.py - RabbitMQ queues
- Event consumer
src/ingestion/event_consumer.py - Feature construction
src/pipelines/build_features.py - Model training
src/models/train_baseline.py - Drift monitoring
src/models/monitor_drift.py - Retraining trigger
src/pipelines/trigger_retrain.py - Retraining task
src/pipelines/retrain_task.py
Other components
- Browser user
Connections 37
- Browser user → React chat UI: uses
README.md - React chat UI → Login and signup: renders
frontend/src/App.jsx - Login and signup → HTTP client: authenticates via
frontend/src/components/AuthScreen.jsx - React chat UI → HTTP client: requests
frontend/src/App.jsx - HTTP client → FastAPI routes: calls HTTPS
README.md - FastAPI routes → JWT authentication: authenticates
src/serving/api.py - JWT authentication → PostgreSQL: reads and writes
src/serving/auth.py - FastAPI routes → Churn prediction: predicts
README.md - FastAPI routes → LangGraph agent: invokes chat
src/serving/api.py - FastAPI routes → Semantic response cache: checks and stores
src/serving/api.py - FastAPI routes → Feedback storage: stores feedback
README.md - Feedback storage → PostgreSQL: writes
README.md - FastAPI routes → JWT authentication: audits requests
README.md - LangGraph agent → Agent tools: dispatches tools
src/agent/agent.py - Agent tools → Churn prediction: calls directly
src/agent/tools.py - Agent tools → Risk explanation: calls
src/agent/tools.py - Churn prediction → Feature cache: looks up features
src/serving/prediction.py - Churn prediction → Feature preparation: prepares inputs
src/models/inference.py - Churn prediction → Production model loader: scores customers
src/serving/prediction.py - Risk explanation → Production model loader: explains scores
src/serving/explain.py - Feature cache → Redis: cache-aside
README.md - Feature cache → PostgreSQL: falls back to
README.md - Semantic response cache → Redis: reads and writes
README.md - Semantic response cache → Shared embedder: embeds queries
src/agent/semantic_cache.py - Agent tools → Shared embedder: embeds documents
src/common/embedding_model.py - Agent tools → Hybrid document retrieval: retrieves documents
- Hybrid document retrieval → Knowledge index builder: uses index
src/agent/hybrid_retriever.py - Agent tools → PostgreSQL: queries customer data
src/agent/tools.py - Synthetic event generator → RabbitMQ queues: publishes events
README.md - RabbitMQ queues → Event consumer: delivers events
README.md - Event consumer → PostgreSQL: commits batches
README.md - Feature construction → PostgreSQL: builds features
README.md - Model training → PostgreSQL: loads training data
README.md - Model training → Feature preparation: shares feature columns
src/models/inference.py - Drift monitoring → Model training: compares distributions
README.md - Retraining trigger → Retraining task: dispatches
src/pipelines/trigger_retrain.py - Retraining task → Model training: retrains model
src/pipelines/retrain_task.py