Abstract
Intent-Based Networks (IBN) enable network operation through high-level intentions expressed by operators, leveraging automation and machine learning to translate these intentions into actionable configurations. This work investigates a Retrieval-Augmented Generation (RAG) chatbot for converting natural language commands into network instructions. The proposed approach retrieves semantically similar intents from a vector database to infer the user request and guide command translation. Experiments evaluate the effectiveness of the method in simplifying network operations and supporting intent-driven automation.
1. Introduction
Intent-Based Networks (IBN) [1] enable network behavior to be defined through high-level intentions expressed by operators. By combining automation and machine learning techniques, these systems translate human objectives into executable network actions. This work investigates the use of a Retrieval-Augmented Generation (RAG) chatbot to translate natural language commands into network instructions.
2. Related Work
Intent-Based Networking (IBN) integrates artificial intelligence, machine learning, and automation to enable agile and reliable network management with minimal human intervention [2]. Previous studies have explored its application in security monitoring, cloud environments, cyber–physical systems, and SDN orchestration [3,4,5]. Despite these advances, several challenges remain regarding intent interpretation, command translation, and operational security [6]. These limitations motivate the development of intelligent interfaces capable of translating natural language into network-level commands.
3. Methodology Summary
Following the CRISP-DM framework [7], this work adopts the phases of business understanding, data understanding, data preparation, modeling, evaluation, and deployment.
3.1. Business Understanding
The objective is to build an intent-based networking system capable of interpreting user commands in natural language and translating them into configuration and monitoring actions, enabling non-experts to manage the network intuitively.
3.2. Data Understanding
A proprietary dataset derived from fifty U.S. campus network policies was translated into the Network Intent Language (Nile) [3]. The dataset was further expanded with approximately 500 additional intents covering firewall rules, monitoring tasks, and IP traffic control operations, providing broader coverage of common network management actions.
3.3. Data Preparation
Intents were normalized and converted into semantic embeddings, stored in a vector database to enable efficient and meaningful retrieval.
3.4. Query Rewriting
To improve intent recognition and reduce ambiguity in user inputs, a query rewriting module was introduced before the retrieval stage. This component reformulates the original user request into a more structured and explicit query, preserving its semantic meaning while improving retrieval performance.
The rewritten query is then used to perform semantic search in the vector database. This step helps mitigate variations in natural language expressions and increases the likelihood of retrieving relevant intents for downstream processing.
3.5. Modeling
The system follows a Retrieval-Augmented Generation (RAG) pipeline composed of four stages:
- User input in natural language;
- Query rewriting to normalize and clarify the request;
- Semantic retrieval of similar intents from the vector database using cosine similarity;
- Intent translation into the Network Intent Language (Nile) using a LLaMA 3 model.
The retrieval process is implemented using Qdrant, which identifies the most similar intents stored as vector embeddings. These retrieved examples provide contextual guidance to the language model during the generation stage.
3.6. Evaluation
Tests with 60 intents known, partially known, and synthetically varied assessed accuracy, clarification rate, and response time. Results refined similarity thresholds and prompted dataset expansion.
3.6.1. Use-Case Demonstration
To illustrate the practical applicability of the proposed system, consider the user request shown in Figure 1: Input: “imap ensure the manager server is set to allow”. After semantic retrieval and translation, the chatbot generates the following Nile representation: Nile: define intent uniIntent: for endpoint(‘manager’) add middlebox(‘firewall’) allow protocol(‘IMAP’). This intent can then be mapped to a concrete firewall rule, for example using iptables: iptables: iptables -A INPUT -p tcp –dport 143 -d manager -j ACCEPT. This example demonstrates how the chatbot converts a natural language instruction into a structured intent representation and finally into an executable network configuration rule.
Figure 1.
Telegram interface.
3.6.2. Robustness Test
To evaluate the robustness of the system against imperfect user inputs, a small set of stress-test queries was introduced. These queries included typographical errors, incomplete instructions, and mixed-language expressions.
Examples include inputs such as “blok traffic zabbix manager”, “vlan 10 finance”, and “imap allow login server”.
In these scenarios, the query rewriting step helped normalize the input before semantic retrieval. As a result, the system was able to retrieve relevant intents and generate coherent Nile representations in most cases.
3.7. Deployment
The deployed system consists of four main components: (1) a Telegram chatbot interface; (2) a query rewriting module for input normalization; (3) a semantic retrieval layer using Qdrant; (4) a local LLaMA 3 model executed through Ollama for intent translation.
4. Results
4.1. Using the 5 Closest Intents
The results show a clear performance gap between known and unknown intents. For known intents, the model achieved an accuracy of 73% with an average response time of 1038.65 ms, indicating greater efficiency when similar examples exist in the dataset. For unknown intents, accuracy dropped to 50% and the average time increased to 1157.40 ms, suggesting greater difficulty in interpreting out-of-scope inputs.
4.2. Using the 7 Closest Intents
As shown in Table 1, the model again performs better with known intents. It reached 83% accuracy with an average time of 1061.73 ms. For unknown intents, accuracy dropped to 56%, with a similar average response time of 1067.92 ms, indicating additional difficulty in understanding unfamiliar inputs.
Table 1.
Performance comparison with different numbers of retrieved intents.
4.3. Using the 11 Closest Intents
The performance analysis in Table 1 demonstrates solid behavior for both known and unknown intents. For intents included in the training set, the model achieved high accuracy (93%) with an average time of 935.07 ms. For unknown intents, accuracy remained satisfactory at 77%, with an average of 948.35 ms.
The small difference in response times suggests stable processing regardless of intent familiarity. The accuracy gap, although expected, indicates good generalization capability. Additional out-of-scope detection mechanisms and further dataset refinements could strengthen robustness.
5. Analysis
As the number of known intents considered increases from 5 to 7 and then to 11, there is a consistent evolution in overall performance (Figure 1). Using a larger set of similar intents expands contextual reference, enabling the model to recognize more diverse patterns and make more accurate decisions. This results in progressively higher accuracy rates and more stable response times across both known and unknown intents.
These findings suggest that expanding the repository of stored intents directly improves system robustness and generalization, especially when handling inputs that deviate from the originally expected patterns. The results highlight the importance of broadening and diversifying the dataset to incorporate richer linguistic and semantic variations. Preliminary tests also indicate that increasing the number of intents strengthens the generation of robust translations, supporting the creation of derived intents.
6. Conclusions
The results obtained demonstrate that applying a RAG-based model for translating natural-language commands shows significant potential for simplifying the operation of intent-driven networks. The system exhibited high accuracy when handling expressions similar to previously registered intents, although its performance decreased in the presence of broader linguistic variations. These findings reinforce the importance of expanding and diversifying the set of stored intents in the vector database to improve the model’s generalization capability.
Regarding future work, we propose: (i) the systematic expansion of the intent repository through automatic paraphrase-generation methods; (ii) the inclusion of semantic verification models to increase the reliability of translated commands; (iii) the integration of the chatbot with real or simulated network environments, enabling validation closer to operational scenarios; and (iv) the evaluation of different LLM architectures and retrieval strategies to enhance the robustness of the interpretation process. Together, these directions may contribute to the development of more effective, scalable solutions aligned with the principles of Intent-Based Networks.
Author Contributions
Conceptualization, methodology, software, validation, formal analysis, investigation, data curation, and writing—original draft preparation, H.G.P.; writing—review and editing, G.D.A.N., F.L.L.d.M., and R.d.O.A. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The data supporting the findings of this study are available from the corresponding author upon reasonable request.
Conflicts of Interest
The author declares no conflicts of interest.
References
- Leivadeas, A.; Falkner, M. A Survey on Intent-Based Networking. IEEE Commun. Surv. Tutor. 2023, 25, 625–655. [Google Scholar] [CrossRef] [Scilit]
- Alsudais, A.; Keller, E. Hey network, can you understand me? In Proceedings of the 2017 IEEE Conference on Computer Communications Workshops (INFOCOM WKSHPS), Atlanta, GA, USA, 1–4 May 2017; pp. 193–198. [Google Scholar] [CrossRef] [Scilit]
- Kim, J.; Kim, E.; Yang, J.; Jeong, J.; Kim, H.; Hyun, S.; Yang, H.; Oh, J.; Kim, Y.; Hares, S.; et al. IBCS: Intent-Based Cloud Services for Security Applications. IEEE Commun. Mag. 2020, 58, 45–51. [Google Scholar] [CrossRef] [Scilit]
- Tomur, E.; Bilgin, Z.; Gülen, U.; Soykan, E.U.; Karaçay, L.; Karakoç, F. Intent-Based Security for Functional Safety in Cyber-Physical Systems. IEEE Trans. Emerg. Top. Comput. 2024, 12, 615–630. [Google Scholar] [CrossRef] [Scilit]
- Szyrkowiec, T.; Santuari, M.; Chamania, M.; Siracusa, D.; Autenrieth, A.; Lopez, V.; Cho, J.; Kellerer, W. Automatic Intent-Based Secure Service Creation Through a Multilayer SDN Network Orchestration. J. Opt. Commun. Netw. 2018, 10, 289. [Google Scholar] [CrossRef] [Scilit]
- Kim, J.; Ujcich, B.E.; Tian, D.J. Intender: Fuzzing Intent-Based Networking with Intent-State Transition Guidance. In Proceedings of the 32nd USENIX Security Symposium (USENIX Security 23), Anaheim, CA, USA, 9–11 August 2023; pp. 4463–4480. [Google Scholar]
- Schröer, C.; Kruse, F.; Marx Gómez, J. A Systematic Literature Review on Applying CRISP-DM Process Model. Procedia Comput. Sci. 2021, 181, 526–534. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
