Skip to content

End-to-end Google Ads support optimization system using machine learning and LLMs to classify ticket severity, route cases, extract issue signals, and generate priority scores that improve support efficiency and resolution time.

Notifications You must be signed in to change notification settings

KayMan2025/google_ads_support_optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“˜ Google Ads Support Optimization β€” ML + LLM Hybrid System

A Data Science + LLM project simulating how Google’s gTech teams optimize Ads customer operations

πŸš€ Overview

This project builds an end-to-end support ticket optimization pipeline inspired by real workflows inside Google Ads / gTech.

It demonstrates how machine learning, LLMs, and operational analytics can be combined to:

classify support ticket severity

extract semantic tags using lightweight LLM prompts

compute a priority score blending ML + LLM + business impact

enable smarter ticket triage, routing, and escalation

The goal is to show how data science and LLMs can directly improve customer support outcomes at scale β€” aligning with responsibilities in Google’s Business Data Science (gDATA) and BizOps roles.

🧠 Project Architecture

Β  +------------------+

Β  | Raw Support Data |

Β  +------------------+

Β  |

Β  v

Β  +------------------+

Β  | EDA + Cleaning |

Β  +------------------+

Β  |

Β  v

Β  +-------------------------------+

Β  | ML Severity Classifier |

Β  | (TF-IDF + Logistic Regression)|

Β  +-------------------------------+

Β  |

Β  v

Β  +-------------------------------+

Β  | LLM Issue Tagger (Groq LLaMA) |

Β  | - topic tags |

Β  | - urgency estimation |

Β  | - concise summarization |

Β  +-------------------------------+

Β  |

Β  v

Β  +-------------------------------+

Β  | Priority Score Engine |

Β  | ML severity + LLM tags + |

Β  | revenue impact (optional) |

Β  +-------------------------------+

Β  |

Β  v

Β  +------------------+

Β  | Ranked Tickets |

Β  +------------------+

πŸ” 1. Exploratory Data Analysis (EDA)

The dataset includes synthetic support tickets with:

ticket text

customer metadata (region, spend, segment)

sentiment + escalation info

timestamps

labels for severity

Notebooks provide:

βœ” distribution plots

βœ” correlations

βœ” text length analysis

βœ” severity imbalance checks

βœ” baseline exploratory insights

πŸ€– 2. ML Severity Classifier

A supervised ML model predicts ticket severity levels (e.g., low, medium, high).

Key components:

TF-IDF vectorizer

Logistic Regression classifier

Pipeline stored in models/severity_classifier.pkl

Why this matters

Severity classification is the first triage step used by real gTech teams.

🧩 3. LLM Issue Module (Groq LLaMA-3.1)

A lightweight NLP layer extracts semantics from the ticket text using Groq’s high-speed inference.

LLM outputs:

A. Category classification

(Policy, Billing, Performance, Tracking, Access, etc.)

B. 1–2 sentence summary for agents

C. JSON semantic tags

{

Β  "billing_related": false,

Β  "policy_related": true,

Β  "performance_related": true,

Β  "access_security_related": false,

Β  "tracking_related": false,

Β  "urgency_hint": "high"

}

This creates rich contextual metadata that ML alone cannot capture.

πŸ”₯ 4. Priority Scoring Engine (ML + LLM Hybrid)

The engine fuses multiple signals:

Component Description

ML Severity 0–1–2 or low/med/high (baseline urgency)

LLM Urgency low / medium / high

LLM Semantic Tags topic-based risk cues

Revenue Impact optional financial weighting

Example output:

{

Β  "priority_score": 82.5,

Β  "components": {

Β  "severity_weight": 0.60,

Β  "llm_urgency_weight": 0.20,

Β  "llm_topic_weights": 0.15,

Β  "revenue_weight": 0.05

Β  }

}

Why this matters

This mirrors the real multi-signal decision logic in enterprise support systems β€” ensuring the right agent sees the right issue at the right time.

πŸ“Š 5. Visualizations

The notebooks include:

πŸ“ˆ Severity Distribution

πŸ“Š Priority Score Histogram

πŸ”₯ Correlation Heatmap (LLM tags vs. Priority)

🎯 Scatter Plot (Severity vs Priority)

🧩 Component Breakdown Bar Chart

These give clear evidence of system behavior and interpretability.

πŸ“‚ Repository Structure

google_ads_support_optimization/

β”‚

β”œβ”€β”€ data/

β”‚ └── raw_support_tickets.xlsx

β”‚

β”œβ”€β”€ models/

β”‚ └── severity_classifier.pkl

β”‚

β”œβ”€β”€ src/

β”‚ β”œβ”€β”€ config.py

β”‚ β”œβ”€β”€ llm_client.py

β”‚ β”œβ”€β”€ llm_issue_module.py

β”‚ └── priority_engine.py

β”‚

β”œβ”€β”€ notebooks/

β”‚ β”œβ”€β”€ 01_EDA.ipynb

β”‚ β”œβ”€β”€ 02_severity_classifier.ipynb

β”‚ └── 03_priority_engine.ipynb

β”‚

β”œβ”€β”€ .env

β”œβ”€β”€ requirements.txt

└── README.md

πŸ› οΈ Installation

1. Clone the repo

git clone https://github.com//google_ads_support_optimization.git

cd google_ads_support_optimization

2. Create and activate virtual environment

python -m venv .venv

.\.venv\Scripts\activate

3. Install dependencies

pip install -r requirements.txt

4. Set up .env

GROQ_API_KEY=your_key_here

LLM_PROVIDER=groq

LLM_MODEL=llama-3.1-8b-instant

πŸ§ͺ Run the notebooks

jupyter notebook

🎯 Why This Project Is Relevant to Google

This project demonstrates capability in:

βœ” Data analysis & statistical modeling

βœ” ML model development

βœ” LLM integration + prompt engineering

βœ” Operations optimization

βœ” Cross-functional communication (summaries, explainability)

βœ” Building production-ready pipelines

βœ” Prioritizing high-impact business problems

It directly aligns with responsibilities in:

gTech Business Data Science (gBDS)

Business Data Scientist (gDATA)

Google Ads Strategy & Operations

BizOps / Product Operations

AI/LLM-enabled support analytics

🧡 Future Extensions

Routing classifier for assigning agent group

Real-time API for scoring new tickets

Streamlit dashboard for interactive triage

Integration with BigQuery or Vertex AI

Multi-label classification for richer taxonomy

About

End-to-end Google Ads support optimization system using machine learning and LLMs to classify ticket severity, route cases, extract issue signals, and generate priority scores that improve support efficiency and resolution time.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published