Pipeline Methodology & Agent Documentation

A comprehensive guide to the 4-agent AI analytics pipeline — what each agent does, how it works, the statistical methods and tools it uses, and how they connect together to deliver actionable telecom customer intelligence.

DAKA v8.1.0 SEKI v7.3.0 LOKI v7.2 STRATEGI v9.0

Pipeline Overview

The pipeline processes raw customer data through 4 specialized AI agents in sequence. Each agent adds a layer of intelligence, passing enriched outputs downstream. The core design principle is NO HARDCODING — every metric, threshold, and decision is derived from the actual data.

DAKA

v8.1.0

Data Analysis & Knowledge Acquisition

"Let me understand the DATA"

SEKI

v7.3.0

Segmentation Expert & Knowledge Intelligence

"Let me understand WHO"

LOKI

v7.2

Persona Discovery & Behavioral Psychology

"Let me understand WHY"

STRATEGI

v9.0

Strategic Growth Intelligence & Wave Planner

"Let me plan WHAT to do"

DAKA — Data Analysis & Knowledge Acquisition

Version 8.1.0 · Enterprise-Grade Universal BI Intelligence Agent
"Before we act, let me deeply understand your data — its quality, structure, risks, and hidden signals."

What It Does

  • Validates file integrity, schema, and data quality
  • Profiles every column — types, distributions, outliers
  • Detects industry, market, currency, and entity type from data patterns
  • Identifies root causes of business problems via dual correlation analysis
  • Assesses data readiness for campaign execution (Grade A–F)
  • Computes segmentability (Hopkins Statistic) and CLV trajectory
  • Performs waterfall decomposition (Pyramid Principle)
  • Detects PII, data leakage, and security risks

Libraries & Tools

  • pandas DataFrame operations & profiling
  • numpy Numerical computations
  • scipy.stats t-distribution for p-values
  • sklearn StandardScaler + NearestNeighbors (Hopkins)
  • regex PII pattern detection
  • LLM Router Goal-specific BI interpretation
  • Knowledge Layer Industry KPI templates

Statistical Methods

MethodPurposeKey Parameters
Pearson CorrelationDetect linear relationships between featuresr ≥ 0.5 (moderate), r ≥ 0.7 (strong)
Spearman Rank CorrelationDetect monotonic/nonlinear relationshipsDivergence > 0.15 flags nonlinear
Dual Correlation SelectionTakes stronger of Pearson vs Spearman per pairBest-of-two approach (v8.1)
Bonferroni CorrectionControl family-wise error rate across multiple testsα × n_tests
Benjamini-Hochberg FDRControl false discovery rateRank-based threshold at α = 0.05
Hopkins StatisticAssess whether data has natural cluster structureH > 0.7 = segmentable, H ≈ 0.5 = random
IQR Outlier DetectionIdentify statistical outliers per numeric columnFences: Q1 − 1.5×IQR, Q3 + 1.5×IQR
Skewness AnalysisDetect highly skewed distributions|skew| > 2.0 = highly skewed
Coefficient of VariationDetect low-variance (uninformative) featuresCV < 0.01 = low variance
CLV Proxy (Tenure × ARPU)Estimate customer lifetime value trajectoryGROWING / STABLE / DECLINING

Methodology Flow

  1. Load & Validate — Load CSV data, check file integrity, schema (no duplicate columns), and data completeness
  2. Profile & Detect Types — Profile every column (dtypes, nulls, cardinality). Auto-detect phone numbers, emails, booleans, currencies, ZIP codes
  3. Context Detection — Infer industry (10 industries), entity type, market/geography, and currency from data patterns with confidence scoring
  4. Semantic Inference — Classify columns by role (identity, revenue, engagement, value, usage). Identify KPI candidates per industry
  5. Quality Analysis — Missing data (nulls + placeholders), duplicates, outliers (IQR), consistency (date order, negative values), cardinality
  6. Correlation Network — Dual Pearson+Spearman with p-values, Bonferroni + FDR correction, trivial pair filtering, redundancy detection (r ≥ 0.95)
  7. Goal Investigation — Check requirements (target column present?), compute baseline metrics, identify root causes via correlations
  8. Waterfall Decomposition — Revenue tree, demographic cuts, digital footprint analysis, feature impact assessment, crosstab generation
  9. Readiness Scoring — Weighted 6-component score (validation 15%, completeness 25%, quality 20%, type cleanliness 10%, consistency 10%, goal alignment 20%) → Grade A–F
  10. Advanced Metrics — Hopkins statistic (segmentability), CLV proxy (tenure×ARPU trajectory), effort estimation (hours to fix issues)

