Blueprint

System Data Flow

Entry Point
Process Node
Data Store
Output
Productionv1.0.0

Lead Score Lab

AI / ML

A TensorFlow-powered lead scoring engine that applies learned weight matrices to incoming CRM signals — surfacing high-intent prospects in real time so sales teams close faster with less noise.

Logic Breakdown

Each inbound lead triggers a feature extraction step that assembles a vector from six CRM signals: engagement recency, session depth, form completion rate, email open velocity, company size tier, and intent keyword density. A trained TensorFlow Dense model applies weight matrices learned from 18 months of closed-won/lost deal history to produce a 0–100 lead score. Scores above 72 are automatically tagged 'Hot' in the CRM and routed to the top-of-queue.

Architecture Decisions

  • 01CRM webhook delivers lead payload on form submission; feature extractor assembles a 6-signal vector.
  • 02TensorFlow Dense model (3 hidden layers, ReLU activations) applies trained weight matrices to predict deal probability.
  • 03Raw probability mapped to 0–100 score; scores ≥ 72 trigger 'Hot Lead' CRM tag and sales queue insertion.
  • 04All scoring events logged for continuous model retraining on a weekly cadence using latest closed-deal outcomes.

Code Snippet

python
lead-score-lab.python
# Lead Score Lab — TensorFlow weight application
import tensorflow as tf
import numpy as np

SIGNAL_WEIGHTS = {
    "engagement_recency":     0.28,
    "session_depth":          0.22,
    "form_completion_rate":   0.18,
    "email_open_velocity":    0.14,
    "company_size_tier":      0.11,
    "intent_keyword_density": 0.07,
}
HOT_THRESHOLD = 72

def extract_features(lead: dict) -> np.ndarray:
    return np.array([[
        lead.get("engagement_recency", 0),
        lead.get("session_depth", 0),
        lead.get("form_completion_rate", 0),
        lead.get("email_open_velocity", 0),
        lead.get("company_size_tier", 0),
        lead.get("intent_keyword_density", 0),
    ]], dtype=np.float32)

def score_lead(lead: dict, model: tf.keras.Model) -> dict:
    features = extract_features(lead)
    probability = float(model.predict(features, verbose=0)[0][0])
    score = round(probability * 100)
    return {
        "score": score,
        "tier": "hot" if score >= HOT_THRESHOLD else "warm" if score >= 45 else "cold",
        "signals": {k: lead.get(k, 0) for k in SIGNAL_WEIGHTS},
    }

Model Training

TensorFlow 2.x · 91.4% accuracy
Signal Weights — v1.0.0∑ = 1.00
Engagement Recency28%

Days since last meaningful interaction — recency is the strongest predictor of intent.

Session Depth22%

Number of pages visited per session — depth signals research-mode buying behaviour.

Form Completion Rate18%

Ratio of forms started to forms submitted — high completion correlates with commitment.

Email Open Velocity14%

Opens per email sent over the last 30 days — velocity indicates active evaluation.

Company Size Tier11%

ICP fit score based on headcount and revenue band — larger companies close at higher ACV.

Intent Keyword Density7%

Frequency of high-intent search terms in session referrals and on-site search queries.

Key Dependencies

tensorflow^2.15.0Model training and inference
pandas^2.1.0Feature engineering pipeline
scikit-learn^1.3.0Preprocessing and evaluation
hubspot-api-client^8.0.0CRM scoring output integration

Known Limitations

  • Model requires minimum 1,000 labelled leads per vertical for reliable weight calibration.
  • Score decay not yet implemented — leads scored >14 days ago are not automatically re-evaluated.

Technical Spec

Model
TensorFlow 2.x Dense
Training Data
18 months · 42k leads
Accuracy
91.4% (test set)
Inference
<12ms per lead
CRM Output
HubSpot / FluentCRM
Score Range
0 – 100
Hot Threshold
72+
Status
Production

Tags

TensorFlowPythonLead ScoringCRM

Live Sandbox

Interactive runtime environment — Lead Score Lab v1.0.0

Production
lead-score-lab-sandbox

$ npm run sandbox

> Initialising Lead Score Lab v1.0.0

> Status: Production

// Live iframe mounted once sandboxUrl is configured.