Smart guidance system based on knowledge graph, method and computer readable medium thereof
Patent Information
- Application Number
- TW113149967
- Authority / Receiving Office
- TW · TW
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2026-10-21
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Traditional keyword searches fail to accurately grasp the semantics of natural language queries, leading to poor accuracy and inability to meet user needs due to the lack of understanding of user intent.
A knowledge graph-based intelligent guidance system that utilizes a knowledge graph database, intent determination module, query generation module, and result aggregation module, along with a large language model, to analyze user queries and generate precise search queries using keyword and vector proxies, enhancing semantic understanding and retrieval accuracy.
Improves search accuracy by determining user intent and generating multimodal queries, enabling the system to provide information that better meets user needs and reduces the time required for knowledge graph construction.
Smart Images

Figure TWG2TB001917009_001 
Figure TWG2TB001917009_002 
Figure TWG2TB001917009_003
Abstract
Description
Technical Field
[0001] This invention relates to artificial intelligence search technology, and more particularly to a knowledge graph-based intelligent guidance system, method, and computer-readable medium thereof. Prior Technology
[0002] A knowledge graph is a specialized data structure used to organize and represent facts, concepts, entities, and their relationships. Traditional keyword searches, unable to grasp the semantics of natural language, often require complex, multi-step queries, resulting in generally poor accuracy and failing to provide the information needed by the user. Furthermore, traditional keyword searches are only one-dimensional data searches; without understanding the semantics and context of the user's query, the search results usually fail to meet the user's needs.
[0003] Therefore, finding an artificial intelligence search technology, especially for natural language questions, that can perform searches after analyzing the intent of the question, thereby improving the accuracy of the information provided, has become an urgent goal for researchers in this field. Summary of the Invention
[0004] To achieve the aforementioned objectives, this invention proposes a knowledge graph-based intelligent guidance system, comprising: a knowledge graph database for storing knowledge graph data; an intent determination module for providing descriptive prompts for the searched agents and examples of each agent to a large language model after receiving a user's question, so that the large language model generates an agent list based on the user's question, the descriptive prompts, and the examples, allowing the intent determination module to select the desired agent from the agent list; a query generation module, connected to the knowledge graph database and the intent determination module, for generating a corresponding query description based on the selected agent, and then using the query description to perform a graph query in the knowledge graph database to generate query results; and a result aggregation module, connected to the query generation module, for transmitting the query results and dialogue history generated by the query generation module to the large language model, which processes the data and generates the final answer.
[0005] In one embodiment, the knowledge graph-based intelligent guidance system further includes a dialogue interface that connects the intent judgment module and the result aggregation module, for the user to input the question and for the user to view the final answer.
[0006] In one embodiment, the knowledge graph-based intelligent guidance system further includes a knowledge conversion module and a knowledge graph database building module connected to the query generation module. The knowledge conversion module is used to convert the format of knowledge files and cut them into knowledge text segments, so that the query generation module can convert the knowledge text segments into corresponding query descriptions and convert the knowledge text segments into vectors to store as the attributes of the nodes of the knowledge graph. The knowledge graph database building module is used to build the knowledge graph based on the query descriptions after the knowledge text segments are converted and the attributes of the nodes of the knowledge graph.
[0007] In one embodiment, the intent determination module includes a proxy parser for parsing the proxy list responded to by the large language model in order to obtain the selected proxy from the proxy list.
[0008] In one embodiment, the proxy includes a keyword proxy and a vector proxy. The keyword proxy is generated directly by the query generation module to produce the query description. The vector proxy is generated by converting the question into a vector using a graph algorithm or its method, and then the query generation module generates the query description.
[0009] In one embodiment, when the keyword proxy executes the graph query, it queries the nodes, relationships, and attributes in the graph data to obtain the query result; and when the vector proxy executes the graph query, it uses a similarity algorithm or its method to compare the question with the vector of the node to find the query result.
[0010] This invention further discloses a knowledge graph-based intelligent guidance method, which is executed on a computer or server. The knowledge graph-based intelligent guidance method includes the following steps: a knowledge graph database pre-stores graph data containing knowledge graphs; upon receiving a user's question, the intent judgment module provides a large language model with descriptive prompts for the searched agents and examples of each agent, so that the large language model generates an agent list based on the user's question, the descriptive prompts, and the examples, allowing the intent judgment module to select a chosen agent from the agent list; a query generation module generates a corresponding query description based on the selected agent, and then uses the query description to perform a graph query in the knowledge graph database to generate query results; and a result aggregation module transmits the query results generated by the query generation module and the dialogue history to the large language model, which processes the data and generates the final answer.
[0011] In the above method, the question asked by the user is input through a dialog interface, and the final answer is presented to the user through the dialog interface.
[0012] In the above method, the step of pre-storing graph data containing knowledge graphs in the graph database includes: having the knowledge conversion module convert the format of the knowledge file and cut it into knowledge text segments, so that the query generation module can convert the knowledge text segments into corresponding query descriptions and convert the knowledge text segments into vectors and store them as the attributes of the nodes of the knowledge graph; and having the graph database building module build the knowledge graph based on the query descriptions after the knowledge text segments are converted and the attributes of the nodes of the knowledge graph.
[0013] In the above method, the step of having the intent determination module select a chosen agent from the agent list includes: parsing the agent list responded to by the large language model through the agent parser, so as to obtain the selected agent from the agent list.
[0014] In the above method, the proxy includes keyword proxy and vector proxy. The keyword proxy is generated directly by the query generation module to generate the query description. The vector proxy is converted into a vector using a graph algorithm or its method, and then the query generation module generates the query description.
[0015] Furthermore, when the keyword proxy executes the graph query, it queries the nodes, relationships, and attributes in the graph data to obtain the query result. When the vector proxy executes the graph query, it uses a similarity algorithm or its method to compare the query with the vector of the node to find the query result.
[0016] The present invention further discloses a computer-readable medium, which is used in a computing device or computer and stores instructions to execute the aforementioned knowledge graph-based intelligent guidance method.
[0017] In summary, the knowledge graph-based intelligent guidance system, method, and computer-readable medium of this invention accept user queries in natural language, then, after judging the intent of the query, perform a search of the knowledge graph database. To improve search accuracy, a list of agents can be generated by a large language model (LLM) for the intent judgment module to select. Furthermore, the agents can include keyword agents and vector agents, thereby providing multimodal queries. Finally, the system replies to the user in natural language. The knowledge graph database is stored in the knowledge graph database after knowledge experts have converted knowledge documents using a knowledge conversion module. Whether searching or building knowledge, the query generation module generates search or knowledge graph building instructions (such as Cypher instructions). Thus, this invention converts knowledge documents into query descriptions (such as Cypher statements) according to the knowledge structure, significantly reducing the time for building the knowledge graph, thereby improving overall efficiency and applicability. Simple Explanation of the Diagram
[0018] Figure 1 is a system architecture diagram of the knowledge graph-based intelligent guidance system of the present invention.
[0019] Figure 2 is a system architecture diagram of an embodiment of the knowledge graph-based intelligent guidance system of the present invention.
[0020] Figure 3 is a schematic diagram of the process of establishing guidance knowledge in the knowledge graph-based intelligent guidance system of the present invention.
[0021] Figure 4 is a schematic diagram of the process of querying guidance knowledge in the knowledge graph-based intelligent guidance system of the present invention.
[0022] Figure 5 is a flowchart illustrating the steps of the knowledge graph-based intelligent guidance method of the present invention.
[0023] Figure 6 is a flowchart of the knowledge graph construction process of this invention.
[0024] Figure 7 is a flowchart of the knowledge graph retrieval process of this invention.
[0025] Figure 8 shows the contents stored in the spectral database of this invention. Implementation
[0026] The technical content of this invention is described below through specific embodiments. Those skilled in the art can easily understand the advantages and effects of this invention from the content disclosed in this specification. However, this invention can also be implemented or applied through other different embodiments.
[0027] Figure 1 is a system architecture diagram of the knowledge graph-based intelligent guidance system of the present invention. The present invention aims to solve the problem of accurately retrieving valuable information from a large amount of data and understanding user intent through natural language. As shown in the figure, the knowledge graph-based intelligent guidance system 1 includes an intent judgment module 11, a query generation module 12, a result aggregation module 13, and a knowledge graph database 14.
[0028] Graph database 14 is used to store graph data containing knowledge graphs. Graph database 14 is a database that stores knowledge in a specific structure. Specifically, graph database 14 is used to store guiding knowledge, which is structured knowledge. This structure facilitates the retrieval of answers to questions. The specific structure may include nodes and relationships. Furthermore, node attributes may include text, vectors, or images.
[0029] The intent determination module 11, upon receiving a user's query, provides the Large Language Model (LLM) 10 with description prompts for the search agents and examples of each agent. The LLM 10 then generates an agent list based on the user's query, the description prompts, and the examples, allowing the intent determination module 11 to select the appropriate agent. The intent determination module 11 primarily determines the content of the user's query and converts it into an appropriate response agent. Specifically, it provides the LLM 10 with description prompts for the search agents and examples of each agent. The LLM 10 then uses the user's query and the aforementioned agent information (description prompts and corresponding examples) to find a list of available agents. Finally, the intent determination module 11 selects the agent to be used from this list.
[0030] The aforementioned agent is a role that can assist in performing tasks. Different tasks use corresponding agents to perform different processes. This invention uses a Large Language Model (LLM) 10 to help find the appropriate agent for a task, and the agent can also be designed and expanded according to needs.
[0031] The query generation module 12 connects to the knowledge graph database 14 and the intent determination module 11. It can generate a corresponding query description based on the selected agent, and then use the query description to perform a graph query in the knowledge graph database 14 to generate query results. In one embodiment, the query generation module 12 can be used to generate query descriptions. The query descriptions mentioned here are Cypher syntax, that is, generating corresponding query descriptions (i.e., query syntax) based on the intent determination results. This query description will be used to search the knowledge graph within the knowledge graph database 14. In addition, the query generation module 12 will generate different query descriptions depending on the selected agent, such as querying using keywords, or querying by converting to vectors and then performing similarity comparison.
[0032] In one embodiment, the aforementioned proxy may include keyword proxy and vector proxy, but is not limited thereto. The present invention takes the above two types of proxy as examples. The keyword proxy can directly generate the query description by the query generation module 12, that is, generate the Cypher syntax of the keyword query. The vector proxy uses graph algorithm or its method to convert the user's question into a vector, and then the query generation module 12 generates the query description, that is, generate the Cypher syntax of the vector query.
[0033] Furthermore, when the keyword proxy performs a graph query, it enters the graph database 14 to query the nodes, relationships, and attributes in the stored graph data to obtain the query results; in addition, when the vector proxy performs a graph query, it enters the graph database 14 and uses a similarity algorithm or other methods to compare the vector of the user's question with the vector of the nodes in the graph data to find the query results.
[0034] The result aggregation module 13 is connected to the query generation module 12 and can be used to transmit the query results generated by the query generation module 12 and the dialogue history to the large language model 10. After processing by the large language model 10, the final answer is generated. In one embodiment, the result aggregation module 13 receives the query results from the query generation module 12 and sends the query results and the dialogue history (i.e., user question records) to the large language model 10 for aggregation to generate the final answer.
[0035] As can be seen from the above, the knowledge graph-based intelligent guidance system 1 of the present invention determines the intent of the user's question through the intent determination module 11. Using predefined agent description prompts and examples, the large language model 10 finds a suitable agent list, which is then determined by the intent determination module 11. After that, the query generation module 12 generates a query description and performs a graph query in the graph database 14 to obtain the query results. Finally, the result aggregation module 13 submits the query results and dialogue records to the large language model 10 for aggregation to obtain the final answer. Through the above method, the intent of the user's question can be determined by the intent determination module 11, and a suitable agent for subsequent search can be found. The graph database 14 has stored graph data with a specific structure. After the query generation module 12 generates a query description (such as the graph database query language Cypher), the graph database 14 can be entered to perform a graph query. Because the graph database 14 has established a knowledge graph suitable for query description queries and records information such as nodes, relationships and / or attributes within the knowledge graph, the desired data can be accurately retrieved.
[0036] Figure 2 is a system architecture diagram of an embodiment of the knowledge graph-based intelligent guidance system of the present invention. As shown in the figure, the large language model 10, intent judgment module 11, query generation module 12, result aggregation module 13, and knowledge graph database 14 in the knowledge graph-based intelligent guidance system 1 are the same as those shown in Figure 1, and therefore will not be described again. This embodiment further describes the related technologies for establishing the knowledge graph in the knowledge graph database 14. The knowledge graph-based intelligent guidance system 1 further includes a dialogue interface 15, a knowledge conversion module 16, and a knowledge graph database establishment module 17.
[0037] The dialog interface 15 can be linked to the intent judgment module 11 and the result aggregation module 13, and can be used to allow users to input the questions they want to query and to present the final answer for users to view. Specifically, the dialog interface 15 provides an interface for users to ask questions and for the system to output responses, that is, an interface for users to input questions and for the intelligent guidance to output results (that is, the final answer).
[0038] The knowledge conversion module 16 is connected to the query generation module 12 and is used to convert the format of knowledge files and cut them into knowledge text segments. These text segments are then converted into corresponding query descriptions and vectors by the query generation module 12 for storage as attributes of nodes in the knowledge graph. In one embodiment, the knowledge conversion module 16 primarily converts knowledge files into knowledge text segments to facilitate the construction of a knowledge graph. Specifically, the knowledge conversion module 16 can convert the format of knowledge files, for example, from a non-text format to a text format (e.g., TXT format). Then, the converted knowledge file is cut into knowledge text segments categorized by topic. These segments can then be used by the query generation module 12 to convert query descriptions or convert the knowledge text segments into vectors as attributes of nodes in the knowledge graph.
[0039] The knowledge graph database creation module 17 is connected to the query generation module 12 and the knowledge graph database 14. It is used to create a knowledge graph stored in the knowledge graph database 14 based on the query description after converting the knowledge text segment and the attributes of the nodes in the knowledge graph. In one embodiment, the knowledge graph database creation module 17 is mainly used for creating the knowledge graph. It can utilize the query description generated by the query generation module 12 and the attributes of the nodes in the knowledge graph to create a knowledge graph and store it in the knowledge graph database 14. The created knowledge graph will be used for subsequent query comparisons.
[0040] Additionally, the intent determination module 11 includes an agent-parser, used to parse the agent list responded to by the large language model 10 to obtain the selected agent from the agent list. In one embodiment, the agent-parser can extract the agent to be used from the agent list responded to by the large language model 10. This is because the agent list contains other text content in addition to the agents themselves, and the agent-parser parses the text content within the agent list to find out which agent is being selected. Through the parsing of the agent-parser, the inability to determine the agent to be used due to the large language model 10's response being too lengthy can be avoided. Furthermore, the intent determination module 11 can also use the agent-parser to parse the user's question to find agents suitable for querying the graph database 14, such as keyword agents and vector agents.
[0041] Figure 3 is a schematic diagram illustrating the process of establishing guidance knowledge in the knowledge graph-based intelligent guidance system of the present invention. This embodiment explains how guidance knowledge is established. Specifically, the knowledge conversion module 16 converts the knowledge file 200 from file formats such as DOC, DOCX, and PDF into text format (e.g., TXT format) knowledge text segments 201. Then, the query generation module 12 uses a Large Language Model (LLM) to convert the knowledge text segments 201 into query descriptions (such as Cypher statements). In addition, the query generation module 12 also uses the graph algorithm 120 or its method to convert the knowledge content (i.e., knowledge text segment 201) into a vector and store it as the attribute of the node of the knowledge graph. Then, the graph database building module 17 builds the knowledge graph according to the query description generated by the query generation module 12 and stores it in the containerized graph database 14. The containerized graph database 14 helps to quickly rebuild and update the database. That is, when there is a new knowledge file 200 to be built into guiding knowledge, the containerized graph database 14 is conducive to reconstruction and updating.
[0042] Figure 4 is a schematic diagram of the process of querying guidance knowledge in the knowledge graph-based intelligent guidance system of the present invention. This embodiment illustrates how guidance knowledge is queried. Specifically, the user inputs a user question 301 through a dialog interface 15 (e.g., a web interface). After receiving the user question 301, the dialog interface 15 hands it over to the intent determination module 11 for intent determination. The intent determination module 11 uses descriptive prompts to explain to the Large Language Model (LLM) which agents are included in the search (e.g., vector agents, keyword agents, etc.), and provides agent examples 302 for each agent. Agent examples 302 are possible descriptions of the agent. Then, the user question 301, the aforementioned descriptive prompts, and agent examples 302 are sent to the Large Language Model, so that the Large Language Model can respond and select which agent.
[0043] Since the response of the large language model is an agent list, which includes the selected agent and other text content, an agent-parser is needed to parse the response of the large language model and extract the agent to be used from the response text. This action is to avoid the inability to know the agent to be used due to the large language model's response text being too long.
[0044] The query generation module 12 determines the search path based on the previous judgment results. Different paths generate corresponding query descriptions (such as Cypher syntax). If it is a keyword proxy 121, the query generation module 12 generates a query description of the graph query. If it is a vector proxy 122, the question is first converted into a vector using a graph algorithm or its method, and then the query generation module 12 generates a query description of the graph query.
[0045] The query generation module 12 uses the generated query description (such as Cypher syntax) to query the graph database 14. The graph query of the keyword proxy 121 queries the nodes, relationships and their attributes (such as keywords or images) in the graph data, while the graph query of the vector proxy 122 uses a similarity algorithm or its method to compare the user's question with the vectors of the nodes in the graph data to find the most similar data (such as three data).
[0046] Finally, the result aggregation module 13 transmits the query result 304 and the dialogue history 303 to the large language model. After aggregation by the large language model, the overall final answer is displayed on the dialogue interface 15.
[0047] In summary, this invention improves retrieval accuracy by utilizing multimodal data (such as text, vectors, and images) within knowledge graphs, thereby enhancing the comprehensive understanding and processing of information and providing more precise retrieval results. Furthermore, by integrating multiple retrieval paths for different purposes, this invention enhances the understanding of query semantics, ensuring that the information provided is more closely aligned with user needs. Additionally, this invention provides efficient knowledge graph construction by transforming knowledge documents into query descriptions (such as Cypher statements) based on knowledge structures, significantly reducing the time required to build the knowledge graph and improving overall efficiency and applicability, especially in scenarios requiring the collection and integration of information from different data sources.
[0048] Figure 5 is a flowchart illustrating the steps of the knowledge graph-based intelligent guidance method of the present invention. As shown in the figure, the knowledge graph-based intelligent guidance method of the present invention can be executed on a computer or server. Its purpose is to accept user questions in natural language, determine the intent of the question, search the knowledge graph database, and finally reply to the user in natural language.
[0049] In step S501, the graph database is pre-stored with graph data containing the knowledge graph. This step explains that the graph database stores guiding knowledge, which is structured knowledge to facilitate subsequent graph queries. Specific structures may include nodes and relationships. Additionally, node attributes may include text, vectors, or images.
[0050] In one embodiment, the aforementioned step of pre-storing graph data containing knowledge graphs in the graph database further includes: a knowledge conversion module converting the format of the knowledge file and segmenting it into knowledge text segments, which are then used by a query generation module to convert the knowledge text segments into corresponding query descriptions and vectors for storage as attributes of nodes in the knowledge graph. Subsequently, a graph database building module constructs the knowledge graph based on the converted query descriptions and the attributes of the knowledge graph nodes. In other words, the knowledge conversion module converts the knowledge file into format and segments it into knowledge text segments suitable for building a knowledge graph; the query generation module converts these knowledge text segments into corresponding query descriptions and vectors for storage as attributes of nodes in the knowledge graph; and the graph database building module then constructs the knowledge graph accordingly.
[0051] In step S502, after receiving the user's question, the intent determination module provides the descriptive prompts for the agents to be retrieved and examples of each agent to the large language model. The large language model then generates an agent list based on the user's question, the descriptive prompts, and the examples, allowing the intent determination module to select the appropriate agent from this list. This step explains that the intent determination module determines the user's question content to convert it into an appropriate response agent. Furthermore, it provides the descriptive prompts for the agents to be retrieved and examples of each agent to the large language model. The large language model then finds a list of available agents based on the user's question, the descriptive prompts, and the corresponding examples. Finally, the intent determination module selects the agent to be used from this list.
[0052] In one embodiment, when the intent to determine the selected agent is to parse the list of agents responded by the large language model through an agent parser, so as to obtain the selected agent from the list of agents; in addition, the agent may include keyword agents and vector agents, but is not limited thereto.
[0053] In step S503, the query generation module generates a corresponding query description based on the selected agent, and then uses this query description to perform a graph query in the graph database to generate query results. This step explains that the query generation module can determine the result based on the intent and generate a query description (such as Cypher syntax). This query description will be used to perform a graph query on the knowledge graph in the graph database. As mentioned earlier, different agents are selected based on the multimodal data in the knowledge graph. The query generation module will generate different query descriptions depending on the selected agent, such as using keywords to query, or converting the data into vectors and then performing a similarity comparison.
[0054] In one embodiment, the keyword proxy directly generates the query description from the query generation module, while the vector proxy uses a graph algorithm or its method to convert the question into a vector, which is then used by the query generation module to generate the query description. Subsequently, when the keyword proxy performs a graph query, it queries the nodes, relationships, and attributes in the graph data to obtain the query results. When the vector proxy performs a graph query, it uses a similarity algorithm or its method to compare the user's question with the vectors of the nodes in the graph data to generate the query results.
[0055] In step S504, the result aggregation module transmits the query results generated by the query generation module and the dialogue history to the large language model. After processing by the large language model, the final answer is generated. This step explains that after receiving the query results generated by the query generation module, the result aggregation module sends the query results and dialogue history to the large language model for aggregation to generate the final answer.
[0056] In one embodiment, the user's question can be input through a dialog interface, and the final answer produced by the result aggregation module can also be presented through the dialog interface.
[0057] Figure 6 is a flowchart illustrating the knowledge graph creation process of this invention.
[0058] In process 601, upload the knowledge file to the knowledge conversion module. Specifically, the knowledge file can be in DOC, DOCX, PDF, or TXT format. Knowledge experts can upload the knowledge file to perform the creation of guiding knowledge (an additional unit or module for creating guiding knowledge can also be set up).
[0059] In process 602, the knowledge conversion module cuts and converts knowledge files. Specifically, the knowledge conversion module (which can be set within the unit or module for creating guiding knowledge) converts the knowledge file and cuts it appropriately to become multiple TXT format knowledge text segments.
[0060] In process 603, the query generation module generates the narrative syntax for building the graph database. In other words, the query generation module transmits knowledge text segments and query command examples to the large language model to generate query descriptions (such as Cypher narrative syntax) for building the graph data. In the process, the knowledge text segments are also converted into vectors using vector algorithms or other methods.
[0061] In process 604, the graph database creation module establishes the graph database. This process explains that the graph database stores knowledge in the form of nodes and relationships. The database can be built using a containerized approach to facilitate subsequent updates.
[0062] In one embodiment, a knowledge file is first uploaded to a knowledge conversion module. Then, the knowledge conversion module converts and segments the knowledge file to obtain knowledge text segments. These knowledge text segments are then converted into corresponding query descriptions or vectors and stored as attributes of nodes in a knowledge graph by a query generation module. This generates a narrative syntax for building a graph database. Finally, the graph database building module builds the knowledge graph in the graph database based on the aforementioned narrative syntax.
[0063] Figure 7 is a flowchart of the knowledge graph retrieval process of this invention. This embodiment illustrates the knowledge graph retrieval process combined with multimodal search.
[0064] In process 701, the dialog interface receives user questions. This process involves the user entering a text question into the dialog interface.
[0065] In process 702, the question is forwarded to the intent determination module. In one embodiment, during the guided knowledge query, the intent determination module sends the user's question and agent example to the large language model to determine the agent of the query, and then uses an agent parser to parse out the agent to be used, such as keywords, vectors, etc.
[0066] In process 703, the search path is determined and the corresponding search syntax (i.e., query description) is generated using the query generation module. Specifically, based on the intent determination result, the corresponding search syntax (such as Cypher syntax) can be generated using a large language model in conjunction with proxy examples (such as Cypher command examples). Among them, vector queries will convert the user's question into a vector using vector algorithms or other methods and then compare the cosine similarity with the vectors of nodes in the graph database.
[0067] In process 704, query the graph database. This process describes how to use the generated search syntax to query the keywords or vectors included in the nodes of the graph database.
[0068] In process 705, the query results are aggregated and displayed on the dialog interface. That is, the query results, historical dialogue records, and aggregated prompts are sent to the large language model, which then returns the results and displays them on the dialog interface.
[0069] In one embodiment, the system first receives a question from the user through a dialog interface. Then, the question is forwarded to the intent determination module. The intent determination module determines the search path based on the determination result. That is, different paths will generate corresponding search syntax, such as keyword proxy search or vector proxy search. Then, the generated search syntax (such as Cypher syntax) is used to query the graph database. Finally, the query results are aggregated by the large language model and displayed on the dialog interface.
[0070] The operation of the knowledge graph-based intelligent guidance system of the present invention will be described below with specific embodiments. First, an embodiment of the guidance knowledge establishment will be described. Please refer to Figure 3.
[0071] The knowledge conversion module 16 converts the knowledge file 200 from DOC, DOCX or PDF format and cuts it into TXT format knowledge text segments 201, where the knowledge text segments 201 can be shown in Table 1 below.
[0072] Next, the query generation module 12 uses a Large Language Model (LLM) to convert the knowledge text segments 201 into query descriptions (such as Cypher statements) according to the knowledge structure paradigm. Additionally, the graph algorithm 120 or its methods are used to convert the knowledge content (i.e., the knowledge text segments 201) into vectors, which are then stored as attributes of knowledge graph nodes. In one embodiment, the Cypher statements are shown in Table 2 below; Cypher syntax can be used to establish graph database nodes and relationships.
[0073] The knowledge graph database creation module 17 uses the generated Cypher statements to create a knowledge graph in a containerized knowledge graph database 14. It should be noted that the use of the currently popular containerized design can quickly rebuild the knowledge graph database, which is conducive to the rapid updating of the knowledge graph database.
[0074] The aforementioned graph knowledge, stored in the graph database, is shown in Figure 8. The embedding field contains {-0.004430030006915331,0.008915392681956291,-0.017401961609721184,...}, which has 1536 dimensions and is the vector that converts the text.
[0075] Next, an example of query-guided knowledge will be described. Please refer to Figure 4 as well.
[0076] First, the user question 301 is received through the dialogue interface 15. The intent judgment module 11 uses descriptive prompts to explain the retrieval agent to the large language model, as shown in Table 3 below. Agents include vector agents 122, keyword agents 121, etc., but are not limited to these. For each agent, an agent example 302 is provided. The user question 301, the aforementioned descriptive prompts, and agent examples 302 are sent to the large language model, and the large language model is asked to respond and select which agent.
[0077] For example, if a company has an internal Project Management System (NPMS), and a user wants to know its website address, they can ask: "What is the NPMS website address?" Or, if a user wants to inquire about other administrative procedures, such as "How do I apply for a mobile phone number?", the intent determination module 11 sends the agent description (i.e., description prompt) and examples, along with the user's question, to the large language model. Since the large language model's response is a list of agents, which includes the selected agent, an agent parser 111 is needed to parse the large language model's response and extract the agent to be used from the response text. The function of the agent parser 111 is shown in Table 4 below.
[0078] As shown in Table 5 below, when a user asks "What is the NPMS URL?", the proxy parser 111 of the intent determination module 11 will determine it as a keyword agent 121. When a user asks "How do I apply for a mobile number?", the proxy parser 111 of the intent determination module 11 will determine it as a vector agent 122.
[0079] Next, the search path is determined based on the judgment result. Different paths generate corresponding query descriptions (such as Cypher syntax). If it is a keyword proxy 121, the query description for graph query is first generated by query generation module 12. If it is a vector proxy 122, the question is converted into a vector using a graph algorithm or its method, and then the query description is generated again by query generation module 12. For example, if the question is "What is the URL of NPMS?", and the intent is determined to be [keyword], the Cypher query syntax is generated as shown in Table 6 below.
[0080] If the question is "How do I apply for a mobile number for government services?", then the text "How do I apply for a mobile number for government services?" will be vectorized using an embedding algorithm or its method, such as Azure text-embedding-ada-002.
[0081] Next, using the generated Cypher query syntax, the graph database 14 is queried, and the graph query of keyword proxy 121 queries the nodes, relationships and their attributes (such as keywords or images) in the graph data. The graph query of vector proxy 122 uses a similarity algorithm or other methods to compare the vectors of the question and the graph nodes to find the most similar data (such as three data). Finally, the result aggregation module 13 transmits the query results and dialogue history to the large language model. After aggregation by the large language model, the overall final answer is displayed on the dialogue interface 15.
[0082] For example, if the question is "What is the URL for NPMS?", the query results are shown in Table 7 below, and the final generated answer is shown in Table 8.
[0083] For example, if the question is "How do I apply for a mobile number for official business?", first perform an embedding vector cosine similarity comparison to obtain the top (e.g., the top three) text segments with high similarity.
[0084] Section 1, the content of which is shown in Table 9 below.
[0085] Section Two of the knowledge text contains the following content as shown in Table Ten.
[0086] Section 1, the knowledge text section, contains the content shown in Table 11 below.
[0087] As shown above, the score for Knowledge Section 1 is 1.0, the score for Knowledge Section 2 is 0.9848007111251196, and the score for Knowledge Section 3 is 0.9785255359437854. Therefore, Knowledge Section 1 is the final choice, and its generated answer is shown in Table 12 below.
[0088] Furthermore, this invention discloses a computer-readable medium applied in a computing device or computer having a processor (e.g., CPU, GPU, etc.) and / or memory, storing instructions, and capable of being executed by the computing device or computer through the processor and / or memory to perform the aforementioned methods and steps when executing the computer-readable medium. In one embodiment, the computer-readable medium is a non-transitory computer-readable storage medium.
[0089] In one embodiment, the modules can be software, hardware, or firmware; if they are hardware, they can be processing units, processors, computers, or servers with data processing and computing capabilities; if they are software or firmware, they can include instructions executable by processing units, processors, computers, or servers, and can be installed on the same hardware device or distributed across different multiple hardware devices.
[0090] As can be seen from the above, the knowledge graph-based intelligent guidance system, method, and computer-readable medium of the present invention can accept user queries in natural language. After judging the intent of the query, it performs graph queries in the graph database. In particular, to improve retrieval accuracy, a list of agents can be generated by the Large Language Model (LLM) for the intent judgment module to select. Agents can include keyword agents and vector agents, but are not limited to these. Multimodal queries help to make the retrieval more accurate. In addition, the knowledge graph is stored in the graph database after knowledge documents are converted using the knowledge transformation module. Whether searching or building knowledge, the query generation module generates search or graph building instructions (such as Cypher instructions). Therefore, knowledge documents are converted into query descriptions (such as Cypher statements) based on the knowledge structure, which significantly reduces the time for graph building, thus improving overall efficiency and applicability. In summary, the present invention has the following advantages.
[0091] First, this invention significantly reduces the time required to build a knowledge graph by directly converting knowledge documents into Cypher statements for building a knowledge graph based on their structure. This method of quickly building a knowledge graph is particularly suitable for application scenarios that require rapid response and updates to the knowledge graph.
[0092] Secondly, by utilizing large language model technology, the system can deeply understand the semantics and context of user queries, and by combining multiple search paths, it can more comprehensively grasp the deeper intent of the query, thereby providing information that better meets user needs.
[0093] Third, this invention can integrate multimodal data from knowledge graphs, such as text, vectors, and images. This integration not only improves data processing capabilities but also deepens the comprehensive understanding of information, enabling the system to retrieve and provide relevant information more accurately.
[0094] Fourth, because the system combines multimodal data and advanced semantic understanding, it can significantly improve the accuracy of information retrieval. This is a major advancement for needs that require filtering useful information from large amounts of data.
[0095] The above detailed description is a specific description of one feasible embodiment of the present invention. However, this embodiment is not intended to limit the patent scope of the present invention. All equivalent implementations or modifications that do not depart from the spirit of the present invention should be included in the patent scope of the present invention.
[0096] 1: A knowledge graph-based intelligent guidance system 10: Large Language Model 11: Intent Determination Module 111: Proxy resolver 12: Query Generation Module 120: Graph Algorithm 121: Keyword Proxy 122: Vector Proxy 13: Results Aggregation Module 14: Atlas Database 15: Dialogue Interface 16: Knowledge Conversion Module 17: Atlas Database Establishment Module 200: Knowledge Documents 201: Knowledge Text Section 301: User Issue 302: Proxy Example 303: Conversation History 304: Query Results 601-604: Process 701-705: Process S501-S504: Steps
Claims
1. A knowledge graph-based intelligent guidance system, comprising: The graph database is used to store graph data containing knowledge graphs; The intent determination module, upon receiving a user's question, provides descriptive prompts and examples of each agent to the large language model. The large language model then generates a list of agents based on the user's question, the descriptive prompts, and the examples, allowing the intent determination module to select the appropriate agent. The query generation module, connected to the graph database and the intent determination module, generates a corresponding query description based on the selected agent. This query description is then used to perform a graph query in the graph database to generate query results. The result aggregation module, connected to the query generation module, transmits the query results and dialogue history generated by the query generation module to the large language model. After processing by the large language model, the final answer is generated.
2. The knowledge graph-based intelligent guidance system as described in claim 1 further includes a dialog interface that connects the intent judgment module and the result aggregation module, for allowing the user to input the question and presenting the final answer to the user for viewing.
3. The knowledge graph-based intelligent guidance system as described in claim 1 further includes a knowledge transformation module and a knowledge graph database establishment module that connect to the query generation module, wherein, The knowledge conversion module is used to convert the format of knowledge files and cut them into knowledge text segments, so that the query generation module can convert the knowledge text segments into corresponding query descriptions and convert the knowledge text segments into vectors to store the attributes of the nodes of the knowledge graph. The graph database building module is used to build the knowledge graph based on the query descriptions after the knowledge text segments are converted and the attributes of the nodes of the knowledge graph.
4. The knowledge graph-based intelligent guidance system as described in claim 1, wherein, The intent determination module includes a proxy parser for parsing the proxy list responded to by the large language model in order to obtain the selected proxy from the proxy list.
5. The knowledge graph-based intelligent guidance system as described in claim 1, wherein, The proxy includes a keyword proxy and a vector proxy. The keyword proxy is generated directly by the query generation module to produce the query description. The vector proxy is generated by using a graph algorithm to convert the question into a vector, and then the query generation module generates the query description.
6. The knowledge graph-based intelligent guidance system as described in claim 5, wherein, When the keyword proxy executes the graph query, it queries the nodes, relationships, and attributes in the graph data to obtain the query result. When the vector proxy executes the graph query, it uses a similarity algorithm to compare the query with the vector of the node to find the query result.
7. A knowledge graph-based intelligent guidance method, comprising the following steps: Pre-storing graph data containing knowledge graphs in a graph database; After receiving a user's question, an intent judgment module provides a descriptive prompt word for the searched agent and examples of each agent to a large language model, which generates an agent list based on the user's question, the descriptive prompt word, and the examples, allowing the intent judgment module to select a chosen agent from the agent list; A query generation module generates a corresponding query description based on the selected agent, and then uses the query description to perform a graph query in the graph database to generate query results; and a result aggregation module transmits the query results generated by the query generation module and the dialogue history to the large language model, which processes the data and generates the final answer.
8. The knowledge graph-based intelligent guidance method as described in request item 7, wherein, The user's question was entered through the dialog interface, and the final answer was presented to the user through the dialog interface.
9. The knowledge graph-based intelligent guidance method as described in claim 7, wherein, The steps for pre-storing graph data containing knowledge graphs in a graph database include: having a knowledge conversion module convert the format of knowledge files and cut them into knowledge text segments, so that the query generation module can convert the knowledge text segments into corresponding query descriptions and convert the knowledge text segments into vectors to store as the attributes of the nodes of the knowledge graph; and having a graph database building module build the knowledge graph based on the query descriptions converted from the knowledge text segments and the attributes of the nodes of the knowledge graph.
10. The knowledge graph-based intelligent guidance method as described in claim 7, wherein, The step of having the intent determination module select a chosen agent from the agent list includes: parsing the agent list responded to by the large language model through the agent parser, so as to obtain the chosen agent from the agent list.
11. The knowledge graph-based intelligent guidance method as described in claim 7, wherein, The proxy includes a keyword proxy and a vector proxy. The keyword proxy is generated directly by the query generation module to produce the query description. The vector proxy is generated by using a graph algorithm to convert the question into a vector, and then the query generation module generates the query description.
12. The knowledge graph-based intelligent guidance method as described in request item 11, wherein, When the keyword proxy executes the graph query, it queries the nodes, relationships, and attributes in the graph data to obtain the query result. When the vector proxy executes the graph query, it uses a similarity algorithm to compare the query with the vector of the node to find the query result.
13. A computer-readable medium, applied in a computing device or computer, storing instructions for performing the knowledge graph-based intelligent guidance method as described in any one of claims 7 to 12.
Citation Information
Patent Citations
A method for constructing a pre-trained language model based on knowledge graph
CN118410130B
Knowledge graph query method and device, equipment and storage medium
CN118760775A
Smart drug consultation response system
TWM655126U
Generation of query templates for knowledge-graph based question answering system
US20230177363A1
