Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

21 Commits

Folders and files

Repository files navigation

πŸ“‘ RAN Diagnostics RAG

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.


🌐 Project Overview

RAN Intelligence Control Center

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:

  1. Telemetry Ingestion & Anomaly Detection (Phase 1): Processes rolling timeseries network metrics, computing normalized statistics, trend slopes, oscillation intensity, and saturation proximity.
  2. Temporal Trend Analysis & Primitives (Phase 2): Tracks cell state transitions, evaluates persistence levels, and fires alert triggers.
  3. 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.
  4. 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.
  5. 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.

πŸ›οΈ System Architecture

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)

Core Architecture Stages

  • 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.

✨ Features

  • 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.

AI Chat Assistant

AI Chat Assistant

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.


πŸ“‚ Repository Structure

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

πŸš€ Quick Start

1. Prerequisites

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.

2. Startup All Services

Run the launcher script to start all services, background buses, and the static file server:

python3 launcher.py

3. Open Dashboard

Open your web browser and navigate to:

http://localhost:8000

You will be greeted with the real-time dynamic 3D RAN Control Center!

4. Inject Faults and Inspect RCA

  • Select RAN_CELL_ALPHA_02 from the developer console at the bottom.
  • Choose HARDWARE_FAULT and 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_FAILURE diagnosed with high confidence.
    • AI Resolution Plan: Shows a step-by-step physical inspection plan.
    • Context Grounding: Displays retrieved standard operating procedures from 3GPP TeleQnA.

πŸ‘©β€πŸ’» Development and Testing

A full development and contribution guide is available at DEVELOPMENT.md and CONTRIBUTING.md.

To run the automated integration tests:

python3 test_all.py

To verify the cryptographic state transition journal ledger:

python3 -m src.governance.state_audit verify

πŸ“œ Attribution and License

Primary Author

License

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.

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages