events / README.md
eliel2003's picture
Update README.md
9aeb3f0 verified
|
Raw
History Blame Contribute Delete
28.6 kB
metadata
configs:
  - config_name: events
    data_files: dataset_a_events.csv
  - config_name: vendors
    data_files: dataset_b_vendors.csv
license: mit
language:
  - en
tags:
  - event-management
  - b2b
  - synthetic
  - recommendation-system
  - nlp
  - embeddings
pretty_name: ProSync AI  B2B Event Management Dataset
size_categories:
  - 1K<n<10K

ProSync AI — The Event Producer's Command Center

An end-to-end Data Analytics & AI project for professional B2B and private event production. ProSync AI turns two synthetic datasets (3,000 past events and 7,000 vendors) into a working pipeline for cost estimation, quotation logic, semantic vendor recommendation, and automated supplier outreach.


Table of Contents

  1. Project Overview
  2. Business Problem
  3. The ProSync AI Solution
  4. Project Objectives
  5. Dataset Overview
  6. Data Preparation & Methodology
  7. Exploratory Data Analysis
  8. Key Findings & Business Insights
  9. Metrics & KPIs
  10. Machine Learning / AI Approach
  11. Business Recommendations
  12. Technologies & Tools
  13. Project Structure
  14. Limitations
  15. Future Work
  16. Conclusion

1. Project Overview

ProSync AI is a decision-support concept for professional event producers. Planning a corporate and private event means estimating a realistic budget, splitting it across seven service categories, choosing suitable vendors under real constraints (city, season, budget), and reaching out to those vendors — today largely a manual, experience-driven, error-prone process.

This project builds the analytical and AI backbone for that workflow. Working from two synthetic datasets, it profiles historical event economics, models spend and segments the vendor marketplace.

The work is delivered as a single reproducible notebook covering four stages — data preprocessing → exploratory data analysis (9 sections) → embedding evaluation & semantic retrieval → text generation — plus the pre-computed vendor embeddings intended to power a lightweight Gradio application.


2. Business Problem

Event production is a high-stakes coordination problem with three recurring pain points:

  • Budgets are unreliable. Planned budgets routinely fail to match final spend, so quotes prepared from the original budget alone tend to under-quote the client.
  • Vendor selection is hard to reason about. Producers juggle price, quality, reliability, availability, location and fit across seven categories and thousands of potential suppliers — usually from memory and a personal contact list.
  • Outreach is slow and repetitive. Drafting tailored RFP emails and production schedules for each event consumes time that could go into planning.

The project's goal is to replace intuition with data-driven, auditable logic wherever possible, and to automate the repetitive drafting work safely.


3. The ProSync AI Solution

ProSync AI is organised around four functional capabilities. Two are implemented as working functions in the notebook; two are delivered as data-driven parameters and models that the EDA derives directly from history.

Capability What it does How it is delivered in this project
Cost Estimation Base budget estimate for a new event A per-event-type lookup table of budget-per-guest (median / Q1 / Q3 / P90), plus a Random Forest spend model
Quotation Logic Correct systematic under-quoting; split budget by category A universal correction factor derived from historical utilisation, plus fixed cost-allocation ratios
Vendor Recommender Rank suitable vendors per category recommend_vendors() — hard filters (city, season, budget) + blended semantic/quality score

A key design principle runs through the system: structured data is the source of truth. Wherever the LLM-generated text is unreliable (for example, vendor company names), the correct value is injected from the structured columns at render time rather than trusted from generated prose.


4. Project Objectives

  1. Validate the structural integrity of the events and vendors datasets.
  2. Identify the dominant driver(s) of event cost per guest.
  3. Quantify how systematically events exceed their planned budget and derive a correction factor.
  4. Test whether vendor price is a reliable proxy for vendor quality.
  5. Build a composite vendor-quality score usable for ranking within a budget.
  6. Map, per budget level, how many vendors in each category are actually affordable.
  7. Establish stable per-category cost-allocation ratios for budget splitting.
  8. Segment events and vendors into interpretable clusters.
  9. Audit the AI-generated text fields for artifacts and hallucinations, and mitigate them.
  10. Select an embedding model and build a working semantic recommendation + generation pipeline.

