Task reasoning, model training and dialogue question and answer method and task platform

By breaking down the task problem into its components using a target reasoning model and retrieving document fragments from a corpus, and combining this with the mapping relationships of a memory reasoning model, the problem of insufficient information relevance caused by retrieval dependency is solved, achieving highly accurate and structured task reasoning results.

CN122072840APending Publication Date: 2026-05-22ALIBABA (CHINA) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ALIBABA (CHINA) CO LTD
Filing Date
2024-11-20
Publication Date
2026-05-22

AI Technical Summary

Technical Problem

In existing technologies, retrieval enhancement generation methods rely on the retrieval performance of the retrieval machine, resulting in insufficient information relevance for complex tasks and affecting the accuracy and quality of reasoning results.

Method used

By employing a target reasoning model, the task problem is decomposed into multiple task sub-problems. The pre-trained target reasoning model is used to retrieve document fragments from the target corpus. Combined with the mapping relationship of the memory reasoning model, information retrieval and reasoning are seamlessly integrated, thereby improving the accuracy of task reasoning.

Benefits of technology

It achieves high accuracy and structured reasoning results for complex tasks, enhances the ability to handle complex problems, and solves the problem of weak collaboration between the retrieval unit and the reasoning model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122072840A_ABST
    Figure CN122072840A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a task reasoning method, a model training method, a dialogue question and answer method and a task platform. The task reasoning method comprises the steps of obtaining a task problem of a target reasoning task; the method comprises the following steps: disassembling a task problem by utilizing a pre-trained target reasoning model to obtain a plurality of task sub-problems of a target reasoning task, retrieving document fragments related to the plurality of task sub-problems from a document of a target corpus, correspondingly reasoning the plurality of related task sub-problems by taking the plurality of document fragments as context information of the target reasoning task, and obtaining the target reasoning task. The target reasoning model is obtained by training a memory reasoning model on the basis of a plurality of sample task problems, a plurality of label task sub-problems and a label task result of the sample reasoning task; the memory reasoning model is obtained by training an initial reasoning model based on a mapping relation between a document and a document fragment of a target corpus, and the accuracy is improved by integrating problem disassembly, information retrieval and reasoning generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the technical field of deep learning, and in particular to a task reasoning, model training, dialogue question answering method, and task platform. Background Technology

[0002] With the development of deep learning technology, task reasoning based on deep learning technology has shifted from direct model reasoning to relying on additional information provided by the outside world as knowledge supplementation, and using the form of Retrieval Augmented Generation (RAG) to perform reasoning, so as to obtain more accurate task results.

[0003] Currently, the retrieval enhancement generation method involves retrieving documents related to the task question directly from the retrieval tool, concatenating them with the task question, and then passing them to the inference model to obtain the task result.

[0004] However, this approach heavily relies on the retrieval performance of the retrieval machine, and is limited by the complexity of the task problem, making it unable to effectively complete complex retrievals. Furthermore, the separation of the retrieval machine and the inference model leads to inaccurate matching of the retrieved information with the inference model, resulting in insufficient relevance between the information and the task problem, thus affecting the quality of the final inference result. Therefore, a highly accurate task inference method is urgently needed. Summary of the Invention

[0005] In view of the above, embodiments of this specification provide a task reasoning method. One or more embodiments of this specification also relate to a model training method, a dialogue question-answering method, a task platform, a task reasoning device, a model training device, a dialogue question-answering device, a computing device, an electronic device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.

[0006] In one embodiment of this specification, a task reasoning method is provided, comprising:

[0007] The task problem of obtaining the target reasoning task;

[0008] Using a pre-trained target reasoning model, the task problem is decomposed to obtain multiple task sub-problems of the target reasoning task. Document fragments related to multiple task sub-problems are retrieved from documents in the target corpus. These document fragments serve as contextual information for the target reasoning task, corresponding to the multiple task sub-problems related to the reasoning, to obtain the task result of the target reasoning task. The target reasoning model is obtained by training a memory reasoning model based on multiple sample task problems of the sample reasoning task, multiple labeled task sub-problems corresponding to the sample task problems, and labeled task results. The memory reasoning model is obtained by training an initial reasoning model based on the mapping relationship between documents and document fragments in the target corpus.

[0009] In one embodiment of this specification, the target reasoning model is not only trained based on multiple sample task questions of the sample reasoning task and multiple labeled task sub-questions and labeled task results corresponding to the sample task questions, but also further trained on the memory reasoning model obtained by training the initial reasoning model based on the mapping relationship between documents and document fragments of the target corpus. This integrated approach enables a single target reasoning model to independently complete question decomposition, retrieval, and reasoning generation to perform the target reasoning task, solving the problem of weak collaboration between the retrieval unit and the reasoning model. It can use the reasoning ability of the reasoning model to assist retrieval, and can also perform reasonable question decomposition by pre-memorizing the document structure of the target corpus, realizing a seamless combination of information retrieval and reasoning process, and improving the structure, logic, and accuracy of task reasoning. Attached Figure Description

[0010] Figure 1 This is a flowchart illustrating a task reasoning method provided in one embodiment of this specification;

[0011] Figure 2 This is a schematic diagram of multiple task sub-problems and task responses in a task reasoning method provided in one embodiment of this specification;

[0012] Figure 3 This is a schematic diagram of the optimization of the thought chain in a task reasoning method provided in one embodiment of this specification;

[0013] Figure 4 This is a flowchart illustrating a model training method provided in one embodiment of this specification;

[0014] Figure 5 This is a flowchart illustrating a model training method provided in one embodiment of this specification;

[0015] Figure 6 This is a flowchart of a dialogue question-and-answer method provided in one embodiment of this specification;

[0016] Figure 7 This is a schematic diagram of the structure of a task platform provided in one embodiment of this specification;

[0017] Figure 8 This is a schematic diagram of the structure of a task reasoning device provided in one embodiment of this specification;

[0018] Figure 9 This is a schematic diagram of the structure of a model training device provided in one embodiment of this specification;

[0019] Figure 10 This is a schematic diagram of the structure of a dialogue question-and-answer device provided in one embodiment of this specification;

[0020] Figure 11 This is a structural block diagram of a computing device provided in one embodiment of this specification;

[0021] Figure 12 This is a structural block diagram of an electronic device provided in one embodiment of this specification. Detailed Implementation

[0022] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0023] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0024] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as: "when," "when," or "in response to a determination."

[0025] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Moreover, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0026] In one or more embodiments of this specification, a large model refers to a deep learning model with a large number of model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even tens of trillions of model parameters. A large model can also be called a foundation model. It is pre-trained using large-scale unlabeled corpora to produce a pre-trained model with hundreds of millions of parameters. Such models can adapt to a wide range of downstream tasks and have good generalization ability. Examples include Large Language Models (LLMs) and multi-modal pre-training models.

[0027] In practical applications, large models only require a small number of samples to fine-tune the pre-trained model before they can be applied to different tasks. Large models can be widely used in fields such as Natural Language Processing (NLP) and Computer Vision. Specifically, they can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and Image Generation, as well as NLP tasks such as text-based sentiment classification, text summarization, and machine translation. The main application scenarios for large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.

[0028] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0029] Large language models, also known as large models, are natural language models with a large number of parameters, trained using deep learning techniques. These models are typically trained on large amounts of text data and are capable of generating and understanding natural language. They are widely used in tasks such as text generation, machine translation, dialogue systems, and question-answering systems. Examples include GPT, BERT, and T5.

[0030] Deep self-attention model (Transformer model): A deep learning architecture based on attention mechanism for processing sequential data, such as natural language.

[0031] Bidirectional Encoder Representations from Transformers (BERT model): A special type of deep self-attention model trained using a bidirectional Transformer encoder and large-scale unlabeled text data.

[0032] This specification provides a task reasoning method, and also relates to a model training method, a dialogue question-and-answer method, a task platform, a task reasoning device, a model training device, a dialogue question-and-answer device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.

[0033] See Figure 1 , Figure 1 A flowchart of a task reasoning method provided in one embodiment of this specification is shown, including the following specific steps:

[0034] Step 102: Obtain the task problem for the target reasoning task.

[0035] This description and its embodiments are applied to applications, platforms, or systems with task reasoning capabilities, such as intelligent customer service platforms, intelligent legal consultation platforms, online medical diagnosis systems, virtual character dialogue applications, and code writing question-and-answer systems.

[0036] Targeted reasoning tasks are specific problems or needs that require model reasoning to solve. These tasks typically involve extracting knowledge from given information, understanding the context, performing logical analysis, and then reasoning to obtain the task result. Targeted reasoning tasks may involve different domains, generally have high complexity, and cannot be directly reasoned; they require the introduction of external information as supplementary knowledge for effective reasoning. For example, on an intelligent customer service platform, the target reasoning task is to answer users' questions about product functions, prices, and after-sales service. On an intelligent legal consultation platform, the target reasoning task is to provide relevant legal advice or interpretations of relevant regulations based on the information provided by the user. On an online medical diagnosis system, the target reasoning task is to provide possible disease diagnoses and treatment suggestions based on the patient's symptom description. On a virtual character dialogue application, the target reasoning task is to engage in natural language dialogue with users, providing entertainment, education, or emotional support. On a code writing question-and-answer system, the target reasoning task is to help programmers solve technical problems encountered during programming by providing code examples or debugging suggestions.

[0037] Task problems are natural language problems describing a target reasoning task. Task problems generally exhibit high complexity and are difficult to solve directly through model reasoning. They often require the introduction of external information as supplementary knowledge and a multi-step reasoning process to arrive at an accurate result. For example, on an intelligent customer service platform, the task problem might be: "Does this phone support 5G networks? What is its price? What colors are available?" On an intelligent legal consultation platform, the task problem might be: "If I am injured in my rented apartment, is the landlord liable? How should I protect my rights?" On an online medical diagnosis system, the task problem might be: "I've been feeling dizzy and weak lately, what could this be? What tests do I need? Which department should I see?" On a virtual character dialogue application, the task problem might be: "Can you tell me a funny joke? What's your favorite movie?" On a code writing question-and-answer system, the task problem might be: "How can I use list comprehensions in Python to filter out even numbers? I've also encountered some cross-domain issues, what are some solutions?"

[0038] For example, on the intelligent customer service platform, the target reasoning task is to answer users' questions about the content, price, and services of tourism products. The task question that the user enters at the front end of the system is: "Which hotel company owns Hotel A, and in which city is the hotel company headquartered?"

[0039] Obtaining the task problem of the target reasoning task provides a data foundation for subsequently breaking it down into multiple task sub-problems, and then retrieving multiple related document fragments.

[0040] Step 104: Using a pre-trained target reasoning model, the task problem is decomposed to obtain multiple task sub-problems of the target reasoning task. Document fragments related to multiple task sub-problems are retrieved from the documents of the target corpus. These document fragments are used as context information for the target reasoning task, corresponding to the multiple task sub-problems related to the reasoning, to obtain the task result of the target reasoning task. The target reasoning model is obtained by training a memory reasoning model based on multiple sample task problems of the sample reasoning task, multiple labeled task sub-problems corresponding to the sample task problems, and labeled task results. The memory reasoning model is obtained by training an initial reasoning model based on the mapping relationship between documents and document fragments in the target corpus.

[0041] The target reasoning model is a deep learning model trained in two stages. It integrates the abilities to decompose task problems, retrieve relevant information, and generate task responses, enabling it to handle highly complex tasks. The target reasoning model is trained on a memory-based reasoning model using multiple sample task problems, corresponding labeled sub-problems, and labeled task results. It integrates problem decomposition, retrieval, and reasoning generation capabilities. Based on an understanding of the task problem and combined with the structural information of the target corpus, it can specifically decompose the task problem, retrieve document fragments related to the decomposed sub-problems from the target corpus, and use these document fragments for multi-step reasoning to arrive at accurate task results. The model architecture of the target reasoning model includes, but is not limited to, the Transformer model, the BERT model, and large language models.

[0042] The sample reasoning task is a specific problem or requirement that needs to be solved through model reasoning, used as sample data. The sample task problem is a natural language problem describing the sample reasoning task, used as sample data. The labeled task sub-problem is a natural language problem describing the sample reasoning task step-by-step, used as labeled data. It serves as one of the target outputs of the training objective reasoning model, providing a learning objective for the model's problem decomposition and retrieval capabilities. The labeled task sub-problem can include positive and negative labeled task sub-problems for comparative training. The labeled task result is the correct answer or solution to the sample reasoning task, used as labeled data. It serves as one of the target outputs of the training objective reasoning model, providing a learning objective for the model's reasoning generation.

[0043] The memory-based reasoning model, a deep learning model obtained through a training phase, serves as the base model for training the target reasoning model. Trained on the mapping relationships between documents and document fragments in the target corpus, the memory-based reasoning model learns the structural information of the target corpus and possesses the ability to accurately retrieve relevant information. Model architectures for the memory-based reasoning model include, but are not limited to, the Transformer model, the BERT model, and large language models.

[0044] A target corpus is a collection of documents used to solve a target reasoning task. It contains rich information related to the target reasoning task to support the reasoning process. The target corpus contains a large number of documents, such as articles, reports, web pages, and code files. For example, for an intelligent customer service platform, the target corpus includes product manuals, frequently asked questions, customer feedback records, technical specifications, price lists, and after-sales service policies. For an intelligent legal consultation platform, the target corpus includes legal provisions, court precedents, legal books and articles, contract samples, and legal news. For an online medical diagnosis system, the target corpus includes medical literature, pathology reports, standard treatment protocols, and drug instructions. For a virtual character dialogue application, the target corpus includes dialogue scripts, story collections, knowledge-based Q&A content, emotional support materials, and educational resources. For a code writing Q&A system, the target corpus includes code examples, code documentation, developer documentation, and project source code.