Key Thresholds

Missing Data Critical
> 50%
Redundant Correlation
r ≥ 0.95
Hopkins Segmentable
H > 0.70
Root Cause Min Corr
r ≥ 0.30
Outlier IQR Multiplier
1.5
Max Correlation Edges
200
Grade A Threshold
≥ 90%
Grade F Threshold
< 40%

SEKI — Segmentation Expert & Knowledge Intelligence

Version 7.3.0 · Goal-Aligned Intelligent Customer Segmentation (Pipeline v10.0)
"I don't just cluster — I create segments aligned to your business goals with stability guarantees."

What It Does

  • Creates goal-aligned customer segments using ML clustering
  • Selects optimal number of segments (k) via silhouette optimization
  • Compares multiple clustering models and selects the best
  • Validates segment stability across 20 runs (Adjusted Rand Index)
  • Calculates goal propensity with bootstrap confidence intervals
  • Auto-splits dominant segments (>40% of base) into sub-groups
  • Generates campaign-ready labels ("Retain: HV Active")
  • Computes segment migration paths with feasibility scoring

Libraries & Tools

  • sklearn.cluster MiniBatchKMeans (memory-efficient)
  • sklearn.metrics silhouette_score, adjusted_rand_score
  • sklearn.preprocessing StandardScaler
  • pandas + numpy Data ops
  • joblib Model serialization
  • LLM Router Segment naming & scoring
  • Knowledge Layer Industry model configs

Statistical & ML Methods

MethodPurposeKey Parameters
MiniBatchKMeansPrimary clustering algorithm (memory-efficient for 200K+ rows)batch=2048, n_init=10, max_iter=200
Silhouette ScoreSelect optimal k — measures cluster cohesion vs separationTests k ∈ [3,4,5,6,7,8,9]
Adjusted Rand Index (ARI)Measure segment stability across 20 random seedsCampaign block if ARI < 0.50
Bootstrap Resampling95% confidence intervals for propensity scores100 bootstrap samples
Feature Interaction DetectionFind feature products that better predict goal KPIMust exceed individuals by ≥ 0.05
Collinearity RemovalDrop highly correlated features before clusteringThreshold: r ≥ 0.95
Multi-Model ComparisonCompare behavioral, value, churn, lifecycle, RFM modelsComposite score with silhouette weight=50
L2 Centroid DistanceMigration path feasibility between segmentsHIGH < 1.5, MEDIUM < 3.0, LOW ≥ 3.0
Goal-Aware Feature WeightingBoost features aligned to business goalTarget KPI: ×1.8, Model-specific: ×2.0

Methodology Flow

  1. Load DAKA Outputs — Unified dataset, domain config, KPI candidates, goal requirements, baseline metrics
  2. Feature Selection — Filter numeric columns, apply semantic role mapping, exclude IDs. Detect feature interactions (product terms that better predict goal)
  3. Goal-Aware Weighting — Boost target KPI (×1.8), supporting features (×1.3), model-specific features (×2.0). Clamp to [0.5, 5.0]
  4. Data Preparation — Sample up to 100K rows, standardize with StandardScaler, apply per-feature weights, drop collinear features (r > 0.95)
  5. Multi-Model Comparison — Run up to 6 model types (behavioral, value, churn, lifecycle, RFM, kmeans) with composite scoring. Silhouette delta override if gap ≥ 0.12
  6. Stability Validation — Run best model 20× with different seeds, compute pairwise ARI. Hard block if stability < 0.50. Campaign-ready flag
  7. Dominant Segment Split — If any segment > 40% of base, auto-split into 3 sub-segments using re-clustering
  8. Propensity & Risk Tiers — Calculate goal propensity per segment with bootstrap CIs. Assign tiers: HIGH_RISK / HIGH_OPPORTUNITY / NEEDS_ACTION
  9. Migration Paths — Compute centroid distances, boundary users (midpoint ratio < 0.55), revenue uplift per path. Top 10 most feasible
  10. Campaign Labels — Auto-generate "Action: Who" labels (max 25 chars). Actions: Retain, Reactivate, Upsell, Reward, Nurture, Grow