5. Dataset Overview

Two linked synthetic datasets are analysed. The narrative text fields (vendor_profile_text, event_narrative) were produced by a small open language model as part of the project's data-generation stage; the structured fields were generated programmatically with business-logic constraints. All data is synthetic — no real companies, events or individuals are represented.

Dataset A — Past Events

Property Value
Rows 3,000
Event types 10
Cities 8
Missing values 0
Duplicate rows 0

Representative fields: event_id, event_type, client_industry, city, month / season, guest_capacity, catering_style, av_complexity (1–5), total_budget_usd, actual_spend_usd, margin_pct, vendor_ids_used (JSON list of 7 vendor IDs), vendor_cost_breakdown (JSON {vendor_id: cost} that sums to actual_spend_usd), success_rating (1–5), and event_narrative.

Event types (10): Investor Day, Corporate Gala, Award Ceremony, Tech Summit, Product Launch, Brand Activation, Annual Conference, Trade Show, Team Building, Workshop Series. Events are roughly evenly distributed (~280–330 per type).

Dataset B — B2B Vendors

Property Value
Rows 7,000
Categories 7 (exactly 1,000 vendors each)
Missing values 0
Duplicate rows 0

Representative fields: vendor_id, vendor_name, category, subcategory, price_tier (1–5), day_rate_min_usd / day_rate_max_usd, avg_rating (1–5), sla_compliance_rate (0–1), response_time_hours, guest_capacity_min / _max, coverage_cities (JSON), seasonal_availability (JSON), specializations (JSON), certifications (JSON), years_in_business, and vendor_profile_text.

Vendor categories (7): Catering, Venue, AV_Technology, Entertainment, Photography_Video, Logistics, Security.

How the datasets connect

Each event references exactly 7 vendors — one per category — through vendor_ids_used and vendor_cost_breakdown. Exploding the breakdown produces an integrated table of 21,000 rows (3,000 events × 7 vendors) that is used for the cost-allocation analysis. The notebook validates referential integrity and confirms the per-event breakdowns reconcile to actual_spend_usd.


6. Data Preparation & Methodology

The following steps are what the notebook actually performs on load.

Events (Dataset A)

  • Parse the two JSON columns (vendor_ids_used, vendor_cost_breakdown).
  • Validate the event_id primary key (no duplicates).
  • Consistency-check derived columns: month_name and season recomputed from month; margin_pct recomputed from budget and spend and asserted to match.
  • Drop vendor_count (constant = 7, zero variance).
  • Feature engineering: budget_per_guest, spend_per_guest, util_rate (actual_spend / total_budget), budget_overage_usd, is_over_budget flag, and is_low_quality flag (success_rating < 3.0).

Vendors (Dataset B)

  • Safe JSON parsing for coverage_cities, seasonal_availability, specializations, certifications (type-guarded to protect list columns).

  • Validate vendor_id uniqueness and numeric ranges (day_rate_min < day_rate_max, guest_capacity_min < guest_capacity_max).

  • Text cleaning: strip a prompt-leakage prefix (**Vendor Profile:**) from affected profiles and trim string columns.

  • Feature engineering: n_specializations, n_cities, n_certifications, has_certification, day_rate_mid, rating_norm (min–max), value_score (1 − (price_tier − 1) / 4), and the composite vendor score:

    composite_score = 0.4 · rating_norm + 0.4 · sla_compliance_rate + 0.2 · value_score
    

Both datasets are confirmed complete (zero nulls, zero duplicates) before analysis.


7. Exploratory Data Analysis

The EDA is organised into nine analytical sections, each tied to one of the four capabilities. Only the most decision-relevant results are summarised here. The figures below are the notebook's saved outputs; the image links assume they live in outputs/figures/ (adjust the paths if you store the PNGs elsewhere).

Section 1 — Data Profiling

Confirms 3,000 events / 7,000 vendors, balanced classes, zero nulls, zero duplicates. Two structural constraints are flagged as known limitations: guest_capacity takes only 14 discrete values, and success_rating is floored at 2.5 (the data contains no catastrophic-failure events).

