Configuring modern networks is a complex and high-stakes endeavor. Network operators must translate high-level business goals—such as "Traffic from A to B must avoid Switch C"—into vendor-specific low-level configurations. This process is traditionally manual, expensive, and prone to human error, which has historically caused massive outages at major global companies. While Software-Defined Networking (SDN) and intent-based tools have attempted to mitigate these issues, they often force operators to learn obscure Domain-Specific Languages (DSLs).
To address this, researchers have introduced NETBUDDY, a framework that leverages the reasoning power of Large Language Models (LLMs) like GPT-4. NETBUDDY allows operators to manage networks using plain English without sacrificing the precision required for stable infrastructure.
The NETBUDDY Architecture
Rather than treating the LLM as a "black box" that writes code in a single step, NETBUDDY employs a structured three-stage pipeline to ensure accuracy and modularity:
- Formal Specification Generation: Translates natural language into a structured intermediate format (e.g., JSON) defining reachability, waypoints, and avoidances.
- High-Level Configuration: Converts the formal specification into routing information or Python scripts designed to calculate network paths.
- Low-Level Configuration: Generates final, executable commands for specific protocols, such as P4 table entries or BGP configurations.
Crucially, the system incorporates a Verifier component. If the LLM generates syntactically incorrect code or a configuration that fails a logic check, the Verifier feeds the error back to the LLM. This creates a "self-healing" loop, allowing the model to iterate until the output is correct.
Performance and Scaling Insights
The researchers evaluated NETBUDDY using the Config2Spec dataset and custom scenarios designed to test reasoning limits. A key finding was the "sweet spot" for task complexity. While LLMs excel at processing tasks in batches, there is a clear limit to their reliability.
As shown in the evaluation data, GPT-4 achieves 100% accuracy when processing batches of approximately 10 requirements at once. However, accuracy drops significantly (below 40%) when the number of requirements exceeds 40 in a single prompt due to token limits and model "forgetting." Interestingly, batching 10 requirements in one message was found to be 6x cheaper than sending 10 individual messages, demonstrating that strategic prompt engineering directly impacts operational costs.
Key Findings and Future Work
The study revealed several important nuances in applying LLMs to networking:
- Scripts over Direct Translation: LLMs are more reliable at writing a Python script to solve a networking problem (e.g., calculating shortest paths) than they are at solving the problem directly.
- Logic Constraints: While GPT-4 is adept at catching explicit contradictions, it still struggles with implicit logical conflicts (e.g., chained reachability failures).
- Cost-Effectiveness: The authors estimate that while a network engineer may cost ~$100k/year, running these configurations via API costs only a few thousand dollars annually.
Future work aims to bridge the "automation gap" by fully automating the Verifier loop and improving the model's ability to generate entire P4 data plane programs from scratch, rather than just table entries.
Summary updated