Skip to content

Add telco_network_recovery template (multi-reasoner, private)#56

Open
cafzal wants to merge 5 commits intomainfrom
telco-network-recovery-template
Open

Add telco_network_recovery template (multi-reasoner, private)#56
cafzal wants to merge 5 commits intomainfrom
telco-network-recovery-template

Conversation

@cafzal
Copy link
Copy Markdown
Collaborator

@cafzal cafzal commented May 5, 2026

Summary

A network operator missing revenue targets in one region needs a tower-upgrade plan that's grounded in evidence: which towers are technically broken, who actually depends on them, where demand is heading, and how to spend a fixed capex budget. No single reasoner answers this — the value of RAI is the chain.

This template demonstrates that chain end-to-end on one shared ontology:

  • Stage 1 — Predictive (GNN) regresses per-region subscriber growth from daily KPIs with same-region 1-day-lag temporal edges. Writes a per-region multiplier joined to each CellTower.projected_demand_growth.
  • Stage 2 — Rules derive per-tower averages (packet loss, latency, error rate, equipment health) and flag CellTower.is_critical_restore for WEST DEGRADED towers with low health.
  • Stage 3 — Graph (PageRank) builds a directed call graph (Subscriber → Subscriber via CallDetailRecord edges), scores influence, aggregates per-critical-tower blast radius (weighted_impact).
  • Stage 4 — Prescriptive (MIP) selects one tier (BRONZE/SILVER/GOLD) per critical tower under cost + crew-week caps, with a three-factor objective: each coefficient comes from a different upstream reasoner (capacity from data, weighted_impact from Stage 3, projected_demand_growth from Stage 1).

Marked private: true and featured: false to match peer predictive templates.

The runbook for this template lives in PR #57, which adds reproducibility runbooks across all four multi-reasoner templates in a consistent style.

Contents

  • telco_network_recovery.py — single combined script with the 4 stage banners
  • data/ — 8 bundled CSVs (~1.2 MB total): cell_towers (250), subscribers (1,200), call_detail_records (6,000), network_performance (5,000), network_equipment (544), equipment_health (544), tower_upgrade_options (360 = 3 tiers × 120 towers), time_series_metrics (3,285 = 365 days × 9 regions)
  • README.md with reasoner overview table, per-stage how-it-works walkthrough, troubleshooting collapsibles
  • pyproject.toml pinning relationalai==1.0.14, pandas>=2.0

Test plan

  • python -m py_compile telco_network_recovery.py passes
  • ruff check v1/telco_network_recovery/ passes
  • End-to-end run: GNN trains, all 4 stages complete, output shape matches the README "Expected output" section ($4,956,843 plan / 122 Gbps / 12 GOLD + 2 SILVER + 1 BRONZE / 15 of 15 critical WEST towers covered)
  • Verify private: true excludes from the public gallery

Four-stage chained-reasoner template on a shared telco ontology:
GNN regression on per-region daily KPIs (Predictive) → derived per-tower
averages + is_critical_restore flag (Rules) → PageRank on the call graph +
per-tower blast radius (Graph) → tower-upgrade MIP with three-factor
objective (Prescriptive). Each stage writes properties consumed by the next.

Bundled CSVs are dumped from TELCO_ENRICHMENT.PUBLIC; end-to-end run
produces $4,956,843 plan / 122 Gbps restored / 12 GOLD + 2 SILVER + 1 BRONZE
across all 15 critical WEST DEGRADED towers. Marked private: true to match
peer predictive templates.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

The docs preview for this pull request has been deployed to Vercel!

✅ Preview: https://relationalai-docs-ihxyfp58v-relationalai.vercel.app/build/templates
🔍 Inspect: https://vercel.com/relationalai/relationalai-docs/D97eA3nrTviamvdnD8h72bncst9b

Adds two reference files customers can adapt:
- telco_full_ontology.py — 18-concept reference ontology with model.Table()
  bindings (placeholder <YOUR_DB>.<YOUR_SCHEMA>) for users who want to scale
  the chain to their own Snowflake schema
- runbook.md — narrative walkthrough of all 5 reasoner stages plus the
  Stage 6 interpretation, including ASCII visualizations useful for
  explaining the chain to non-technical stakeholders

README links both from a new 'Further reading' section.
Drop telco_full_ontology.py — customer treats this as a worked example,
not a starter kit, so the broader Snowflake-source ontology added noise
without payoff.

Rewrite runbook.md from a narrative walkthrough into a build recipe
keyed to the RAI agent skills: rai-discovery scopes the question;
rai-pyrel-coding lays the focused 7-concept ontology; rai-rules-authoring
covers the derived averages + critical_restore flag; rai-graph-analysis
covers PageRank + blast radius; rai-prescriptive-problem-formulation
covers the MIP and pre-solver gates; rai-prescriptive-results-interpretation
covers the post-solve summary. Closes with how to adapt the chain to
a different domain.
… templates)

Plan for PR 57's hybrid build+present runbook authoring lives in
dev_temp/pr57_runbook_hybrid_plan.md (untracked, not shipped).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant