Knowledge graph based queries in artificial intelligence chatbots using basic query element detection and graph path generation
By mapping query characteristics to basic elements in a knowledge graph and calculating validity scores, the method improves AI chatbot performance, enabling flexible and accurate query handling.
Patent Information
- Application Number
- JP2022513038
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-08-26
- Filing Date
- 2020-08-18
- Publication Date
- 2025-01-29
- Estimated Expiration
- 2040-08-18
AI Technical Summary
Current methods for using knowledge graphs in artificial intelligence chatbots are limited by pre-defined rules, templates, and deep learning methods that struggle with flexibility, time-consuming maintenance, and lack of explainability, making them unsuitable for broad industrial applications.
A computer-based method that identifies query characteristics, maps them to basic elements in a knowledge graph, generates query routes, and calculates validity scores to produce flexible and accurate query results.
Enhances the performance of AI chatbots by allowing them to handle diverse queries flexibly and provide accurate results, overcoming limitations of pre-defined rules and deep learning methods.
Smart Images

Figure 0007623765000001 
Figure 0007623765000002 
Figure 0007623765000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates generally to knowledge graphs, and more particularly to utilizing knowledge graphs in artificial intelligence chatbots using base query element detection and graph path generation. [Background technology]
[0002] In computing, a graph database is a database that utilizes a graph structure containing nodes, edges, and properties to represent stored data for semantic queries. The graph structure associates data items with a collection of nodes and edges, with the edges representing relationships between the nodes. These relationships link data directly to each other, often allowing it to be retrieved in a single operation. Querying relationships in a graph database is fast because those relationships are stored inside the database itself. Relationships can be intuitively visualized using a graph database, making relationships useful for strongly interconnected data. Retrieving data from a graph database requires a query language. Some graph databases are accessed through an application programming interface in addition to having a query language interface.
[0003] A knowledge graph is a knowledge base integrated with a graph database. By integrating a knowledge base with a graph database, a knowledge graph supports a much broader and deeper range of services than a standard graph database. In other words, a knowledge graph cross-links information, e.g., facts, entities, and locations, to create more accurate, relevant, and interconnected search results. More specifically, a knowledge graph is a knowledge base that consists of a huge amount of data corresponding to frequently searched information, as well as the context and intent behind requesting the information based on the available content.
[0004] A chatbot is a computer program that converses with a user through auditory or textual means. Chatbots are designed to simulate how a human would behave as a conversational partner. Chatbots are typically used in dialogue systems for various practical purposes such as customer service or information retrieval. Current chatbots scan for keywords in the input and retrieve responses from a database that contain the most matching keywords or most similar word patterns. Many industries, organizations, companies, and institutions, such as banks, insurance companies, media companies, e-commerce companies, airlines, hotel chains, retailers, healthcare providers, educational institutions, government agencies, and restaurant chains, are using chatbots to answer simple questions and increase user engagement.
[0005] However, current methods of using knowledge graphs with artificial intelligence have several problems. For example, one current method of using knowledge graphs with artificial intelligence is based on an artificial intelligence program that calls the knowledge graph through an application programming interface and uses predefined rules to perform some kind of query or computational task. The problem with this first method is that the predefined rules are inflexible and can only be used to answer predefined questions.
[0006] A second current method of using knowledge graphs with artificial intelligence is based on artificial intelligence programs that use predefined question and answer templates. The goal of this second method is to find a template that corresponds to the submitted query and then fill the missing slots of the template. In other words, a well-known query is converted into a template and an entity is left as a slot in the template that can be filled while answering the user's query. Examples of templates can be "XXX (person) is the president of XXX (country)" or "XXX (city) is the capital of XXX (country)". The problems with this second method are that templates can only fit small knowledge graphs, it is difficult to enumerate all the query paths in the knowledge graph, it takes time to prepare templates, and it is difficult to maintain templates.
[0007] A third current method of using knowledge graphs with artificial intelligence is based on embedding a knowledge graph containing vertices and edges and exploring the embedded knowledge graph using deep learning methods, such as graph neural networks. The problem with this third method is that the query results are unexplainable and the performance of the query depends mainly on the quality of the training data, making it difficult to use in industry or organizations compared to academic research.
[0008] Therefore, there is a need in the art to address the aforementioned problems. Summary of the Invention
[0009] Viewed from a first aspect, the present invention provides a computer-implemented method for generating a query result by utilizing a knowledge graph in an artificial intelligence chatbot, the computer-implemented method including: identifying, by a computer, characteristics of a query; mapping, by a computer, the query characteristics to basic elements of a knowledge graph in the artificial intelligence chatbot; generating, by a computer, a set of query paths in the knowledge graph based on the mapping of the query characteristics to the basic elements of the knowledge graph; validating, by the computer, one or more query paths in the set of query paths in the knowledge graph based on respective scores of each query path; and generating, by the computer, a query result corresponding to the query based on the one or more validated query paths in the knowledge graph.
[0010] Viewed from a first aspect, the present invention provides a computer system for generating a query result utilizing a knowledge graph in an artificial intelligence chatbot, the computer system comprising: a bus system; a storage device connected to the bus system, where the storage device stores program instructions; and a processor connected to the bus system, wherein the processor executes the program instructions to identify characteristics of a query, map the query characteristics to basic elements of a knowledge graph in the artificial intelligence chatbot, generate a set of query paths in the knowledge graph based on the mapping of the query characteristics to the basic elements of the knowledge graph, validate one or more query paths in the set of query paths in the knowledge graph based on each score of each query path, and generate a query result corresponding to the query based on the validated one or more query paths in the knowledge graph.
[0011] Viewed from a further aspect, the present invention provides a computer program product for generating query results utilizing a knowledge graph in an artificial intelligence chatbot, the computer program product comprising a computer readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit to perform a method for performing steps of the present invention.
[0012] Viewed from a further aspect, the present invention provides a computer program stored on a computer readable medium and readable into an internal memory of a digital computer, the computer program comprising software code portions for performing the steps of the present invention when executed on the computer.
[0013] Viewed from a further aspect, the present invention provides a computer program product for generating query results utilizing a knowledge graph in an artificial intelligence chatbot, the computer program product comprising a computer-readable storage medium having program instructions embodied therein, the program instructions being executable by a computer to cause the computer to perform a method including: identifying, by the computer, characteristics of a query; mapping, by the computer, the characteristics of the query to basic elements of a knowledge graph in the artificial intelligence chatbot; generating, by the computer, a set of query paths in the knowledge graph based on the mapping of the characteristics of the query to the basic elements of the knowledge graph; validating, by the computer, one or more query paths in the set of query paths in the knowledge graph based on a respective score of each query path; and generating, by the computer, a query result corresponding to the query based on the one or more validated query paths in the knowledge graph.
[0014] According to one example embodiment, a computer-implemented method is provided for generating query results utilizing a knowledge graph in an artificial intelligence chatbot. A computer identifies characteristics of a query. A computer maps the characteristics of the query to primitive elements of a knowledge graph in the artificial intelligence chatbot. A computer generates a set of query paths in the knowledge graph based on the mapping of the characteristics of the query to primitive elements of the knowledge graph. A computer validates one or more query paths in the set of query paths in the knowledge graph based on a respective score of each query path. A computer generates a query result corresponding to the query based on the validated one or more query paths in the knowledge graph. According to another example embodiment, a computer system and computer program product are provided for generating query results utilizing a knowledge graph in an artificial intelligence chatbot.
[0015] As a result, the example embodiment utilizes knowledge graph technology along with the detection of basic query elements, the generation of graph paths, and the validation of the graph paths to improve the performance of the artificial intelligence chatbot. In addition, the artificial intelligence chatbot of the example embodiment is more flexible compared to current rule-based and template-based chatbots because it utilizes the definition of basic query elements in the knowledge graph. Thus, the artificial intelligence chatbot of the example embodiment is not limited to predefined queries. Furthermore, the artificial intelligence chatbot of the example embodiment validates the generated query paths in the knowledge graph by calculating a query path score for each of the generated query paths, thus providing valid query results that are important to industries and organizations.
[0016] The invention will now be described, by way of example only, with reference to preferred embodiments illustrated in the following figures. [Brief description of the drawings]
[0017] [Figure 1]1 is a pictorial representation of a network of data processing systems in which example embodiments may be implemented; [Diagram 2] 1 is a diagram of a data processing system in which example embodiments may be implemented; [Diagram 3] FIG. 2 illustrates an example of a query result generation process according to an example embodiment. [Figure 4] FIG. 1 illustrates an example of a query path generation process according to an example embodiment. [Diagram 5] FIG. 1 illustrates an example of a query path validation process according to an example embodiment. [Figure 6] 4 is a flowchart illustrating a process for generating query results corresponding to a natural language query according to an example embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0018] The present invention may be a system, method, and / or computer program product at any possible level of technical detail of integration. The computer program product may include a computer readable storage medium including computer readable program instructions for causing a processor to perform aspects of the present invention.
[0019] A computer readable storage medium may be a tangible device that can hold and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. A non-exhaustive list of more specific examples of computer-readable storage media includes portable floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disk (DVD), memory sticks, floppy disks, mechanically encoded devices such as punch cards or ridge structures in grooves in which the instructions are recorded, and any suitable combinations of these. As used herein, computer-readable storage media should not itself be construed as being ephemeral signals such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., light pulses passing through a fiber optic cable), or electrical signals transmitted over wires.
[0020] The computer readable program instructions described herein may be downloaded from a computer readable storage medium to each computing device / processing device or to an external computer or external storage device over a network (e.g., the Internet, a local area network, a wide area network, or a wireless network, or a combination thereof) that may include copper transmission cables, optical transmission fiber, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface within each computing device / processing device receives the computer readable program instructions from the network and forwards the computer readable program instructions for storage on a computer readable storage medium within each computing device / processing device.
[0021] The computer readable program instructions for carrying out the operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or source or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk®, C++, and procedural programming languages such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partially on the user's computer as a standalone software package, partially on the user's computer and on a remote computer, or entirely on a remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (e.g., via the Internet using an Internet Service Provider). In some embodiments, to carry out aspects of the invention, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute computer readable program instructions to customize the electronic circuitry by utilizing state information of the computer readable program instructions.
[0022] Aspects of the present invention are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks included in the flowchart illustrations and / or block diagrams, can be implemented by computer readable program instructions.
[0023] These computer readable program instructions may be provided to a processor of a computer or other programmable data processing apparatus to produce a machine, such that the instructions, executed by the processor of the computer or other programmable data processing apparatus, produce means for performing the functions / operations specified in the blocks of the flowcharts and / or block diagrams. These computer readable program instructions may be stored on a computer readable storage medium and capable of directing a computer, programmable data processing apparatus, or other device, or combination thereof, to function in a particular manner, such that the computer readable storage medium on which the instructions are stored comprises an article of manufacture containing instructions for performing aspects of the functions / operations specified in the blocks of the flowcharts and / or block diagrams.
[0024] The computer readable program instructions may be loaded into a computer, other programmable data processing apparatus, or other device to cause a series of operable steps to be performed on the computer, other programmable apparatus, or other device to generate a computer-implemented process such that the instructions, which execute on the computer, other programmable apparatus, or other device, perform the functions / acts specified in the flowchart and / or block diagram blocks.
[0025] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowcharts or block diagrams may represent a module, segment, or portion of instructions, comprising one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions shown in the blocks may occur in a different order than the order shown in the figures. For example, two blocks shown in succession may in fact be executed as one step, executed simultaneously, executed substantially simultaneously in a partially or fully overlapping manner in time, or executed in reverse order, depending on the functionality involved. It is also noted that each block in the block diagrams and / or flowchart diagrams, as well as combinations of blocks included in the block diagrams and / or flowchart diagrams, may be implemented by a dedicated hardware-based system that executes the specified functions or operations or executes a combination of dedicated hardware and computer instructions.
[0026] Referring now to the figures, and in particular to Figures 1 and 2, diagrams of data processing environments in which example embodiments may be implemented are shown. It should be understood that Figures 1 and 2 are intended as examples only and are not intended to assert or imply any limitation with respect to the environments in which various embodiments may be implemented. Many modifications may be made to the illustrated environments.
[0027] 1 shows a diagrammatic representation of a network of data processing systems in which example embodiments may be implemented. Network data processing system 100 is a network of computers, data processing systems, and other devices in which example implementations may be implemented. Network data processing system 100 includes network 102, which is the medium used to provide communications links between the computers, data processing systems, and other devices connected together in network data processing system 100. Network 102 may include connections, such as, for example, wired communications links, wireless communications links, fiber optic cables, and the like.
[0028] In the illustrated example, server 104 and server 106 are connected to network 102 along with storage 108. Server 104 and server 106 may be, for example, server computers with high speed connections to network 102. In addition, server 104 and server 106 provide a set of one or more chatbot services to client devices. It should also be noted that server 104 and server 106 may represent a cluster of servers in a data center. Alternatively, server 104 and server 106 may be computing nodes in a cloud environment.
[0029] Client 110, client 112, and client 114 are also connected to network 102. Clients 110, 112, and 114 are clients of server 104 and server 106. In this example, clients 110, 112, and 114 are shown as desktop or personal computers having wired communication links with network 102. However, it should be noted that clients 110, 112, and 114 are merely examples and may represent other types of data processing systems, such as laptop computers, handheld computers, smartphones, smart watches, smart televisions, smart appliances, gaming devices, kiosks, etc., having wired or wireless communication links with network 102. Users of clients 110, 112, and 114 may utilize clients 110, 112, and 114 to access and utilize chatbot services provided by server 104 and server 106.
[0030] Storage 108 is a network storage device that can store any type of data in a structured or unstructured format. In addition, storage 108 may represent multiple network storage devices. Furthermore, storage 108 may represent a graph database that includes knowledge graphs corresponding to one or more data domains, such as, for example, an insurance domain, a financial domain, an education domain, an entertainment domain, a gaming domain, etc. Additionally, storage 108 may store other types of data, such as authentication data or credential data, which can include, for example, usernames, passwords, and biometric data associated with system administrators and users of client devices.
[0031] In addition, it should be noted that network data processing system 100 may include any number of additional servers, clients, storage devices, and other devices not shown in the figures. The program code within network data processing system 100 may be stored on a computer readable storage medium and downloaded to a computer or other data processing device for use. For example, the program code may be stored on a computer readable storage medium on server 104 and downloaded to client 110 via network 102 for use by client 110.
[0032] In the depicted example, network data processing system 100 may be implemented as a number of different types of communication networks, such as, for example, the Internet, an intranet, a local area network (LAN), a wide area network (WAN), a telecommunications network, or any combination thereof. Figure 1 is intended as an example only, and not as an architectural limitation for different example embodiments.
[0033] 2, a diagram of a data processing system is shown in accordance with an example embodiment. Data processing system 200 is an example of a computer, such as server 104 of FIG. 1, within which computer readable program code or instructions implementing the processes of an example embodiment may be located. In this example, data processing system 200 includes a communications fabric 202 that provides communications between a processor unit 204, a memory 206, persistent storage 208, a communications unit 210, an input / output (I / O) unit 212, and a display 214.
[0034] The processor unit 204 is responsible for executing instructions of software applications and programs that may be loaded into the memory 206. The processor unit 204 may be a set of one or more hardware processor devices or may be a multi-core processor, depending on the particular implementation.
[0035] Memory 206 and persistent storage 208 are examples of storage devices 216. A computer-readable storage device is any piece of hardware that can store information, such as, but not limited to, data, computer-readable program code in a functional form, or other suitable information, or a combination thereof, on a temporary or persistent basis. Additionally, computer-readable storage devices exclude propagating media. In these examples, memory 206 may be, for example, random access memory (RAM) or any other suitable volatile or non-volatile storage device. Persistent storage 208 may take various forms, depending on the particular implementation. For example, persistent storage 208 may include one or more devices. For example, persistent storage 208 may be a hard disk drive, a solid-state drive, a flash memory, a rewritable optical disk, a rewritable magnetic tape, or a combination thereof. The medium used by persistent storage 208 may be removable. For example, a removable hard drive may be used for persistent storage 208.
[0036] In this example, persistent storage 208 stores chatbot 218. However, it should be noted that even though chatbot 218 is shown as residing in persistent storage 208, in alternative example embodiments, chatbot 218 may be a separate component of data processing system 200. For example, chatbot 218 may be a hardware component coupled to communications fabric 202, or a combination of hardware and software components.
[0037] The chatbot 218 may be, for example, an artificial intelligence program or other type of machine learning program. The data processing system 200 utilizes the chatbot 218 to interact with users of client devices who submit queries via voice or text input. The chatbot 218 utilizes a graph database 220 containing a knowledge graph 222 to generate query results for the received query by defining primitives 224 in the knowledge graph 222 that meet the needs of the received query and generating a query path in the knowledge graph 222 based on mapping characteristics of the received query to the primitives 224.
[0038] The base elements 224 are defined base query elements and correspond to a graph query language that can be identified by the graph database 220. In this example, the base elements 224 include an anchor element 226, a jump element 228, a filter element 230, and a target element 232. However, it should be noted that alternative example embodiments may include more base elements based on industry and organizational needs.
[0039] The anchor elements 226 represent entities, such as people, places, objects, events, businesses, etc., in the knowledge graph 222. The jump elements 228 represent relationships between data stored in the knowledge graph 222. The filter elements 230 represent filtering conditions for data stored in the knowledge graph 222. The target elements 232 represent target attributes of data stored in the knowledge graph 222.
[0040] The query 234 represents a natural language query. In addition, the query 234 may represent any type of query or question. The data processing system 200 receives the query 234 from a client device, such as the client 110 of FIG. 1. The data processing system 200 utilizes the chatbot 218 to identify and extract characteristics 236 of the query 234. The characteristics 236 include, for example, one or more of keywords, key phrases, traits, characteristics, properties, etc., contained in the query 234.
[0041] After identifying and extracting the characteristics 236 from the query 234, the chatbot 218 performs a query characteristics-to-base element mapping 238. The query characteristics-to-base element mapping 238 represents a mapping between each of the characteristics 236 of the query 234 and a corresponding base element of the base elements 224 of the knowledge graph 222. The chatbot 218 utilizes the query characteristics-to-base element mapping 238 to generate a query path 240 in the knowledge graph 222. The query path 240 represents a set of one or more possible paths in the knowledge graph 222 for finding appropriate information or answering the query 234.
[0042] After generating query paths 240 in the knowledge graph 222 for the query 234, the chatbot 218 generates a score 242 for each of the query paths 240 based on dimensions 244. The chatbot 218 may express the score 242, for example, as a number, a percentage, etc. The dimensions 244 may include, for example, the order of words in the query 234, information or ground truth for finding valid results for the query 234 in the knowledge graph 222, the likelihood that the query 234 was submitted based on the query history, etc.
[0043] Further, the chatbot 218 may compare the score 242 of each query path to a threshold 246. The threshold 246 represents a minimum threshold level for the query path score. The chatbot 218 utilizes the threshold 246 to identify valid query paths 248. The valid query paths 248 represent a set of one or more valid query paths in the knowledge graph 222. In other words, if the chatbot 218 generates a score for a particular query path that exceeds the threshold 246, the chatbot 218 identifies the particular query path as a valid query path. Alternatively, the chatbot 218 may select the query path with the highest score as the only valid query path. The chatbot 218 utilizes the valid query paths 248 to generate query results 250. The query results 250 represent valid and plausible answers to the query 234.
[0044] Communications unit 210 provides for communication with other computers, data processing systems, and devices over a network, such as network 102 in FIG. 1, in this example. Communications unit 210 may provide communication by using both physical and wireless communications links. The physical communications links may utilize, for example, wires, cables, a universal serial bus, or any other physical technology to establish a physical communications link for data processing system 200. The wireless communication link may utilize, for example, short wave, radio frequency, ultra-high frequency, microwave, wireless fidelity (Wi-Fi), Bluetooth® technology, global system for mobile communications (GSM), code division multiple access (CDMA), second-generation (2G), third-generation (3G), fourth-generation (4G), 4G Long Term Evolution (LTE), LTE Advanced, fifth-generation (5G), or any other wireless communication technology or standard for establishing a wireless communication link with data processing system 200.
[0045] Input / output unit 212 allows for the input and output of data to and from other devices that may be connected to data processing system 200. For example, input / output unit 212 may provide a connection for user input via a keypad, keyboard, mouse, microphone, or other suitable input device, or combination thereof. Display 214 provides a mechanism for displaying information to a user and may include, for example, touch screen functionality to allow a user to make on-screen selections via a user interface or input data.
[0046] Instructions for the operating system, applications, and / or programs may be located in storage devices 216, which communicate with processor unit 204 via communications fabric 202. In this example, the instructions reside in functional form on persistent storage 208. These instructions may be loaded into memory 206 for execution by processor unit 204. The processes of the various embodiments may be executed by processor unit 204 using computer-implemented instructions, which may be located in a memory, such as memory 206. These program instructions are referred to as program code, computer usable program code, or computer readable program code, which may be read and executed by a processor in processor unit 204. The program instructions may be embodied on different physical computer readable storage devices, such as memory 206 or persistent storage 208, in various embodiments.
[0047] The program code 252 may be located in a functional form on a selectively removable computer readable medium 254 and loaded or transferred to the data processing system 200 for execution by the processor unit 204. The program code 252 and the computer readable medium 254 form a computer program product 256. In one example, the computer readable medium 254 may be a computer readable storage medium 258 or a computer readable signal medium 260. The computer readable storage medium 258 may include, for example, an optical or magnetic disk inserted or placed into a device or other device that is part of the persistent storage 208 for transfer to a storage device such as a hard drive that is part of the persistent storage 208. The computer readable storage medium 258 may take the form of persistent storage, such as a hard drive, thumb drive, or flash memory connected to the data processing system 200. In some cases, the computer readable storage medium 258 may not be removable from the data processing system 200.
[0048] Alternatively, program code 252 may be transferred to data processing system 200 using computer readable signal media 260. Computer readable signal media 260 may be, for example, a propagated data signal containing program code 252. For example, computer readable signal media 260 may be an electromagnetic signal, an optical signal, or any other suitable type of signal, or a combination thereof. These signals may be transmitted over communications links, such as wireless communications links, fiber optic cable, coaxial cable, a wire, or any other suitable type of communications link, or a combination thereof. In other words, in these examples, the communications links and / or connections may be physical or wireless. The computer readable media may take the form of non-tangible media, such as communications links or wireless transmissions containing the program code.
[0049] In some example embodiments, program code 252 may be downloaded over a network from another device or data processing system to persistent storage 208 via computer readable signal medium 260 for use within data processing system 200. For example, program code stored on a computer readable storage medium within a data processing system may be downloaded over a network from the data processing system to data processing system 200. The data processing system providing program code 252 may be a server computer, a client computer, or other device capable of storing and transmitting program code 252.
[0050] The various components illustrated in data processing system 200 are not meant to provide architectural limitations to the manner in which various embodiments may be implemented. Various example embodiments may be implemented in a data processing system including components in addition to or in place of the components illustrated in data processing system 200. Other components illustrated in FIG. 2 may vary from the illustrated example. Various embodiments may be implemented using any hardware device or system capable of executing program code. As one example, data processing system 200 may include organic components integrated with inorganic components, or may be entirely composed of non-human organic components, or both. For example, the storage device may be composed of organic semiconductors.
[0051] As another example, a computer readable storage device in data processing system 200 is any hardware apparatus that can store data. Memory 206, persistent storage 208, and computer readable storage media 258 are examples of physical storage devices in a tangible form.
[0052] In another example, a bus system may be used to implement communications fabric 202 and may be comprised of one or more buses, such as a system bus or an I / O bus. Of course, the bus system may be implemented using any suitable type of architecture that provides for a transfer of data between different components or devices connected to the bus system. Furthermore, a communications unit may include one or more devices used for transmitting and receiving data, such as a modem or a network adapter. Further, a memory may be memory 206 or a cache, such as found in an interface and memory controller hub that may be present in communications fabric 202.
[0053] Artificial intelligence chatbots play an important role in many current industries and organizations. Currently, retrieve and rank and classification are the most common techniques used in artificial intelligence chatbots when finding the most relevant answers to queries submitted by users. In addition, knowledge graphs are currently the most popular state-of-the-art technology. Compared to retrieve and rank and classification, the use of knowledge graph techniques in artificial intelligence chatbots has multiple advantages. For example, the use of knowledge graphs in artificial chatbots realizes the ability to understand user queries more easily compared to retrieve and rank or classification. Furthermore, the use of knowledge graphs in artificial chatbots realizes the ability to expand beyond submitted user queries. Furthermore, the use of knowledge graphs in artificial chatbots allows for more flexible user queries and provides more comprehensive and relevant answers to those user queries.
[0054] The artificial intelligence chatbot of the example embodiment identifies characteristics of a user's natural language query and automatically converts the natural language query into a graph query language, which can be identified by a graph database containing a knowledge graph by utilizing multiple steps. First, the artificial intelligence chatbot of the example embodiment defines basic query elements in the knowledge graph to meet the needs of the submitted natural language query. The example embodiment utilizes four defined types of basic query elements in the knowledge graph. The four defined basic elements include anchor elements, jump elements, filter elements, and target elements. An anchor element represents an entity in the knowledge graph. A jump element represents a relationship in the knowledge graph. A filter element represents a filtering condition in the knowledge graph. A target element represents a target attribute in the knowledge graph. However, it should be noted that the number of basic query elements can be increased if required by an industry or organization. The example embodiment maps each basic query element to a graph query language script based on a selected graph database and graph query language.
[0055] Second, the artificial intelligence chatbot of the example embodiment uses natural language processing to extract useful information, such as characteristics (e.g., important terms), from the submitted natural language query. The artificial intelligence chatbot of the example embodiment then maps the extracted information to defined base query elements in the knowledge graph.
[0056] Third, the artificial intelligence chatbot of the example embodiment dynamically builds one or more query paths in the knowledge graph based on a mapping of the extracted information to defined base query elements in the knowledge graph. Fourth, the artificial intelligence chatbot of the example embodiment generates a score for each built query path based on multiple dimensions to determine whether each particular query path is valid. The multiple dimensions may include, for example, the order of words in the natural language query, ground truth that validates the results of the natural language query in the knowledge graph, the likelihood that the natural language query was submitted based on the query history, etc. Fifth, the artificial intelligence chatbot of the example embodiment finds query results in the knowledge graph based on the valid query paths.
[0057] As a result, the example embodiments utilize knowledge graph technology along with the detection of basic query elements, graph path generation, and graph path validation to improve the performance of the artificial intelligence chatbot. In addition, the artificial intelligence chatbot of the example embodiments is more flexible compared to current rule-based and template-based chatbots because it utilizes the definition of basic query elements in the knowledge graph. Thus, the artificial intelligence chatbot of the example embodiments is not limited to predefined queries. Furthermore, the artificial intelligence chatbot of the example embodiments validates the query path in the knowledge graph by calculating the score of the query path, thus providing valid query results that are important for industries and organizations. Furthermore, the example embodiments are scalable because the query transformation layer, the natural language processing layer, and the query path generation layer are separated from each other.
[0058] Thus, example embodiments provide one or more technical solutions that overcome technical problems by utilizing a knowledge graph in an artificial intelligence chatbot. As a result, these one or more technical solutions provide technical effects and practical applications in the field of artificial intelligence chatbots. Referring now to FIG. 3, a diagram illustrating an example of a query result generation process according to an example embodiment is shown. In a network of data processing systems, such as the network data processing system 100 of FIG. 1, a query result generation process 300 may be implemented. The query result generation process 300 is a process for generating query results corresponding to a natural language query in an artificial intelligence chatbot using a knowledge graph together with detection of basic query elements, generation of a query path, and validation of the query path.
[0059] In this example, the query result generation process 300 includes steps 302, 304, 306, 308, and 310. However, it should be noted that the query result generation process 300 may include more or fewer steps than those shown in the figure, for example, a step may be split into two or more steps, two or more steps may be combined into one step, one or more steps not shown in the figure may be added, etc.
[0060] In step 302, a data processing system, such as the server 104 in FIG. 1 or the data processing system 200 in FIG. 2, receives a natural language query, "I want to travel to the capital city of China. Any recommended places worth visiting?" from a client device, such as the client 110 in FIG. 1. In step 304, the data processing system utilizes an artificial intelligence chatbot to define basic query elements in a knowledge graph to match the requirements of the received natural language query. In this example, the defined basic query elements include an anchor element "China", a jump element "Capital City", and a jump element "Famous Places".
[0061] In step 306, the artificial intelligence chatbot generates a query path in the knowledge graph based on the defined basic query elements that meet the needs of the received natural language query. In this example, the generated query path includes an anchor element "country" with a jump element "capital" to the anchor element "city". The anchor element "city" includes three jump elements "famous for" to the anchor elements "Great Wall", "Summer Palace", and "...", respectively.
[0062] At step 308, the artificial intelligence chatbot validates the query paths by calculating a score for each query path. The artificial intelligence chatbot may, for example, compare the score of each query path to a threshold score level and validate only those query paths having a query path score greater than the threshold score level. Alternatively, the artificial intelligence chatbot may validate only those query paths having the highest query path score.
[0063] At step 310, the artificial intelligence chatbot generates query results corresponding to the received natural language query based on valid query paths in the knowledge graph. In this example, the query results for the received natural language query "I want to travel to the capital city of China. Any recommendations on places worth visiting?" are "The Great Wall," "Summer Palace," and "...". The artificial intelligence chatbot outputs these query results to the client device via text or voice.
[0064]
[0036] Referring now to Figure 4, a diagram illustrating an example of a query path generation process is shown in accordance with an example embodiment. The query path generation process 400 may be implemented in a computer, such as, for example, the server 104 of Figure 1 or the data processing system 200 of Figure 2. In this example, the query path generation process 400 shows query paths 402, 404, 406, and 408.
[0065] Query path 402 includes an anchor element with a jump element for "capital city of China" (in this example, anchor element "China" with jump element "capital city"), which would result in a query result of this example being Beijing. Query path 404 includes an anchor element with a jump element to a filter element for "population of capital cities of China" (in this example, anchor element "China" with jump element "capital city" to target element "population"), which would result in a query result of approximately 21.5 million.
[0066] Query path 406 includes a filter element with a jump element (in this example, anchor element "China" with jump element "Capital" to jump element "Famous Scenery") for "famous scenes in China's capital city". In this example, the query result would be the Summer Palace. Query path 408 includes an anchor element to another anchor element (in this example, anchor element "China" to anchor element "Summer Palace") for the question "Is the Summer Palace in China?". In this example, a computer artificial intelligence chatbot such as chatbot 218 of FIG. 2 searches for a valid path between two anchor elements in a knowledge graph. If the artificial intelligence chatbot does not find a valid path for the query in the knowledge graph, the artificial intelligence chatbot determines that no connection exists between the two anchor elements. If the artificial intelligence chatbot finds a valid path for the query in the knowledge graph, the artificial intelligence chatbot determines that the Summer Palace is in China.
[0067] 5, a diagram illustrating an example of a query path validation process according to an example embodiment is shown. The query path validation process 500 may be implemented in a computer such as, for example, the server 104 of FIG. 1 or the data processing system 200 of FIG. 2. In this example, the query path validation process 500 is for a received natural language query 502 of "Who is the mother of Yao Ming's daughter?"
[0068] Query path 504 includes an anchor element “YaoMing” that includes a jump element “daughter” to a jump element “mother”. In this example, a computer artificial intelligence chatbot, such as chatbot 218 of FIG. 2, generates a query path validation score of “0.9” for query path 504. Query path 506 includes an anchor element “Yao Ming” that includes a jump element “mother” to a jump element “daughter”. In this example, the artificial intelligence chatbot generates a query path validation score of “0.6” for query path 506. In this example, the artificial intelligence chatbot selects query path 504 with the highest query path score as a valid query path for generating query results for the received natural language query 502.
[0069]
[0023] Referring now to Figure 6, a flow chart illustrating a process for utilizing a knowledge graph in an artificial intelligence chatbot to generate query results corresponding to a natural language query is shown according to an example embodiment. The process illustrated in Figure 6 may be implemented in a computer, such as, for example, the server 104 of Figure 1 or the data processing system 200 of Figure 2.
[0070] The process begins when the computer receives a natural language query from a client device corresponding to a user over a network (step 602). The computer uses an artificial intelligence chatbot, such as chatbot 218 of FIG. 2, to define basic query elements of a knowledge graph contained within a graph database to match the requirements of the natural language query received from the client device (step 604). The computer also uses the artificial intelligence chatbot to identify characteristics of the natural language query using natural language processing (step 606).
[0071] The computer uses the artificial intelligence chatbot to map the identified characteristics of the natural language query to the defined base query elements of the knowledge graph (step 608). In addition, the computer uses the artificial intelligence chatbot to generate a set of one or more query paths in the knowledge graph based on the mapping of the identified characteristics of the natural language query to the defined base query elements of the knowledge graph (step 610). In addition, the computer uses the artificial intelligence chatbot to calculate a score for each query path in the set of query paths in the knowledge graph based on a plurality of dimensions (step 612). The plurality of dimensions may include, for example, sentence structure (e.g., word order, grammar, punctuation, etc.), ground truth to verify the validity of the query results in the knowledge graph, whether the query is included in the query history (e.g., the same query or a similar query has been submitted previously), etc.
[0072] The computer then validates one or more query paths in the set of query paths in the knowledge graph based on each of the calculated scores for each query path (step 614) using the artificial intelligence chatbot. The computer generates query results corresponding to the natural language query based on the validated query path or paths in the knowledge graph using the artificial intelligence chatbot (step 616). The computer transmits the query results corresponding to the natural language query over a network to a client device corresponding to the user (step 618). The process then ends.
[0073] Thus, the exemplary embodiments of the present invention provide a computer-implemented method, computer system, and computer program product for generating query results utilizing a knowledge graph in an artificial intelligence chatbot. The description of various embodiments of the present invention is presented for illustrative purposes, but is not intended to be exhaustive and is not limited to the disclosed embodiments. It will be apparent to those skilled in the art that many changes and modifications are possible without departing from the scope of the described embodiments. The terms used in this specification are selected to best explain the principles of the embodiments, practical applications, or technical improvements beyond the technology found in the market, or to enable other skilled in the art to understand the embodiments disclosed herein.
Claims
1. 1. A computer-implemented method for generating query results utilizing a knowledge graph in an artificial intelligence chatbot, comprising: Identifying, by a computer, a characteristic of the query; mapping, by the computer, the characteristics of the query to primitives of the knowledge graph in the artificial intelligence chatbot; generating, by the computer, a set of query paths within the knowledge graph based on the mapping of the characteristics of the query to the primitives of the knowledge graph; validating, by the computer, one or more query paths in the set of query paths in the knowledge graph based on each score of each query path; generating, by the computer, a query result corresponding to the query based on the one or more validated query paths in the knowledge graph; Including, Wherein the basic element is a defined basic query element, the basic query element includes an anchor element, a jump element, a filter element, and a target element, the anchor element represents an entity in the knowledge graph, the jump element represents a relationship between data stored in the knowledge graph, the filter element represents a filtering condition for the data stored in the knowledge graph, and the target element represents a target attribute of the data stored in the knowledge graph. The computer-implemented method.
2. The computer-implemented method of claim 1 , further comprising receiving, by the computer, the query from a client device corresponding to a user over a network.
3. The computer-implemented method of claim 2 , further comprising transmitting, by the computer, the query results corresponding to the query over the network to the client device corresponding to the user.
4. The computer-implemented method of claim 1 , further comprising: defining, by the computer, the base elements of the knowledge graph to match requirements of the query.
5. 5. The computer-implemented method of claim 1, further comprising: calculating, by the computer, the respective scores for each query path in the set of query paths in the knowledge graph based on a plurality of dimensions.
6. 6. The computer-implemented method of claim 5, wherein the multiple dimensions include an order of words in the query, a ground truth that validates the query results in the knowledge graph, and whether the query was submitted based on a query history.
7. The computer-implemented method of claim 1 , wherein the query is a natural language query.
8. The computer-implemented method of claim 1 , wherein the computer utilizes natural language processing to identify the characteristics of the query.
9. 2. The computer-implemented method of claim 1, wherein the defined basic query elements correspond to a graph query language that can be identified by a graph database that contains the knowledge graph.
10. 10. The computer-implemented method of claim 1, wherein a valid query path of the one or more validated query paths has a corresponding query path score that exceeds a threshold query path score level.
11. The computer-implemented method of claim 1 , wherein a valid query path of the one or more validated query paths has a highest query path score.
12. The computer-implemented method of claim 1 , wherein the characteristics of the query include keywords contained in the query.
13. 1. A computer system for generating query results utilizing a knowledge graph in an artificial intelligence chatbot, the computer system comprising: A bus system; a storage device connected to the bus system, the storage device storing program instructions; a processor connected to the bus system; wherein the processor executes the program instructions to Identify the characteristics of the query, Mapping the characteristics of the query to primitives of the knowledge graph in the artificial intelligence chatbot; generating a set of query paths in the knowledge graph based on the mapping of the characteristics of the query to the primitives of the knowledge graph; validating one or more query paths in the set of query paths in the knowledge graph based on each score of each query path; generating a query result corresponding to the query based on the one or more validated query paths in the knowledge graph; Wherein the basic element is a defined basic query element, the basic query element includes an anchor element, a jump element, a filter element, and a target element, the anchor element represents an entity in the knowledge graph, the jump element represents a relationship between data stored in the knowledge graph, the filter element represents a filtering condition for the data stored in the knowledge graph, and the target element represents a target attribute of the data stored in the knowledge graph. The computer system.
14. The processor further executes the program instructions to:
14. The computer system of claim 13, wherein the query is received from a client device corresponding to a user over a network.
15. The processor further executes the program instructions to:
15. The computer system of claim 14, further comprising: transmitting, over the network, the query results corresponding to the query to the client device corresponding to the user.
16. The processor further executes the program instructions to:
16. A computer system according to any one of claims 13 to 15, further comprising: defining the primitives of the knowledge graph to match requirements of the query.
17. The processor further executes the program instructions to:
17. The computer system of claim 13, further comprising: a computer system configured to calculate the respective scores for each query path in the set of query paths in the knowledge graph based on a plurality of dimensions.
18. A computer program product for causing a computer to carry out the steps of the implementation method according to any one of claims 1 to 12.
19. 20. A computer readable medium having recorded thereon the computer program of claim 18.
Citation Information
Patent Citations
Method, controller, program and data storage system for performing reconciliation processing
JP2013257874A
Method and device for processing graph database query
JP2014194772A
Information processing system, server, terminal device, information processing method and program
JP2017182457A
Selecting next user prompt types
WO2018034928A1
Recommending friends in automated chatting
WO2018214164A1