v10.0 Pipeline Enhancements

ARI Consensus with Mapped-Label Mode Assignment
Maps bootstrap run labels to common basis before computing mode. Improves consensus robustness across multiple clustering runs.
Silhouette 0.480 Achieved via Behavioral Model
Behavioral model optimization produces silhouette coefficient of 0.480, delivering improved segment cohesion and separation without sacrificing interpretability.

Key Thresholds

Stability Hard Block
ARI < 0.50
Stability Warning
ARI < 0.70
Dominant Segment
> 40% share
Bootstrap Samples
100 (95% CI)
Stability Runs
20 seeds
High Propensity
≥ 0.30
Silhouette Excellent
> 0.50
Max Features
100K rows sampled

LOKI — Persona Discovery & Behavioral Psychology Engine

Version 7.2 · LLM-First Intelligent Persona Discovery (Pipeline v10.0)
"I don't match templates — I discover personas by reasoning about data patterns and human psychology."

What It Does

  • Discovers personas via LLM reasoning (not template matching)
  • Models psychology: motivations, barriers, triggers, emotional state
  • Statistically grounds psychology claims via z-score testing
  • Infers communication channels from actual data signals
  • Consolidates similar personas using trait-weighted similarity
  • Computes multi-source confidence (closeness × certainty × completeness)
  • Calculates persona evolution windows with urgency levels
  • Graceful degradation: LLM → 8 fallback archetypes → deterministic rules

Libraries & Tools

  • LLM Router Persona discovery & psychology reasoning
  • numpy Z-score computation, sigmoid functions
  • pandas User-level enrichment & aggregation
  • joblib SEKI model artifact loading
  • itertools Pairwise similarity computation
  • Knowledge Layer Industry persona templates
  • math Exponential decay for confidence

Methods & Techniques

MethodPurposeKey Parameters
LLM Persona DiscoveryReason about segment data to discover psychologyTemp: 0.3, max 2 retries
Z-Score GroundingStatistically validate psychology claims against dataSTRONG: |z| ≥ 2.0, MODERATE: |z| ≥ 1.5
Trait-Weighted Jaccard SimilarityMerge similar personas (adaptive threshold)Motivations: 3.0, Barriers: 3.0, Triggers: 2.0
Sigmoid Centroid CertaintyMeasure segment separation qualitysigmoid(min_dist / scale)
Exponential Decay ClosenessUser-level confidence from centroid distanceexp(−dist / median_dist)
Composite ConfidenceCombine 3 signals into per-user confidence45% closeness + 35% certainty + 20% completeness
Tenure-Based Evolution WindowsOptimal intervention timing per personap25/p50/p75 tenure quartiles
Data-Driven Channel InferenceInfer channels from actual app/SMS/USSD signalsKeyword matching on column names

v10.0 Pipeline Enhancements

Iterative Jaccard Enforcement
Up to 10 iterations eliminating overlapping persona pairs with Jaccard similarity > 0.5, ensuring distinct and non-overlapping psychological profiles.
DIFFERENTIATION_POOL
12 motivations, 10 barriers, 10 triggers available for forced diversity. Ensures psychological profiles across personas maintain maximum distinction.
Goal Overlay Protection
Only fills MISSING psychology fields without overwriting enforced fields. Preserves critical psychological constraints while enriching incomplete profiles.
4-Component Tiered Fallback Naming
Persona names follow {Engagement} {Value} {Behavioral} {Psychology} structure with deterministic fallback to archetypes when data is insufficient.
Barrier Enforcement with BARRIER_POOL
Systematically assigns barriers from a curated pool of 10 barrier types, ensuring realistic and grounded psychological constraints for each persona.