Section 1 — Data Profiling & Structural Overview Event-type frequencies, the perfectly balanced vendor categories (1,000 each), the 14-value guest-capacity artifact, the success-rating floor at 2.5, and a zero-nulls / zero-duplicates quality summary.

Section 2 — Cost Hierarchy (Cost Estimation)

event_type is by far the strongest driver of cost per guest, producing an ≈5× spread from the cheapest type (Workshop Series) to the most expensive (Investor Day) — the notebook's cost-lookup table reports a median budget-per-guest range of roughly $124 to $618. The per-type IQR (Q1–Q3) becomes the quotation confidence interval.

Section 2 — Cost Hierarchy: The Quotation Lookup Table Left: budget-per-guest distribution per event type, sorted by median. Right: the median ± IQR "confidence interval" that seeds each quote.

Section 3 — The Under-Quoting Problem (Quotation)

55.0% of events exceed their planned budget. The mean utilisation rate is ≈1.02 and is structurally uniform across event types (no type is meaningfully "safer"), so the quotation logic applies a single universal correction rather than per-type adjustments. The P90 utilisation sits near 1.10 (a ~10% buffer covers ~90% of cases); the maximum observed is 1.50.

Section 3 — The Under-Quoting Problem Utilisation-rate histogram (55% land above break-even), mean utilisation per event type (uniform ≈1.02), and planned-vs-actual spend on a 500-event sample.

Section 4 — Price vs. Quality (Recommender Logic)

Across every category, average rating is essentially flat across price tiers — the Pearson correlation between price_tier and avg_rating is near zero. Paying more does not reliably buy higher quality. This is the finding that shapes the recommender: rank on the composite score and semantic fit, not on price.

Section 4 — Vendor Marketplace Dynamics Left: composite score by price tier (overlapping distributions). Right: average rating by tier for every category — near-flat lines with a near-zero Pearson r confirm price ≠ quality.

Section 5 — Predictive Modelling (Quotation Precision)

A Random Forest predicts actual_spend_usd (details in Section 10). It defines the quotation engine's expected precision band (MAE), with an explicit caveat about feature leakage.

Section 5 — Predictive Quotation Optimisation Predicted vs. actual spend against the ideal-fit diagonal; the tight fit reflects both model accuracy and the mathematical structure of the features (R² ≈ 0.945, MAE ≈ $29,067).

Section 6 — Budget Fit Matrix (Supply Constraints)

Affordability by category at three budget levels (P25 ≈ $57K, P50 ≈ $101K, P75 ≈ $207K):

Budget level Most constrained categories
Median (~$101K) Venue ≈ 57%, Entertainment ≈ 60% affordable
Small (~$57K) Entertainment & Logistics ≈ 19% affordable (fewer than 1 in 5 vendors)

Rule derived: if affordable vendors in a category fall below ~30%, warn the user before running the search.

Section 6 — Budget Fit Matrix Heatmap of vendor affordability (category × budget level), red→green. Venue and Entertainment are the first categories to become supply-constrained as budgets shrink.

Section 7 — Cost Allocation DNA (Cross-Dataset Integration)

Category cost shares vary by less than 2 percentage points across all 10 event types — stable enough to use as budget-split baselines:

Category Avg share
Catering 30.4%
Venue 22.8%
AV_Technology 17.5%
Entertainment 10.4%
Photography_Video 7.6%
Logistics 5.7%
Security 5.7%

Catering + Venue + AV together account for ≈70.6% of every event budget.

Section 7 — Cost Allocation DNA Left: average cost share per category across all 3,000 events. Right: cost share by category × event type — near-identical columns (<2pp variation) validate fixed allocation ratios.

Section 8 — K-Means Clustering (Segmentation)

K = 4 clusters for both events and vendors (chosen for interpretability; the elbow is gradual). The standout segment is "Budget Champions": 2,263 vendors offering roughly Tier-2 pricing with an average rating of ≈4.56 — high quality at low cost — which the recommender can prioritise for cost-conscious briefs.

Section 8 — K-Means Clustering & PCA Six panels — elbow, PCA scatter, and cluster-profile heatmap for events (top) and vendors (bottom). The Budget Champions region stands out in the vendor PCA scatter.

