An Open-Source, Carrier-Grade RAN Diagnosing and Root-Cause-Analysis (RAG) System
Copyright 2026 Rajveer Singh. Licensed under the Apache License, Version 2.0.
RAN Diagnostics RAG is an advanced, carrier-grade, real-time diagnostic system for Radio Access Networks (RAN). In cellular network infrastructures (such as urban macro 4G/5G cells), telecom engineers face high volumes of diverse metrics, alarms, and coverage overlap matrices. Manually identifying the root cause of performance anomalies is slow and error-prone.
This project implements the OSCR (Operational Signature Classification and Reasoning) framework to automate:
- Telemetry Ingestion & Anomaly Detection (Phase 1): Processes rolling timeseries network metrics, computing normalized statistics, trend slopes, oscillation intensity, and saturation proximity.
- Temporal Trend Analysis & Primitives (Phase 2): Tracks cell state transitions, evaluates persistence levels, and fires alert triggers.
- Causal Progression Matching & Exclusions (Phase 3): Automatically evaluates anomaly signatures against a strict catalog and eliminates incorrect hypotheses using a Class-A/Class-B exclusion rules engine.
- Context-Grounded Retrieval & Optimization (Phase 4): Uses a FAISS-based vector index of 3GPP and TeleQnA telecom specification standards to retrieve domain-grounded context, passing it to an LLM to generate precise, hallucination-free action plans.
- Dynamic 3D Control Center (Web UI): Renders real-time telemetry, network topologies, causal transition timelines, and provides developer consoles for fault injection in a futuristic glassmorphic Three.js dashboard.
The codebase leverages a decoupled, high-performance microservices architecture that communicates asynchronously via ZeroMQ (zmq) message buses:
[ C++ Network Simulator ]
β (ZMQ: 5555)
βΌ
[ telemetry_simulator.py ]
β (ZMQ: 5555)
βΌ
[ anomaly_detector.py ]
β (ZMQ: 5556)
βΌ
[ pipeline_orchestrator.py ] <ββ> [ temporal_engine.py ]
β (ZMQ: 5560) [ causal_progression.py ]
βΌ
[ rca_engine.py ]
β (ZMQ: 5557)
βΌ
[ rag_pipeline.py ] <ββ> [ knowledge_base.py ] (FAISS)
β (ZMQ: 5558)
βΌ
[ llm_engine.py ] <ββ> [ optimization_engine.py ]
β (ZMQ: 5559)
βΌ
[ web_server.py ]
β (WebSockets: 8765)
βΌ
[ 3D HTML5 Dashboard ] (HTTP: 8000)
- Telemetry Bus (5555): Simulates macroscopic cell telemetry under baseline noise or injected faults (congestions, hardware degradations, interference, scheduler collapses).
- Anomaly Bus (5556): Standardizes rolling statistical evaluations to determine if a performance KPI is spiking, dropping, or oscillating.
- Orchestration Bus (5560): Orchestrates the OSCR pipeline, feeding the temporal state tracker, establishing transition state audits, and building structured signature evidence packages.
- RCA Bus (5557): Aggregates state-occupancy and causal-progression reports to converge on a single, high-confidence Root Cause.
- RAG Grounding Bus (5558): Vector embeds queries using Sentence-Transformers, querying a FAISS vector index built on the TeleQnA corpus.
- LLM generation Bus (5559): Passes grounded context to a generation engine with real-time runtime guardrails to prevent AI hallucinations, outputting concrete step-by-step mitigation recommenders.
- WebSocket Bridge (8765): Bridges ZMQ payload channels to JSON socket structures for client-side rendering.
- OSCR-driven Causal Reasoning Engine: Employs formal state-logic matrices rather than fragile heuristics to identify Root Causes.
- Vector Grounded RAG Pipeline: FAISS-backed retrieval system grounded directly in standard 3GPP operating procedures.
- Robust State Auditing Ledger: Log-based ledger records state history, cryptographically verifying each state transition's legitimacy.
- Interactive 3D Three.js Interface: Renders interactive network topologies, sector coordinates, connection nodes, and dynamic status bars.
- Interactive LLM RAN Assistant: Full chat panel allowing telecom operators to consult the RAG-backed LLM in real-time.
- Deterministic Simulation Controls: Developer console allowing dynamic fault-injection and normal resets to test the system's end-to-end resilience.
The integrated interactive AI RAN Assistant querying the local knowledge base directly from standard 3GPP operating procedures to assist with diagnostic verification. Also supports openai APIs to use natural language for queries.
The codebase is organized into a clean, modern, and professional structure to facilitate maintenance and scaling:
.
βββ AUTHORS # Attribution credits
βββ CITATION.cff # Research citation metadata
βββ CONTRIBUTING.md # Guidelines for open-source contributions
βββ DEVELOPMENT.md # Developer workflow and debugging guides
βββ INSTALLATION.md # Environment setup and dependencies guide
βββ LICENSE # Apache 2.0 License file
βββ PROJECT_STRUCTURE.md # Visual map and architecture guidelines
βββ README.md # Master documentation (this file)
β
βββ launcher.py # Root wrapper script to start all services
βββ evaluate.py # RCA performance evaluator
βββ evaluate_teleqna.py # TeleQnA retrieval benchmark validator
βββ test_all.py # Wrapper to start background test dependencies
βββ test_chat.py # ZMQ interactive chat test script
βββ test_pipeline.py # End-to-end integration test runner
β
βββ frontend/ # Static Web UI code
β βββ index.html # UI layout and dependencies
β βββ style.css # Cyberpunk glassmorphic layout styles
β βββ app.js # Three.js 3D renderer and web socket controller
β
βββ tests/ # Automated test suites
β βββ test_primitives.py # normalizations and accuracy tests
β βββ test_exclusions.py # Signature matches and class-A rule checks
β βββ test_convergence.py # Scores hysteresis validation
β βββ ...
β
βββ src/ # Source package directory
βββ __init__.py # Src package declaration
βββ pipeline_orchestrator.py # Core orchestrator process
βββ web_server.py # WebSocket server and command bridge
β
βββ common/ # Shared data schemas
β βββ contracts.py # Message payloads and transition records
β βββ oscr_contracts.py # Structured evidence schemas
β βββ semantic_validator.py # Schema validator utility
β
βββ config/ # Simulation configurations
β βββ baseline_profiles.json # Rolling metric calibration baselines
β βββ cell_config.json # Physical limits parameters
β βββ demo_topology_5tower.json # site azimuth and overlap grids
β
βββ datasets/ # Local grounding corpora
β βββ TeleQnA/ # TeleQnA standard dataset texts
β
βββ telemetry/ # Telemetry capturing
β βββ telemetry_simulator.py # Network simulation clock
β βββ anomaly_detector.py # Sliding window statistical checks
β
βββ temporal/ # State occupancy
β βββ temporal_engine.py # Primitives extraction and TSL counter
β βββ causal_state_model.py # Ontology state adapter bridge
β
βββ progression/ # Transition chains
β βββ causal_progression.py # OSCR chain matched templates
β
βββ rca/ # Diagnostics convergence
β βββ rca_engine.py # Diagnostic evaluator and confidence levels
β
βββ retrieval/ # FAISS RAG indexers
β βββ knowledge_base.py # FAISS VectorDB index builds
β βββ memory_engine.py # Long-term semantic embedding memory
β βββ rag_pipeline.py # Combined retrieval context engine
β
βββ explanation/ # Mitigation recommenders
β βββ llm_engine.py # OpenAI/Fallback generators
β βββ optimization_engine.py # Deterministic approved actions matrix
β
βββ ontology/ # Core ontology adapters
β βββ occupancy_engine.py # Phase transitions logic
β
βββ oscr/ # Signature matching layer
β βββ oscr_signature_engine.py # conformance and invariants checker
β βββ oscr_evidence_assembler.py # Context evidence packager
β βββ oscr_exclusion_engine.py # Exclusion criteria engine
β βββ oscr_signatures_catalog.py # Rules configuration catalog
β
βββ governance/ # Audit & Ledgers
βββ transition_journal.py # transition logger
βββ state_audit.py # Timeline verifying script
βββ replay_runner.py # Replay capture and check scripts
Ensure you have Python 3.10+ installed. System dependencies such as sentence-transformers, faiss-cpu, and websockets require setup. Refer to INSTALLATION.md for step-by-step setup guides.
Run the launcher script to start all services, background buses, and the static file server:
python3 launcher.pyOpen your web browser and navigate to:
http://localhost:8000
You will be greeted with the real-time dynamic 3D RAN Control Center!
- Select
RAN_CELL_ALPHA_02from the developer console at the bottom. - Choose
HARDWARE_FAULTand click Inject Fault. - In a few seconds, the live 3D tower node in the layout will turn red.
- The right panel will immediately update:
- Root Cause & Diagnosis: Shows
HARDWARE_FAILUREdiagnosed with high confidence. - AI Resolution Plan: Shows a step-by-step physical inspection plan.
- Context Grounding: Displays retrieved standard operating procedures from 3GPP TeleQnA.
- Root Cause & Diagnosis: Shows
A full development and contribution guide is available at DEVELOPMENT.md and CONTRIBUTING.md.
To run the automated integration tests:
python3 test_all.pyTo verify the cryptographic state transition journal ledger:
python3 -m src.governance.state_audit verify- Rajveer Singh (ladybug-me)
- GitHub: https://github.com/ladybug-me
- Email: rajveer2027singh@gmail.com
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this codebase except in compliance with the License. You may obtain a copy of the License in the LICENSE file or at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

