Search

CN-122021884-A - Knowledge graph-based question-answer data processing method and device

CN122021884ACN 122021884 ACN122021884 ACN 122021884ACN-122021884-A

Abstract

The method and the device for processing question-answer data based on the knowledge graph provided by the embodiment of the specification are respectively abstract into each independent agent for each key operation aiming at the knowledge graph. Aiming at the user questions, corresponding answers can be obtained by combining reasonable operations in the knowledge graph. Wherein, in the process of answering the questions based on the knowledge graph, multiple levels of agent calls can be made. In single-level calling, a target agent is selected from all candidate agents to be called based on a current operation sequence through a large language model, the target agent is operated to obtain a corresponding operation result, and the target operation result is determined to be added to the current operation sequence. And carrying out agent calling layer by layer to form an operation sequence, and selecting a target operation sequence to determine an answer. Thus, the operation diversity can be increased, so that the generated answers have higher accuracy and stability.

Inventors

  • JIN YUE
  • LIU YONGCHAO
  • HONG CHUNTAO

Assignees

  • 支付宝(杭州)数字服务技术有限公司

Dates

Publication Date
20260512
Application Date
20260113

Claims (12)

  1. 1. A question-answer data processing method based on a knowledge graph comprises the following steps: Acquiring a first problem; Determining at least one operation sequence through multi-level calling based on the first problem, wherein in single-level calling, a first number of target agents are determined from a plurality of candidate agents based on the first problem and the current operation sequence, a calling instruction is sent to each target agent, each target agent generates a respective operation result, and the target operation result is selected to be added to the current operation sequence according to an evaluation score obtained by scoring each operation result; selecting a target operation sequence from the at least one operation sequence; and generating a first answer to the first question according to the target operation sequence.
  2. 2. The method of claim 1, wherein the first type of agent comprises a first agent for performing a node lookup operation for a knowledge-graph and a second agent for checking node types of neighboring nodes in the knowledge-graph.
  3. 3. The method of claim 1, wherein said sending call instructions to each target agent comprises: Determining the parameter data of the current call according to at least one operation result of the sequence tail in the current operation sequence and the target intelligent agent; and the parameter data is contained in an instruction format corresponding to the target agent, a calling instruction is generated, and the calling instruction is sent to the target agent.
  4. 4. The method of claim 3, wherein the generating a call instruction further comprises: and determining a behavior strategy applicable to the target intelligent agent, and including the behavior strategy in the calling instruction.
  5. 5. The method of claim 3, wherein the target agent belongs to the first class of agents, and the parameter data includes at least one of a node name to be looked up, an edge type to be looked up, a neighbor node type to be looked up, and a number of returned results.
  6. 6. The method of claim 1, wherein the determining a first number of target agents from a plurality of candidate agents based on the first question and a current sequence of operations comprises: predicting probabilities of each candidate agent as an agent performing the next operation by using the large language model; and selecting a first number of agents as target agents according to the order of the probabilities from the high probability to the low probability.
  7. 7. The method of claim 1, wherein the evaluation score corresponding to a single operation result is obtained by one of: The target intelligent agent is obtained when the single operation result is obtained by executing corresponding operation on the knowledge graph; Scoring the updated operation sequence by using the single operation result by a large language model.
  8. 8. The method of claim 1, wherein the selecting a target sequence of operations from the at least one sequence of operations comprises: Scoring each operation sequence through a large language model to obtain scoring values of each candidate operation path; And selecting the operation sequence with the largest scoring value as a target operation sequence.
  9. 9. The method of claim 1, wherein the generating a first answer to the first question from the target sequence of operations comprises: Determining the first answer according to the last operation result of the target operation sequence, or And generating the first answer according to the information contained in the target operation sequence.
  10. 10. A knowledge graph-based question-answer data processing device, comprising: an acquisition unit configured to acquire a first problem; A calling unit configured to determine at least one operation sequence through multi-level calling based on the first problem, wherein in single-level calling, a first number of target agents are determined from a plurality of candidate agents based on the first problem and a current operation sequence, a calling instruction is sent to each target agent, each target agent generates a respective operation result, and the target operation result is selected and added to the current operation sequence according to an evaluation score obtained by scoring each operation result; a determining unit configured to select a target operation sequence from the at least one operation sequence; And the generating unit is configured to generate a first answer to the first question according to the target operation sequence.
  11. 11. A computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of claims 1-9.
  12. 12. A computing device comprising a memory and a processor, wherein the memory has executable code stored therein, which when executed by the processor, implements the method of any of claims 1-9.