Event clusters (K = 4):

Cluster Label Avg $/guest Avg guests Avg success
0 High-Budget Premium $547 503 4.1
1 Mid-Scale Underperforming $231 367 3.1
2 Mid-Scale High-Quality $220 418 4.4
3 Large-Format Events $251 1,565 3.8

Vendor clusters (K = 4):

Cluster Label Avg tier Avg rating Avg $/day
0 Budget Champions 2.3 4.56 $4,969
1 Budget Underperformers 2.5 3.64 $5,511
2 Mid-Tier Generalists 2.9 4.10 $8,283
3 Premium Tier 4.8 4.10 $25,861

Cluster labels are defined in the notebook; the "Budget Champions" segment (Tier-2 pricing, ~4.56 rating) is the most actionable — strong quality at a low day rate.

Section 9 — LLM Quality Audit

Three classes of issues in the AI-generated text were identified and handled:

Issue Extent Handling
Prompt-leakage prefix 384 profiles Cleaned during preprocessing
Vendor-name hallucination 17.8% of profiles reference the wrong company Runtime name injection from the structured vendor_name column
City hallucination 0 detected

Text completeness was also verified (no truncated profiles or narratives).

Section 9 — LLM Quality Audit Text-length completeness, the 384 prompt-leakage artifacts (pre-cleaning), the 17.8% vendor-name mismatch donut, and sample cases where the model invented a different company name.


8. Key Findings & Business Insights

1. Event type is the master pricing signal. Evidence: ~5× spread in median budget-per-guest across event types, dwarfing every other variable. Implication: a simple, transparent event_type → budget/guest lookup is a credible foundation for first-pass quoting. Use: powers the Cost Estimation lookup table.

2. Under-quoting is systematic, not situational. Evidence: 55% of events run over budget with a uniform ≈1.02 mean utilisation across all types. Implication: quotes built from the original budget alone are biased low. Use: the quotation logic applies a universal correction factor plus a documented buffer.

3. Price does not buy quality. Evidence: near-zero correlation between price tier and average rating; flat rating curves in every category. Implication: selecting the priciest vendor is not a quality strategy. Use: the recommender ranks on composite quality + semantic fit, and the "Budget Champions" cluster becomes the go-to pool for value.

4. Budget allocation is remarkably stable. Evidence: <2pp variation in category cost shares across all event types. Implication: one allocation formula generalises across the whole portfolio. Use: fixed ratios split any quote into per-category budgets.

5. Supply is budget-constrained where it matters most. Evidence: at median budgets only ~57–60% of Venue/Entertainment vendors are reachable, and as low as ~19% at small budgets. Implication: recommendations can silently fail if affordability isn't checked first. Use: a pre-search budget warning per category.

6. Generated text needs architectural guardrails. Evidence: 17.8% of vendor profiles name the wrong company. Implication: generated prose cannot be a factual source. Use: vendor identities are always injected from structured data during RFP/Run-of-Show generation.


9. Metrics & KPIs

The metrics below are the ones actually computed and used in the project:

Metric Value / definition Role
Budget-overrun rate 55.0% of events over budget Quantifies the under-quoting problem
Mean utilisation (util_rate) ≈1.02 (P90 ≈ 1.10, max 1.50) Quotation correction factor + buffer
Composite vendor score 0.4·rating_norm + 0.4·SLA + 0.2·value_score (~0.13–0.87) Vendor ranking
Category affordability % Share of vendors within a category's allocated budget Budget-fit / warning rule
Cost-allocation ratios 30.4 / 22.8 / 17.5 / 10.4 / 7.6 / 5.7 / 5.7 (%) Budget splitting
Model precision (MAE / R²) See Section 10 Quotation precision band
Retrieval Hit@5 100% on 5 targeted queries Embedding-model selection
Name-hallucination rate 17.8% Motivates runtime name injection

Note on planned vs. delivered KPIs. Several KPIs discussed in the original project plan — Quote Accuracy Rate, Supplier Reliability Score, Margin-at-Risk, Vendor Concentration Risk, and a Seasonality Index — are not implemented in the final notebook. They are listed under Future Work rather than presented as completed.