[0045] A document is a single unit of information within the target corpus. It can be any form of text file, such as an article, report, webpage, or code file. Documents contain detailed information relevant to a specific domain. Documents form the basis for information retrieval by the model and can be structured (e.g., database records) or unstructured (e.g., natural language text). Documents provide the model with the necessary external knowledge to handle more complex tasks. For example, for an online medical diagnostic system, a medical research paper on diabetes might be found in the target corpus.

[0046] A document fragment is a portion of content extracted from a document, typically containing specific information related to a task sub-problem. A document fragment can be a sentence, paragraph, or even a smaller unit of information, used as contextual information to help the inference model understand the logic of the inference task and perform model inference on the relevant task sub-problem. For example, in an online medical diagnostic system, a sentence from a medical research paper on diabetes might state, "Diabetic patients may experience symptoms such as increased thirst and frequent urination."

[0047] The mapping relationship between documents and document fragments is a data structure used to represent the belonging relationship between documents and document fragments. It is used to characterize the structural information of the target corpus. The mapping relationship helps the inference model to quickly locate specific document fragments in relevant documents, thereby supporting efficient and accurate retrieval. It can be represented in the form of trie, triple data, graph data, key-value pairs, etc.

[0048] The initial inference model is an untrained deep learning model, serving as the base model for training the memory-based inference model. This initial inference model lacks the ability to decompose task problems, retrieve relevant information, or generate task responses; it only possesses simple, general inference capabilities and can understand natural language but has not yet been trained for the target inference task. The model architecture of the initial inference model includes, but is not limited to, the Transformer model, the BERT model, and large language models.

[0049] The task sub-problems are natural language questions that describe the target reasoning task step by step. Multiple task sub-problems are obtained by breaking down the task problem. Compared to the task problem, a single task sub-problem has lower complexity. Task sub-problems are indexes for retrieving relevant document fragments from the target corpus. For example, on an intelligent customer service platform, the task problem is: "Does this phone support 5G networks? What is its price? What colors are available?". The broken-down task sub-problems include: "Does this phone support 5G networks?", "What is the price of this phone?", and "What colors are available for this phone?". Another example is on an intelligent legal consultation platform, where the task problem is: "If I am injured in my rented apartment, is the landlord liable? How should I protect my rights?". The broken-down task sub-problems include: "Under what circumstances is the landlord liable for the tenant's injury?", "What is the scope of the landlord's liability when the tenant is injured?", "If the landlord is liable, how should the tenant protect their rights?", and "What legal avenues can the tenant seek help through?". For example, in an online medical diagnosis system, the task question might be: "I've been feeling dizzy and weak lately. What could be causing this? What tests do I need? Which department should I see?" The sub-questions could be: "What are some possible causes of dizziness and weakness?", "What symptoms usually accompany dizziness and weakness?", "What medical tests are needed for a definitive diagnosis?", and "Which department should I schedule an appointment with for further diagnosis?". Similarly, in a virtual character dialogue application, the task question might be: "Can you tell me a funny joke? What's your favorite movie?". The sub-questions could be: "Please provide a funny joke.", and "What's your favorite movie?". For example, in a code-writing question-and-answer system, the task question is: "How can I use list comprehensions in Python to filter out even numbers? I also encountered some cross-domain issues, what are some solutions?" The broken-down task sub-questions include: "How can I use list comprehensions in Python to create a new list containing only even numbers?", "What is the syntax of list comprehensions?", "What are cross-domain issues?", "What are some common methods to solve cross-domain issues?", and "How can I configure the server to allow cross-domain requests?".

[0050] Contextual information is relevant information provided to the inference model for performing inference tasks. As a knowledge supplement, it helps the text processing model better understand each task sub-problem, and thus comprehensively understand the high-complexity task problem to reason and obtain the task result.

[0051] The task result is a specific answer or solution to the target reasoning task. The result is a coherent and complete specific answer or solution generated by the target reasoning model through a multi-step reasoning process, combining multiple document fragments as contextual information. This multi-step reasoning process ensures a high degree of accuracy and completeness in the task result. For example, on an intelligent customer service platform, the task question might be: "Does this phone support 5G networks? What is its price? What colors are available?" The task result might be: "This phone does indeed support 5G networks. Its official price is ¥4,999. You can choose from black, white, and blue." For example, on an intelligent legal consultation platform, the task question is: "If I am injured in my rented apartment, is the landlord liable? How should I protect my rights?" The task result is: "According to relevant laws, if your injury is caused by the landlord's failure to fulfill their maintenance obligations or the provision of facilities with safety hazards, the landlord may bear corresponding responsibility. You can protect your rights through the following channels: First, collect evidence such as photos of the scene and medical reports. Submit a written claim to the landlord, stating your losses and compensation requests. If the landlord refuses to compensate, you can file a complaint with the local consumer association or housing management department. If the problem persists, you can consider suing the landlord through legal channels and seeking the court's assistance." For example, on an online medical diagnostic system, the task question might be: "I've been feeling dizzy and weak lately. What could be causing this? What tests should I have done? Which department should I see?" The result might be: "Dizziness and weakness can be caused by a variety of reasons, including anemia, hypoglycemia, thyroid dysfunction, and cardiovascular disease. To confirm the diagnosis, we recommend the following tests: Complete blood count (CBC): to check for anemia. Blood glucose test: to rule out hypoglycemia. Thyroid function test: to rule out thyroid dysfunction. Electrocardiogram (ECG): to check heart function." Another example is on a virtual character dialogue application, where the task question might be: "Can you tell me a funny joke? What's your favorite movie?" The result might be: "Sure! Here's a simple joke: ... As for my favorite movie, I like 'XXX.' It tells a story of hope and freedom, and it's very moving and inspiring." For example, in a code-writing question-and-answer system, the task question might be: "How can I use list comprehensions in Python to filter out even numbers? I've also encountered some cross-domain issues; what are some solutions?" The task result might be: "In Python, you can use list comprehensions to filter out even numbers. Here's a simple example: ... Regarding Cross-Domain Response (CORS) issues, you can try the following common solutions: 1. Server-side configuration: Set response headers on the server side to allow requests from specific domains. For example, in Flask applications, you can use the flask-cors library."2. Proxy server: Use the proxy function in front-end development tools (such as Webpack Dev Server) to forward requests to the back-end server.

[0052] One possible approach to retrieving document fragments related to multiple task sub-problems from documents in the target corpus is to use a trie of the target corpus to retrieve document fragments related to multiple task sub-problems.

[0053] Using multiple document fragments as contextual information for the target inference task, and correspondingly inferring multiple related sub-tasks to obtain the task result, one optional approach is to use multiple document fragments as contextual information for the target inference task, progressively inferring multiple related sub-tasks to obtain the task result. Another optional approach is to use multiple document fragments as contextual information for the target inference task, inferring multiple related sub-tasks in parallel to obtain the task result. Neither approach is limited here. Through these two methods, the target inference model can effectively utilize contextual information to infer multiple related sub-tasks and generate highly accurate task results, improving not only the accuracy of inference but also enhancing its ability to handle complex problems.

[0054] For example, the target reasoning model is a large language model trained on a memory reasoning model, based on a large number of sample task questions and labeled task results from the sample reasoning task. The memory reasoning model is trained on a general large language model based on a trie between corpus documents (travel product brochures, FAQs, customer feedback records, price lists, and after-sales service policies) and corpus document fragments from an intelligent customer service corpus. Using this target reasoning model suitable for intelligent customer service platforms, the task question "Which hotel company owns Hotel A, and in which city is the headquarters of this hotel company located?" is decomposed into multiple sub-questions:

[0055] Sub-question 1: To answer this question, I should first identify the specific hotel company...;

[0056] Sub-question 2: According to relevant documentation, the name of the hotel company owning Hotel A is Hotel Company A. I need...;

[0057] ...

[0058] Retrieve document fragments related to multiple task sub-questions from the corpus of intelligent customer service language documents:

[0059] Corpus document fragments related to sub-problem 1 of task: Document: a hotel introduction, document fragment: ...;

[0060] Corpus document fragments related to sub-problem 2 of task: Document: Introduction to Hotel Company A, Document fragment: ...;

[0061] ...

[0062] Using this target reasoning model, multiple document fragments (document fragments related to task sub-problem 1: document: hotel introduction, document fragment: ...; document fragments related to task sub-problem 2: document: hotel company introduction, document fragment: ...; ...) serve as contextual information for the target reasoning task. The model progressively addresses and reasons about multiple related task sub-problems (task sub-problem 1: To answer this question, I should first determine the specific hotel company...; task sub-problem 2: According to the relevant documents, the name of the hotel company to which hotel a belongs is Hotel Company A. I need...; ...) to obtain the task result of the target reasoning task: "Task result: The hotel company is located in city B."

[0063] In the embodiments of this specification, the target reasoning model is not only trained based on multiple sample task questions of the sample reasoning task and multiple label task sub-questions and label task results corresponding to the sample task questions, but also further trained on the memory reasoning model obtained by training the initial reasoning model based on the mapping relationship between documents and document fragments of the target corpus. This integrated approach enables a single target reasoning model to independently complete question decomposition, retrieval, and reasoning generation to perform the target reasoning task, solving the problem of weak collaboration between the retrieval unit and the reasoning model. It can use the reasoning ability of the reasoning model to assist retrieval, and can also perform reasonable question decomposition by pre-memorizing the document structure of the target corpus, realizing a seamless combination of information retrieval and reasoning process, and improving the structure, logic, and accuracy of task reasoning.

[0064] In one optional embodiment of this specification, before step 104, the following specific steps are further included: constructing a thought chain corresponding to the target reasoning task based on multiple task sub-problems and document fragments related to multiple task sub-problems;

[0065] Correspondingly, step 104 uses multiple document fragments as context information for the target reasoning task, and uses multiple related task sub-problems to obtain the task result of the target reasoning task. This includes the following specific steps: using multiple document fragments as context information for the target reasoning task, and using multiple related task sub-problems to reason step by step according to the thought chain to obtain the task result of the target reasoning task.

[0066] The thought chain for a target reasoning task is a data structure used to represent the reasoning steps for solving complex task problems. It decomposes the model reasoning process of a complex task problem into a series of simpler reasoning sub-tasks, connecting these sub-tasks through the order of step execution to form a clear reasoning path. In task reasoning based on a reasoning model, the thought chain helps the reasoning model understand and process the reasoning sub-tasks step by step with reference to contextual information, achieving multi-step reasoning and generating coherent and complete task results. The thought chain provides a structured framework, making the reasoning process more orderly and traceable. Each task sub-problem may depend on the sub-results of one or more previous task sub-problems; this dependency is explicitly represented in the thought chain. The solution to each task sub-problem relies on relevant document fragments as contextual information, ensuring that external knowledge is fully and comprehensively utilized during the reasoning process. By following the step execution order of the thought chain, each task sub-problem is reasoned step by step, ensuring the accuracy of the result at each step and providing necessary information for subsequent steps.

[0067] Based on multiple task sub-problems and related document fragments, a thought chain corresponding to the target reasoning task is constructed. One possible approach is to concatenate multiple task sub-problems and related document fragments based on the execution order of the steps corresponding to multiple task sub-problems to obtain the thought chain corresponding to the target reasoning task. This can be done using a reasoning model or a template construction method, which is not limited here.

[0068] For example, based on the execution order of steps corresponding to multiple task sub-problems, multiple task sub-problems and related corpus document fragments are concatenated to obtain the thought chain corresponding to the target reasoning task, such as... Figure 2 As shown, Figure 2 This specification illustrates a schematic diagram of multiple task sub-problems and task responses in a task reasoning method provided in one embodiment:

[0069] The structure of this thought chain is as follows:

[0070] Task question: Which hotel company owns Hotel A, and in which city is the hotel company headquartered?

[0071] Sub-question 1: To answer this question, I should first identify the specific hotel company...;

[0072] Corpus document fragments related to sub-problem 1 of task: Document: a hotel introduction, document fragment: ...;

[0073] Sub-question 2: According to relevant documentation, the name of the hotel company owning Hotel A is Hotel Company A. I need...;

[0074] Corpus document fragments related to sub-problem 2 of task: Document: Introduction to Hotel Company A, Document fragment: ...;

[0075] ...

[0076] Using multiple corpus document fragments as contextual information for the target reasoning task, and following this thought chain, we gradually reason out multiple related task sub-problems to obtain the task result of the target reasoning task: the hotel company is located in city B.

[0077] In the embodiments of this specification, by constructing a thought chain corresponding to the target reasoning task, the thought chain provides a clear reasoning path, ensuring that the solution of each sub-problem is based on relevant document fragments and the results of previous sub-problems. This guarantees that contextual information can be fully and comprehensively utilized during the reasoning process. By using the target reasoning model to reason about multiple related task sub-problems step by step according to the thought chain, the accuracy and completeness of the task results can be significantly improved. This not only enhances the target reasoning model's ability to understand complex task problems, but also improves the coherence and logical consistency of multi-step reasoning, making the task results more comprehensive and accurate.

[0078] In one optional embodiment of this specification, the thought chain includes steps corresponding to multiple task sub-problems;

[0079] Correspondingly, using multiple document fragments as contextual information for the target reasoning task, and following the thought process to progressively reason about multiple related sub-questions, the task result of the target reasoning task is obtained, including the following specific steps:

[0080] Using the first document fragment as the context information for the target reasoning task, reason about the first task sub-problem and obtain the first task sub-result. The first document fragment and the first task sub-problem correspond to the first step, which is any one of the multiple steps in the thought chain. Update the first step to the next step in the thought chain, and return to execute the step of using the first document fragment as the context information for the target reasoning task, reasoning about the first task sub-problem, and obtaining the first task sub-result, until the task sub-results corresponding to each step in the thought chain are obtained. Based on the task sub-results corresponding to multiple steps, determine the task result of the target reasoning task.

[0081] The steps corresponding to the task sub-problems represent a series of specific, sequentially executed reasoning sub-tasks in the thought chain. Each step corresponds to a specific task sub-problem and a related document fragment. In the thought chain, multiple task sub-problems and their related document fragments are arranged according to the execution order of the reasoning sub-tasks to ensure that the entire reasoning process proceeds in an orderly manner.

[0082] The first step is any step in the thought process chain, and it will be updated to the next step after the reasoning is completed. The first task sub-problem is the task sub-problem corresponding to the first step. The first document fragment is the document fragment related to the first task sub-problem. The first task sub-result is the preliminary answer or solution obtained by using the target reasoning model based on the first document fragment and the first task sub-problem. The first task sub-result not only solves the current first task sub-problem, but also provides an important information foundation for subsequent task sub-problems.

[0083] Based on the task sub-results corresponding to multiple steps, the task result of the target reasoning task is determined. One possible approach is to integrate the task sub-results corresponding to multiple steps to obtain the task result of the target reasoning task. Another possible approach is to use the target reasoning model to reason and obtain the task result of the target reasoning task based on the task sub-results corresponding to multiple steps. No specific approach is required here.

[0084] For example, using the first document fragment corresponding to the first step (the corpus document fragments related to task sub-problem 1: document: introduction of hotel A, document fragment: ...) as the context information of the target reasoning task, the first task sub-problem corresponding to the first step (the corpus document fragments related to task sub-problem 2: document: introduction of hotel company A, document fragment: ...) is used to obtain the first task sub-result corresponding to the first step: This hotel belongs to hotel company A.

[0085] Update the first step to the next step in the thought chain. Using the first document fragment corresponding to the first step (document fragment related to task sub-problem 2: document: hotel introduction, document fragment: ...) as the context information for the target reasoning task, reason about the first task sub-problem corresponding to the first step (task sub-problem 2: According to the relevant documents, the name of this hotel company is Hotel Company A. I need...), and obtain the first task sub-result corresponding to the first step: This hotel belongs to Hotel Company A.

[0086] ...