Description

Knowledge graph-based question-answer data processing method and device Technical Field One or more embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method and an apparatus for processing question-answer data based on a knowledge graph. Background In the age of information explosion, the knowledge accumulated by human society has exponentially increased, and the association between knowledge has become more complex. The Knowledge Graph (knowledgegraph) is used as a structured Knowledge representation method which takes an entity as a node and takes a relation as an edge, and becomes an important tool for solving the problems of complex Knowledge organization and retrieval by virtue of the accurate modeling capability of the Knowledge Graph on Knowledge semantic association. The knowledge graph can connect scattered knowledge units (such as characters, concepts and events) through semantic relations to form a knowledge network with hierarchical structures and net-shaped relations, so that a foundation is provided for understanding deep semantics of user inquiry and mining hidden relations among knowledge. With the rise of a large language model (Large Language Model, abbreviated as LLM), when the problem is processed, the knowledge graph is combined with the expanded search, and the connection legs among the knowledge are further provided with a new height. However, in the tree-shaped mental chain search (Tree of Thought, toT for short) based on the knowledge graph, the generation of the sample output is limited by the temperature parameters, and the result is too similar or inaccurate. On these similar or inaccurate results, the diversity is often neither guaranteed nor the correct result is obtained when making the next selection. This limitation to some extent constrains LLMs's ability to explore diverse solutions, as well as limits the adaptability of large language models to different situations. Therefore, how to realize diversified reasoning path exploration and high-quality result generation becomes an important technical problem of path searching of a large language model in the process of processing problems based on a knowledge graph. Disclosure of Invention One or more embodiments of the present disclosure describe a knowledge-graph-based question-answer data processing method and apparatus, for solving one or more of the problems mentioned in the background art. According to a first aspect, a question and answer data processing method based on a knowledge graph is provided, the method comprises the steps of obtaining a first question, determining at least one operation sequence through multi-level calling based on the first question, determining a first number of target agents from a plurality of candidate agents based on the first question and the current operation sequence in single-level calling, sending calling instructions to each target agent, generating each operation result by each target agent, selecting the target operation result to be added to the current operation sequence according to an evaluation score obtained by scoring each operation result, wherein the plurality of candidate agents comprise a first type of agent used for inquiring the knowledge graph, selecting the target operation sequence from the at least one operation sequence, and generating a first answer for the first question according to the target operation sequence. In one embodiment, the first type of agent includes a first agent for performing a node lookup operation with respect to a knowledge graph and a second agent for checking node types of neighboring nodes in the knowledge graph. In one embodiment, the sending the call instruction to each target agent includes determining parameter data of the current call according to at least one operation result of the sequence tail in the current operation sequence and the target agent, and including the parameter data in an instruction format corresponding to the target agent to generate the call instruction and sending the call instruction to the target agent. In a further embodiment, the generating the call instruction further comprises determining a behavior policy applicable to the target agent, including the behavior policy in the call instruction. In another further embodiment, the target agent belongs to the first class of agents, and the parameter data includes at least one of a node name to be searched, an edge type to be searched, a neighbor node type to be searched, and a number of returned results. In one embodiment, the determining a first number of target agents from the plurality of candidate agents based on the first question and the current operation sequence includes predicting probabilities of each candidate agent as an agent performing a next operation using a large language model, and selecting the first number of agents as target agents in order of the probabilities from large to small. I