Feb 2026 — Aug 2026 · AMC Ernst & Young (EY)
Data & AI Consultant
An end-to-end social media analytics and AI platform: five platforms and more than two million posts brought into one automated workflow, from ingestion through to dashboards and a web interface.
01 Sources
- 2M+ posts from five social platforms
- plus Tunisian news (RSS)
02 Ingest
- Validates each file, loads only the changes
- pydantic · incremental CDC upserts
03 Quality
- Cleans the data and logs every correction
- multi-pass cleaning · quality gate
04 Warehouse
- Stores everything in one consistent model
- PostgreSQL · star schema
05 Models
- Predicts, forecasts and explains why
- LightGBM · XGBoost · Prophet · MAPIE · SHAP
06 Serve
- Answers requests in under 200 ms
- FastAPI · models from MLflow
07 Analyse
- Dashboards showing what worked and why
- Power BI · KPIs · SHAP drill-down
08 Decide
- A web app to score and plan new posts
- Next.js · best time · AI assistant
09 Automate
- Automates routine work with a human sign-off
- 8 n8n workflows · Google Gemini
Orchestration — Airflow runs it every day and picks the best model each week · all in Docker
Governance — monitored in Prometheus + Grafana · drift checks · audit log · logins & roles · CI/CD on GitHub Actions
| Ref | Measure | Value |
|---|---|---|
| O1 | weekly reporting time | 12h → <1h |
| O2 | posts unified from 5 platforms | 2M+ |
| O3 | MAPE on engagement forecasts | 9% |
| O4 | model serving via FastAPI | <200ms |
| O5 | saved per week by automation (team estimate) | ~15h |
Scope of work
- S1Built the data backbone: Airflow pipelines into PostgreSQL, feeding Power BI dashboards and a Next.js interface.
- S2Deployed four ML use cases (engagement analysis, anomaly detection, forecasting and recommendations) using LightGBM, XGBoost, Prophet, MAPIE and SHAP.
- S3Tracked experiments with MLflow and served models through FastAPI.
- S4Automated editorial and operational processes with eight n8n workflows and Google Gemini.
Python / SQL / Power BI / PostgreSQL / Airflow / FastAPI / Next.js / MLflow / Docker / Google Gemini / n8n / Scikit-learn
Runs on an invented demo dataset, so the client's name and data stay confidential.
Design notes
Why it was built this way: the decisions that make the numbers trustworthy.
- D1Honest validationModels train on older posts and are tested on the most recent 30 days, never on shuffled folds that let a model see the future.
- D2UncertaintyEngagement predictions come with an 80% conformal interval (MAPIE) instead of a falsely precise single number.
- D3ExplanationsEvery prediction keeps its top SHAP drivers, so the dashboard can say why a post is expected to perform.
- D4CalibrationPerformance-tier probabilities are isotonic-calibrated, so “80% likely” actually means 80%.
- D5Local seasonalityProphet forecasts per platform and series, with a Tunisian holiday calendar that includes Ramadan.
- D6Actionable anomaliesAnomalies come from model residuals and are labelled viral, underperforming or data quality, so each flag says what to do next.
- D7Grounded AIThe Gemini assistant answers data questions by running read-only SQL against the warehouse instead of guessing.
- D8OperationsContainerised with Docker, monitored with Prometheus and Grafana, drift checks in the daily pipeline, CI on GitHub Actions.