[0087] Until the task sub-results corresponding to each step in the thought chain are obtained (task sub-result 1: This hotel belongs to Hotel Company A; task sub-result 2: Hotel A is one of the high-end brands under Hotel Company A; task sub-result 3: Hotel Company A's headquarters is located in City B), based on the task sub-results corresponding to multiple steps, the task result of the target reasoning task is obtained: "Task result: The hotel company is located in City B".

[0088] In the embodiments of this specification, by constructing and utilizing thought chains and combining multi-step reasoning with the target reasoning model, it is ensured that each task sub-problem and its related document fragments are arranged and processed in a logical order, forming a clear reasoning path. By reasoning step by step according to this reasoning path, the task result is obtained, which not only improves the accuracy of reasoning but also enhances the ability to handle complex problems, and can significantly improve the structure, logic and accuracy of the task result.

[0089] In the above embodiments, the introduction of the thought chain can also provide a self-correction and optimization mechanism. After each step of reasoning, the target reasoning model can perform a self-local evaluation to determine the relevance and accuracy between the first task sub-result obtained from the reasoning of the document fragment and the task question. One possible approach is as follows:

[0090] In one optional embodiment of this specification, before updating the first step to the next step in the thought chain, the following specific steps are further included:

[0091] Based on the matching degree between the task question and the first task sub-result, determine whether the first step is a valid step;

[0092] If not, remove the first step from the thought process.

[0093] The matching degree between the task problem and the first task sub-result is a quantitative indicator of the relevance and accuracy between the task problem and the first task sub-result. It is used to evaluate whether the reasoning result of the current step effectively solves a part of the task problem, or whether adjustments or re-retrieval and reasoning are needed. This matching degree is a local optimization score for a model to evaluate relevance.

[0094] Optionally, after determining whether the first step is a valid step based on the matching degree between the task problem and the first task sub-result, the following specific steps are also included: if so, the first step is retained in the thought chain.

[0095] For example, based on the local optimization score (0.65) between the task question (which hotel company owns Hotel A, and in which city is the hotel company headquartered?) and the first task sub-result (this hotel belongs to Hotel Company B), the first step is determined to be an ineffective step and is removed from the thought process. The "pruned" thought process is as follows:

[0096] Task question: Which hotel company owns Hotel A, and in which city is the hotel company headquartered?

[0097] Sub-question 2: According to relevant documentation, the name of the hotel company owning Hotel A is Hotel Company A. I need...;

[0098] -Related document excerpts: Document: a Hotel Introduction; Document excerpt: ...;

[0099] --Sub-question 3: Now that I know Hotel A is a hotel under Hotel Company A, I need to determine the location of Hotel Company A's headquarters...;

[0100] --Related document excerpts: Document: Information on the headquarters of Hotel Company A; Document excerpt: ...

[0101] In the embodiments described in this specification, the thought chain is optimized in a timely manner by adopting a pruning method, which not only improves the efficiency and accuracy of the reasoning process, but also enhances the robustness of task reasoning.

[0102] In the above embodiments, after a thought chain completes reasoning, the target reasoning model can perform a self-global evaluation to determine the correlation and accuracy between the task sub-results and task questions corresponding to each step in the thought chain obtained from the document fragment reasoning. One possible approach is as follows:

[0103] In one optional embodiment of this specification, the thought chain includes at least one thought branch;

[0104] Before determining the task result of the target reasoning task based on the task sub-results corresponding to multiple steps, the following specific steps are also included: determining the target thinking branch from at least one thinking branch based on the matching degree between the task problem and the task sub-results corresponding to each step in at least one thinking branch.

[0105] Based on the task sub-results corresponding to multiple steps, the task result of the target reasoning task is determined, including the following specific steps: Based on the task sub-results corresponding to each step in the target thinking chain, the task result of the target reasoning task is determined.

[0106] A thought chain typically includes multiple thought branches. For example, a task sub-problem may yield multiple related text fragments, and these text fragments form the branches.

[0107] A thought branch is a branch data structure within a thought chain, used to represent a complete set of reasoning steps for solving complex task problems, and to explore different reasoning paths. Each thought branch connects its corresponding reasoning subtasks through the order of step execution. Each thought branch represents a possible solution; by comparing the results of different thought branches, more optimized task reasoning methods can be found, improving the flexibility and adaptability of task reasoning, especially when facing problems with multiple solutions or multiple paths.

[0108] The matching degree between the task problem and the task sub-results corresponding to each step in at least one thought branch is a quantitative indicator of the relevance and accuracy between the task problem and the task sub-results corresponding to each step in at least one thought branch. This matching degree is used to evaluate whether the reasoning result of each thought branch effectively solves a part of the task problem, or whether adjustments or re-retrieval and reasoning are needed. This matching degree is a global optimization score for a model to evaluate relevance.

[0109] The target-oriented thought branch is selected from at least one thought branch based on the degree of matching between the task problem and the corresponding task sub-outcomes of each step. The target-oriented thought branch is the one that is more consistent with the task problem, and its reasoning results are considered more accurate.

[0110] Based on the task sub-results corresponding to each step in the target thinking branch, the task result of the target reasoning task is determined. One possible approach is to integrate the task sub-results corresponding to each step in the target thinking branch to obtain the task result of the target reasoning task. Another possible approach is to deduce the task result of the target reasoning task based on the task sub-results corresponding to each step in the target thinking branch. No specific method is specified here.

[0111] For example, the thought chain includes two thought branches:

[0112] Thinking branch 1:

[0113] -Sub-question 1: Identify the specific hotel company...;

[0114] -Related document excerpts: Document: Introduction to Hotel Company A; Document excerpt: ...;

[0115] --Sub-problem 2: Determine the location of Hotel Company A's headquarters...;

[0116] --Related document excerpts: Document: Information on the headquarters of Hotel Company A; Document excerpt: ...

[0117] Thinking branch 2:

[0118] -Sub-question 1: Determine the specific hotel brand...;

[0119] -Related document excerpts: Document: a Hotel Introduction; Document excerpt: ...;

[0120] --Sub-question 2: Determine the location of the headquarters of Hotel Group C...;

[0121] --Related document excerpts: Document: C Hotel Group Headquarters Information; Document excerpt: ...

[0122] Based on the task question (Which hotel company owns Hotel A, and in which city is the hotel company headquartered?) and the corresponding task sub-results for each step in the two thought branches (Thought Branch 1: Task Sub-result 1: This hotel belongs to Hotel Company A; Task Sub-result 2: Hotel Company A's headquarters are located in City B. Thought Branch 2: Task Sub-result 1: Hotel A is one of the brands of Hotel Group C; Task Sub-result 2: Hotel Group C's headquarters are located in City D.), the matching degree is: Thought Branch 1: 0.89; Thought Branch 2: 0.71

[0123] From the two thought branches, we determine thought branch 1 as the target thought branch. Based on the task sub-results corresponding to each step in the target thought branch (thought branch 1: task sub-result 1: This hotel belongs to Hotel Company A; task sub-result 2: Hotel Company A's headquarters is located in City B), we deduce the task result of the target reasoning task: "Task result: The hotel company is located in City B".

[0124] In the embodiments of this specification, multiple potential thought branches are maintained simultaneously. By comprehensively evaluating the matching degree between the task problem and the task sub-results corresponding to each step in each complete thought branch, the target thought branch is selected as the final reasoning path, resulting in more comprehensive and reliable task results. This approach is suitable for handling complex or fuzzy retrievals, allows for the exploration of multiple possible task reasoning angles, and maintains attention to optimizing the reasoning path.

[0125] For the two thought chain optimization solutions mentioned above, please refer to... Figure 3 , Figure 3 This specification illustrates a schematic diagram of thought chain optimization in a task reasoning method according to an embodiment of the present specification:

[0126] The thought chain structure is as follows:

[0127] Task issues;

[0128] -Step 1: Task sub-problem 1, document fragment 1;

[0129] -Step 1: Task sub-problem 1, document fragment 2;

[0130] -Step 1: Task sub-problem 1, document fragment 3;

[0131] --Step 2: Task sub-problem 2, document fragment 4;

[0132] --Step 2: Task sub-problem 2, document fragment 5.

[0133] Based on the two self-optimization methods described above, the optimized thought chain (or target thought branch) is determined as follows:

[0134] Task issues;

[0135] -Step 1: Task sub-problem 1, document fragment 3;

[0136] --Step 2: Task sub-problem 2, document fragment 5.

[0137] By following this thought chain, we can gradually find the corresponding sub-problems of the reasoning task and obtain the task result of the target reasoning task.

[0138] See Figure 4 , Figure 4 A flowchart of a model training method provided in one embodiment of this specification is shown, including the following specific steps:

[0139] Step 402: Obtain the sample task problem of the sample reasoning task, the multiple labeled task sub-problems corresponding to the sample task problem, and the labeled task results corresponding to the sample task problem.

[0140] The embodiments in this specification are used in applications, platforms, or systems with model training capabilities, such as virtual task platforms with model training capabilities.

[0141] Sample reasoning tasks are specific problems or needs that require model reasoning to solve, using sample data as the basis.

[0142] The sample task problem is a natural language problem that uses sample data to describe the sample reasoning task.

[0143] The labeling task sub-problem is a natural language question that describes the sample reasoning task step by step, using labeled data. It serves as one of the target outputs for training the objective reasoning model, providing a learning objective for training the model's problem decomposition and retrieval capabilities. The labeling task sub-problem can include positive and negative labeling task sub-problems for comparative training.

[0144] The results of the labeling task serve as the correct answers or solutions for the labeling data and sample reasoning tasks, and are used as one of the target outputs of the training objective reasoning model, providing a learning objective for the training model's reasoning generation ability.

[0145] One possible way to obtain the sample task problem for the sample reasoning task is to obtain the sample task problem from an open-source sample library. Another possible way is to obtain the sample task problem from a historical database. Yet another possible way is to generate the sample task problem for the sample reasoning task using a text generation model. No further restrictions are imposed here.

[0146] To obtain multiple labeled sub-problems corresponding to the sample task problem, one option is for domain experts to manually design and label these sub-problems. Another option is to extract or generate these sub-problems from the sample task problem based on a preset rule template. For example, the rule template might be: "Package Type Identification: Identify the types of travel packages offered by the travel agency. Template: What types of travel packages does this travel agency offer? Service Content Identification: For each identified travel package type, further identify the service content it includes. Template: What services are included in the [Package Type] package? Price Range Identification: Identify the price range for each travel package. Template: What is the price of the [Package Type] package? Booking Process Identification: Identify the process for booking a travel package. Template: How to book the [Package Type] package?" Another option is to use a deep learning model to analyze the sample task problem and obtain the corresponding multiple labeled sub-problems.

[0147] One possible way to obtain the labeled task results of the sample reasoning task is to obtain the labeled task results of the sample reasoning task from an open-source sample library. Another possible way is to manually annotate the sample task questions of the sample reasoning task. Yet another possible way is to use a text generation model to generate the labeled task results of the sample reasoning task. No specific method is specified here.

[0148] For example, a dialogue question-and-answer model for tourism products applied to an intelligent customer service platform needs to be trained. Publicly available tourism question-and-answer datasets are used to extract questions and corresponding standard answers related to tourism products. For example, "What types of tour packages does this travel agency offer?" or "This travel agency offers three types of tour packages: luxury tours, adventure tours, and family tours." Questions are extracted from historical user question records on online travel platforms. For example, "What services are included in this tour package?" Domain experts or customer service personnel are asked to label these questions, providing multiple labeled sub-questions, such as "Does this tour package include hotel accommodation?", "Does this tour package include tour guide services?", and "Does this tour package include catering services?", along with precise answers, such as "This tour package includes hotel accommodation, tour guide services, and catering." A pre-trained text generation model (such as a pre-trained generative Transformer model, or GPT model) is used to generate questions and answers related to tourism products. For example, "Is this tour package suitable for family travel?" or "This tour package is very suitable for family travel, including parent-child activities and children's entertainment facilities." A large sample dataset is constructed using the above methods.

[0149] Obtaining the sample task questions and labeled task results of the sample reasoning task provides a data foundation for subsequent decomposition into multiple sample task sub-questions, and then retrieving multiple related document fragments.

[0150] Step 404: Using the memory reasoning model, the sample task problem is decomposed to obtain multiple sample task sub-problems of the sample reasoning task. Document fragments related to multiple sample task sub-problems are retrieved. Multiple document fragments are used as context information of the sample reasoning task to infer the multiple sample task sub-problems related to the sample reasoning task and obtain the prediction task result of the sample reasoning task. The memory reasoning model is obtained by training the initial reasoning model based on the mapping relationship between documents and document fragments in the target corpus.

[0151] The sample task sub-problems are natural language problems that describe the sample inference task step by step. Multiple sample task sub-problems are obtained by decomposing the sample task problem. Compared with the sample task problem, the complexity of a single sample task sub-problem is lower. The sample task sub-problem is an index for retrieving relevant document fragments from the target corpus.

[0152] The prediction task result is a specific answer or solution for the sample reasoning task. The prediction task result is a specific answer or solution generated by the memory reasoning model by combining multiple document fragments as contextual information and through a multi-step reasoning process.

[0153] Using multiple document fragments as context information for a sample reasoning task, and corresponding to multiple sample task sub-problems related to reasoning, the predicted result of the sample reasoning task can be obtained. One possible approach is to use a memory reasoning model, using multiple document fragments as context information for a sample reasoning task, and progressively corresponding to multiple sample task sub-problems related to reasoning to obtain the predicted result of the sample reasoning task. Another possible approach is to use a memory reasoning model, using multiple document fragments as context information for a sample reasoning task, and concurrently corresponding to multiple sample task sub-problems related to reasoning to obtain the predicted result of the sample reasoning task. No particular limitation is made here.

[0154] For example, the memory-based reasoning model is trained on a general large language model using a trie (prefix tree) between corpus documents (travel product brochures, FAQs, customer feedback records, price lists, and after-sales service policies) and corpus document fragments from an intelligent customer service corpus. A sample task problem is: "What types of travel packages does this travel agency offer, and what services are included in these packages?". Using the memory-based reasoning model, this sample task problem is decomposed into multiple sample task sub-problems:

[0155] Sample Task Sub-problem 1: Determine the specific type of travel package...;

[0156] Sample Task Sub-problem 2: Determine the service content of each travel package...;

[0157] Retrieve document fragments related to two sample task sub-questions from the intelligent customer service corpus:

[0158] Document snippets related to sample task sub-problem 1: Document: Travel agency product introduction; Document snippet: We offer three types of travel packages: luxury tours, adventure tours, and family tours.

[0159] Sample Task Sub-problem 2 Related Document Fragments: Document: Detailed Description of Tour Packages; Document Fragment: Luxury Tour Packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure Tour Packages include outdoor adventure activities, professional guides, and camping equipment. Family Tour Packages include family-friendly activities, children's entertainment facilities, and family-friendly accommodations.

[0160] Using document fragments related to sample task sub-problem 1 as contextual information for the sample reasoning task, sample task sub-problem 1 is reasoned, generating prediction task sub-result 1: "This travel agency offers three types of travel packages: luxury tours, adventure tours, and family tours." Then, using a memory reasoning model, using document fragments related to sample task sub-problem 2 as contextual information for the sample reasoning task, sample task sub-problem 2 is reasoned, generating prediction task sub-result 2: "Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure tour packages include outdoor adventure activities, professional guides, and camping equipment. Family tour packages include parent-child activities, children's entertainment facilities, and family-friendly accommodations." Integrating prediction task sub-result 1 and prediction task sub-result 2, the prediction task result is obtained: "This travel agency offers three types of travel packages: luxury tours, adventure tours, and family tours. Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure tour packages include outdoor adventure activities, professional guides, and camping equipment. Family tour packages include parent-child activities, children's entertainment facilities, and family-friendly accommodations."

[0161] For example, the memory-based reasoning model is trained on a general large language model using a trie (prefix tree) between corpus documents (travel product brochures, FAQs, customer feedback records, price lists, and after-sales service policies) and corpus document fragments from an intelligent customer service corpus. A sample task problem is: "What types of travel packages does this travel agency offer, and what services are included in these packages? What is the price range of the travel packages offered by this travel agency?". Using the memory-based reasoning model, this sample task problem is decomposed into multiple sample task sub-problems:

[0162] Sample Task Sub-problem 1: Determine the specific type of travel package...;

[0163] Sample Task Sub-problem 2: Determine the service content of each travel package...;

[0164] Sample Task Sub-problem 3: Determine the price range for each tour package...;

[0165] Retrieve document fragments related to two sample task sub-questions from the intelligent customer service corpus:

[0166] Document snippets related to sample task sub-problem 1: Document: Travel agency product introduction; Document snippet: We offer three types of travel packages: luxury tours, adventure tours, and family tours.

[0167] Sample Task Sub-problem 2 Related Document Fragments: Document: Detailed Description of Tour Packages; Document Fragment: Luxury Tour Packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure Tour Packages include outdoor adventure activities, professional guides, and camping equipment. Family Tour Packages include family-friendly activities, children's entertainment facilities, and family-friendly accommodations.

[0168] Document fragments related to sample task sub-problem 3: Document: Price list of tour packages; Document fragment: The price range of luxury tour packages is 5,000 to 10,000 yuan, the price range of adventure tour packages is 3,000 to 5,000 yuan, and the price range of family tour packages is 2,000 to 4,000 yuan.

[0169] Using document fragments related to sample task sub-problems 1, 2, and 3 as contextual information for the sample reasoning task, parallel reasoning is performed on sample task sub-problems 1, 2, and 3 to generate the following predicted task sub-results: 1. "This travel agency offers three types of tour packages: luxury tours, adventure tours, and family tours." 2. "Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure tour packages include outdoor adventure activities, professional guides, and camping equipment. Family tour packages include parent-child activities, children's entertainment facilities, and family-friendly accommodations." 3. "Luxury tour packages range in price from 5,000 to 10,000 yuan." Adventure tour packages range from 3,000 to 5,000 yuan, while family tour packages range from 2,000 to 4,000 yuan. Integrating prediction task sub-results 1, 2, and 3, the prediction task result is: "This travel agency offers three types of tour packages: luxury tours, adventure tours, and family tours. Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences, with prices ranging from 5,000 to 10,000 yuan. Adventure tour packages include outdoor adventure activities, professional guides, and camping equipment, with prices ranging from 3,000 to 5,000 yuan. Family tour packages include parent-child activities, children's entertainment facilities, and family-friendly accommodations, with prices ranging from 2,000 to 4,000 yuan."

[0170] By using forward propagation, the results of the prediction task are obtained, providing data support for subsequent backpropagation training of the memory reasoning model.

[0171] Step 406: Based on multiple sample task sub-problems and multiple labeled task sub-problems, as well as the predicted task results and labeled task results, train the memory reasoning model to obtain the target reasoning model, wherein the target reasoning model is used to perform the target reasoning task of the above task reasoning method.

[0172] A memory inference model is trained based on multiple sample task sub-problems, multiple labeled task sub-problems, and the prediction and labeled task results to obtain the target inference model. One possible approach is to determine a loss value based on these factors, and then adjust the model parameters of the memory inference model accordingly. The loss value includes, but is not limited to, cross-entropy loss. Further, another possible approach is to determine a first loss value based on the sample task sub-problems and multiple labeled task sub-problems, and a second loss value based on the prediction and labeled task results. Finally, a final loss value is determined based on both the first and second loss values. Finally, the model parameters of the memory inference model are adjusted based on the loss value. One possible approach is to use a gradient update method to adjust the model parameters of the memory inference model based on the loss value.

[0173] For example, based on multiple sample task sub-problems and multiple label task sub-problems, as well as the prediction task results and label task results, the cross-entropy loss value is determined. Based on the cross-entropy loss value, the model parameters of the memory inference model are adjusted using the gradient update method. When the training termination condition is met, a dialogue question-and-answer model for tourism products applied to the intelligent customer service platform is obtained.

[0174] It should be noted that the technical solutions of the embodiments in this specification and the technical solutions of the task reasoning method described above belong to the same concept. For details not described in detail in the technical solutions of the embodiments in this specification, please refer to the description of the technical solutions of the task reasoning method described above.

[0175] In the embodiments of this specification, the target reasoning model is not only trained based on multiple sample task questions of the sample reasoning task and multiple labeled task sub-questions and labeled task results corresponding to the sample task questions, but also further trained on the memory reasoning model obtained by training the initial reasoning model based on the mapping relationship between documents and document fragments of the target corpus. This integrated approach enables a single target reasoning model to independently complete question decomposition, retrieval, and reasoning generation to perform the target reasoning task, solving the problem of weak collaboration between the retrieval unit and the reasoning model. It can use the reasoning ability of the reasoning model to assist retrieval, and can also perform reasonable question decomposition by pre-memorizing the document structure of the target corpus, realizing a seamless combination of information retrieval and reasoning processes, obtaining a high-performance target reasoning model, and providing model support for improving the structure, logic, and accuracy of task reasoning.

[0176] In one optional embodiment of this specification, before obtaining the prediction result of the sample reasoning task by using multiple document fragments as context information for the sample reasoning task in step 404, corresponding to multiple sample task sub-problems related to reasoning, the following specific steps are further included:

[0177] Based on text fragments related to multiple sample sub-problems and multiple sample task sub-problems, construct the sample reasoning chain corresponding to the sample reasoning task;

[0178] Correspondingly, step 404 uses multiple document fragments as context information for the sample reasoning task, corresponding to multiple sample task sub-problems related to reasoning, to obtain the prediction task result of the sample reasoning task, including the following specific steps:

[0179] Using multiple document fragments as contextual information for the sample reasoning task, the system gradually reasons through multiple sample task sub-problems according to the sample thought chain to obtain the prediction result of the sample reasoning task.

[0180] A sample thought chain is a data structure used to represent the reasoning steps for solving complex sample task problems. It decomposes the model's reasoning process for a complex sample task problem into a series of simpler reasoning sub-tasks, connecting these sub-tasks through the order of step execution to form a clear reasoning path. Each step corresponds to a sample task sub-problem and a related document fragment. The accuracy of the sample thought chain directly determines the accuracy of the prediction results obtained from subsequent reasoning. During training, through the medium of the thought chain, the initial reasoning model gradually learns to better utilize its powerful reasoning capabilities to solve more complex task problems, such as multi-hop problems (when dealing with certain complex problems, the model needs to obtain the final answer through multiple reasoning steps or levels, rather than in one step. This type of reasoning requires the model to have strong logical reasoning and information integration capabilities). Furthermore, using the thought chain of natural language as a medium to connect various task sub-problems is more consistent with the generation process of the reasoning model than self-retrieval, enabling it to more freely handle various complex target reasoning tasks requiring reasoning.

[0181] Based on text fragments related to multiple sample sub-problems and multiple sample task sub-problems, a sample thought chain corresponding to the sample reasoning task is constructed. One possible approach is to concatenate multiple sample task sub-problems and multiple sample task sub-problems related to document fragments based on the execution order of steps corresponding to multiple sample task sub-problems to obtain the sample thought chain corresponding to the sample reasoning task. This can be done using a reasoning model or a template construction method, and is not limited here.

[0182] For example, based on the execution order of steps corresponding to multiple sample task sub-problems, multiple sample task sub-problems and related corpus document fragments are concatenated to obtain the sample thought chain corresponding to the sample reasoning task. The structure of the sample thought chain is as follows:

[0183] Sample task question: What types of travel packages does this travel agency offer, and what services are included in these packages?

[0184] -Sample Task Sub-problem 1: Determine the specific type of travel package...;

[0185] - Sample task sub-problem 1 related document fragments: Document: Travel agency product introduction; Document fragment: We offer three types of travel packages: luxury tours, adventure tours, and family tours;

[0186] --Sample Task Sub-problem 2: Determine the service content of each travel package...;

[0187] --Document fragments related to sample task sub-problem 2: Document: Detailed description of tour packages; Document fragment: Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure tour packages include outdoor adventure activities, professional guides, and camping equipment. Family tour packages include parent-child activities, children's entertainment facilities, and family-friendly accommodations;

[0188] ...

[0189] Using multiple document fragments from the corpus as contextual information for the sample reasoning task, multiple sample task sub-problems are reasoned step-by-step according to the thought chain of the sample, resulting in prediction task sub-result 1 and prediction task sub-result 2. Integrating prediction task sub-result 1 and prediction task sub-result 2, the predicted result of the sample reasoning task is obtained: "This travel agency offers three types of tour packages: luxury tours, adventure tours, and family tours. Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure tour packages include outdoor adventure activities, professional guides, and camping equipment. Family tour packages include parent-child activities, children's entertainment facilities, and family-friendly accommodations."

[0190] It should be noted that the technical solutions of the embodiments in this specification and the technical solutions of the task reasoning method described above belong to the same concept. For details not described in detail in the technical solutions of the embodiments in this specification, please refer to the description of the technical solutions of the task reasoning method described above.

[0191] In the embodiments of this specification, by constructing a sample thought chain, complex task problems are decomposed into a series of simpler sub-tasks and connected in a step-by-step sequence, providing a clear reasoning path. This enables the model to better learn how to handle multi-hop and complex reasoning tasks, thereby effectively solving the limitations of traditional self-retrieval methods in handling complex tasks.

[0192] In one optional embodiment of this specification, a label mind chain is pre-constructed for multiple label task sub-problems corresponding to the sample task problem and the label task results corresponding to the sample task problem;

[0193] Before step 406, the following specific steps are also included: adding the prediction task results to the sample thinking chain to obtain the prediction thinking chain;

[0194] Correspondingly, step 406 includes the following specific steps: comparing multiple sample task sub-problems in the prediction thinking chain and multiple label task sub-problems in the label thinking chain, as well as the prediction task results in the prediction thinking chain and the label task results in the label thinking chain, to determine the loss value; based on the loss value, training the memory reasoning model to obtain the target reasoning model.

[0195] Labeled reasoning chains are a data structure used to represent the correct reasoning steps for solving complex sample tasks. They decompose a complex sample task into a series of simpler reasoning sub-tasks and connect these sub-tasks sequentially to form a clear reasoning path. Each step corresponds to a labeled task sub-question and a related document fragment, ending with a labeled task result. Labeled reasoning chains not only help models learn how to break down complex problems into simpler ones but also guide them on how to solve these problems in the correct order. Negatively labeled task sub-questions and related document fragments can be added as distractors. During training, through this reasoning chain medium, the initial inference model gradually learns to better utilize powerful reasoning capabilities to solve more complex tasks, such as those involving multiple hops. Furthermore, using natural language reasoning chains to connect various task sub-questions is more consistent with the generation process of inference models than self-retrieval, allowing the model to handle various complex target inference tasks more flexibly.

[0196] Predictive thought chains are a data structure used to represent the inference steps of a model when solving complex sample task problems. It decomposes the reasoning process of a complex sample task problem into a series of simpler inference sub-tasks, connecting these sub-tasks through the order of step execution to form a clear inference path. Each step corresponds to a sample task sub-problem and a related document fragment, and finally, the predicted task result is added. During training, through the medium of thought chains, the initial inference model gradually learns to better utilize powerful inference capabilities to solve more complex task problems, such as those involving multiple hops. Furthermore, using natural language thought chains as a medium to connect various task sub-problems is more consistent with the generation process of inference models than self-retrieval, and the model learns to handle various complex target inference tasks more freely.

[0197] The loss value is a numerical metric that measures the difference between the predicted thought process and the labeled thought process. During training, the loss value is used to guide the adjustment of model parameters to reduce the gap between the predicted results and the true labels. The smaller the loss value, the closer the model's predicted thought process is to the labeled thought process, and the better the model's performance.

[0198] To determine the loss value, we compare multiple sample task sub-problems in the prediction thinking chain with multiple label task sub-problems in the label thinking chain, as well as the prediction task results in the prediction thinking chain and the label task results in the label thinking chain. One possible approach is to directly compare multiple sample task sub-problems in the prediction thinking chain with multiple label task sub-problems in the label thinking chain, as well as the prediction task results in the prediction thinking chain and the label task results in the label thinking chain, to determine the loss value. Another possible approach is to compare multiple sample task sub-problems in the prediction thinking chain with multiple label task sub-problems in the label thinking chain to determine a first loss value, compare the prediction task results in the prediction thinking chain with the label task results in the label thinking chain to determine a second loss value, and finally determine the loss value based on the first and second loss values. No limitation is imposed here.

[0199] Based on the loss value, the memory reasoning model is trained. One possible approach is to adjust the model parameters of the memory reasoning model using a gradient update method based on the loss value.

[0200] For example, the tag thinking chain is as follows:

[0201] Sample task question: What types of travel packages does this travel agency offer, and what services are included in these packages?

[0202] -Sub-task 1: Determine the specific type of travel package;

[0203] -Document snippets related to sub-question 1 of the tag task: Document: Travel agency product introduction; Document snippet: We offer three types of travel packages: luxury tours, adventure tours, and family tours;

[0204] --Sub-task 2: Determine the booking process for each tour package;

[0205] --Document excerpts related to sub-question 2 of the tag task: Document: Booking Guide; Document excerpt: Booking luxury tour packages requires booking 30 days in advance and paying a 50% deposit. Booking adventure tour packages requires booking 15 days in advance and paying a 30% deposit. Booking family tour packages requires booking 10 days in advance and paying a 20% deposit;

[0206] ...

[0207] Tag Task Result: This travel agency offers three types of tour packages: luxury tours, adventure tours, and family tours. Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences, with prices ranging from 10,000 to 20,000 yuan. Bookings require 30 days' advance notice and a 50% deposit. The cancellation policy is that cancellations made within 14 days of departure will incur a 50% penalty.

[0208] The sample thought chain is as follows:

[0209] Sample task question: What types of travel packages does this travel agency offer, and what services are included in these packages?

[0210] - Sample Task Sub-problem 1: Determine the specific type of travel package...

[0211] - Sample task sub-problem 1 related document fragments: Document: Travel agency product introduction; Document fragment: We offer three types of travel packages: luxury tours, adventure tours, and family tours;

[0212] --Sample Task Sub-problem 2: Determine the service content of each travel package...;

[0213] --Document fragments related to sample task sub-problem 2: Document: Detailed description of tour packages; Document fragment: Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure tour packages include outdoor adventure activities, professional guides, and camping equipment. Family tour packages include parent-child activities, children's entertainment facilities, and family-friendly accommodations;

[0214] ...

[0215] Add the predicted task outcome, "This travel agency offers three types of tour packages: luxury tours, adventure tours, and family tours. Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure tour packages include outdoor adventure activities, professional guides, and camping equipment. Family tour packages include family-friendly activities, children's entertainment facilities, and family-friendly accommodations," to the sample mind chain to obtain the predicted mind chain;

[0216] Sample task question: What types of travel packages does this travel agency offer, and what services are included in these packages?

[0217] - Sample Task Sub-problem 1: Determine the specific type of travel package...

[0218] - Sample task sub-problem 1 related document fragments: Document: Travel agency product introduction; Document fragment: We offer three types of travel packages: luxury tours, adventure tours, and family tours;

[0219] --Sample Task Sub-problem 2: Determine the service content of each travel package...;

[0220] --Document fragments related to sample task sub-problem 2: Document: Detailed description of tour packages; Document fragment: Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure tour packages include outdoor adventure activities, professional guides, and camping equipment. Family tour packages include parent-child activities, children's entertainment facilities, and family-friendly accommodations;

[0221] ...

[0222] The generated prediction task result reads: "This travel agency offers three types of tour packages: luxury tours, adventure tours, and family tours. Luxury tour packages include luxury hotel accommodations, private guide services, and upscale dining experiences. Adventure tour packages include outdoor adventure activities, professional guides, and camping equipment. Family tour packages include parent-child activities, children's entertainment facilities, and family-friendly accommodations." During the generation of the prediction thought chain, each token is compared with multiple sample task sub-problems and prediction task results in the prediction thought chain, and with multiple labeled task sub-problems and labeled task results in the labeled thought chain. Cross-entropy loss values ​​are calculated, and based on these cross-entropy loss values, gradient update methods are used to adjust the model parameters of the memory inference model.

[0223] In the embodiments described in this specification, by constructing and comparing labeled thought chains with predicted thought chains, the model can more accurately learn and simulate complex reasoning processes. This structured training method not only improves the model's reasoning ability and logic but also enhances its robustness in handling multi-hop and complex tasks.

[0224] In one optional embodiment of this specification, before determining the loss value by comparing multiple sample task sub-problems in the prediction thinking chain and multiple label task sub-problems in the label thinking chain, and between the prediction task results in the prediction thinking chain and the label task results in the label thinking chain, the following specific steps are further included:

[0225] Obtain multiple document fragments related to the sample task problem; use a natural language model to analyze the sample task problem based on the multiple document fragments to obtain a tag thinking chain composed of multiple tag task sub-problems corresponding to the sample task problem, or, according to a preset thinking chain template, decompose the sample task problem based on multiple document fragments to obtain a tag thinking chain composed of multiple tag task sub-problems corresponding to the sample task problem.

[0226] Multiple document fragments related to the sample task question are document fragments from the target corpus that are relevant to the sample task question. These document fragments contain rich background information and detailed content, which helps the model to more accurately understand and generate sub-questions and results of the labeled task. For example, for a dialogue question-and-answer model for tourism products, relevant document fragments may come from travel agency product introductions, frequently asked questions, customer feedback records, price lists, and after-sales service policies, etc.

[0227] Natural language models are deep learning models that enable natural language understanding and generation, including but not limited to: Transformer models, BERT models, and large language models.

[0228] The preset thought chain template is a pre-defined, structured rule template framework for thinking chains. It represents the reasoning steps for solving complex task problems, providing a standardized rule template framework for constructing the thought chain corresponding to the target reasoning task. This ensures that each task sub-problem and its related document fragments are arranged in the order of step execution. For example, for an intelligent customer service platform, the preset thought chain template is: Determine product specifications - Obtain product price - List product options. For an intelligent legal consultation platform, the preset thought chain template is: Determine liability conditions - Clarify the scope of liability - Legal advice and guidance. For an online medical diagnosis system, the preset thought chain template is: Identify the cause of symptoms - Determine accompanying symptoms - Provide medical advice - Recommend treatment plan. For a virtual character dialogue application, the preset thought chain template is: Question 1 - Question 2. For a code writing question-and-answer system, the preset thought chain template is: Explain usage - Explain syntax rules - Provide example methods.

[0229] Using a natural language model, the sample task problem is analyzed based on multiple document fragments to obtain a tag thinking chain composed of multiple tag task sub-problems corresponding to the sample task problem. One possible approach is to use a natural language model to analyze the execution order of the steps of the sample task problem based on multiple document fragments, and generate multiple tag task sub-problems based on the execution order of the steps. Then, the multiple tag task sub-problems and related document fragments are concatenated to obtain a tag thinking chain composed of multiple tag task sub-problems corresponding to the sample task problem.

[0230] For example, the sample task question is: "What types of travel packages does this travel agency offer, and what services are included in these packages?"

[0231] Document snippet 1: We offer three types of travel packages: luxury tours, adventure tours, and family tours.

[0232] Document Fragment 2: Luxury tour packages require booking 30 days in advance and a 50% deposit. Adventure tour packages require booking 15 days in advance and a 30% deposit. Family tour packages require booking 10 days in advance and a 20% deposit.

[0233] The execution order of steps for analyzing sample task problems using natural language models based on multiple document fragments is as follows:

[0234] Step 1: Determine the specific type of travel package:

[0235] The document fragment 1 was analyzed using natural language models (such as Transformer, BERT, etc.) to extract key information.

[0236] Identify the types of travel packages mentioned in document fragment 1: luxury tours, adventure tours, and family tours.

[0237] Output:

[0238] Tag Task Sub-Question 1: Determine the specific type of travel package

[0239] Document snippets related to sub-question 1 of the tag task: Document: Travel agency product introduction; Document snippet: We offer three types of travel packages: luxury tours, adventure tours, and family tours.

[0240] Step 2: Determine the booking process for each tour package

[0241] Document fragment 2 was analyzed using a natural language model to extract key information.

[0242] Identify the booking process for each travel package, including booking time and deposit percentage:

[0243] Luxury tour: Book 30 days in advance and pay a 50% deposit.

[0244] Adventure tours: Book 15 days in advance and pay a 30% deposit.

[0245] Family trips: Book 10 days in advance and pay a 20% deposit.

[0246] Output:

[0247] Tag Task Sub-Question 2: Determine the booking process for each travel package.

[0248] Document snippets related to sub-question 2 of the tag task: Document: Booking Guide; Document snippet: Booking luxury tour packages requires booking 30 days in advance and paying a 50% deposit. Booking adventure tour packages requires booking 15 days in advance and paying a 30% deposit. Booking family tour packages requires booking 10 days in advance and paying a 20% deposit.

[0249] Generate a tag mind chain

[0250] Sample task question: What types of travel packages does this travel agency offer, and what services are included in these packages?

[0251] Tag Task Sub-Question 1: Determine the specific type of travel package

[0252] Document snippets related to sub-question 1 of the tag task: Document: Travel agency product introduction; Document snippet: We offer three types of travel packages: luxury tours, adventure tours, and family tours.

[0253] Tag Task Sub-Question 2: Determine the booking process for each travel package.

[0254] Document snippets related to sub-question 2 of the tag task: Document: Booking Guide; Document snippet: Booking luxury tour packages requires booking 30 days in advance and paying a 50% deposit. Booking adventure tour packages requires booking 15 days in advance and paying a 30% deposit. Booking family tour packages requires booking 10 days in advance and paying a 20% deposit.

[0255] ...

[0256] For example, the sample task question is: "What types of travel packages does this travel agency offer, and what services are included in these packages?"

[0257] Document snippet 1: We offer three types of travel packages: luxury tours, adventure tours, and family tours.

[0258] Document Fragment 2: Luxury tour packages require booking 30 days in advance and a 50% deposit. Adventure tour packages require booking 15 days in advance and a 30% deposit. Family tour packages require booking 10 days in advance and a 20% deposit.

[0259] The preset thought process template is as follows:

[0260] Determine the specific type - determine the content of each type - determine the process of each type - determine the price range of each type.

[0261] Based on a pre-defined thought chain template, the sample task problem is broken down into multiple document fragments to obtain a tagged thought chain consisting of multiple tagged task sub-problems corresponding to the sample task problem:

[0262] Sample task question: What types of travel packages does this travel agency offer, and what services are included in these packages?

[0263] -Sub-task 1: Determine the specific type of travel package;

[0264] -Document snippets related to sub-question 1 of the tag task: Document: Travel agency product introduction; Document snippet: We offer three types of travel packages: luxury tours, adventure tours, and family tours;

[0265] --Sub-task 2: Determine the booking process for each tour package;

[0266] --Document excerpts related to sub-question 2 of the tag task: Document: Booking Guide; Document excerpt: Booking luxury tour packages requires booking 30 days in advance and paying a 50% deposit. Booking adventure tour packages requires booking 15 days in advance and paying a 30% deposit. Booking family tour packages requires booking 10 days in advance and paying a 20% deposit;

[0267] ...

[0268] In the embodiments of this specification, the label thinking chain corresponding to the sample reasoning task is constructed by using a preset thinking chain template or by using a natural language model. This method ensures the structuring and standardization of the label thinking chain, enabling the model to learn and simulate complex reasoning processes more accurately, improving the model's reasoning ability and logic, enhancing its robustness in handling multi-hop and complex tasks, and significantly improving the model's performance and user experience in practical applications.

[0269] In one optional embodiment of this specification, the following specific steps are included before step 404:

[0270] Obtain the mapping relationship between documents and document fragments in the target corpus; use the initial inference model to predict the predicted mapping relationship between documents and document fragments; based on the predicted mapping relationship and the mapping relationship, train the initial inference model to obtain the memory inference model.

[0271] In the embodiments of this specification, a mapping relationship between documents and document fragments in the target corpus is constructed through self-supervised training. For each document in the target corpus, each document fragment is used as input, and the initial inference model is trained to map these inputs back to the original document. This enables the initial inference model to memorize and understand the structure and content of the entire target corpus, thereby accurately locating the source document of a specific document fragment. This lays the foundation for subsequent training to decompose task problems and retrieve relevant information. This memorization stage allows the target inference model, trained in two stages, to fully understand the target corpus. This helps to consider the structural information and actual content of the target corpus when decomposing problems, reducing erroneous problem decomposition caused by the target inference model's lack of understanding of the target corpus. For example, for a task problem such as "querying the detailed sales of Company A for the past 5 years," if a summary document of Company A's sales exists in the target corpus, it can be directly queried; if such a summary document does not exist, it needs to be decomposed into multiple sub-task problems of querying annual sales.

[0272] The mapping relationship between documents and document fragments is a data structure used to represent the belonging relationship between documents and document fragments. It is used to characterize the structural information of the target corpus. The mapping relationship helps the inference model to quickly locate specific document fragments in relevant documents, thereby supporting efficient and accurate retrieval. It can be represented in the form of trie, triple data, graph data, key-value pairs, etc.

[0273] The predicted mapping relationship is the mapping relationship prediction generated by the initial inference model based on documents and document fragments in the target corpus. The initial inference model attempts to learn the association between documents and document fragments and generates a predicted mapping relationship. The predicted mapping relationship can be a probability distribution, similarity score, or other form of association representation between documents and document fragments.

[0274] The initial inference model is trained based on the predicted mapping relationship and the mapping relationship. One possible approach is to determine the loss value based on the predicted mapping relationship and the mapping relationship, and then adjust the model parameters of the initial inference model based on the loss value. The loss value includes, but is not limited to, the cross-entropy loss value. Further, the model parameters of the initial inference model are adjusted based on the loss value. One possible approach is to adjust the model parameters of the initial inference model using a gradient update method based on the loss value.

[0275] For example, obtain the mapping relationship of the corpus of tourism products for the intelligent customer service platform:

[0276] Document 1: Introduction to Luxury Tour Packages from Travel Agency A:

[0277] -Document Fragment 1-1: Luxury tour packages include luxury hotel accommodations;

[0278] -Document Fragment 1-2: Luxury tour packages include private tour guide services;

[0279] Document 2: Introduction to Adventure Tour Packages from Travel Agency A:

[0280] -Document Fragment 2-1: Adventure tour packages include outdoor adventure activities;

[0281] -Document Fragment 2-2: Adventure tour packages include professional guides and camping equipment;

[0282] Document 3: Introduction to Family Tour Packages from Travel Agency A:

[0283] -Document fragment 3-1: Family travel packages include parent-child activities;

[0284] - Document Fragment 3-2: Family travel packages offer children's entertainment facilities and family-friendly accommodations.

[0285] The initial inference model receives each document fragment as input and attempts to predict which document the fragment belongs to. For example, for document fragment 1-1 (“Luxury tour packages include luxury hotel accommodations”), the initial inference model generates a predicted document representing the probability distribution or similarity score of the fragment belonging to document 1, thus obtaining the predicted mapping relationship for the entire corpus.

[0286] Based on the predicted mapping relationship and the mapping relationship, the contrastive loss value is calculated. Based on the contrastive loss value, the model parameters of the initial inference model are adjusted by the provision update method. When the training termination condition is met, the memory inference model is obtained.

[0287] It should be noted that the technical solutions of the embodiments in this specification and the technical solutions of the task reasoning method described above belong to the same concept. For details not described in detail in the technical solutions of the embodiments in this specification, please refer to the description of the technical solutions of the task reasoning method described above.

[0288] In the embodiments of this specification, a mapping relationship between documents and document fragments in the target corpus is constructed through self-supervised training. The initial inference model can fully understand the structural information of the target corpus, which helps the target inference model to better learn to decompose complex problems and retrieve relevant information to generate inferences in subsequent model training.

[0289] Figure 5 A schematic flowchart of a model training method provided in one embodiment of this specification is shown, such as... Figure 5 As shown:

[0290] Using document fragments from the target corpus as input for self-supervised training and documents from the target corpus as output for self-supervised training, self-supervised training is performed based on the mapping relationship between document fragments and documents in the target corpus, enabling the inference model to learn the trie of the target corpus and obtain a self-supervised training memory inference model.

[0291] The sample task question, "Which hotel company owns Hotel A, and in which city is the hotel company headquartered?", is input into a memory reasoning model. The model is then used to break down the sample task question into multiple sub-questions. Based on a learned trie, the model retrieves relevant document fragments from the target corpus for each sub-question: Sub-question 1: Document: Hotel A introduction, Document fragment: ... The model proceeds step-by-step, following a thought chain, until the predicted result is obtained: The hotel company is located in city B.

[0292] Based on the results of the prediction task and the labeling task, the memory reasoning model is trained to obtain the target reasoning model.

[0293] See Figure 6 , Figure 6 This specification illustrates a flowchart of a dialogue question-and-answer method according to an embodiment, applied to the server side of an intelligent customer service platform, including the following specific steps:

[0294] Step 602: Receive a dialogue task request sent by the front end of the intelligent customer service platform, wherein the dialogue task request carries the task question of the dialogue task.

[0295] An intelligent customer service platform is a virtual platform based on artificial intelligence technology. Through technologies such as natural language processing and deep learning, it automatically answers user questions and provides relevant services. Intelligent customer service platforms can be applied to various scenarios, such as product inquiries, technical support, and after-sales service.

[0296] The server-side of an intelligent customer service platform handles user requests, invokes inference models, and generates responses. It receives requests from the front-end, processes them, and returns the results. The server typically includes multiple components, such as an API interface, a task scheduler, data storage, and an inference model invocation module. The server communicates with the front-end through the API interface, receives user dialogue task requests, invokes a pre-trained target inference model to decompose and infer the task, and ultimately generates a task response.

[0297] The front end of the intelligent customer service platform is the part where users interact with the platform. It is responsible for receiving the task questions sent by users and displaying the generated task answers.

[0298] A dialogue task request is an instruction request sent from the front end of the intelligent customer service platform to the server, containing the task question raised by the user and other relevant information. For example, a dialogue task request is represented in JSON format or other structured data formats, containing information such as the user's question, user ID, and session ID. After receiving the request, the server parses it and calls the corresponding inference model for processing.

[0299] Dialogue tasks are specific questions or requests raised by users through the intelligent customer service platform, requiring the system to resolve them through reasoning. Dialogue tasks can involve various types of questions, such as product feature inquiries, price checks, and after-sales service requests. Each dialogue task contains one or more task questions, which the platform needs to break down, retrieve relevant information from, and generate task responses.

[0300] A task problem is a specific natural language question describing a dialogue task, typically one or more specific questions posed by the user. Task problems generally exhibit high complexity and are difficult to solve directly through model reasoning. They often require the introduction of external information as supplementary knowledge and a multi-step reasoning process to arrive at an accurate task response.

[0301] For example, a user asks the following question on the intelligent customer service platform of an electronics sales website: "What is the processor model of this laptop? What are its memory and storage capacities?" The server of the intelligent customer service platform receives the dialogue task request sent by the front end of the intelligent customer service platform, wherein the dialogue task request carries the question.

[0302] The system receives dialogue task requests sent from the front end of the intelligent customer service platform. These requests carry the task questions, providing a data foundation for subsequent decomposition into multiple sub-questions and subsequent retrieval of multiple related document fragments.

[0303] Step 604: Using a pre-trained target reasoning model, the task problem is decomposed to obtain multiple task sub-problems of the dialogue task. Document fragments related to multiple task sub-problems are retrieved from the documents in the intelligent customer service corpus. These document fragments are used as context information for the dialogue task to infer the related multiple task sub-problems and obtain the task response for the dialogue task. The target reasoning model is obtained by training a memory reasoning model based on multiple sample task problems of the sample dialogue task, multiple labeled task sub-problems and labeled task responses corresponding to the sample task problems, and the mapping relationship between documents and document fragments in the intelligent customer service corpus.

[0304] An intelligent customer service corpus is a collection of documents used to solve dialogue tasks on an intelligent customer service platform. It contains rich information related to the dialogue tasks to support the inference process. Intelligent customer service corpora typically include documents such as product manuals, frequently asked questions, customer feedback records, technical specifications, price lists, and after-sales service policies. These documents provide the necessary external knowledge for the inference model, enabling it to handle more complex tasks.

[0305] Sample dialogue tasks are specific problems or needs used as training data, which are then solved through model reasoning. Sample dialogue tasks are used to train the target reasoning model, helping the model learn how to handle various types of task problems. Sample dialogue tasks typically include a sample task problem and a corresponding labeled task response.

[0306] Sample task questions are natural language questions used as training data, describing specific questions related to sample dialogue tasks. These questions are used to train the target inference model, helping it learn how to understand and handle various types of user questions. Sample task questions typically appear in pairs with labeled task responses.

[0307] The label task response is the correct natural language response to the sample dialogue task, which is used as the target output of the training objective reasoning model to provide a learning objective for model training.

[0308] The mapping relationship between documents and document fragments in the intelligent customer service corpus is a data structure used to represent the relationship between documents and document fragments, characterizing the structural information of the intelligent customer service corpus. This mapping relationship helps the inference model quickly locate specific document fragments within relevant documents, thus supporting efficient and accurate retrieval. The mapping relationship can be represented as a trie, triplet data, graph data, key-value pairs, etc.

[0309] The task response is a specific natural language answer generated by the target inference model in response to a user's question or request. The task response is a coherent and complete answer generated by the target inference model through a multi-step inference process, combining multiple document fragments as contextual information. This multi-step inference process ensures a high degree of accuracy and completeness in the task response.

[0310] For example, the goal-oriented reasoning model decomposes the task problem into the following sub-problems:

[0311] Task Sub-problem 1: Determine the processor model of the laptop.

[0312] Sub-question 2: Determine the memory capacity of the laptop.

[0313] Sub-question 3: Determine the storage capacity of the laptop.

[0314] Then, the target inference model retrieves document fragments related to these task sub-problems from the intelligent customer service corpus:

[0315] Document snippet related to sub-question 1: Document: Product Specification Sheet, Document snippet: "This laptop is equipped with a high-performance processor."

[0316] Document snippet related to sub-question 2: Document: Product Specification Sheet, Document snippet: "This laptop is equipped with a large capacity of memory."

[0317] Document snippet related to sub-question 3: Document: Product Specification Sheet, Document snippet: "This laptop has ample storage capacity."

[0318] The target reasoning model uses the three document fragments mentioned above as contextual information for the dialogue task, and infers the three task sub-questions accordingly to obtain the task response for the dialogue task: "This laptop is equipped with a high-performance processor, large-capacity memory, and very ample storage capacity."

[0319] By integrating multi-step reasoning and contextual information, the target reasoning model generates accurate and coherent task responses, improving the structure, logic, and accuracy of the task responses.

[0320] Step 606: Send the task response back to the front end.

[0321] For example, the server returns the generated task response to the front end via an API interface, and the front end displays it to the user.

[0322] It should be noted that the technical solutions of the embodiments in this specification and the technical solutions of the task reasoning method described above belong to the same concept. For details not described in detail in the technical solutions of the embodiments in this specification, please refer to the description of the technical solutions of the task reasoning method described above.

[0323] In the embodiments of this specification, the target reasoning model is not only trained based on multiple sample task questions of the sample dialogue task and multiple labeled task sub-questions and labeled task responses corresponding to the sample task questions, but also further trained on the memory reasoning model obtained by training the initial reasoning model based on the mapping relationship between documents and document fragments of the intelligent customer service corpus. This integrated approach enables a single target reasoning model to independently complete question decomposition, retrieval, and reasoning generation to perform dialogue tasks, solving the problem of weak collaboration between the retrieval unit and the reasoning model. It can use the reasoning ability of the reasoning model to assist retrieval, and can also perform reasonable question decomposition by pre-memorizing the document structure of the intelligent customer service corpus, realizing a seamless combination of information retrieval and reasoning processes, improving the structure, logic, and accuracy of dialogue question answering, and enhancing the user experience.

[0324] Corresponding to the above method embodiments, this specification also provides task platform embodiments. Figure 7 A schematic diagram of the structure of a task platform provided in one embodiment of this specification is shown. Figure 7 As shown, the task platform 700 includes a first training interface 702 and a response unit 704;

[0325] The first training interface 702 is used to receive a first training request sent by the first terminal, wherein the first training request carries a sample task problem of the sample inference task, multiple label task sub-problems corresponding to the sample task problem, and label task results corresponding to the sample task problem.

[0326] The response unit 704 is used to decompose the sample task problem using a memory reasoning model to obtain multiple sample task sub-problems of the sample reasoning task, retrieve document fragments related to multiple sample task sub-problems, use multiple document fragments as context information of the sample reasoning task, reason about the multiple sample task sub-problems related to the sample reasoning task, obtain the prediction task result of the sample reasoning task, and train the memory reasoning model based on multiple sample task sub-problems, multiple label task sub-problems, prediction task result and label task result to obtain the target reasoning model. The memory reasoning model is obtained by training the initial reasoning model based on the mapping relationship between documents and document fragments in the target corpus. The target reasoning model is used to perform the target reasoning task of the above task reasoning method.

[0327] Task Platform 700 is an integrated virtual platform with model training capabilities, used to train inference models adapted to the target inference task to solve complex task problems. Task Platform 700 includes multiple interfaces and units, capable of receiving corresponding training requests and completing the corresponding model training.

[0328] The first training interface 702 is a component of the task platform 700, used to receive the first training request from a first terminal (such as a developer or administrator). The first training interface 702 is responsible for receiving and parsing the training request, and passing the sample data to the response unit 704 for processing. In this way, the task platform 700 can train a high-performance target inference model based on a large amount of sample data.

[0329] The response unit 704 is the core processing unit of the task platform 700, responsible for executing model training and inference tasks. Based on the received training requests and sample data, it trains the memory inference model to obtain the target inference model, or trains the initial inference model to obtain the memory inference model.

[0330] In the embodiments of this specification, the model training performed in the response unit of the task platform involves training the target inference model not only based on multiple sample task questions of the sample inference task and multiple labeled task sub-questions and labeled task results corresponding to the sample task questions, but also further training on the memory inference model obtained by training the initial inference model based on the mapping relationship between documents and document fragments of the target corpus. This integrated approach allows a single target inference model to independently complete question decomposition, retrieval, and inference generation to perform the target inference task, solving the problem of weak collaboration between the retrieval unit and the inference model. It can use the inference ability of the inference model to assist retrieval, and can also perform reasonable question decomposition by pre-memorizing the document structure of the target corpus, achieving a seamless integration of information retrieval and inference processes, obtaining a high-performance target inference model, and providing model support for improving the structure, logic, and accuracy of task inference.

[0331] Optionally, the task platform 700 also includes a second training interface; the second training interface is used to receive a second training request sent by a second terminal;

[0332] The response unit 704 is also configured to respond to the second training request by obtaining the mapping relationship between documents and document fragments in the target corpus, using the initial inference model to predict the predicted mapping relationship between documents and document fragments, and training the initial inference model based on the predicted mapping relationship and the mapping relationship to obtain the memory inference model.

[0333] The second training interface is a component of the task platform 700, used to receive self-supervised learning training requests from a second terminal (such as a developer or administrator). These training requests are used to trigger the training of the initial inference model to obtain the memory inference model.

[0334] In the embodiments of this specification, the model training performed in the response unit of the task platform constructs the mapping relationship between documents and document fragments in the target corpus through self-supervised training. The initial inference model can fully understand the structural information of the target corpus, which helps the target inference model to better learn to decompose complex problems and retrieve relevant information to generate inferences in subsequent model training.

[0335] The above is an illustrative scheme of a task platform according to this embodiment. It should be noted that the technical solution of this task platform and the technical solution of the model training method described above belong to the same concept. For details not described in detail in the technical solution of the task platform, please refer to the description of the technical solution of the model training method described above.

[0336] Corresponding to the above method embodiments, this specification also provides embodiments of a task reasoning device. Figure 8 A schematic diagram of a task reasoning device according to one embodiment of this specification is shown. Figure 8 As shown, the device includes:

[0337] The first acquisition module 802 is configured to acquire the task problem of the target reasoning task;

[0338] The first reasoning module 804 is configured to decompose the task problem using a pre-trained target reasoning model to obtain multiple task sub-problems of the target reasoning task. It retrieves document fragments related to multiple task sub-problems from documents in the target corpus, uses these document fragments as context information for the sample reasoning task, and infers the corresponding multiple task sub-problems to obtain the task result of the target reasoning task. The target reasoning model is obtained by training a memory reasoning model based on multiple sample task problems of the sample reasoning task, multiple labeled task sub-problems corresponding to the sample task problems, and labeled task results. The memory reasoning model is obtained by training an initial reasoning model based on the mapping relationship between documents and document fragments in the target corpus. The target reasoning model is used to execute the target reasoning task of the above task reasoning method.

[0339] Optionally, the device further includes: a first construction module configured to construct a thought chain corresponding to the target reasoning task based on multiple task sub-problems and document fragments related to the multiple task sub-problems; correspondingly, the first reasoning module 804 is further configured to: use multiple document fragments as context information of the target reasoning task, and gradually reason out multiple related task sub-problems according to the thought chain to obtain the task result of the target reasoning task.

[0340] Optionally, the thought chain includes steps corresponding to multiple task sub-problems; correspondingly, the first reasoning module 804 is further configured to: use the first document fragment as the context information of the target reasoning task, reason about the first task sub-problem, and obtain the first task sub-result, wherein the first document fragment and the first task sub-problem correspond to the first step, and the first step is any one of the multiple steps in the thought chain; update the first step to the next step in the thought chain, return to execute the step of using the first document fragment as the context information of the target reasoning task, reasoning about the first task sub-problem, and obtaining the first task sub-result, until the task sub-results corresponding to each step in the thought chain are obtained; and determine the task result of the target reasoning task based on the task sub-results corresponding to multiple steps.

[0341] Optionally, the device further includes: a first pruning module configured to determine whether the first step is a valid step based on the matching degree between the task problem and the first task sub-result; if not, to remove the first step from the thought chain.

[0342] Optionally, the thought chain includes at least one thought branch; correspondingly, the device further includes: a first evaluation module configured to determine a target thought branch from at least one thought branch based on the matching degree between the task problem and the task sub-results corresponding to each step in the at least one thought branch; correspondingly, the first reasoning module 804 is further configured to: determine the task result of the target reasoning task based on the task sub-results corresponding to each step in the target thought branch.

[0343] In the embodiments of this specification, the target reasoning model is not only trained based on multiple sample task questions and labeled task results of the sample reasoning task, but also further trained on the memory reasoning model obtained by training the initial reasoning model based on the mapping relationship between documents and document fragments in the target corpus. This integrated approach enables a single target reasoning model to independently complete question decomposition, retrieval, and reasoning generation to perform the target reasoning task, solving the problem of weak collaboration between the retrieval unit and the reasoning model. It can use the reasoning ability of the reasoning model to assist retrieval, and can also perform reasonable question decomposition by pre-memorizing the document structure of the target corpus, realizing a seamless combination of information retrieval and reasoning process, and improving the structure, logic, and accuracy of task reasoning.

[0344] The above is an illustrative scheme of a task reasoning device according to this embodiment. It should be noted that the technical solution of this task reasoning device and the technical solution of the task reasoning method described above belong to the same concept. For details not described in detail in the technical solution of the task reasoning device, please refer to the description of the technical solution of the task reasoning method described above.

[0345] Corresponding to the above method embodiments, this specification also provides embodiments of a model training device. Figure 9 A schematic diagram of a model training apparatus provided in one embodiment of this specification is shown. Figure 9 As shown, the device includes:

[0346] The second acquisition module 902 is configured to acquire the sample task question and the label task result of the sample reasoning task.

[0347] The second reasoning module 904 is configured to use a memory reasoning model to decompose the sample task problem, obtain multiple sample task sub-problems of the sample reasoning task, retrieve document fragments related to multiple sample task sub-problems, use multiple document fragments as context information of the sample reasoning task, reason about the multiple sample task sub-problems related to the sample reasoning task, and obtain the prediction task result of the sample reasoning task. The memory reasoning model is based on the mapping relationship between documents and document fragments in the target corpus and is obtained by training the initial reasoning model.

[0348] Training module 906 is configured to train a memory reasoning model based on multiple sample task sub-problems and multiple labeled task sub-problems, as well as prediction task results and labeled task results, to obtain a target reasoning model. The target reasoning model is used to perform the target reasoning task of the above task reasoning method.

[0349] Optionally, the device further includes: a second construction module configured to construct a sample thought chain corresponding to the sample reasoning task based on text fragments related to multiple sample sub-problems and multiple sample task sub-problems; correspondingly, the second reasoning module 904 is further configured to: use multiple document fragments as context information of the sample reasoning task, and gradually reason out multiple related sample task sub-problems according to the sample thought chain to obtain the prediction task result of the sample reasoning task.

[0350] Optionally, a label thinking chain is pre-constructed for multiple labeled task sub-problems corresponding to the sample task problem and the labeled task results corresponding to the sample task problem; correspondingly, the device further includes: an adding module configured to add the prediction task results to the sample thinking chain to obtain the prediction thinking chain; correspondingly, the training module 906 is further configured to: compare multiple sample task sub-problems in the prediction thinking chain and multiple labeled task sub-problems in the label thinking chain, as well as the prediction task results in the prediction thinking chain and the labeled task results in the label thinking chain, to determine the loss value; based on the loss value, train the memory reasoning model to obtain the target reasoning model.

[0351] Optionally, the device further includes: a tag thinking chain construction module, configured to acquire multiple document fragments related to the sample task problem; and to analyze the sample task problem based on the multiple document fragments using a natural language model to obtain a tag thinking chain composed of multiple tag task sub-problems corresponding to the sample task problem, or to decompose the sample task problem based on multiple document fragments according to a preset thinking chain template to obtain a tag thinking chain composed of multiple tag task sub-problems corresponding to the sample task problem.

[0352] Optionally, the device further includes: a memory training module configured to acquire the mapping relationship between documents and document fragments in the target corpus; predict the predicted mapping relationship between documents and document fragments using an initial inference model; and train the initial inference model based on the predicted mapping relationship and the mapping relationship to obtain a memory inference model.

[0353] In the embodiments of this specification, the target reasoning model is not only trained based on multiple sample task questions of the sample reasoning task and multiple labeled task sub-questions and labeled task results corresponding to the sample task questions, but also further trained on the memory reasoning model obtained by training the initial reasoning model based on the mapping relationship between documents and document fragments of the target corpus. This integrated approach enables a single target reasoning model to independently complete question decomposition, retrieval, and reasoning generation to perform the target reasoning task, solving the problem of weak collaboration between the retrieval unit and the reasoning model. It can use the reasoning ability of the reasoning model to assist retrieval, and can also perform reasonable question decomposition by pre-memorizing the document structure of the target corpus, realizing a seamless combination of information retrieval and reasoning processes, obtaining a high-performance target reasoning model, and providing model support for improving the structure, logic, and accuracy of task reasoning.

[0354] The above is an illustrative scheme of a model training device according to this embodiment. It should be noted that the technical solution of this model training device and the technical solution of the model training method described above belong to the same concept. For details not described in detail in the technical solution of the model training device, please refer to the description of the technical solution of the model training method described above.

[0355] Corresponding to the above method embodiments, this specification also provides embodiments of a dialogue question-and-answer device. Figure 10 A schematic diagram of a dialogue question-and-answer device according to one embodiment of this specification is shown. Figure 10 As shown, the device includes:

[0356] The receiving module 1002 is configured to receive a dialogue task request sent by the front end of the intelligent customer service platform, wherein the dialogue task request carries the task question of the dialogue task.

[0357] The third reasoning module 1004 is configured to use a pre-trained target reasoning model to decompose the task problem, obtain multiple task sub-problems of the dialogue task, retrieve document fragments related to multiple task sub-problems from the documents of the intelligent customer service corpus, use multiple document fragments as context information of the dialogue task, reason about the multiple task sub-problems related to the dialogue task, and obtain the task response of the dialogue task. The target reasoning model is obtained by training a memory reasoning model based on multiple sample task problems of the sample dialogue task and multiple labeled task sub-problems and labeled task responses corresponding to the sample task problems. The memory reasoning model is obtained by training an initial reasoning model based on the mapping relationship between documents and document fragments of the intelligent customer service corpus.

[0358] Feedback module 1006 is configured to send task responses back to the front end.

[0359] In the embodiments of this specification, the target reasoning model is not only trained based on multiple sample task questions of the sample dialogue task and multiple labeled task sub-questions and labeled task responses corresponding to the sample task questions, but also further trained on the memory reasoning model obtained by training the initial reasoning model based on the mapping relationship between documents and document fragments of the intelligent customer service corpus. This integrated approach enables a single target reasoning model to independently complete question decomposition, retrieval, and reasoning generation to perform dialogue tasks, solving the problem of weak collaboration between the retrieval unit and the reasoning model. It can use the reasoning ability of the reasoning model to assist retrieval, and can also perform reasonable question decomposition by pre-memorizing the document structure of the intelligent customer service corpus, realizing a seamless combination of information retrieval and reasoning processes, improving the structure, logic, and accuracy of dialogue question answering, and enhancing the user experience.

[0360] The above is an illustrative scheme of a dialogue question-and-answer device according to this embodiment. It should be noted that the technical solution of this dialogue question-and-answer device and the technical solution of the dialogue question-and-answer method described above belong to the same concept. For details not described in detail in the technical solution of the dialogue question-and-answer device, please refer to the description of the technical solution of the dialogue question-and-answer method described above.

[0361] Figure 11 A structural block diagram of a computing device provided in one embodiment of this specification is shown.

[0362] The computing device 1100 includes: a memory 1110 and a processor 1120;

[0363] The memory 1110 is used to store computer programs / instructions, and the processor 1120 is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor 1120, they implement the steps of the above-mentioned task reasoning method, model training method, or dialogue question answering method.

[0364] In one or more embodiments of this specification, the computing device can be understood as an integrated smart terminal, including but not limited to a server, desktop computer, PC (Personal Computer), all-in-one model machine, mobile phone, tablet computer or other portable smart terminal, etc., and the computing device may have the model of the above embodiments of this application pre-installed.

[0365] Specifically, this computing device can pre-install various types of models, including but not limited to models in natural language processing, visual processing, speech processing, code processing, and multimodal task processing, thus providing diverse model selection. In different product forms, this computing device can support one or more model usage methods, including but not limited to model training, model invocation, model fine-tuning, model deployment, model inference, and application. In some product forms, this computing device also supports model management, including but not limited to multi-type model management (supporting the management of discriminative, generative, and other types of models), model version control (supporting the control of different model versions), and model evaluation (evaluating model performance and effectiveness based on model evaluation tools). In other product forms, this computing device can also create applications based on models, providing API (Application Programming Interface) calling capabilities. Users can call models into created applications through the API interface, and application management tools are also provided to manage and monitor the applications.

[0366] Furthermore, the computing device may also include data management (supporting the creation and management of model tuning datasets), a training center (providing abundant training resources to help users learn and master AI technology), and basic control capabilities (providing enterprise-level basic control capabilities to ensure the security and efficient operation of the system). Through the above functions, it provides a comprehensive and integrated device for AI development, training, deployment, and application.

[0367] Figure 12 A structural block diagram of an electronic device provided according to one embodiment of this specification is shown.

[0368] The electronic device includes a memory 1210 and a processor 1220, which are connected via a bus 1230. The memory 1210 is used to store computer programs / instructions, and the processor 1220 is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor 1220, they implement the steps of the method.

[0369] Electronic device 1200 may also include access device 1240, which enables electronic device 1200 to communicate with database 1250 storing data via one or more networks 1260. Examples of such networks 1260 include combinations of public switched telephone networks (PSTN), local area networks (LANs), wide area networks (WANs), personal area networks (PANs), or communication networks such as the Internet. Access device 1240 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Controller, or NIC), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.

[0370] In one embodiment of this specification, the above-described components of the electronic device 1200 and Figure 12 Other components, not shown, can also be connected to each other, for example, via bus 1230. It should be understood that... Figure 12 The block diagram of the electronic device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0371] Electronic device 1200 can be any type of stationary or mobile electronic device, including mobile computers or mobile electronic devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable electronic devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary electronic devices such as desktop computers or personal computers (PCs). Electronic device 1200 can also be a mobile or stationary server.