10. Machine Learning / AI Approach

The project contains four distinct ML/AI components.

(a) Random Forest spend model — supervised regression

  • Target: actual_spend_usd
  • Features: guest_capacity, budget_per_guest
  • Split: 80/20 train/test, random_state=42; RandomForestRegressor(n_estimators=100)
  • Result: R² ≈ 0.945, MAE ≈ $29,067 on the test set
  • Interpretation: the high R² is partly structural — budget_per_guest × guest_capacity is closely related to spend — so the model behaves largely as a scaling/correction function. Its value is defining the quotation engine's expected error band, and the notebook flags that it should be validated on real, unseen data before production use.

(b) K-Means segmentation — unsupervised clustering

Events and vendors each clustered with K = 4 (StandardScaler → KMeans → PCA for 2-D view). Surfaces the actionable "Budget Champions" vendor segment (2,263 vendors, high rating, low price).

(c) Semantic vendor recommender — embeddings + retrieval

  • Embedding-model bake-off: MiniLM (all-MiniLM-L6-v2, 384-d), BGE-small, BGE-base, evaluated with Hit@5 over 5 category-targeted queries.

  • Outcome: all three models scored 100% Hit@5 on the targeted set, so encode speed broke the tie — MiniLM won (~9s to encode the full corpus vs. over a minute for BGE-base). Embeddings are saved to vendor_embeddings.parquet (indexed by vendor_id) for fast app startup.

    Section 11 — Embedding Model Comparison Encode time, vector dimensions, and Hit@5 for the three candidates. All tie at 100% Hit@5, so MiniLM's speed advantage decides the winner.

  • recommend_vendors() pipeline: vectorised hard filters (city coverage ∩ seasonal availability ∩ per-category budget allocation), then rank survivors by a blended score:

    final_score = 0.60 · semantic_similarity + 0.40 · composite_score
    

    Returns the top vendor(s) per category. Five targeted sanity tests confirm the expected category is surfaced under the specified constraints (with the explicit caveat that this is not a guarantee across all possible briefs).

  • PCA check: on the 384-d embedding space, 119 components explain 90% of variance, and categories occupy distinguishable regions — descriptive evidence of category-discriminative structure (retrieval quality is judged separately by Hit@5).

    Section 15 — Embedding Analysis (PCA) Left: 1,000 vendor embeddings projected to 2-D, coloured by category. Right: per-component and cumulative explained variance, marking the 119 components needed to reach 90%.


11. Business Recommendations

  1. Quote from history, not from the client's opening budget. Apply the ≈1.02 correction factor (plus a ~10% buffer for conservative quotes) so that 9 in 10 events land within the quoted range instead of exceeding it.
  2. Lead vendor ranking with quality and fit, never price. Because price and rating are uncorrelated, surface the "Budget Champions" pool first for cost-sensitive clients — better ratings at lower day rates.
  3. Check affordability before recommending. Show a category-level budget warning when fewer than ~30% of vendors are reachable (especially Venue and Entertainment), so producers can reallocate before a search returns thin results.
  4. Split budgets with the stable allocation ratios, using them as transparent starting points (Catering 30% / Venue 23% / AV 18% …) and adjusting only when a brief clearly demands it.
  5. Treat generated text as a draft, not a record. Keep vendor identities and any contractual figures sourced from structured data; use the LLM only for tone and structure.
  6. Prioritise Venue and Entertainment sourcing in the vendor network, since these are the categories where affordable supply runs out first.

12. Technologies & Tools

Area Tools
Language & environment Python, Jupyter / Google Colab (T4 GPU)
Data & numerics pandas, NumPy, SciPy
Visualisation Matplotlib, Seaborn
Classical ML scikit-learn — RandomForestRegressor, KMeans, PCA, StandardScaler, train_test_split, metrics
Embeddings / retrieval sentence-transformers (all-MiniLM-L6-v2), PyTorch
Text generation Hugging Face transformers, huggingface_hub (Mistral-7B-Instruct-v0.2), TinyLlama-1.1B-Chat
Storage Parquet (vendor_embeddings.parquet)
Data generation (upstream) Programmatic generation with Faker/NumPy + a small open LLM for narrative fields
Intended deployment Gradio app on Hugging Face Spaces (loads the pre-computed embeddings)