Methodology Flow

  1. Load Upstream Data — SEKI segments with users, domain config, segment profiles (with propensity), optional model artifact
  2. Intelligent Discovery — For each segment: call LLM with key features, propensity, root causes. Discover persona name, goals, psychology, channels, messaging tone
  3. Statistical Grounding — For each psychology claim: map concept → keywords → find matching data columns → compute z-score. Tier: STRONG / MODERATE / WEAK / UNGROUNDED
  4. Channel Inference — Detect app engagement (moa_*, pwa_*), SMS signals, USSD signals. Merge data-driven channels with LLM suggestions (data gets priority)
  5. Persona Consolidation — Compute trait-weighted Jaccard similarity between all persona pairs. Merge if similarity > adaptive threshold (0.80 + 0.01×segments)
  6. Confidence Computation — Per user: closeness (45%, exp decay from centroid), certainty (35%, sigmoid of centroid separation), completeness (20%, KPI coverage)
  7. Bounded Overrides — Non-MOA + high revenue (90th pctl) → conversion target. MOA + low usage (10th pctl) → fragile starter. Adds reason codes
  8. Evolution Windows — Per persona: compute tenure quartiles. Map goal type to urgency (CRITICAL for churn, HIGH for dormant, MEDIUM for growth/engagement)

8 Fallback Archetypes

Dormant Mass — HIGH_RISK + Not Engaged + Large segment
Non-Digital At-Risk — HIGH_RISK + Not Engaged + Small
Fragile Starter — HIGH_RISK + Engaged (at risk of leaving)
Transitional — MEDIUM_RISK + Not Engaged
Core Mainstream — MEDIUM_RISK + Engaged
Digital Power User — LOW_RISK + Engaged
Stable Non-Digital — LOW_RISK + Not Engaged
Unclassified — Default fallback

STRATEGI — Strategic Growth Intelligence & Wave Planner

Version 9.0 · Data-First Campaign Orchestration with Competitive Intelligence (Pipeline v10.0)
"I turn insights into action — multi-wave campaign plans with realistic scenarios and rigorous A/B/C testing."

What It Does

  • Generates multi-wave campaign plans from root causes
  • Scores strategies on confidence × impact × feasibility
  • Creates 3-dimension A/B/C variants (channel + offer + tone)
  • Calibrates conversion rates against industry benchmarks
  • Models wave carryover effects (fatigue + conversion removal)
  • Plans 4 competitive scenarios (Conservative → Best Case)
  • Aligns campaign timing to billing/recharge cycles
  • Optimizes budget allocation via linear programming

Libraries & Tools

  • scipy.optimize linprog for budget optimization
  • LLM Client Wave plan enhancement
  • collections Counter for keyword extraction
  • math Scoring & calibration functions
  • json + pathlib Persistence
  • Knowledge Layer Industry learnings & CIG
  • re Pattern parsing

Methods & Techniques

MethodPurposeKey Parameters
Composite Strategy ScoringRank strategies by data-backed quality30% confidence + 45% impact + 25% feasibility
Industry Benchmark CalibrationNormalize propensity rates to realistic campaign ratesTelecom retention: 15–25%, reactivation: 3–8%
3-Dimension A/B/C VariantsTest channel, offer size, and message tone independently34/33/33 split ratio
Wave Carryover ModelingAdjust later waves for fatigue and prior conversions10% fatigue/wave, 30% max cap
Competitive Scenario ProjectionsRange of outcomes for executive planningFloor: −40%, Competitive: −25%, Best: +20%
Linear Programming (scipy)Mathematically optimal budget allocation5% min, 60% max per wave
Billing Cycle AlignmentTime campaigns to user recharge/renewal cyclesRetention: days −5 to −1 from cycle
Control Group Allocation10% holdout for lift measurementPer-strategy holdout
Strategy GroundingValidate psychology claims against data signalsScore 0.0–1.0 = grounded/total
Segment Overlap DetectionIdentify double-targeting across strategiesWarn if overlap > 30%