[0372] The above is an illustrative scheme of an electronic device according to this embodiment. It should be noted that the technical solution of this electronic device belongs to the same concept as the technical solutions of the task reasoning method, model training method, and dialogue question answering method described above. For details not described in detail in the technical solution of the electronic device, please refer to the descriptions of the technical solutions of the task reasoning method, model training method, or dialogue question answering method described above.

[0373] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described task reasoning method, model training method, or dialogue question-answering method.

[0374] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solutions of the task reasoning method, model training method, and dialogue question answering method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solutions of the task reasoning method, model training method, or dialogue question answering method described above.

[0375] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described task reasoning method, model training method, or dialogue question answering method.

[0376] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product belongs to the same concept as the technical solutions of the task reasoning method, model training method, and dialogue question answering method described above. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solutions of the task reasoning method, model training method, or dialogue question answering method described above.

[0377] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0378] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0379] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0380] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

[0381] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A task reasoning method, comprising: The task problem of obtaining the target reasoning task; Using a pre-trained target reasoning model, the task problem is decomposed to obtain multiple task sub-problems of the target reasoning task. Document fragments related to the multiple task sub-problems are retrieved from documents in the target corpus. These document fragments are used as context information for the target reasoning task, and the multiple task sub-problems related to the reasoning are inferred accordingly to obtain the task result of the target reasoning task. The target reasoning model is obtained by training a memory reasoning model based on multiple sample task problems of the sample reasoning task, multiple labeled task sub-problems corresponding to the sample task problems, and labeled task results. The memory reasoning model is obtained by training an initial reasoning model based on the mapping relationship between documents and document fragments in the target corpus.