13. Project Structure

The structure below reflects the artifacts the project actually produces (one combined analysis notebook, two source datasets, eleven EDA figures, and the pre-computed embeddings). The upstream data-generation notebook is included per the project documentation.

ProSync-AI/
│
├── README.md
│
├── data/
│   ├── dataset_a_events.csv          # 3,000 past events
│   └── dataset_b_vendors.csv         # 7,000 B2B vendors
│
├── notebooks/
│   ├── prosync_analysis.ipynb        # Preprocessing → EDA → embeddings → recommender → generation
│   └── data_generation.ipynb         # Upstream synthetic-data generation (per documentation)
│
├── outputs/
│   ├── vendor_embeddings.parquet     # MiniLM vectors, indexed by vendor_id
│   └── figures/
│       ├── S1_profiling_overview.png
│       ├── S2_cost_hierarchy.png
│       ├── S3_underquoting_problem.png
│       ├── S4_vendor_dynamics.png
│       ├── S5_predictive_modeling.png
│       ├── S6_budget_fit_matrix.png
│       ├── S7_cost_allocation_dna.png
│       ├── S8_kmeans_clustering.png
│       ├── S9_llm_quality_audit.png
│       ├── S11_model_comparison.png
│       └── S15_embedding_analysis.png

14. Limitations

  • Synthetic data. All records are generated, so distributions and relationships reflect the generation rules rather than a live market; prices are not real-time.
  • success_rating is floored at 2.5. The dataset contains no catastrophic-failure events, so the models cannot learn extreme failure behaviour.
  • Low-cardinality fields. guest_capacity (14 discrete values) and response_time_hours behave more like ordinal categories than continuous measures.
  • Spend-model leakage. The Random Forest's high R² partly reflects the mathematical relationship between its features and the target; it should not be read as independent forecasting power.
  • Narrow evaluation of retrieval. Hit@5 = 100% is measured on just five targeted queries; the recommender's five sanity tests likewise validate behaviour only on representative scenarios, not universally.
  • LLM name hallucination (17.8%) means generated profile text is unreliable for factual fields; the mitigation reduces but does not eliminate the underlying model limitation.
  • No live deployment in this repo. The Gradio/Spaces application is the intended target; this project delivers the analytics, the recommender, the generation functions, and the pre-computed embeddings it would consume.

15. Future Work

  • Implement the originally planned KPIs — Quote Accuracy Rate, Supplier Reliability Score, Margin-at-Risk, Vendor Concentration Risk, and a Seasonality Index — and surface them in a dashboard.
  • Dedicated seasonality and geography analysis. City and season are currently used only as hard filters; a pricing analysis across cities and seasons would add planning value.
  • Stronger spend modelling with features that avoid target leakage, plus proper cross-validation and calibration on out-of-sample data.
  • Learned recommendation weighting. Replace the fixed 60/40 semantic/quality blend with a weighting tuned against real booking or satisfaction outcomes.
  • Broaden retrieval evaluation to a large, labelled query set for a defensible Recall@k benchmark.
  • Validate on real (non-synthetic) data, including genuine failure cases, before any production use.
  • Ship the Gradio application end-to-end and integrate with real event-management and vendor systems.

16. Conclusion

ProSync AI demonstrates a complete, honest analytics-to-AI pipeline for B2B event production. The EDA establishes a small set of durable, decision-ready facts — event type dominates cost, under-quoting is systematic, price is a poor quality signal, and budget allocation is stable — and each fact maps to a concrete product rule. On top of that foundation sit two working AI components: a semantic vendor recommender that respects real city/season/budget constraints, and a grounded LLM generation module for schedules and outreach. Just as importantly, the project is candid about what it did not achieve — the synthetic ceiling on failure cases, the leakage in the spend model, the narrow retrieval evaluation, and the KPIs still on the roadmap — which is what makes the parts that do work trustworthy.


All data is synthetic. No real companies, events, or individuals are represented.