Question answering device, question answering method, and program
Patent Information
- Application Number
- JP2025506274
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-13
- Filing Date
- 2023-03-13
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2043-03-13
AI Technical Summary
Existing question answering systems face inefficiencies in generating and outputting answers based on vast causal relationship knowledge, as they struggle to effectively trace and utilize the complex relationships between phrases.
A question answering device and method that acquire queries, determine starting phrases and inference types, and search causal relationship data to output answers by tracing causal and semantic relationships, using a processor and database to execute inference processing and generate answers efficiently.
Enables efficient generation and output of answers by leveraging causal and semantic relationships, reducing computational load and improving response time through pre-processing and graphical representation of relationships, suitable for applications like medical knowledge generation.
Abstract
Description
Question answering device, question answering method, and recording medium
[0001] The present disclosure relates to question answering technology.
[0002] A question-answering system that accepts questions in natural language from users and returns answers to the questions is known. Patent Literature 1 discloses a question-answering device that outputs an answer to a question while taking into account a causal relationship between the question and answer candidates.
[0003] Japanese Patent Application Laid-Open No. 2008-282366
[0004] When generating answers to questions using knowledge of causal relationships, it is necessary to efficiently generate and output answers to questions based on a huge amount of knowledge of causal relationships.
[0005] An object of the present disclosure is to provide a question answering device that can efficiently generate and output answers to questions based on causal relationship knowledge.
[0006] In one aspect of the present disclosure, a question answering device comprises: a query acquisition means for acquiring a query; a starting phrase determination means for determining a starting phrase corresponding to the query from a plurality of phrases included in causal relationship data; an inference type determination means for determining an inference type based on the query; a search means for searching for a phrase by tracing a causal relationship included in the causal relationship data from the starting phrase using a search procedure corresponding to the determined inference type; and an output means for outputting the phrase obtained by the search as an answer to the query.
[0007] In another aspect of the present disclosure, a question-answering method executed by a computer includes: acquiring a query; determining a starting phrase corresponding to the query from a plurality of phrases included in causal relationship data; determining an inference type based on the query; searching for phrases by tracing causal relationships included in the causal relationship data from the starting phrase using a search procedure corresponding to the determined inference type; and outputting the phrase obtained by the search as an answer to the query.
[0008] In yet another aspect of the present disclosure, a recording medium records a program that causes a computer to execute the following process: acquire a query; determine a starting phrase corresponding to the query from a plurality of phrases included in causal relationship data; determine an inference type based on the query; search for phrases by tracing causal relationships included in the causal relationship data from the starting phrase using a search procedure corresponding to the determined inference type; and output the phrase obtained by the search as an answer to the query.
[0009] 1 shows the overall configuration of a question answering system according to a first embodiment. FIG. 2 is a block diagram showing the hardware configuration of a question answering device. FIG. 3 is a block diagram showing the functional configuration of a question answering device. FIG. 4 is a schematic diagram showing an example of causal relationship knowledge stored in a causal relationship database. FIG. 5 is a diagram showing an example of causal inference. FIG. 6 is a diagram showing an example of reverse causal inference. FIG. 7 is a diagram showing an example of problem-solution inference. FIG. 8 is a diagram showing an example of solution-problem inference. FIG. 9 is a flowchart of inference processing by the question answering device according to the first embodiment. FIG. 10 is a block diagram showing the functional configuration of a question answering device according to a second embodiment. FIG. 11 is a flowchart of inference processing by the question answering device according to the second embodiment. FIG. 12 is a diagram showing an example of a display of an answer graph output by the question answering device according to the second embodiment. FIG. 13 is a block diagram showing another display example of an answer graph output by the question answering device according to the second embodiment. FIG. 14 is a block diagram showing the configuration of a medical knowledge generation system according to a third embodiment. FIG. 15 is a block diagram showing the configuration of a question answering system according to the third embodiment. FIG. 16 is a block diagram showing the functional configuration of a question answering device according to a fourth embodiment. FIG. 17 is a flowchart of processing by the question answering device according to the fourth embodiment.
[0010] Preferred embodiments of the present disclosure will now be described with reference to the drawings. First Embodiment (Overall Configuration) FIG. 1 shows the overall configuration of a question answering system according to a first embodiment. The question answering system 1 includes a user terminal device 5 and a question answering device 100. The user operates the terminal device 5 to send a question (hereinafter referred to as a "query") to the question answering device 100. The query is written in natural language. The question answering device 100 receives the query from the user. The question answering device 100 generates an answer to the query using causal relationship knowledge that defines the relationship between multiple phrases that have a causal relationship, and sends the answer to the user terminal device 5.
[0011] (Basic Principle) Next, the basic principle of the question answering device 100 will be described. The question answering device 100 searches for an answer to a user's query based on prepared causal relationship knowledge. The causal relationship knowledge defines a causal relationship between multiple sentences (hereinafter also referred to as "phrases") written in natural language. The question answering device 100 first determines, as a start phrase, a phrase corresponding to the user's query from among multiple phrases included in the causal relationship knowledge. The question answering device 100 then searches for a phrase having a causal relationship with the user's query by tracing the causal relationships included in the causal relationship knowledge from the start phrase, and generates an answer to the query. Note that the question answering device 100 may search for phrases by tracing specific semantic relationships, which will be described later, in addition to causal relationships. In this way, the question answering device 100 can generate an answer having a causal relationship with the user's query based on prepared causal relationship knowledge. Note that the process of deriving an answer to a user's query based on causal relationship knowledge is called "inference."
[0012] 2 is a block diagram showing the hardware configuration of the question answering device 100. As shown in the figure, the question answering device 100 includes an interface (IF) 12, a processor 13, a memory 14, a recording medium 15, and a database (DB) 16.
[0013] The IF 12 communicates with an external device to acquire a query input by a user. The IF 12 also transmits an answer generated by the question answering device 100 to the external device. Specifically, when a user transmits a query to the question answering device 100 using the terminal device 5, the question answering device 100 receives the query through the IF 12 and transmits an answer corresponding to the query to the user's terminal device 5 through the IF 12.
[0014] The processor 13 is a computer such as a CPU (Central Processing Unit), and controls the entire question answering apparatus 100 by executing a prepared program. Specifically, the processor 13 may be a CPU, a GPU (Graphics Processing Unit), a DSP (Digital Signal Processor), an MPU (Micro Processing Unit), an FPU (Floating Point number Processing Unit), a PPU (Physics Processing Unit), a TPU (Tensor Processing Unit), a quantum processor, a microcontroller, or a combination thereof. Specifically, the processor 13 executes inference processing to generate an answer to a query.
[0015] The memory 14 is composed of a ROM (Read Only Memory), a RAM (Random Access Memory), etc. The memory 14 stores various programs executed by the processor 13. The memory 14 is also used as a working memory while the processor 13 is executing various processes.
[0016] The recording medium 15 is a non-volatile, non-transitory recording medium such as a disk-shaped recording medium or a semiconductor memory, and is configured to be detachable from the question answering device 100. The recording medium 15 records various programs to be executed by the processor 13. When the question answering device 100 executes various processes, the programs recorded on the recording medium 15 are loaded into the memory 14 and executed by the processor 13.
[0017] The DB 16 stores causal relationship knowledge used when generating answers to queries. The DB 16 may also store machine learning models used in the inference process described below.
[0018] In addition to the above, the question answering device 100 may also include a display device such as a liquid crystal display or a projector, and an input device such as a keyboard or a mouse. These display devices and input devices are used by, for example, an administrator of the question answering device 100 to perform necessary management.
[0019] 3 is a block diagram showing the functional configuration of the question answering device 100. Functionally, the question answering device 100 includes a causal relationship DB 21, a semantic relationship determination unit 22, a starting phrase determination unit 23, an inference type determination unit 24, and an inference unit 25.
[0020] The causal relationship DB 21 stores causal relationship knowledge between a plurality of phrases. The causal relationship knowledge is an example of causal relationship data, and is knowledge data extracted from a large amount of literature, web documents, and the like. In this embodiment, the causal relationship knowledge is defined as consisting of the following elements having a causal relationship: - "a natural language sentence expressing a cause (cause phrase)" - "a natural language sentence expressing a result (result phrase)" The causal relationship knowledge is prepared in advance as a plurality of pairs of the above cause phrases and result phrases (hereinafter also referred to as "causal relationship pairs") and stored in the causal relationship DB 21.
[0021] In this embodiment, the term "causal relationship" refers to a correspondence such that "if one thing occurs, the other thing occurs." Therefore, in this embodiment, the causal relationship includes the following relationships:
[0022] (1) Causal relationship in the narrow sense A causal relationship in the narrow sense refers to a relationship in which one thing causes another. For example, "The birth rate is declining." → "The aging population is increasing." (2) Before and after relationship A before and after relationship refers to a temporal relationship in which one thing occurs after the other. For example, "Going to a restaurant." → "Ordering a meal." (3) Implication relationship An implication relationship refers to a relationship in which one thing implies the other. For example, "Managing the condition of fields with AI." → "IT-based agriculture."
[0023] As described above, the causal relationship DB 21 stores multiple causal relationship pairs. The causal relationship DB 21 may also store the following additional information: (i) Source Information of Causal Relationships The source information of causal relationships is, for example, information indicating an information source, such as a document or a web document, in which a causal relationship pair is described. When presenting an answer to a query to a user, the source information of causal relationships can be used as information indicating the basis for selecting the answer. (ii) Subcategorization of Causal Relationships The subcategorization of causal relationships is a classification indicating a more detailed relationship between phrases constituting a causal relationship pair. Examples include "the relationship between a problem and its solution (problem-solving relationship)" and "temporal context." Furthermore, as described above, relationships included in "causal relationships" in this embodiment (narrowly defined causal relationships, context relationships, and implication relationships) may be used as subcategorizations.
[0024] FIG. 4 schematically shows an example of causal relationship knowledge stored in the causal relationship DB 21. For ease of explanation, FIG. 4 shows the causal relationship knowledge in a graph structure. Each phrase F1 to F6 corresponds to a node in the graph structure, and the causal relationship between the phrases is indicated by a solid arrow (edge). For example, phrases F1 and F2 form a causal relationship pair of "The aging of rural areas is progressing" → "Drones are being introduced to rural areas." Note that FIG. 4 shows an excerpt of causal relationship knowledge that includes a large number of causal relationship pairs.
[0025] The data structure of the causal relationship knowledge stored in the causal relationship DB 21 is not limited to the graph structure described above. For example, the causal relationship DB 21 may store the causal relationship knowledge as an enumeration of a large number of causal relationship pairs.
[0026] The semantic relationship determination unit 22 extracts pairs of phrases that fall under a specific semantic relationship (hereinafter also referred to as "specific semantic relationship pairs") from among a plurality of phrases included in the causal relationship knowledge stored in the causal relationship DB 21. Here, a "specific semantic relationship" refers to a relationship in which the phrases are similar in meaning, and specifically includes an entailment relationship, a synonymous relationship, a similarity relationship, etc. An entailment relationship is a relationship in which one of two phrases entails the other. A synonymous relationship is a relationship in which the two phrases have the same meaning, and a similarity relationship is a relationship in which the two phrases have similar meanings.
[0027] The reason for extracting specific semantic relationship pairs from multiple phrases included in causal knowledge is as follows: As mentioned above, the causal relationship pairs that make up causal knowledge are phrase pairs described in natural language, and therefore the causal knowledge includes multiple phrases that are in an entailment relationship, as well as multiple phrases that describe substantially identical or similar content. Therefore, by flexibly linking such phrases with similar meanings to expand the causal relationship knowledge, it becomes possible to infer answers from queries using a wider range of causal relationship knowledge.
[0028] In FIG. 4 , dashed arrows indicate edges connecting specific semantic relation pairs. In the example of FIG. 4 , phrase F2 “Drones are being introduced to rural areas” and phrase F5 “Pesticides are being sprayed by drones” are in an entailed relationship and correspond to a specific semantic relation pair. Thus, although there is no causal relationship between phrases F2 and F5 in the original causal relationship knowledge, phrases F2 and F5 are defined as a specific semantic relation pair. Then, when making inferences based on a query, the question answering device 100 searches for an answer to the query by tracing the causal relationships and specific semantic relationships. In this way, in the example of FIG. 4 , the question answering device 100 can search by tracing more phrases, such as phrases F1 → F2 → F5 → F6. This enables the question answering device 100 to infer an answer to a query using a wider range of causal relationship knowledge.
[0029] As an example, the semantic relationship determination unit 22 can determine whether two phrases have a specific semantic relationship using the feature vectors of the phrases to be determined. For example, the semantic relationship determination unit 22 converts each of the two phrases into a feature vector and calculates the similarity and distance between them. Then, if the similarity or distance between the two feature vectors is equal to or less than a predetermined threshold, the semantic relationship determination unit 22 determines that the phrases have a specific semantic relationship. The semantic relationship determination unit 22 outputs the extracted specific semantic relationship pair to the inference unit 25.
[0030] The start phrase determination unit 23 determines a start phrase corresponding to a query input by a user by referring to the causal relationship knowledge stored in the causal relationship DB 21. A "start phrase" is a phrase that serves as a starting point when tracing the causal relationship knowledge based on the query input by the user in inferring an answer to the query. Specifically, the start phrase determination unit 23 analyzes the meaning of the user's query. Then, the start phrase determination unit 23 determines, as the start phrase, a phrase that is similar in meaning to the user's query from among multiple phrases included in the causal relationship knowledge. For example, if the user's query is "What happens when rural areas age?", the start phrase determination unit 23 searches the causal relationship knowledge for a phrase that is substantially identical in meaning to the query or a phrase whose meaning is closer than a predetermined standard. Then, for example, if the phrase "rural aging" is found in the causal relationship knowledge stored in the causal relationship DB 21, the start phrase determination unit 23 determines the phrase as the start phrase. In one example, the start phrase determination unit 23 may determine, as the start phrase, a phrase whose feature vector similarity between phrases is higher than a predetermined reference value, or whose feature vector distance is shorter than a predetermined reference value, similar to the semantic relation determination unit 22. The start phrase determination unit 23 outputs the determined start phrase to the inference unit 25.
[0031] The number of starting phrases determined by the starting phrase determination unit 23 for one query is not limited to one, but may be multiple. For example, if the user's query is "rural problems," the starting phrase determination unit 23 may determine, as starting phrases, multiple phrases that are close to rural problems from among multiple phrases included in the causal relationship knowledge.
[0032] The inference type determination unit 24 determines an inference type based on a query entered by a user. Here, the "inference type" refers to a procedure for searching for phrases by tracing causal relationship knowledge when inferring an answer corresponding to a query based on causal relationship knowledge. Specifically, the inference types include the following:
[0033] (A) Causal inference Causal inference is an inference type for queries such as "What happens if I do XX?", and is a search method that traces causal relationships and specific semantic relationships forward in causal knowledge. Note that the forward direction is, for example, from "cause" to "result."
[0034] FIG. 5 shows an example of causal inference. Note that solid arrows in the figure indicate causal relationships, and dashed arrows indicate problem-solving relationships. Causal inference infers events that occur due to a query. In the example of FIG. 5, based on the query "The aging of rural areas is progressing," the phrase "The food self-sufficiency rate will decline" is obtained. Furthermore, based on the phrase "The food self-sufficiency rate will decline," the phrase "Household food costs will rise" is obtained.
[0035] (B) Reverse causal inference Reverse causal inference is an inference type for queries such as "What caused XX?", and is a search method that traces causal relationships and specific semantic relationships backward. Note that the reverse direction is, for example, from "result" to "cause."
[0036] FIG. 6 shows an example of reverse causal inference. Note that solid arrows in the figure indicate causal relationships, and dashed arrows indicate problem-solving relationships. Reverse causal inference infers the events that cause a query. In the example of FIG. 6, the phrase "The birth rate is declining" is obtained based on the query "The aging of rural areas is progressing." Furthermore, the phrase "Delayed marriage is progressing" is obtained based on the phrase "The birth rate is declining."
[0037] (C) Combinatorial Inference Combinatorial inference is a method that combines the above-mentioned causal inference and reverse causal inference, and includes, for example, the following methods.
[0038] (C1) Problem-Solving Reasoning Problem-solving reasoning is a type of reasoning for queries such as "What should I do to solve XX?", and is a search method that traces the causal relationships from the problem to the solution in a forward direction, and then traces the causal relationships and specific semantic relationships in a backward direction. In this way, after obtaining a solution from a certain problem, it is possible to obtain other problems that are simultaneously solved by that solution, as well as situations and phenomena that occur as a result of that solution.
[0039] Figure 7 shows an example of problem-solving inference. Note that solid arrows in the figure indicate causal relationships, and dashed arrows indicate problem-solving relationships. Problem-solving inference infers a solution from a query, and then infers the events that will trigger the realization of that solution. In the example of Figure 7, the phrase "Agricultural automation will progress" is obtained based on the query "The aging of rural areas is progressing." Furthermore, the phrase "Agricultural automation will progress" is obtained based on the phrase "Introducing drones to agriculture," and the phrase "Legislation regarding drones will progress" is obtained based on the phrase "Introducing drones to agriculture."
[0040] (C2) Solution-Problem Reasoning Solution-problem reasoning is a type of reasoning for queries such as "What problem does doing XX solve?", and is a search method that traces the causal relationships backward from a solution to the problem, and then traces the causal relationships and specific semantic relationships forward from there. This allows, for example, to obtain a problem solved by a solution, and then obtain another solution that solves the problem.
[0041] FIG. 8 shows an example of solution-problem inference. Note that solid arrows in the figure indicate causal relationships, and dashed arrows indicate problem-solving relationships. Solution-problem inference infers the problem to be solved by a query, and then infers the phenomenon that will be resolved by solving that problem. In the example of FIG. 8, the phrase "The aging of rural areas is progressing" is obtained based on the query "The aging of rural areas is progressing." Furthermore, the phrase "The population of agricultural workers is declining" is obtained based on the phrase "The aging of rural areas is progressing."
[0042] (D) Subcategory-Specific Inference Subcategory-Specific Inference is a search method that limits the causal relationships used during inference to those of a specific subcategory. That is, subcategory-specific inference performs a search by considering or excluding causal relationships belonging to a specific subcategory among multiple causal relationships included in the causal relationship knowledge. For example, as described above, the causal relationship knowledge stored in the causal relationship DB 21 includes three subcategories: "narrow causal relationship," "problem-solving relationship," and "temporal context." When a user specifies "consider only the problem-solving relationship" as a condition for query-based inference, the question answering device 100 performs a search by tracing only the problem-solving relationship and the specific semantic relationship associated therewith among the causal relationship knowledge stored in the causal relationship DB 21. Conversely, when a user specifies "exclude the problem-solving relationship" as a condition for query-based inference, the question answering device 100 performs a search by tracing only the causal relationships other than the problem-solving relationship and the specific semantic relationship associated therewith among the causal relationship knowledge stored in the causal relationship DB 21.
[0043] Next, a method for determining an inference type by the inference type determination unit 24 will be described. The inference type determination unit 24 determines an inference type by performing text analysis on a query entered by a user. Specifically, in a first method, the inference type determination unit 24 determines an inference type using a rule-based machine learning model. For example, a machine learning model that determines an inference type based on rules, based on words and symbols contained in phrases constituting a query, is generated in advance, and the inference type is determined using this model. In a second method, the inference type determination unit 24 generates a classification model that receives query phrases as input and outputs a corresponding inference type, and determines the inference type using this classification model. This classification model may use, for example, a neural network. In a third method, the inference type determination unit 24 determines an inference type based on whether a specific word (e.g., "why," "what should I do," etc.) or symbol (e.g., "?") is included at the beginning or end of a sentence constituting the query. The inference type determination unit 24 outputs the inference type determined by either method to the inference unit 25.
[0044] The inference unit 25 infers an answer to the query using the start phrase determined by the start phrase determination unit 23 and the inference type determined by the inference type determination unit 24. Specifically, the inference unit 25 searches for a phrase having a causal relationship with the query by tracing the causal relationship and the specific semantic relationship starting from the start phrase in causal relationship knowledge including a specific semantic relationship pair as illustrated in FIG. 4. The inference unit 25 then outputs a phrase at a node where the causal relationship and the specific semantic relationship can no longer be traced (hereinafter also referred to as an "end node") as an answer to the query. Note that, as described above, if the start phrase determination unit 23 determines multiple start phrases for the query, the inference unit 25 may search for each phrase individually starting from each start phrase and output a phrase at an end node corresponding to each search as an answer.
[0045] 9 is a flowchart of the inference process performed by the question answering device 100 according to the first embodiment. This process is realized by the processor 13 shown in FIG. 2 executing a program prepared in advance and operating as each element shown in FIG. 3.
[0046] First, the question answering device 100 acquires a query input by a user (step S21). Next, the start phrase determination unit 23 determines a start phrase corresponding to the input query from the causal relationship knowledge stored in the causal relationship DB 21 (step S22). Next, the inference type determination unit 24 determines an inference type corresponding to the input query (step S23).
[0047] Next, the inference unit 25 searches for a phrase by tracing the causal relationships and specific semantic relationships included in the causal relationship knowledge according to the inference type determined in step S23, starting from the starting phrase determined in step S22 (step S24). Specifically, the inference unit 25 traces the causal relationships based on the causal relationship knowledge. At the same time, the semantic relationship determination unit 22 determines whether there is a phrase that has a specific semantic relationship with the phrase at the current position in the search. If there is a phrase that has a specific semantic relationship with the phrase at the current position, the inference unit 25 also traces the specific semantic relationship to perform the search. That is, the inference unit 25 searches for a phrase while taking into account the specific semantic relationship extracted by the semantic relationship determination unit 22. Then, when there are no more causal relationships or specific semantic relationships to trace, i.e., when the current position of the search has reached an end node, the inference unit 25 outputs the phrase at that end node as an answer to the query (step S25). The inference process then ends.
[0048] As described above, in the first embodiment, in addition to prepared causal relationship knowledge, answers to queries are inferred for phrases having specific semantic relationships such as implication, synonymy, and similarity, making it possible to infer answers based on a larger number of causal relationship knowledge. Furthermore, a starting phrase and an inference type are determined based on a query entered by a user, and phrases are searched for from the determined starting phrase in accordance with the determined inference type, making it possible to infer answers in a manner suited to the entered query.
[0049] Second Embodiment Next, a second embodiment of the present disclosure will be described. In the first embodiment, the question answering device 100 performs inference on a query while extracting specific semantic relationship pairs using the semantic relationship determination unit 22. Instead, in the second embodiment, the question answering device extracts specific semantic relationships in advance from causal relationship knowledge stored in a causal relationship DB to create a relationship graph including the causal relationships and the specific semantic relationships. Also, in the second embodiment, the question answering device outputs an answer graph, described below, as an answer to the query. Other than these points, the second embodiment is basically the same as the first embodiment. Specifically, the overall configuration and hardware configuration of the question answering device 100x of the second embodiment are the same as the overall configuration of the first embodiment shown in FIG. 1 and the hardware configuration shown in FIG. 2, and therefore description thereof will be omitted.
[0050] 10 is a block diagram showing the functional configuration of a question answering device 100x according to the second embodiment. As shown in the figure, the question answering device 100x of the second embodiment includes a causal relationship DB 31, a semantic relationship determination unit 32, a start phrase determination unit 33, an inference type determination unit 34, an inference unit B 35, and a relationship graph 36. Note that the causal relationship DB 31, the start phrase determination unit 33, and the inference type determination unit 34 are basically the same as the causal relationship DB 21, the start phrase determination unit 23, and the inference type determination unit 24 in the first embodiment, and therefore description thereof will be omitted.
[0051] As a preprocessing step, the semantic relationship determination unit 32 extracts specific semantic relationship pairs from all of the causal relationship knowledge stored in the causal relationship DB 31. The semantic relationship determination unit 32 then generates a relationship graph 36 by adding the extracted specific semantic relationship pairs to the causal relationship knowledge. The generated relationship graph 36 has a graph structure including causal relationships and specific semantic relationships, as illustrated in FIG. 4 . That is, the relationship graph 36 is a directed graph in which each phrase is represented by a node and the causal relationship or the specific semantic relationship is represented by an edge. In this way, in the second embodiment, the relationship graph 36 is generated as a preprocessing step by adding specific semantic relationship pairs to the causal relationship knowledge, and when a user inputs a query, an answer is inferred by referring to the relationship graph 36. This reduces the computational load of inference for a query input and shortens the time required to output an answer.
[0052] When a user inputs a query, as in the first embodiment, the start phrase determination unit 33 determines a start phrase, and the inference type determination unit 34 determines an inference type. Then, the inference unit 35 searches for a phrase in the relationship graph 36 by tracing the causal relationships and specific semantic relationships, starting from the start phrase. Note that in the first embodiment, the inference unit 35 outputs, as an answer to the query, a phrase at an end node where the causal relationships and specific semantic relationships can no longer be traced. In contrast, in the second embodiment, the inference unit 35 outputs, as an answer to the query, a graph (referred to as an "answer graph") indicating the portion of the causal relationships and specific semantic relationships traced in the phrase search.
[0053] (Inference Processing) Fig. 11 is a flowchart of the inference processing by the question answering device 100x of the second embodiment. This processing is realized by the processor 13 shown in Fig. 2 executing a prepared program and operating as each element shown in Fig. 10. Note that in the second embodiment, as preprocessing, the semantic relationship determination unit 32 extracts specific semantic relationship pairs between phrases included in the causal relationship DB 31, and generates a relationship graph 36 including the causal relationship and the specific semantic relationship.
[0054] First, the question answering device 100x acquires a query input by a user (step S31). Next, the start phrase determination unit 33 determines a start phrase corresponding to the input query from the causal relationship knowledge stored in the causal relationship DB 31 (step S32). Next, the inference type determination unit 34 determines an inference type corresponding to the input query (step S33).
[0055] Next, the inference unit 35 searches for a phrase by tracing the causal relationships and specific semantic relationships in the relationship graph 36 according to the inference type determined in step S33, starting from the starting phrase determined in step S32 (step S34). When there are no more causal relationships or specific semantic relationships to trace, the inference unit 35 outputs the portion of the relationship graph 36 that has been traced in the search up to that point as an answer graph (step S25). This presents the answer graph to the user, and the inference process then ends.
[0056] (Display Example) FIG. 12 shows an example of a display of an answer graph output by the inference unit 35. In this example, a query, "What will happen if the aging of rural areas progresses?" is input by the user, and an answer graph 40 for this query is displayed. The answer graph 40 is an extract of the portion of the relationship graph 36 used by the inference unit 35 for inference, which the inference unit 35 traversed in its phrase search. Specifically, in the example of FIG. 12, the start phrase determination unit 33 determines node 41a as the start phrase for the query, "What will happen if the aging of rural areas progresses?" The inference unit 35 then proceeds from node 41a through edge 42a indicating a causal relationship to node 41b, then through edge 42b indicating a specific semantic relationship to node 41c, and then through edge 42c indicating a causal relationship to end node 41d, thereby completing the search. In this way, in the second embodiment, an answer graph showing the portion of the relationship graph 36 traversed by the inference unit 35 during inference is displayed as an answer to the query, allowing the user to know how the answer was generated.
[0057] FIG. 13 shows another example of the display of an answer graph output by the inference unit 25. In this example, the query "What will happen as a result of agriculture DX?" is input by the user, and an answer graph 50 in response to this query is displayed. Specifically, in the example of FIG. 13, the inference unit 35 first determines a starting phrase 51x based on the query "What will happen as a result of agriculture DX?" Next, the inference unit 35 searches for nodes 51a and 51b that have a causal relationship with the starting phrase 51x and displays these phrases. The inference unit 35 also searches for nodes 51c to 51f that have a problem-solving relationship with the starting phrase 51x, and further searches for nodes 51g and 51h that have a causal relationship with node 51e and displays these phrases.
[0058] As described above, when the causal relationship knowledge stored in the causal relationship DB 31 includes source information for each causal relationship as additional information, the question answering device 100x may display the corresponding source information in response to a user's specification. For example, when a user clicks an edge indicating a causal relationship in the displayed answer graph, the question answering device 100x may display, in a pop-up or other format, the source information of the causal relationship knowledge corresponding to the edge (e.g., the URL of a Web document describing the information). In the display example of FIG. 13 , when a user clicks on an edge E51d connecting nodes 51x and 51d, the source (information source) of the causal relationship knowledge indicated by edge E51d is displayed in answer 52.
[0059] Furthermore, if the causal relationship knowledge stored in the causal relationship DB 31 includes subclassifications of each causal relationship as additional information, the question answering device 100x may display the subclassifications in response to a user's specification. For example, when a user clicks an edge indicating a causal relationship in the displayed answer graph, the question answering device 100x may display a subclassification of the causal relationship corresponding to the edge (e.g., "temporal context") in a pop-up or the like. In the display example of FIG. 13 , as a result of the user clicking edge E51d connecting nodes 51x and 51d, the subclassification of the causal relationship of edge E51d, "problem-solving relationship," is displayed in answer 52.
[0060] Furthermore, the user may select a node included in the answer graph and issue a search instruction for a phrase corresponding to the query. In this case, the question answering device 100x performs a search using the node selected by the user as a starting phrase.
[0061] Furthermore, the user may be allowed to input an evaluation of the answer or the question answering device 100x for the displayed answer graph. For example, when the inference type determination unit 34 determines the inference type based on rules, the rules used to determine the inference type may be modified based on the user's input of the evaluation. When the inference type is determined using a machine learning model, the user's input of the evaluation may be used as training data to retrain the model that determines the inference type.
[0062] Furthermore, the user may be allowed to input modifications to the causal relationship knowledge in the displayed answer graph. For example, the user may be allowed to add a new edge or modify the direction of an edge (arrow) in the displayed answer graph. This makes it possible to modify the causal relationship knowledge used for inference based on the user's input. Furthermore, when a causal relationship graph indicating causal relationship knowledge is generated by machine learning, the causal relationship graph may be re-learned using the above-described user input as additional learning data.
[0063] As described above, in the second embodiment, in addition to the prepared causal relationship knowledge, a relationship graph 36 is prepared in advance to which phrases having specific semantic relationships such as implication, synonymy, and similarity are added, thereby reducing the processing load from when the user inputs a query to when an answer is output, and making it possible to perform inference in a short time. Furthermore, an answer graph showing the causal relationships and specific semantic relationships used in the inference is displayed as the answer to the query, allowing the user to know the process and basis for obtaining the answer.
[0064] Third Embodiment Next, a third embodiment of the present disclosure will be described. In the third embodiment, the question answering device of the first and second embodiments is applied to question answering related to medical care.
[0065] FIG. 14 shows the configuration of a medical knowledge generation system according to the third embodiment. As shown in the figure, the medical knowledge generation system 200x includes a medical knowledge generation device 201 and a medical knowledge DB 202. The voices of doctors and nurses when diagnosing patients are input to the medical knowledge generation device 201. The medical knowledge generation device 201 includes a medical knowledge generation AI. The medical knowledge generation AI has the functions of converting the input voices into text and summarizing the content, automatically generating a medical record based on the text of the summary, and constructing causal relationship knowledge from the medical record. The medical knowledge generation device 201 uses the medical knowledge generation AI to generate medical causal relationship knowledge from the voices input by doctors and nurses, and stores the generated knowledge in the medical knowledge DB 202 as medical knowledge.
[0066] Specifically, the medical knowledge generation device 201 generates medical knowledge using a medical knowledge generation AI as follows: When a doctor diagnoses a patient, the medical knowledge generation AI records the doctor's or nurse's voice. The medical knowledge generation AI converts the doctor's or nurse's voice into text. This text reflects the content of the diagnosis made by the doctor on the patient. Next, the medical knowledge generation AI summarizes the text obtained by the text conversion. This summary is a concise summary of the content of the diagnosis made by the doctor on the patient. Next, the medical knowledge generation AI automatically generates a patient's medical record based on the text obtained by the summary. This medical record contains basic information about the patient, the content of the diagnosis, treatment methods, etc.
[0067] Next, the medical knowledge generation AI constructs causal relationship knowledge from the generated medical records using a predetermined machine learning algorithm. At this time, the causal relationship knowledge may include not only past user medical records but also publicly available medical information. In this way, medical causal relationship knowledge is generated and stored in the medical knowledge DB 202 as medical knowledge.
[0068] 15 shows the configuration of a question answering system according to the third embodiment. The question answering system 200y supports a doctor's diagnosis of a patient by performing an AI diagnosis using a question answering device. The question answering system 200y is an application of the question answering device 100 according to the first embodiment or the question answering device 100x according to the second embodiment.
[0069] When diagnosing a patient, a doctor inputs a query to the question answering device 100 or 100x using a terminal device 5. The question answering device 100 or 100x uses a medical knowledge DB 202 that accumulates medical causal relationship knowledge to generate an answer to the doctor's query and transmits it to the doctor's terminal device 5. The question answering device 100 or 100x uses the technology of the first or second embodiment to infer and optimize the cause of the patient's symptoms and a diagnosis result using past user medical records, publicly available medical information, and the like, and transmits this as an answer to the doctor's terminal device 5. The doctor can diagnose the patient by referring to the answer provided by the question answering device 100 or 100x.
[0070] 16 is a block diagram showing the functional configuration of a question answering apparatus according to a fourth embodiment. A question answering apparatus 70 includes an acquisition unit 71, a starting phrase determination unit 72, an inference type determination unit 73, a search unit 74, and an output unit 75.
[0071] 17 is a flowchart of processing by the question answering apparatus 70 of the fourth embodiment. The acquiring means 71 acquires a query (step S71). The starting phrase determining means 72 determines a starting phrase corresponding to the query from a plurality of phrases included in the causal relationship data (step S72). The inference type determining means 73 determines an inference type based on the query (step S73). The searching means 74 searches for a phrase by tracing the causal relationship included in the causal relationship data from the starting phrase using a search procedure corresponding to the determined inference type (step S74). The outputting means 75 outputs the phrase obtained by the search as a response to the query (step S75).
[0072] According to the question answering device 70 of the fourth embodiment, it is possible to efficiently generate and output answers to questions based on causal relationship knowledge.
[0073] <Modifications> (Modification 1) In the above embodiment, a specific semantic relationship pair is added to the causal relationship knowledge, and when inferring an answer to a query, a phrase is searched for by tracing the causal relationship and the specific semantic relationship. Alternatively, the question answering device may search for a phrase by tracing only the causal relationship without considering the specific semantic relationship.
[0074] 1 , the user's terminal device 5 and the question answering device 100 are connected via communication, but instead, the question answering device 100 may be configured as an independent device. In that case, the question answering device 100 may be provided with an input unit and a display unit, and the user may input a query to the input unit and the answer to the query may be displayed on the display unit.
[0075] A part or all of the above-described embodiments can be described as, but not limited to, the following supplementary notes.
[0076] (Supplementary Note 1) A question answering device comprising: a query acquisition means for acquiring a query; a starting phrase determination means for determining a starting phrase corresponding to the query from a plurality of phrases included in causal relationship data; an inference type determination means for determining an inference type based on the query; a search means for searching for a phrase by tracing the causal relationship included in the causal relationship data from the starting phrase using a search procedure corresponding to the determined inference type; and an output means for outputting the phrase obtained by the search as an answer to the query.
[0077] (Supplementary Note 2) The question answering device according to Supplementary Note 1, further comprising a semantic relationship determination means for extracting specific semantic relationships between a plurality of phrases included in the causal relationship data, wherein the search means performs the search by tracing the causal relationships and specific semantic relationships included in the causal relationship data.
[0078] (Supplementary Note 3) The question answering device according to Supplementary Note 2, wherein the specific semantic relationship includes at least one of an entailment relationship, a synonym relationship, and a synonym relationship between phrases.
[0079] (Supplementary Note 4) The question answering device according to Supplementary Note 1, wherein the starting phrase determination means determines, as the starting phrase, a phrase whose meaning is closer to that of the query phrase than a predetermined criterion, from among a plurality of phrases included in the causal relationship data.
[0080] (Supplementary Note 5) The question answering device according to Supplementary Note 1, wherein the inference type determining means analyzes a phrase of the query and determines an inference type corresponding to an inference requested by the phrase.
[0081] (Supplementary Note 6) The question answering device described in Supplementary Note 1, wherein the inference types include a first inference type indicating a search procedure for tracing the causal relationship data in a forward direction of the causal relationship, a second inference type indicating a search procedure for tracing the causal relationship data in a reverse direction of the causal relationship, and a third inference type indicating a search procedure that combines a search for tracing the causal relationship data in a forward direction of the causal relationship and a search for tracing the causal relationship data in a reverse direction.
[0082] (Appendix 7) The question answering device described in Appendix 6, wherein the causal relationship data includes data indicating subclassifications of causal relationships, and the inference types include a fourth inference type that limits the search target to causal relationships corresponding to a specified subclassification of the causal relationship data.
[0083] (Supplementary Note 8) The question answering device according to Supplementary Note 1, wherein the output means outputs, as a response to the query, a graph showing a portion of the causal relationship data that was the target of the search.
[0084] (Supplementary Note 9) The question answering device according to claim 1, wherein the query is a question about a patient's diagnosis, the causal relationship data includes medical causal relationship knowledge constructed from past user medical records and publicly available medical information, and the output means outputs an optimized treatment plan as the answer.
[0085] (Supplementary Note 10) A question-answering method executed by a computer, comprising: acquiring a query; determining a starting phrase corresponding to the query from a plurality of phrases included in causal relationship data; determining an inference type based on the query; searching for phrases by tracing causal relationships included in the causal relationship data from the starting phrase using a search procedure according to the determined inference type; and outputting the phrase obtained by the search as an answer to the query.
[0086] (Appendix 11) A recording medium having recorded thereon a program that causes a computer to execute the following process: acquire a query; determine a starting phrase corresponding to the query from a plurality of phrases contained in causal relationship data; determine an inference type based on the query; search for phrases by tracing the causal relationships contained in the causal relationship data from the starting phrase using a search procedure corresponding to the determined inference type; and output the phrase obtained by the search as an answer to the query.
[0087] Although the present disclosure has been described above with reference to the embodiments and examples, the present disclosure is not limited to the above-described embodiments and examples. Various modifications that can be understood by a person skilled in the art can be made to the configuration and details of the present disclosure within the scope of the present disclosure.
[0088] 5 Terminal device 13 Processor 21, 31 Causal relationship DB 22, 32 Semantic relationship determination unit 23, 33 Starting phrase determination unit 24, 34 Inference type determination unit 25, 35 Inference unit 36 Relationship graph
Claims
1. a query acquisition means for acquiring a query; a start phrase determination means for determining a start phrase corresponding to the query from a plurality of phrases included in the causal relationship data; an inference type determining means for determining an inference type based on the query; a search means for searching for a phrase by tracing the causal relationship included in the causal relationship data from the starting phrase in a search procedure according to the determined inference type; output means for outputting the phrases obtained by the search as answers to the query; A question answering device comprising:
2. a semantic relationship determination means for extracting specific semantic relationships between a plurality of phrases included in the causal relationship data; 2. The question answering apparatus according to claim 1, wherein the search means performs the search by tracing the causal relationships and specific semantic relationships included in the causal relationship data.
3. The question answering apparatus according to claim 2 , wherein the specific semantic relationship includes at least one of an entailment relationship, a synonym relationship, and a synonym relationship between phrases.
4. The question answering device according to claim 1 , wherein the start phrase determining means determines, as the start phrase, a phrase that is closer in meaning to the phrase of the query than a predetermined criterion, from among a plurality of phrases included in the causal relationship data.
5. 2. The question answering apparatus according to claim 1, wherein the inference type determining means analyzes a phrase of the query and determines an inference type corresponding to the inference requested by the phrase.
6. 2. The question answering device according to claim 1, wherein the inference types include a first inference type indicating a search procedure for tracing the causal relationship data in a forward direction of the causal relationship, a second inference type indicating a search procedure for tracing the causal relationship data in a reverse direction of the causal relationship, and a third inference type indicating a search procedure that combines a search for tracing the causal relationship data in a forward direction and a search for tracing the causal relationship data in a reverse direction.
7. the causal relationship data includes data indicating subclassification of the causal relationships; 7. The question answering apparatus according to claim 6, wherein the inference types include a fourth inference type that limits a search target to a causal relationship corresponding to a predetermined subcategory of the causal relationship data.
8. The question answering device according to claim 1 , wherein the output means outputs a graph indicating the portion of the causal relationship data that was the target of the search as the answer to the query.
9. the query is a question regarding the patient's diagnosis; The causal relationship data includes medical causal relationship knowledge constructed from past user medical records and publicly available medical information; 2. The question answering device according to claim 1, wherein the output means outputs an optimized treatment plan as the answer.
10. 1. A computer-implemented method of question answering, comprising: Get the query, determining a starting phrase corresponding to the query from a plurality of phrases included in the causal relationship data; determining an inference type based on the query; searching for a phrase by tracing the causal relationship included in the causal relationship data from the starting phrase using a search procedure according to the determined inference type; A question answering method that outputs the phrase obtained by the search as an answer to the query.
11. Get the query, determining a starting phrase corresponding to the query from a plurality of phrases included in the causal relationship data; determining an inference type based on the query; searching for a phrase by tracing the causal relationship included in the causal relationship data from the starting phrase using a search procedure according to the determined inference type; A program that causes a computer to execute a process of outputting the phrase obtained by the search as an answer to the query.