2. The method according to claim 1, further comprising, before using multiple document fragments as context information for the target reasoning task, corresponding to the multiple task sub-problems related to the reasoning, and obtaining the task result of the target reasoning task: Based on the multiple task sub-problems and document fragments related to the multiple task sub-problems, construct the thought chain corresponding to the target reasoning task; The step of using multiple document fragments as context information for the target reasoning task, corresponding to the multiple task sub-problems related to reasoning, and obtaining the task result of the target reasoning task includes: Using multiple document fragments as contextual information for the target reasoning task, the task results of the target reasoning task are obtained by progressively reasoning through the multiple task sub-problems according to the thought chain.

3. The method according to claim 2, wherein the thought chain includes steps corresponding to the plurality of task sub-problems; The process of using multiple document fragments as contextual information and logically reasoning step-by-step according to the aforementioned thought chain to obtain the task result of the target reasoning task includes: Using the first document fragment as context information for the target reasoning task, reasoning is performed on the first task sub-problem to obtain the first task sub-result. The first document fragment and the first task sub-problem correspond to the first step, which is any one of the multiple steps in the thought chain. The first step is updated to the next step in the thought chain, and the execution of the first document fragment as the target reasoning task is returned, the first task sub-problem is reasoned, and the first task sub-result is obtained, until the task sub-results corresponding to each step in the thought chain are obtained; Based on the task sub-results corresponding to the multiple steps, the task result of the target reasoning task is determined.

