US-12626147-B1 - Method and system for network query construction using retrieval-augmented generation (RAG), and applications thereof
Abstract
This disclosure provides a method and system for constructing queries using Retrieval Augmented Generation (RAG) to enhance human interaction with technology. This system leverages RAG and large language models (LLM) to analyze multi-source data, enabling the precise construction of structured queries. By integrating multiple sources of truth from various backend and application components, the system ensures accurate and comprehensive responses to user inquiries. The technology empowers users to interact naturally with complex data environments through intuitive query formation, fostering efficient information retrieval and seamless human technology interaction.
Inventors
- Daniel W. Rose
- Alexander Xie
Assignees
- LIGHTRIVER TECHNOLOGIES, INC.
Dates
- Publication Date
- 20260512
- Application Date
- 20250620
Claims (19)
- 1 . A computer-implemented method for intelligently searching disparate technology silos within a communications network including a plurality of network elements from different vendors, comprising: receiving a request from a user to perform an action with respect to the communications network, wherein the plurality of network elements from the different vendors includes different generations of network devices; identifying one or more keywords from the request; searching a knowledge base comprising user manuals for the different generations of network devices for one or more documents relevant to the request based on a correspondence between the keywords and the one or more documents, wherein one or more portions of the user manuals related to performing the action are identified from the knowledge base; constructing a prompt for instructing a large language model (LLM) to generate an application programming interface (API) call to perform the action based on the one or more portions of the user manuals related to performing the action as identified from the knowledge base; providing the API call to a network access device configured to execute the API call; and returning a result of the execution of the API call including transmitting the result to the LLM based on a complexity score comprising a number of the different generations of the network devices involved in the API call, wherein the complexity score is greater than or equal to a complexity threshold.
- 2 . The computer-implemented method of claim 1 , wherein the LLM is configured to identify a set of required information for generating the API call, and wherein the computer-implemented method further comprises: identifying information missing from the request based on a comparison of the request to the set of required information; and receiving subsequent input from the user including the information missing from the request, wherein the LLM is configured to generate the API call based at least in part on the subsequent input from the user.
- 3 . The computer-implemented method of claim 1 , wherein the action comprises a provisioning action for provisioning both a first network device of the plurality of network elements associated with a first vendor of the different vendors, and a second network device of the plurality of network elements associated with a second vendor of the different vendors, wherein the second network device is a legacy network device that is no longer supported by the second vendor.
- 4 . The computer-implemented method of claim 3 , wherein the network access device is configured to cause a provisioning of both the first network device and the second network device.
- 5 . The computer-implemented method of claim 3 , wherein the network access device is configured to communicate indirectly with the first network device through a network management system associated with the first vendor, and directly with the second network device.
- 6 . The computer-implemented method of claim 4 , wherein the second network device is only available for provisioning through direct communications with the second network device and is not available via a network management system associated with the second vendor.
- 7 . The computer-implemented method of claim 3 , wherein a set of required information necessary to generate the API call to perform the action includes required information for both the first network device of the first vendor and the second network device of the second vendor.
- 8 . The computer-implemented method of claim 1 , wherein the identifying one or more documents comprises performing a vector search of the one or more documents based on the keywords.
- 9 . The computer-implemented method of claim 1 , wherein the API call comprises a plurality of API calls, and wherein the network access device is configured to communicate a first API call of the plurality of API calls to a first network device of the plurality of network elements from a first vendor, and a second API call of the plurality of API calls to a second network device of the plurality of network elements from a second vendor.
- 10 . The computer-implemented method of claim 9 , wherein the network access device is configured to communicate directly with the first network device, and communicate indirectly with the second network device through a management interface associated with the second vendor.
- 11 . The computer-implemented method of claim 1 , wherein a user-appropriate output comprises translated error codes in the result based at least on the one or more portions of the user manuals corresponding to the different generations of the network devices involved in the API call.
- 12 . The computer-implemented method of claim 1 , wherein the returning the result of the execution of the API call comprises transmitting the result to the LLM based at least on a role of the user.
- 13 . The computer-implemented method of claim 1 , wherein the returning the result of the execution of the API call comprises: constructing a results prompt that causes the LLM to generate a user-appropriate output regarding whether the result was successful; and transmitting the results prompt and the result to the LLM.
- 14 . A system comprising: a memory; and at least one processor coupled to the memory and configured to perform operations comprising: receiving a request from a user to perform an action with respect to a communications network comprising a plurality of network devices from different vendors including different generations of network devices; identifying one or more keywords from the request; searching a knowledge base comprising user manuals for the different generations of network devices for one or more documents relevant to the request based on a correspondence between the keywords and the one or more documents, wherein one or more portions of the user manuals related to performing the action are identified from the knowledge base; constructing a prompt for instructing a large language model (LLM) to generate an application programming interface (API) call to perform the action based on the one or more portions of the user manuals related to performing the action as identified from the knowledge base; providing the API call to a network access device configured to execute the API call; and returning a result of the execution of the API call including transmitting the result to the LLM based on a complexity score comprising a number of the different generations of the network devices involved in the API call, wherein the complexity score is greater than or equal to a complexity threshold.
- 15 . The system of claim 14 , wherein the LLM is configured to identify a set of required information for generating the API call, and wherein the computer-implemented method further comprises: identifying information missing from the request based on a comparison of the request to the set of required information; and receiving subsequent input from the user including the information missing from the request, wherein the LLM is configured to generate the API call based at least in part on the subsequent input from the user.
- 16 . The system of claim 14 , wherein the action comprises a provisioning action for provisioning both a first network device of the plurality of network devices associated with a first vendor of a plurality of vendors, and a second network device of the plurality of network devices associated with a second vendor of the plurality of vendors.
- 17 . The system of claim 16 , wherein the network access device is configured to cause a provisioning of both the first network device and the second network device.
- 18 . A non-transitory computer-readable medium having instructions stored thereon that, when executed by at least one computing device, cause the at least one computing device to perform operations comprising: receiving a request from a user to perform an action with respect to a communications network comprising a plurality of network devices from different vendors including different generations of network devices; identifying one or more keywords from the request; searching a knowledge base comprising user manuals for the different generations of network devices for one or more documents relevant to the request based on a correspondence between the keywords and the one or more documents, wherein one or more portions of the user manuals related to performing the action are identified from the knowledge base; constructing a prompt for instructing a large language model (LLM) to generate an application programming interface (API) call to perform the action based on the one or more portions of the user manuals related to performing the action as identified from the knowledge base; providing the API call to a network access device configured to execute the API call; and returning a result of the execution of the API call including transmitting the result to the LLM based on a complexity score comprising a number of the different generations of the network devices involved in the API call, wherein the complexity score is greater than or equal to a complexity threshold.
- 19 . The non-transitory computer-readable medium of claim 18 , wherein the LLM is configured to identify a set of required information for generating the API call, and wherein the computer-implemented method further comprises: identifying information missing from the request based on a comparison of the request to the set of required information; and receiving subsequent input from the user including the information missing from the request, wherein the LLM is configured to generate the API call based at least in part on the subsequent input from the user.
Description
FIELD OF INVENTION The present disclosure relates generally to constructing network queries using retrieval-augmented generation (RAG), which may modify the operations of network devices. BACKGROUND Provisioning network capabilities is a complicated process that requires expertise across varying systems, varying vendors, and varying devices. For example, a communications network connecting two different cities may use different devices, across different vendors; and these devices may be serving many different clients. For a user to provision or request access to reserve a portion of this network so that the user may send data, requires communication and coordination across these varied technological systems and devices. There is no simple way for a user to provision network capabilities, because of the many different devices and variables involved. BRIEF SUMMARY According to one or more aspects a natural language request is received from a user to perform an action with respect to a communications network. One or more keywords are identified from the request. A knowledge base is searched for one or more documents relevant to the request based on a correspondence between the keywords and the one or more documents. One or more portions of one or more user manuals for the network elements related to performing the action are identified from the knowledge base. A prompt for instructing a large language model (LLM) to generate an API (application programming interface) call to perform the action is generated based on the one or more portions of one or more user manuals for the network elements related to performing the action as identified from the knowledge base. The API call is provided to a network access device configured to execute the API call, and a result of the execution of the API call is returned. BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings are incorporated herein and form a part of the specification. FIG. 1 is a block diagram illustrating example functionality for a network action system (NAS), according to some embodiments. FIG. 2 is a flowchart illustrating example operations for performing an action by a network action system (NAS), according to some embodiments. FIG. 3 is a flowchart illustrating example operations for providing by a network action system (NAS), according to some embodiments. FIG. 4 is example computer system useful for implementing various embodiments. In the drawings, like reference numbers generally indicate identical or similar elements. Additionally, generally, the left-most digit(s) of a reference number identifies the drawing in which the reference number first appears. DETAILED DESCRIPTION Provisioning network capabilities is a complicated process that requires expertise across varying systems, varying vendors, and varying devices. For example, a communications network connecting two different cities may use different devices, including legacy devices, across different vendors; and these devices may be serving many different clients. For a user to provision or request access to reserve a portion of this network so that the user may send data, requires communication and coordination across these varied technological systems and devices. There is no simple way for a user to provision network capabilities, because of the many different devices and variables involved. At least in part to deal with these challenges, this disclosure provides a method and system for constructing queries using Retrieval Augmented Generation (RAG) to enhance human interaction with technology. This system leverages RAG and large language models (LLM) to analyze multi-source data, enabling the precise construction of structured queries. By integrating multiple sources of truth from various backend and application components, the system ensures accurate and comprehensive responses to user inquiries. The technology empowers users to interact naturally with complex data environments through intuitive query formation, fostering efficient information retrieval and seamless human technology interaction. FIG. 1 is a block diagram 100 illustrating example functionality for a network action system (NAS) 102, according to some embodiments. NAS 102 may modify the operations of a network 104 based on a request 106 to perform an action 120, as received from a user 108. These network modification operations or actions 120 may include provisioning usage of one or more network devices 110A-B, requesting bandwidth from the network 104 to transmit data from a first location to a second location, deprovisioning previously provisioned or allocated network bandwidth, configuring one or more of the network devices 110A-B, as well as performing other operations affecting the performance or operations of one or more network devices 110. Other operations that may be performed, that may or may not impact the operations of the equipment of network 104, include, but are not limited to: network planning, generat