ResiNetResearchGroup/ResiNet-LLM-topology
0
ResiNet-LLM-topology
This repository contains the implementation for the submission:
An LLM-Based Framework for Intent-Driven Network Topology Design
Purpose
ResiNet-LLM-topology provides the evaluation pipeline used in our work for comparing generated network topologies against reference designs.
It includes:
- node-edge level F1 evaluation
- resilience evaluation
- scenario data and reference topologies used for evaluation
Folder layout
requirements.txt
README.md
data/
├─ results/
├─ scenarios/
├─ topology_scenario_1.json
├─ topology_scenario_2.json
├─ topology_scenario_3.json
└─ topology_scenario_4.json
f1_nodes_functions.py
f1_nodes_main.py
f1_edges_functions.py
f1_edges_main.py
resinet_llm_prompt.py
evaluate_connectivity.py
draw_topology.py
models_configuration.py
resinet_llm_prompt.py
topology_generation.pyInstallation
Install the dependencies with:
pip install -r requirements.txtQuick start
Node F1 evaluation
python f1_nodes_main.py --gen <generated-json-or-folder> --ref <reference.json>Edge F1 evaluation
python f1_edges_main.py --gen <generated-json-or-folder> --ref <reference.json>Resilience evaluation
python evaluate_connectivity.py <tested-generated-folder>Topologies generation
- Start Ollama server (after installation) :
ollama serve- Pull a model you plan to use (models are defined in models_configuration.py)
ollama pull qwen3:32b- The code expects the Ollama HTTP API to be reachable at
http://localhost:11434(default).
- Notes for OpenAI / GPT users: When using OpenAI (GPT) backends, set the
OPENAI_API_KEYenvironment variable before running scripts.
- Commande:
python topology_generation.py --model_topo <model_key> --use_case 1 --type_ablation <type_ablation>--model_topo: model key frommodels_configuration.py(e.g.qwen3:32b,mistral-small:24b, or GPT keys when using OpenAI).--use_case: integer selecting the user requirements prompt (see data/scenarios/scenarios.py).--type_ablation: ablation flag for experimental runs.
The scripts produce detailed evaluation logs and summary .txt outputs in the local results/ path next to the evaluated files.
File descriptions
f1_nodes_functions.py— helper functions for node normalization, mapping, and F1 calculation.f1_nodes_main.py— driver script for node-based evaluation and overall summary generation.f1_edges_functions.py— helper functions for edge cleanup, structural remapping, and edge F1 scoring.f1_edges_main.py— driver script for edge-based evaluation and final metrics.resinet_llm_prompt.py— prompt utilities for intent-driven topology generation.evaluate_connectivity.py— connectivity and resilience measurement helpers.draw_topology.py— graph drawing utilities.requirements.txt— Python package dependencies.topology generation.py— intent-driven topology generation
Repository usage
This package is designed to let users:
- inspect the evaluation logic used in the paper,
- reproduce node and edge F1 scoring on generated topologies with LLMs using the previous prompts,
- compare generated outputs with reference topologies,
Notes for publication
- This repository is intended as a reproducibility artifact
- Updates and releases: The repository may be updated for bug fixes, documentation improvements, or additional examples.
