# johnson-penguin/integrating-generative-ai-into-mobile-networking architecture

> Architecture diagram of the GitHub repository johnson-penguin/integrating-generative-ai-into-mobile-networking, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/johnson-penguin/integrating-generative-ai-into-mobile-networking
- Repository: https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking

## Overview

##### Project type and purpose
- This is a research/analysis toolchain for generating and testing 5G gNB configurations (CU/DU), ingesting logs/pcaps, building an error database, and then running embedding‐based analyses (e.g., RAG vs. no‐RAG).
- It combines a configuration‐generation library, a simulation/orchestration layer (shell/python), data extraction into a structured “error_db,” and Jupyter notebooks for downstream embedding experiments.

##### File structure
- Top‐level directories:
- Experiment/ – notebooks for embedding & RAG experiments
- Sample_conf/ – sample .conf files illustrating scenarios
- Scenario/ – actual runs: per‐scenario subfolders containing DU/CU conf, logs, pcap, error_db
- Scenario_Gen/ – Python modules for generating parameterized CU/DU test configurations and expected logs
- TOOL/ – helper script to convert .conf → JSON
- gNB_script/ – shell scripts to launch gNB tests & capture logs/pcap
- debug.yaml, new_debug.yaml – orchestrator/config for pipeline
- Config generators (Scenario_Gen/cu and Scenario_Gen/du) produce many .conf/.json sets and scaffolding tests.
- Orchestration: gNB_script/*.sh and the notebooks call TOOL/conf_to_json.py; resulting logs/pcap are saved under Scenario/*.
- Data storage: each Scenario_n/error_db contains binary files plus chroma.sqlite3.

##### README

3. Next: “Orchestrator (debug.yaml + gNB_script)”
4. Then: “gNB Simulation Environment (CU & DU)”
5. Then branch into two: “Logs & PCAP” and “Error DB Builder → chroma.sqlite3 + .bin segments”
6. Finally: “Experiment Notebooks (embedding.ipynb, rag_vs_no_rag_comparison.ipynb)”

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Generation"
        direction TB
        SC["Sample Configuration Store"]:::storage
        CG_CU["Scenario_Gen: CU"]:::generation
        CG_DU["Scenario_Gen: DU"]:::generation
    end

    TOOL["Conversion Tool (conf_to_json)"]:::generation

    subgraph "Orchestrator"
        direction TB
        YAML["YAML Config (debug.yaml / new_debug.yaml)"]:::execution
        S1["1_catch_log_pcap.sh"]:::execution
        S2["testing_FH.sh"]:::execution
    end

    gNB["gNB Simulation (CU & DU)"]:::execution

    Logs["Logs (.log)"]:::storage
    PCAP["PCAP (.pcap)"]:::storage

    ErrorBuilder["Error DB Builder"]:::execution
    EDB["Error_DB (chroma.sqlite3 + .bin)"]:::storage

    subgraph "Experiment Notebooks"
        Emb["embedding.ipynb"]:::analysis
        Rag["rag_vs_no_rag_comparison.ipynb"]:::analysis
    end

    subgraph "Scenario Notebooks"
        SN["testing_embedding_integration*.ipynb"]:::analysis
    end

    SC -->|".conf"| TOOL
    CG_CU -->|".conf"| TOOL
    CG_DU -->|".conf"| TOOL

    TOOL -->|".json"| YAML
    YAML --> S1
    YAML --> S2
    S1 -->|"runs CU/DU"| gNB
    S2 -->|"runs CU/DU"| gNB

    gNB -->|".log"| Logs
    gNB -->|".pcap"| PCAP

    Logs --> ErrorBuilder
    PCAP --> ErrorBuilder

    ErrorBuilder -->|".sqlite3 / .bin"| EDB

    EDB --> Emb
    EDB --> Rag
    EDB --> SN

    click CG_CU "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/tree/main/Scenario_Gen/cu/"
    click CG_DU "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/tree/main/Scenario_Gen/du/"
    click SC "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/tree/main/Sample_conf/"
    click TOOL "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/blob/main/TOOL/conf_to_json.py"
    click YAML "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/blob/main/debug.yaml"
    click S1 "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/blob/main/gNB_script/1_catch_log_pcap.sh"
    click S2 "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/blob/main/gNB_script/testing_FH.sh"
    click Logs "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/blob/main/Scenario/*/DU/log/*.log"
    click PCAP "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/blob/main/Scenario/*/FH/*.pcap"
    click EDB "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/tree/main/Scenario/*/error_db/"
    click Emb "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/blob/main/Experiment/embedding.ipynb"
    click Rag "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/blob/main/Experiment/rag_vs_no_rag_comparison.ipynb"
    click SN "https://github.com/johnson-penguin/integrating-generative-ai-into-mobile-networking/blob/main/Scenario/*/testing_embedding_integration*.ipynb"

    classDef generation fill:#8FBC8F,stroke:#333,stroke-width:1px
    classDef execution fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef storage fill:#FFA500,stroke:#333,stroke-width:1px
    classDef analysis fill:#9370DB,stroke:#333,stroke-width:1px
```
