NetConfigQA2.1 / README.md
hbnunlp's picture
Update README.md
1cba8d1 verified
|
Raw History Blame Contribute Delete
9.21 kB
---
license: cc-by-nd-4.0
language:
- en
pretty_name: NetConfigQA 2.1
size_categories:
- 1K<n<10K
task_categories:
- question-answering
tags:
- network-configuration
- cisco-ios
- batfish
- benchmark
- llm-evaluation
configs:
- config_name: default
data_files:
- split: LabA
path: data/LabA.jsonl
- split: LabB
path: data/LabB.jsonl
- split: LabC
path: data/LabC.jsonl
- split: LabD
path: data/LabD.jsonl
---
# NetConfigQA 2.1
NetConfigQA 2.1 is a benchmark for evaluating whether LLMs can infer network behavior from raw router configuration files (Cisco IOS `.cfg`).
It contains **9,473 QA instances** across four emulated SP/DC topologies (10–40 nodes) and five difficulty levels, from single-device fact extraction (L1) to what-if failure analysis (L5).
All ground-truth answers are generated automatically from the configurations using [Batfish](https://www.batfish.org/) (static analysis + simulation).
All 5,719 L1–L3 answers were cross-checked against an independent, Batfish-free regex parser (99.91% agreement).
**Code:** The generation pipeline, ground-truth validation parser, and evaluation (TA-Acc scoring) code are available at [github.com/hbnu-nlplab/NetConfigQA2.1](https://github.com/hbnu-nlplab/NetConfigQA2.1)
## Repository layout
```
data/LabA.jsonl ... LabD.jsonl # QA instances, one JSON object per line
labs/LabA/configs/*.cfg # device configurations (model input)
labs/LabB/configs/*.cfg
labs/LabC/configs/*.cfg
labs/LabD/configs/*.cfg
```
## Topologies and QA distribution
| Lab | Nodes | Concept | Key protocols | L1 | L2 | L3 | L4 | L5 | Total | QA/N |
| --------------- | ----- | ---------------- | ------------------------ | ----: | --: | ----: | ----: | --: | --------------: | ---: |
| Lab-A | 10 | SP MPLS VPN | OSPF, BGP, LDP, VRF | 694 | 70 | 252 | 153 | 103 | **1,272** | 127 |
| Lab-B | 20 | Extended SP | + NTP, SNMP, AAA | 1,274 | 57 | 255 | 443 | 128 | **2,157** | 108 |
| Lab-C | 30 | Security + L2VPN | + L2VPN, ACL, eBGP, HSRP | 1,271 | 39 | 255 | 954 | 155 | **2,674** | 89 |
| Lab-D | 40 | Multi-AS Complex | + QoS, NetFlow, 3-AS | 1,271 | 28 | 253 | 1,657 | 161 | **3,370** | 84 |
| **Total** | | | | 4,510 | 194 | 1,015 | 3,207 | 547 | **9,473** | |
## Difficulty levels
| Level | Domain | Reasoning | Example |
| ----- | ------- | -------------------------------------------------- | ------------------------------------------------------------- |
| L1 | Static | Fact extraction from a single device | *What is the system hostname on p4?* |
| L2 | Static | Aggregation across all devices | *Which devices have SSH enabled?* |
| L3 | Static | Cross-device consistency comparison | *Which L2VPN pairs have only unidirectional configuration?* |
| L4 | Dynamic | Packet-path simulation (traceroute / reachability) | *What is the traceroute path from 172.16.4.2 to 10.0.0.5?* |
| L5 | Dynamic | What-if analysis under link/device failure | *Which devices are single points of failure (SPOF)?* |
## Data fields
| Field | Description |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `uid` | Globally unique ID (`<lab>/<id>`) |
| `lab` | `LabA` – `LabD` |
| `id` | Question ID, unique within a lab |
| `metric` | Metric (question template) name |
| `category` | Metric category (e.g. `System_Inventory`, `OSPF_Consistency`, `Reachability_Analysis`) |
| `level` | Difficulty level `L1`–`L5` |
| `scope` | JSON string describing the question target (`DEVICE`, `GLOBAL`, `NODE_PAIR`, ...) |
| `question` | Question text, including the expected answer format |
| `answer_type` | `text`, `number`, `set_str`, `set`, `map_str_str`, `map_str_int` |
| `answer` | Raw ground-truth answer (JSON-encoded string) |
| `eval_answer` | Normalized answer used for scoring |
| `oracle_source` | How the answer was derived: `parser` (Batfish config parsing), `hybrid` (parsed facts + cross-device logic), `batfish_replay` (Batfish simulation, L4/L5) |
| `files` | Configuration files (under `labs/<lab>/configs/`) needed to answer. An **empty list means the whole lab** (all L4/L5 questions require the full topology) |
## Evaluation: Type-Aware Accuracy (TA-Acc)
Embedding-based similarity (e.g. BERTScore) does not separate correct from incorrect answers on network data, so each answer type uses its own comparison function:
| Answer type | Comparison | Example |
| -------------------------------------- | ----------------------------------------- | ------------------------------------- |
| Set (`set`, `set_str`) | Set F1 (order-agnostic) | BGP neighbor list, interface set |
| Map (`map_str_str`, `map_str_int`) | Key-value F1 | Per-device attributes / statistics |
| Number (`number`) | Numeric normalization + exact match | Hop count, AS number |
| Text (`text`) | Normalized exact match (order-preserving) | Hostname, IP address, traceroute path |
### `NOT_CONFIGURED` answers
2,076 instances (21.9%) ask about a feature that is **not configured** on the target device(s), e.g. a timezone on a router without `clock timezone`.
For these, `eval_answer` is `NOT_CONFIGURED`. A model is expected to recognize the absence of the feature rather than hallucinate a value.
### Answer conventions
Some question templates do not state how to answer when the queried item is absent or when traffic does not reach its destination. The ground truth follows these conventions:
| Situation | Ground-truth answer | Scoring |
| --- | --- | --- |
| Queried feature not configured on the target device(s) | `eval_answer` = `NOT_CONFIGURED` (raw `answer` is `[]`, `{}`, `0`, `"None"`, `"Disabled"`, `"Not Configured"` or `null`, depending on the template) | Answers stating that the feature is absent (e.g. `none`, `not configured`) are accepted |
| List question with no matching item (e.g. *Which devices are missing SSH configuration?* when none are) | `[]` | Set F1; only an empty list (`[]`) scores 1 |
| Traceroute that does not reach the destination | Hops traversed, up to the device where the flow stops (e.g. `"leaf6 -> pe3"`) | Normalized exact match |
| Reachability status | `PATH: <hops>; REACHABLE: TRUE` or `PATH: <hops>; REACHABLE: FALSE; REASON: <NO_ROUTE \| EXTERNAL \| ...>` | Normalized exact match |
## Notes
- **Sanitization.** Local-user `secret` values in the configurations were replaced with a dummy hash. No question depends on them.
- **Known limitation.** 8 L5 config-change questions (*"... after the configuration modification?"*) do not state which device was modified in the question text.
```
@misc{hyeonjeong_lee_2026,
author = { Hyeonjeong Lee and Yujin Park and Ki-Hyeon Kim and Chanjin Park and Jinyeong Bak and Eunkyung Kim and Taehoon Kim and Haneol Jang and Cheoneum Park },
title = { NetConfigQA2.1 (Revision 49edc00) },
year = 2026,
url = { https://huggingface.co/datasets/hbnunlp/NetConfigQA2.1 },
doi = { 10.57967/hf/11571 },
publisher = { Hugging Face }
}
```