Methodology Flow

  1. Extract Inputs — Root causes from DAKA, segments from SEKI, personas from LOKI, CIG patterns, learnings. Parse goal, budget, timeline
  2. Data-Derived Configuration — Build grounding keywords from actual metrics (no hardcoding). Derive channels from persona consensus. Derive rates from SEKI propensity
  3. Generate Wave Plan (Data-First) — For each root cause × segment: create strategy with persona-matched channels. Assign to waves by ROI ranking. Dynamic wave names from content
  4. LLM Enhancement (Optional) — Improve descriptions, messaging, rationale. Retry up to 2× with backoff. Falls back to data-driven plan if fails
  5. Score Strategies — Confidence (data signals, propensity, grounding) × Impact (segment size, alignment, conversion) × Feasibility (channels, wave position). Rating: HIGH / MEDIUM / LOW
  6. Generate A/B/C Variants — For HIGH-rated strategies: test 3 dimensions (channel ↔ alternative, standard ↔ aggressive offer, urgency ↔ benefit ↔ social proof tone). 34/33/33 split
  7. Enrich & Calibrate — User counts from SEKI. Delivery rates per channel. Industry benchmark calibration (raw propensity → realistic rate). Control group holdout (10%)
  8. Billing Cycle + Carryover — Align timing to recharge cycles. Remove converted users from later waves. Apply fatigue (10%/wave, max 30%). Prevents 15–30% overstatement
  9. Budget & Scenarios — scipy linprog optimization (or proportional fallback). 4 competitive scenarios: Conservative Floor (−40%) → Best Case (+20%). Segment overlap detection
  10. Validate & Ground — ≥1 wave, 1–5 strategies/wave, ≥60% root cause coverage. Ground claims against data signals. Final grounding score + ungrounded claim list

v10.0 Pipeline Enhancements

Lifecycle-Bespoke Strategy Descriptions
Strategy descriptions are regenerated AFTER lifecycle phase assignment, ensuring messaging is optimized for customer journey stage (New, Mature, Veteran).
Grounding Audit at 85.7%
Merged psychology and data-derived keyword taxonomy achieves 85.7% strategy grounding rate, validating strategy claims against actual data signals.
Wave Number Metadata Propagation
Wave assignment metadata is propagated through all downstream strategy specifications, ensuring consistency in campaign sequencing and timing.
Lifecycle-Specific Offers
New → welcome bonus | Mature → VIP loyalty rewards | Veteran → exclusive retention programs. Tailored incentive structure per customer lifecycle stage.

Industry Benchmark Rates (Telecom)

Reactivation
3% – 8%
Retention
15% – 25%
Upsell
10% – 15%
Education
8% – 12%
Quick Win
12% – 20%
Fatigue Cap
30% max
Control Group
10% holdout
Budget Bounds
5%–60% per wave

Data Flow Between Agents

FromToKey Data Passed
DAKASEKIUnified CSV (200K rows × 83 cols), domain config (KPIs, semantics, goal requirements), root causes, baseline metrics
DAKALOKIDomain config (industry, KPI candidates, semantic groupings), root causes for persona reasoning
DAKASTRATEGIRoot causes (strategy basis), baseline metrics (conversion rates), billing cycle data
SEKILOKIUsers with segment IDs, segment profiles (propensity, goal rank, key features), model artifact (centroids)
SEKISTRATEGISegment profiles (sizes, propensity, alignment, campaign labels), migration paths
LOKISTRATEGIPersona summaries (psychology, preferred channels, messaging tone), evolution windows

Core Design Principles

NO HARDCODING — Every metric, threshold, channel, and conversion rate is derived from actual data. No hardcoded segment names, no template matching, no assumed constants.
DATA-FIRST, LLM-SECOND — Complete data-driven plans are always built first. LLM enhances descriptions and messaging but never gates execution. Graceful degradation guaranteed.
GOAL ALIGNMENT — Every agent is driven by the business goal. Segments are goal-aligned, personas reflect goal psychology, strategies target goal-specific root causes.
STATISTICAL RIGOR — Multiple testing corrections (Bonferroni + FDR), stability validation (20 runs), bootstrap CIs, z-score grounding, industry benchmark calibration.
GRACEFUL DEGRADATION — Every agent has fallback paths. LLM fails → rule-based. Missing data → proxy detection. No model → minimal output. Pipeline never crashes.
CAMPAIGN READINESS — Output is designed for direct CVM execution — campaign labels, A/B/C test specs, billing cycle timing, budget allocation, control groups.