Datasets:
scenario_name
stringclasses 5
values | prompt
stringclasses 5
values | result
stringclasses 5
values |
---|---|---|
ospf_simple | The network topology is in a textual format. Each line has the following format:
<NAME>[<METADATA>]=<VALUE>
<NAME> is the device name.
<METADATA> is alphanumeric. The numeric values are network interfaces of the device <NAME>. You have to remember them. The interface name is composed as "eth<METADATA>" All the other values can be ignored.
<VALUE> is the value associated to <METADATA>. You only need to remember values associated to the network interfaces. They represent the LAN identifier where the interface is attached. If two devices are on the same LAN, it means that they are directly connected.
Here is the network topology:
bb0[0]=A
bb0[1]=C
bb1[0]=A
bb1[1]=D
bb2[0]=A
bb2[1]=B
bb3[0]=B
bb3[1]=C
bb4[0]=C
bb4[1]=D
Give the user the configurations of all the devices.
If you do not know a required value, leave the following placeholder: [PLACEHOLDER].
If a value is optional, do not include anything in the output.
If a chunk of configuration is optional, do not include anything in the output. | {"bb0": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\ninterface eth0\n ip ospf cost 21\nexit\n!\ninterface eth1\n ip ospf cost 36\nexit\n!\nrouter ospf\n redistribute connected\n network 10.0.0.0/16 area 0.0.0.0\nexit\n!\nend\n", "bb2": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 10.0.0.0/16 area 0.0.0.0\nexit\n!\nend\n", "bb3": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\ninterface eth0\n ip ospf cost 7\nexit\n!\nrouter ospf\n redistribute connected\n network 10.0.0.0/16 area 0.0.0.0\nexit\n!\nend\n", "bb1": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\ninterface eth1\n ip ospf cost 45\nexit\n!\nrouter ospf\n redistribute connected\n network 10.0.0.0/16 area 0.0.0.0\nexit\n!\nend\n", "bb4": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 10.0.0.0/16 area 0.0.0.0\nexit\n!\nend\n"} |
ospf_multiarea | The network topology is in a textual format. Each line has the following format:
<NAME>[<METADATA>]=<VALUE>
<NAME> is the device name.
<METADATA> is alphanumeric. The numeric values are network interfaces of the device <NAME>. You have to remember them. The interface name is composed as "eth<METADATA>" All the other values can be ignored.
<VALUE> is the value associated to <METADATA>. You only need to remember values associated to the network interfaces. They represent the LAN identifier where the interface is attached. If two devices are on the same LAN, it means that they are directly connected.
Here is the network topology:
bb0[0]=A
bb0[1]=C
bb1[0]=A
bb1[1]=D
bb1[2]=E
bb1[3]=F
bb2[0]=A
bb2[1]=B
bb2[2]=H
bb2[3]=G
bb3[0]=B
bb3[1]=C
bb4[0]=C
bb4[1]=D
r1[0]=E
r1[1]=I
r2[0]=I
r2[1]=J
r3[0]=G
r3[1]=F
r3[2]=K
r4[0]=L
r4[1]=N
r5[0]=M
r5[1]=N
r5[2]=H
r6[0]=L
r6[1]=M
Give the user the configurations of all the devices.
If you do not know a required value, leave the following placeholder: [PLACEHOLDER].
If a value is optional, do not include anything in the output.
If a chunk of configuration is optional, do not include anything in the output. | {"r6": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 220.0.0.0/16 area 3.3.3.3\n area 3.3.3.3 stub\nexit\n!\nend\n", "bb0": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 10.0.0.0/16 area 0.0.0.0\nexit\n!\nend\n", "r3": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 110.0.0.0/30 area 2.2.2.2\n network 120.0.0.0/30 area 2.2.2.2\n network 210.0.0.0/16 area 2.2.2.2\n area 2.2.2.2 stub\nexit\n!\nend\n", "bb2": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\ninterface eth0\n ip ospf cost 100\nexit\n!\nrouter ospf\n redistribute connected\n network 10.0.0.0/16 area 0.0.0.0\n network 120.0.0.0/30 area 2.2.2.2\n network 130.0.0.0/30 area 3.3.3.3\n area 2.2.2.2 stub\n area 3.3.3.3 stub\nexit\n!\nend\n", "r2": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 200.0.0.0/16 area 1.1.1.1\n area 1.1.1.1 stub\nexit\n!\nend\n", "r5": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 130.0.0.0/30 area 3.3.3.3\n network 220.0.0.0/16 area 3.3.3.3\n area 3.3.3.3 stub\nexit\n!\nend\n", "bb3": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 10.0.0.0/16 area 0.0.0.0\nexit\n!\nend\n", "bb1": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\ninterface eth0\n ip ospf cost 90\nexit\n!\nrouter ospf\n redistribute connected\n network 10.0.0.0/16 area 0.0.0.0\n network 100.0.0.0/30 area 1.1.1.1\n network 110.0.0.0/30 area 2.2.2.2\n area 1.1.1.1 stub\n area 2.2.2.2 stub\nexit\n!\nend\n", "bb4": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 10.0.0.0/16 area 0.0.0.0\nexit\n!\nend\n", "r1": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 100.0.0.0/30 area 1.1.1.1\n network 200.0.0.0/16 area 1.1.1.1\n area 1.1.1.1 stub\nexit\n!\nend\n", "r4": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter ospf\n redistribute connected\n network 220.0.0.0/16 area 3.3.3.3\n area 3.3.3.3 stub\nexit\n!\nend\n"} |
rip | The network topology is in a textual format. Each line has the following format:
<NAME>[<METADATA>]=<VALUE>
<NAME> is the device name.
<METADATA> is alphanumeric. The numeric values are network interfaces of the device <NAME>. You have to remember them. The interface name is composed as "eth<METADATA>" All the other values can be ignored.
<VALUE> is the value associated to <METADATA>. You only need to remember values associated to the network interfaces. They represent the LAN identifier where the interface is attached. If two devices are on the same LAN, it means that they are directly connected.
Here is the network topology:
r1[0]="H"
r1[1]="G"
r1[2]="E"
r1[3]="A"
r2[0]="E"
r2[1]="F"
r2[2]="B"
r3[0]="F"
r3[1]="G"
r3[2]="I"
r3[3]="C"
r4[0]="L"
r4[1]="D"
r4[2]="I"
r4[3]="H"
r5[0]="L"
Give the user the configurations of all the devices.
If you do not know a required value, leave the following placeholder: [PLACEHOLDER].
If a value is optional, do not include anything in the output.
If a chunk of configuration is optional, do not include anything in the output. | {"r3": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter rip\n network 100.1.0.0/24\n redistribute connected\nexit\n!\nend\n", "r2": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter rip\n network 100.1.0.0/24\n redistribute connected\nexit\n!\nend\n", "r1": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter rip\n network 100.1.0.0/24\n redistribute connected\nexit\n!\nend\n", "r4": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter rip\n network 100.1.0.0/24\n redistribute connected\nexit\n!\nend\n"} |
bgp_simple | The network topology is in a textual format. Each line has the following format:
<NAME>[<METADATA>]=<VALUE>
<NAME> is the device name.
<METADATA> is alphanumeric. The numeric values are network interfaces of the device <NAME>. You have to remember them. The interface name is composed as "eth<METADATA>" All the other values can be ignored.
<VALUE> is the value associated to <METADATA>. You only need to remember values associated to the network interfaces. They represent the LAN identifier where the interface is attached. If two devices are on the same LAN, it means that they are directly connected.
Here is the network topology:
router1[0]="A"
router1[1]="B"
router2[0]="A"
router2[1]="C"
Give the user the configurations of all the devices.
If you do not know a required value, leave the following placeholder: [PLACEHOLDER].
If a value is optional, do not include anything in the output.
If a chunk of configuration is optional, do not include anything in the output. | {"router1": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter bgp 1\n neighbor 193.10.11.2 remote-as 2\n !\n address-family ipv4 unicast\n network 195.11.14.0/24\n exit-address-family\nexit\n!\nend\n", "router2": "frr version 9.0.1\nfrr defaults traditional\nhostname frr_test\nno ipv6 forwarding\nno service integrated-vtysh-config\n!\nrouter bgp 2\n neighbor 193.10.11.1 remote-as 1\n !\n address-family ipv4 unicast\n network 200.1.1.0/24\n exit-address-family\nexit\n!\nend\n"} |
rift_dc | The network topology is in a textual format. Each line has the following format:
<NAME>[<METADATA>]=<VALUE>
<NAME> is the device name.
<METADATA> is alphanumeric. The numeric values are network interfaces of the device <NAME>. You have to remember them. The interface name is composed as "eth<METADATA>" All the other values can be ignored.
<VALUE> is the value associated to <METADATA>. You only need to remember values associated to the network interfaces. They represent the LAN identifier where the interface is attached. If two devices are on the same LAN, it means that they are directly connected.
Here is the network topology:
tof_1_2_1[0]="G"
tof_1_2_1[1]="I"
tof_1_2_1[2]="Q"
tof_1_2_1[3]="S"
tof_1_2_2[0]="H"
tof_1_2_2[1]="J"
tof_1_2_2[2]="R"
tof_1_2_2[3]="T"
spine_1_1_1[0]="A"
spine_1_1_1[1]="D"
spine_1_1_1[2]="G"
spine_1_1_1[3]="H"
spine_1_1_2[0]="B"
spine_1_1_2[1]="E"
spine_1_1_2[2]="I"
spine_1_1_2[3]="J"
leaf_1_0_1[0]="A"
leaf_1_0_1[1]="B"
leaf_1_0_1[2]="C"
leaf_1_0_1[3]="U"
leaf_1_0_2[0]="D"
leaf_1_0_2[1]="E"
leaf_1_0_2[2]="V"
leaf_1_0_2[3]="Z"
spine_2_1_1[0]="K"
spine_2_1_1[1]="N"
spine_2_1_1[2]="Q"
spine_2_1_1[3]="R"
spine_2_1_2[0]="L"
spine_2_1_2[1]="O"
spine_2_1_2[2]="S"
spine_2_1_2[3]="T"
leaf_2_0_1[0]="K"
leaf_2_0_1[1]="L"
leaf_2_0_1[2]="M"
leaf_2_0_1[3]="F"
leaf_2_0_2[0]="N"
leaf_2_0_2[1]="O"
leaf_2_0_2[2]="P"
leaf_2_0_2[3]="W"
Give the user the configurations of all the devices.
If you do not know a required value, leave the following placeholder: [PLACEHOLDER].
If a value is optional, do not include anything in the output.
If a chunk of configuration is optional, do not include anything in the output. | {"leaf_1_0_2": "router rift\n level 1\n interface eth0\n interface eth1\n interface eth2\n prefix 200.0.2.0/24", "spine_1_1_2": "router rift\n system-id 874638\n interface eth0\n interface eth1\n interface eth2\n interface eth3", "spine_1_1_1": "router rift\n interface eth0\n interface eth1\n interface eth2\n interface eth3", "spine_2_1_1": "router rift\n interface eth0\n interface eth1\n interface eth2\n interface eth3", "tof_1_2_1": "router rift\n level 20\n lie-address 224.0.8.24\n interface eth0\n interface eth1\n interface eth2\n interface eth3", "tof_1_2_2": "router rift\n level 20\n interface eth0\n interface eth1\n interface eth2\n interface eth3", "spine_2_1_2": "router rift\n interface eth0\n interface eth1\n interface eth2\n interface eth3", "leaf_2_0_1": "router rift\n level 1\n interface eth0\n interface eth1\n interface eth2\n prefix 200.0.3.0/24\n prefix fafb::/64", "leaf_1_0_1": "router rift\n level 1\n interface eth0\n interface eth1\n interface eth2\n prefix 200.0.1.0/24", "leaf_2_0_2": "router rift\n level 1\n interface eth0\n interface eth1\n interface eth2\n prefix 200.0.4.0/24"} |
NetConfEval: Can LLMs Facilitate Network Configuration?
What is it?
We present a set of benchmarks (NetConfEval) to examine the effectiveness of different models in facilitating and automating network configuration described in our paper "NetConfEval: Can LLMs Facilitate Network Configuration?".
This repository contains pre-generated datasets for each of the benchmark task, so that they can be used independently from our testing environment.
Generation scripts can be found here.
Translating High-Level Requirements to a Formal Specification Format
This dataset evaluates LLMs' ability to translate network operators' requirements into a formal specification. For instance, the input information can be converted into a simple data structure to specify the reachability, waypoints, and load-balancing policies in a network.
The dataset step_1_spec_translation.jsonl
contains five iterations of data extracted from a Config2Spec policy dataset.
Dataset Format
Each line of the output .jsonl
file contains the following fields:
iteration
: incremental index of the iterationmax_n_requirements
: number of total requirements in the datasetchunk
: the batch identifier when chunking the total requirementsbatch_size
: number of requirements in a batchn_policy_types
: total number of policy types: (e.g.,2
ifreachability
andwaypoint
are used)description
: textual description of the supported requirements, can be used as system prompthuman_language
: the input specifications in human languageexpected
: the expected JSON data structure translated from thehuman_language
Conflict Detection
In this dataset, we test LLMs' ability to detect a "simple conflict" during formal specification translation. A common case for a "simple conflict" is when two requirements explicitly include contradictory information. For instance, a requirement specifies s1 to reach h2 while another requirement prevents s1 from reaching h2.
The dataset step_1_spec_conflict.jsonl
contains five iterations of data extracted from a Config2Spec policy dataset.
A "simple conflict" is inserted in each even batch (0, 2, ...).
Dataset Format
Each line of the output .jsonl
file contains the following fields:
iteration
: incremental index of the iterationmax_n_requirements
: number of total requirements in the datasetchunk
: the batch identifier when chunking the total requirementsbatch_size
: number of requirements in a batchn_policy_types
: total number of policy types: (e.g.,2
ifreachability
andwaypoint
are used)conflict_exists
: a boolean indicating whether the conflict is present in the requirementsdescription
: textual description of the supported requirements, can be used as system prompthuman_language
: the input specifications in human languageexpected
: the expected JSON data structure translated from thehuman_language
Developing Routing Algorithms
Traffic engineering is a critical yet complex problem in network management, particularly in large networks. Our dataset asks the models to create functions that compute routing paths based on specific network requirements (the shortest path, reachability, waypoint, load balancing).
The dataset contains both the input user prompt (without preliminary system prompts) in the prompt
column and a series
of test cases to run on the generated code in the tests
column.
To run the tests, you need to JSON decode the tests
field. This will give you a dict with an incremental index as key and the test body as value.
It is recommended to run the tests in order, following the index key. You need the pytest
package to run the tests.
After extracting the test body:
- Replace the
# ~function_code~
placeholder with the code generated by the LLM; - Save the resulting string into a
.py
file in your filesystem, for exampletest_file.py
; - Run
python3 -m pytest --lf --tb=short test_file.py -vv
.
The above procedure is implemented in NetConfEval through the netconfeval/verifiers/step_2_verifier_detailed.py
class.
Dataset Format
Each line of the output .jsonl
file contains the following fields:
prompt
: the type of instruction given to the model to generate the code, can bebasic
orno_detail
policy
: the type of policy that the generated function should implement, can beshortest_path
,reachability
,waypoint
orloadbalancing
prompt
: the human textual instructions fed to the model to generate codetests
: JSON-encoded test cases (to run usingpytest
) to verify code correctness
Generating Low-level Configurations
This dataset explores the problem of transforming high-level requirements into detailed, low-level configurations suitable for installation on network devices. We handpicked four network scenarios publicly available in the Kathará Network Emulator repository. The selection encompasses the most widespread protocols and consists of two OSPF networks (one single-area network and one multi-area network), a RIP network, a BGP network featuring a basic peering between two routers, and a small fat-tree datacenter network running a made-up version of RIFT. All these scenarios (aside from RIFT) leverage FRRouting as the routing suite.
The dataset step_3_low_level.jsonl
contains both the input user prompt (without preliminary system prompts) in the prompt
column
and the corresponding configuration for each device in the result
column.
To compare the generated LLM configuration with the expected one, we suggest to:
- JSON decode the
result
column, this will give you a Dict with the device name as key and the expected configuration as value (in string); - Take the LLM output and, for each device, run the same formatting command in the
vtysh
using the FRRouting container; - Compare the two outputs using
difflib.SequenceMatcher
.
The above procedure is implemented in NetConfEval in the netconfeval/step_3_low_level.py
script.
Dataset Format
Each line of the output .jsonl
file contains the following fields:
scenario_name
: the name of the network scenario for which generate configurations, can beospf_simple
,ospf_multiarea
,rip
,bgp_simple
, orrift
prompt
: the human textual instructions fed to the model to generate low-level configurationsresult
: JSON data structure with the expected configuration (value of the JSON) for each device (key of the JSON)
- Downloads last month
- 0