4. The method according to claim 3, further comprising, before updating the first step to the next step in the thought chain: Based on the matching degree between the task problem and the first task sub-result, determine whether the first step is a valid step; If not, remove the first step from the thought chain.

5. The method according to claim 3, wherein the thought chain includes at least one thought branch; Before determining the task result of the target inference task based on the task sub-results corresponding to the multiple steps, the method further includes: Based on the matching degree between the task problem and the task sub-results corresponding to each step in the at least one thought branch, the target thought branch is determined from the at least one thought branch. The process of determining the task result of the target reasoning task based on the task sub-results corresponding to the multiple steps includes: Based on the task sub-results corresponding to each step in the target thinking branch, the task result of the target reasoning task is determined.

6. A model training method, comprising: Obtain the sample task problem of the sample reasoning task, the multiple labeled task sub-problems corresponding to the sample task problem, and the labeled task results corresponding to the sample task problem; The sample task problem is decomposed using a memory reasoning model to obtain multiple sample task sub-problems of the sample reasoning task. Document fragments related to the multiple sample task sub-problems are retrieved. The multiple document fragments are used as context information of the sample reasoning task. The multiple sample task sub-problems related to the reasoning are inferred accordingly to obtain the prediction task result of the sample reasoning task. The memory reasoning model is obtained by training an initial reasoning model based on the mapping relationship between documents and document fragments in the target corpus. Based on the multiple sample task sub-problems and the multiple labeled task sub-problems, as well as the predicted task results and the labeled task results, the memory reasoning model is trained to obtain a target reasoning model, wherein the target reasoning model is used to perform the target reasoning task of the task reasoning method according to any one of claims 1 to 5.

