from google.cloud import aiplatform
# Define features ONCE
feature_store = aiplatform.Featurestore.create("wxcc-features")
entity_type = feature_store.create_entity_type(
entity_type_id="customer",
description="Customer-level features"
)
## Create features (computed once, reused by all models)
entity_type.create_feature(
feature_id="avg_call_duration_30d",
value_type="DOUBLE",
description="Average call duration in last 30 days (seconds)"
)
entity_type.create_feature(
feature_id="total_calls_90d",
value_type="INT64",
description="Total calls in last 90 days"
)
## Models fetch features from Feature Store (consistent, cached)
features = entity_type.read(entity_ids=["customer_12345"])
Benefits: - Consistency: All models use same feature definitions - Performance: Features computed once, cached - Governance: Track feature lineage, versioning
Priority: MEDIUM (nice-to-have, not critical for initial deployment)
6. Vertex AI Model Monitoring¶
What We Missed: Automated detection when models degrade over time (data drift, concept drift).
Problem: - Model trained on pre-COVID call patterns - Post-COVID, customer behavior changes - Model accuracy drops from 85% → 65% silently
Solution: Model Monitoring
## Enable monitoring during endpoint deployment
endpoint = aiplatform.Endpoint.create(
display_name="wxcc-churn-model",
monitoring_config={
"alert_config": {
"email_alert_config": {"user_emails": ["mlops@abhavtech.com"]}
},
"drift_detection_config": {
"drift_thresholds": {"customer_tenure": 0.05} # Alert if >5% drift
},
"skew_detection_config": {
"skew_thresholds": {"sentiment_score": 0.1}
}
}
)
Monitors: - Training-Serving Skew: Input data distribution changes - Prediction Drift: Output distribution changes (e.g., suddenly predicting 80% churn vs baseline 20%) - Feature Attribution Drift: Which features model relies on changes
Priority: HIGH (prevent silent model degradation)
Medium Priority - Operational Enhancements¶
7. Cloud Composer (Apache Airflow)¶
What We Missed: Complex workflow orchestration beyond Cloud Scheduler.
Use Case:
Daily WxCC ML Pipeline:
1. Export CDR from WxCC → BigQuery (5 min)
2. Wait for export to complete
3. Run data quality checks (10 min)
4. If checks pass → Train churn model (2 hours)
5. If accuracy >80% → Deploy to production
6. Send summary email to ML team
Cloud Scheduler can't handle this logic (dependencies, conditionals, retries). Need Airflow.
Priority: MEDIUM (use Cloud Scheduler initially, upgrade to Composer if workflows become complex)
8. Memorystore (Redis)¶
What We Missed: Real-time caching for agent dashboards.
Problem: - Agent opens dashboard showing "Customer 360 view" - Query: "Get last 20 interactions, CSAT history, churn score" - BigQuery query takes 5 seconds (too slow!)
Solution: Redis Cache
import redis
r = redis.Redis(host='10.200.2.50', port=6379)
## Cache customer data for 5 minutes
customer_data = r.get(f"customer:12345")
if not customer_data:
customer_data = bigquery_query("SELECT * FROM customers WHERE id=12345")
r.setex(f"customer:12345", 300, customer_data) # TTL 5 min
return customer_data # <50ms response time
Priority: MEDIUM (optimize agent dashboard performance)
9. Cloud CDN¶
What We Missed: If agent dashboards served globally, need CDN for low latency.
Scenario:
- Agent in Mumbai accesses dashboard served from us-east4
- Latency: 200ms
- With Cloud CDN: 20ms (cached at Mumbai PoP)
Priority: LOW (agents typically in fixed locations, not traveling)
10. Cloud Armor (DDoS Protection)¶
What We Missed: If exposing WxCC analytics APIs to external systems (e.g., Salesforce), need DDoS protection.
Configuration:
## Create Cloud Armor security policy
gcloud compute security-policies create wxcc-api-protection \
--description "Protect WxCC analytics API"
## Add rate limiting rule
gcloud compute security-policies rules create 1000 \
--security-policy wxcc-api-protection \
--expression "true" \
--action "rate-based-ban" \
--rate-limit-threshold-count 100 \
--rate-limit-threshold-interval-sec 60 \
--ban-duration-sec 600
Priority: MEDIUM (if APIs are public-facing)
Low Priority - Future Enhancements¶
11. Recommendations AI¶
- Product/service recommendations during customer calls
- "Customer bought Product A, suggest Product B"
- Priority: LOW (business-driven feature)
12. Document AI¶
- OCR for scanned documents (if WxCC integrates with ticketing)
- Extract data from customer-uploaded forms
- Priority: LOW (not in current scope)
13. Cloud Healthcare API¶
- Only if WxCC handles medical support lines (HIPAA compliance)
- Priority: N/A (not applicable to Abhavtech)