7. The method according to claim 6, further comprising, before using the plurality of document fragments as context information for the sample inference task, correspondingly inferring the plurality of sample task sub-problems related to the inference, and obtaining the prediction task result of the sample inference task: Based on the text fragments related to the multiple sample sub-problems and the multiple sample task sub-problems, construct the sample thought chain corresponding to the sample reasoning task; The step of using the multiple document fragments as context information for the sample inference task, corresponding to the multiple sample task sub-problems related to the inference, and obtaining the prediction task result of the sample inference task includes: Using multiple document fragments as contextual information for the sample reasoning task, the related sub-problems of the sample task are reasoned step by step according to the sample thought chain to obtain the prediction result of the sample reasoning task.

8. The method according to claim 6, wherein the multiple labeled task sub-problems corresponding to the sample task problem and the labeled task results corresponding to the sample task problem are pre-constructed with a labeled thought chain; Before training the memory reasoning model based on the multiple sample task sub-problems and the multiple labeled task sub-problems, as well as the prediction task results and the labeled task results, to obtain the target reasoning model, the method further includes: The prediction task results are added to the sample thinking chain to obtain the prediction thinking chain; The process of training the memory reasoning model based on the multiple sample task sub-problems and the multiple labeled task sub-problems, as well as the prediction task results and the labeled task results, to obtain the target reasoning model includes: By comparing the multiple sample task sub-problems in the prediction thinking chain with the multiple label task sub-problems in the label thinking chain, as well as the prediction task results in the prediction thinking chain and the label task results in the label thinking chain, the loss value is determined. Based on the loss value, the memory reasoning model is trained to obtain the target reasoning model.

9. The method according to claim 8, further comprising, before determining the loss value by comparing the plurality of sample task sub-problems in the prediction thinking chain and the plurality of label task sub-problems in the label thinking chain, and the prediction task results in the prediction thinking chain and the label task results in the label thinking chain: Obtain multiple document fragments related to the sample task problem; Using a natural language model, the sample task problem is analyzed based on the multiple document fragments to obtain a tag thinking chain composed of multiple tag task sub-problems corresponding to the sample task problem. Alternatively, the sample task problem is decomposed based on the multiple document fragments according to a preset thinking chain template to obtain a tag thinking chain composed of multiple tag task sub-problems corresponding to the sample task problem.

10. The method according to any one of claims 6-9, further comprising, before decomposing the sample task problem using a memory reasoning model to obtain multiple sample task sub-problems of the sample reasoning task, retrieving document fragments related to the multiple sample task sub-problems, using the multiple document fragments as context information of the sample reasoning task, and reasoning the related multiple sample task sub-problems to obtain the prediction task result of the sample reasoning task: Obtain the mapping relationship between documents and document fragments in the target corpus; Using an initial inference model, predict the predicted mapping relationship between the document and the document fragment; Based on the predicted mapping relationship and the mapping relationship, the initial reasoning model is trained to obtain the memory reasoning model.

11. A dialogue-based question-and-answer method, applied to the server side of an intelligent customer service platform, comprising: Receive a dialogue task request sent from the front end of the intelligent customer service platform, wherein the dialogue task request carries a task question for the dialogue task. Using a pre-trained target reasoning model, the task problem is decomposed to obtain multiple task sub-problems of the dialogue task. Document fragments related to the multiple task sub-problems are retrieved from the documents of the intelligent customer service corpus. These document fragments are used as context information for the dialogue task to infer the related multiple task sub-problems and obtain the task response for the dialogue task. The target reasoning model is obtained by training a memory reasoning model based on multiple sample task problems of the sample dialogue task, multiple labeled task sub-problems and labeled task responses corresponding to the sample task problems. The memory reasoning model is obtained by training an initial reasoning model based on the mapping relationship between documents and document fragments in the intelligent customer service corpus. The task response is fed back to the front end.

12. A task platform, comprising a first training interface and a response unit; The first training interface is used to receive a first training request sent by the first terminal, wherein... The first training request carries a sample task question for the sample reasoning task, multiple labeled task sub-questions corresponding to the sample task question, and labeled task results corresponding to the sample task question. The response unit is configured to use a memory reasoning model to decompose the sample task problem into multiple sample task sub-problems, retrieve document fragments related to the multiple sample task sub-problems, use the multiple document fragments as context information for the sample reasoning task, reason about the multiple sample task sub-problems accordingly, obtain the predicted task result of the sample reasoning task, and train the memory reasoning model based on the multiple sample task sub-problems, the multiple labeled task sub-problems, the predicted task result, and the labeled task result to obtain a target reasoning model. The memory reasoning model is obtained by training an initial reasoning model based on the mapping relationship between documents and document fragments in the target corpus. The target reasoning model is used to execute the target reasoning task of the task reasoning method according to any one of claims 1 to 5.

13. The platform according to claim 12 further includes a second training interface; The second training interface is used to receive a second training request sent by the second terminal; The response unit is further configured to respond to the second training request by obtaining the mapping relationship between documents and document fragments in the target corpus, using an initial inference model to predict the predicted mapping relationship between the documents and document fragments, and training the initial inference model based on the predicted mapping relationship and the mapping relationship to obtain a memory inference model.

14. A computing device, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 11.

15. An electronic device comprising: A memory and a processor, the memory and the processor being connected via a bus; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 11.

16. A computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.

17. A computer program product comprising a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 11.