Task processing method, text question-answering method, model hallucination evaluation method, retrieval augmentation method and task platform
By generating structured task data and using a large language model for contextual semantic analysis, the problem of insufficient accuracy of natural language models in handling long-distance dependencies and complex contextual situations is solved, thereby improving the accuracy and generalization ability of task processing.
Patent Information
- Application Number
- PCT/IB2025/054092
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-20
- Filing Date
- 2025-04-18
- Publication Date
- 2025-12-26
AI Technical Summary
Existing natural language models struggle to effectively understand long-distance dependencies and complex contextual situations when processing long, continuous task data, resulting in insufficient accuracy in task processing.
By performing semantic analysis on initial task data, structured task data with multiple semantic levels is generated. The target language task is then executed based on the structured task data. A large language model is used for contextual semantic analysis and reorganization to improve the accuracy and generalization ability of task processing.
It improves the accuracy and scope of task processing, enhances the generalization ability of task processing, and adapts to the needs of different language tasks.
Smart Images

Figure IB2025054092_26122025_PF_FP_ABST
Abstract
Description
[0001] The present disclosure claims the priority of Chinese patent application No. 202410804751.2, filed on June 20, 2024, with the title of "Task processing, text question answering, model hallucination evaluation, retrieval enhancement method and task platform", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD The embodiments of the present disclosure relate to the technical field of artificial intelligence, and in particular to a task processing method, a text question answering method, a model hallucination evaluation method, a retrieval enhancement method, and a task platform. BACKGROUND With the development of natural language processing (NLP) technology, natural language models perform well in executing different language tasks. At present, natural language models use linear and sequential processing methods to execute language tasks based on task data. However, there are still challenges in processing long and continuous task data, and it is often difficult to efficiently understand language tasks due to limited data processing capabilities, for example, when facing long-distance dependencies and complex context situations, which results in insufficient accuracy of task processing. Therefore, there is an urgent need for a high-accuracy task processing method. CONTENT The embodiments of the present disclosure provide a task processing method. One or more embodiments of the present disclosure also relate to a text question answering method, a model hallucination evaluation method, a retrieval enhancement method, a structured model training method, a task processing device, a text question answering device, a model hallucination evaluation device, a retrieval enhancement device, a structured model training device, a task platform, a computing device, a computer-readable storage medium, and a computer program product, to solve the technical defects in the prior art. According to a first aspect of the embodiments of the present disclosure, a task processing method is provided, including: obtaining initial task data corresponding to a target language task; performing semantic analysis based on the initial task data using a natural language model to generate structured task data, wherein the structured task data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; and executing the target language task based on the structured task data to obtain a task execution result.According to a second aspect of an embodiment of the present disclosure, a text question and answer method is provided, including: obtaining question text of a text question and answer task and initial text corresponding to the text question and answer task; based on the initial text, performing semantic analysis using a natural language model to generate structured text, wherein the structured text includes text elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; based on the question text and the structured text, performing the text question and answer task to obtain answer text. According to a third aspect of an embodiment of the present disclosure, a model hallucination evaluation method is provided, including: obtaining predicted answer text output by a trained question and answer model, and label answer text used to train the question and answer model; based on the label answer text, performing semantic analysis using a natural language model to generate structured label answer text, wherein the structured label answer text includes text elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; based on the predicted answer text and the structured label answer text, performing a model hallucination evaluation task to obtain an evaluation result. According to a fourth aspect of an embodiment of the present disclosure, a retrieval enhancement method is provided, including: obtaining initial task data of a retrieval enhancement task, wherein the initial task data includes input data and multiple candidate material data; based on the multiple candidate material data, performing semantic analysis using a natural language model to generate multiple structured candidate material data, wherein the structured candidate material data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; encoding the multiple structured candidate material data to obtain material data features of the multiple structured candidate material data, and encoding the input data to obtain input features; based on feature correlation between the input features and the multiple material data features, determining structured target material data; based on the input data and the structured target material data, performing the retrieval enhancement task to obtain output data. According to a fifth aspect of an embodiment of the present disclosure, a structured model training method is provided, including: obtaining sample task data corresponding to a target language task, and indication information and example information of a semantic analysis task, wherein the example information includes example data and structured example data, the structured example data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; based on the indication information, the sample task data and the example information, performing a semantic analysis task using a large language model to generate structured sample task data; based on the sample task data and the structured sample task data, training a natural language model to obtain a structured model.According to a sixth aspect of the embodiments of the present disclosure, a task processing apparatus is provided, comprising: a first acquisition module configured to acquire initial task data corresponding to a target language task; a first semantic analysis module configured to perform semantic analysis based on the initial task data by using a natural language model to generate structured task data, wherein the structured task data comprises data elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; and a first execution module configured to perform the target language task based on the structured task data to obtain a task execution result. According to a seventh aspect of the embodiments of the present disclosure, a text question and answer apparatus is provided, comprising: a second acquisition module configured to acquire question text of a text question and answer task and initial text corresponding to the text question and answer task; a second semantic analysis module configured to perform semantic analysis based on the initial text by using a natural language model to generate structured text, wherein the structured text comprises text elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; and a second execution module configured to perform the text question and answer task based on the structured text to obtain answer text. According to an eighth aspect of the embodiments of the present disclosure, a model hallucination evaluation apparatus is provided, comprising: a third acquisition module configured to acquire predicted answer text output by a trained question and answer model and label answer text used for training the question and answer model; a third semantic analysis module configured to perform semantic analysis based on the label answer text by using a natural language model to generate structured label answer text, wherein the structured label answer text comprises text elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; and a third execution module configured to perform a model hallucination evaluation task based on the predicted answer text and the structured label answer text to obtain an evaluation result.According to a ninth aspect of the embodiments of the present disclosure, a retrieval enhancement device is provided, comprising: a fourth acquisition module configured to acquire initial task data of a retrieval enhancement task, wherein the initial task data comprises input data and a plurality of candidate material data; a fourth semantic analysis module configured to perform semantic analysis on the plurality of candidate material data based on the plurality of candidate material data using a natural language model to generate a plurality of structured candidate material data, wherein the structured candidate material data comprises a plurality of data elements of semantic levels, and the plurality of semantic levels have semantic relevance; an encoding module configured to encode the plurality of structured candidate material data to obtain material data features of the plurality of structured candidate material data, and encode the input data to obtain input features; a screening module configured to determine structured target material data based on feature relevance between the input features and the plurality of material data features; and a fourth execution module configured to execute the retrieval enhancement task based on the input data and the structured target material data to obtain output data. According to a tenth aspect of the embodiments of the present disclosure, a structured model training device is provided, comprising: a fifth acquisition module configured to acquire sample task data corresponding to a target language task, and instruction information and example information of a semantic analysis task, wherein the example information comprises example data and structured example data, the structured example data comprises a plurality of data elements of semantic levels, and the plurality of semantic levels have semantic relevance; a fifth semantic analysis module configured to perform a semantic analysis task using a large language model based on the instruction information, the sample task data, and the example information to generate structured sample task data; and a training module configured to train a natural language model based on the sample task data and the structured sample task data to obtain a structured model. According to an eleventh aspect of the embodiments of the present disclosure, a task platform is provided, comprising a request interface and a response unit; the request interface is configured to receive a task processing request sent by a terminal device, wherein the task processing request comprises initial task data corresponding to a target language task; and the response unit is configured to perform semantic analysis using a natural language model based on the initial task data to generate structured task data, execute the target language task based on the structured task data, and obtain a task execution result, wherein the structured task data comprises a plurality of data elements of semantic levels, and the plurality of semantic levels have semantic relevance. According to a twelfth aspect of the embodiments of the present disclosure, a computing device is provided, comprising a memory and a processor; the memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, which realize the steps of the above method when executed by the processor.According to a thirteenth aspect of an embodiment of the present disclosure, a computer readable storage medium is provided, which stores computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps of the above method. According to a fourteenth aspect of an embodiment of the present disclosure, a computer program product is provided, which includes computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps of the above method. In one embodiment of the present disclosure, initial task data corresponding to a target language task is obtained; based on the initial task data, semantic analysis is performed by using a natural language model to generate structured task data, wherein the structured task data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic correlation; based on the structured task data, the target language task is executed to obtain a task execution result. Through the way of context semantic analysis by using the natural language model, the initial task data is reorganized to generate structured task data composed of multiple semantic levels, the multiple semantic levels have semantic correlation, the target language task is executed based on the structured task data, and the accuracy of task processing is improved, and the application range and generalization ability of task processing are improved.BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a flowchart of a task processing method according to an embodiment of the present disclosure; FIG. 2 is a schematic diagram of structured task data in a task processing method according to an embodiment of the present disclosure; FIG. 3 is a schematic diagram of a large language model generating structured task data in a task processing method according to an embodiment of the present disclosure; FIG. 4 is a schematic diagram of a structured model generating structured task data in a task processing method according to an embodiment of the present disclosure; FIG. 5 is a schematic diagram of a task processing method according to an embodiment of the present disclosure; FIG. 6 is a flowchart of a text question answering method according to an embodiment of the present disclosure; FIG. 7 is a schematic diagram of a text question answering method according to an embodiment of the present disclosure; FIG. 8 is a flowchart of a model hallucination evaluation method according to an embodiment of the present disclosure; FIG. 9 is a schematic diagram of a model hallucination evaluation method according to an embodiment of the present disclosure; FIG. 10 is a flowchart of a retrieval enhancement method according to an embodiment of the present disclosure; FIG. 11 is a schematic diagram of a retrieval enhancement method according to an embodiment of the present disclosure; FIG. 12 is a flowchart of a structured model training method according to an embodiment of the present disclosure; FIG. 13 is a structural schematic diagram of a task processing apparatus according to an embodiment of the present disclosure; FIG. 14 is a structural schematic diagram of a text question answering apparatus according to an embodiment of the present disclosure; FIG. 15 is a structural schematic diagram of a model hallucination evaluation apparatus according to an embodiment of the present disclosure; FIG. 16 is a structural schematic diagram of a retrieval enhancement apparatus according to an embodiment of the present disclosure; FIG. 17 is a structural schematic diagram of a structured model training apparatus according to an embodiment of the present disclosure; FIG. 18 is a structural schematic diagram of a task platform according to an embodiment of the present disclosure; FIG. 19 is a structural block diagram of a computing device according to an embodiment of the present disclosure. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, the present disclosure can be practiced without the specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail so as not to obscure the present disclosure. The terminology used in the description of one or more embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present disclosure. As used in one or more embodiments of the present disclosure, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in one or more embodiments of the present disclosure, specify the presence of stated features,These terms are used only to distinguish one type of information from another type of information. For example, without departing from the scope of one or more embodiments of the present disclosure, the first can also be referred to as the second, and similarly, the second can also be referred to as the first. Depending on the context, the word "if" as used herein can be interpreted as meaning "when" or "while" or "in response to determining." In one or more embodiments of the present disclosure, a large model refers to a deep learning model with a large number of model parameters, usually including hundreds of millions, billions, tens of billions, hundreds of billions, or even tens of billions of model parameters. A large model can also be referred to as a foundation model. A large model is pre-trained through a large amount of unlabeled corpus, and a pre-training model with hundreds of millions of parameters is output. Such a model can adapt to a wide range of downstream tasks, and the model has good generalization ability. For example, a large language model (LLM) and a multi-modal pre-training model. In practical applications, a large model only needs a small amount of samples to fine-tune the pre-training model and can be applied to different tasks. A large model can be widely used in natural language processing (NLP) and computer vision fields, and can be applied to computer vision field tasks such as visual question answering (VQA), image captioning (IC), and image generation, as well as natural language processing field tasks such as text-based sentiment classification, text summary generation, and machine translation. The main application scenarios of a large model include digital assistants, intelligent robots, search, online education, office software, e-commerce, intelligent design, and the like. In addition, it should be noted that the user information (including but not limited to user device information, user personal information, and the like) and data (including but not limited to data for analysis, stored data, displayed data, and the like) involved in one or more embodiments of the present disclosure are information and data authorized by the user or authorized by all parties, and the collection, use, and processing of related data need to comply with relevant national and regional laws, regulations, and standards, and provide corresponding operation entrances for users to choose authorization or refusal. First, the terms involved in one or more embodiments of the present disclosure are explained. Structurization: converting input data into an organized and hierarchical data structure.Speech transcription: The process of converting spoken content in audio into written text. Document reading: Involves understanding the content of a document, extracting key information or summarizing the text, and assessing the reader's comprehension and application abilities. Machine translation: The use of computer software to automatically translate text from one language to another while maintaining the original meaning. Text-to-Question: Answering questions related to the provided text content, testing the model's ability to understand and extract information from the text. Model hallucination evaluation: Evaluating the authenticity of the generated results of a generative model. For example, in this process, three key models are involved: Model A, Model B, and Model C. Model A is the generative model to be evaluated, which has the ability to generate data such as text, images, or other modalities. Model B is the model used for evaluation, which is used to determine whether the data generated by Model A has some form of "hallucination", that is, whether it can be clearly identified as non-real data rather than observations from the real world. Model C is a model for semantic analysis, which is used to convert the initial data in a serialized format into structured data. The three work together to improve the authenticity of the data generated by the generative model. Retrieval-Augmented Generation (RAG): A natural language processing technique that combines information retrieval and text generation methods to improve the accuracy and context relevance of the content generated by the model. In traditional generative models, the model generates text directly based on the knowledge stored in its internal storage. In contrast, the RAG model retrieves the most relevant fragments from an external knowledge base or large-scale document collection before generating a response, and then uses these retrieved information to guide and enrich its generation process.
[0002] Few-Shot: A model-based task execution method that can learn and generalize based on very few example information, solve new tasks or classification, and emphasize efficient use of data and rapid adaptation capability. Prompt: A paradigm information that uses natural language to guide or stimulate large language models to perform target processing tasks. Prompt is composed of instruction information, example information, and reference task data. Instruction: Natural language information used to instruct large language models to perform language tasks. Examples: Natural language information used to help large language models understand language tasks from the perspective of examples to obtain task execution results. Aspect-Based Summarization (ABS): A natural language processing technique that focuses on extracting information from text and generating summaries based on different topics or aspects. This method is often used to extract opinions and information on various aspects in reviews or long articles, allowing readers to quickly understand the various opinions and sentiment orientations on a particular topic in the text. Aspect-Based Summarization often involves several steps: Aspect identification: Using data classification to determine key aspects or topics in the task data. Data extraction: Extracting relevant descriptive data from the task data based on data classification. Summary generation: Using concatenation to concatenate aspects, topics, and descriptive inferences to generate summary data. Currently, in the human cognitive process, understanding and processing long texts have natural structural characteristics. However, in the field of natural language processing, although natural language models perform well in executing different language tasks, they still face challenges when dealing with longer, continuous task data. Specifically, traditional language models use linear and sequential processing methods, rather than mimicking human hierarchical and structured cognitive patterns, which results in insufficient accuracy in task processing when facing long-distance dependencies and complex context situations. Using Aspect-Based Summarization can mimic human hierarchical and structured cognitive patterns to some extent, improving the accuracy of task processing. However, Aspect-Based Summarization extracts specific aspects from the entire text to create structured data to meet specific user needs, but does not change the inherent content logic structure, thereby helping large language models more effectively understand and process task data.
[0003] 1. Aspect -dependent summarization generates relatively narrow application scope: Aspect -dependent summarization is particularly suitable for scenarios with well-defined aspects and focused opinions, such as product review aggregation, but can not be as effective when handling more general and complex task data.
[0004] 2. Aspect -dependent summarization relies on domain-specific prior knowledge: Aspect -dependent summarization requires pre-defining which aspects to extract and building an aspect inventory, which limits the generalization ability of task processing.
[0005] 3、 The accuracy of aspect-dependent summary generation and opinion extraction is limited: aspect recognition and data extraction, topic and description derivation, need to predefine the aspect list, which may cause errors due to the limitation of the aspect list, and some information is inevitably missing, and the accuracy is insufficient. In view of the above problems, the present disclosure provides a task processing method, and simultaneously relates to a text question and answer method, a model hallucination evaluation method, a retrieval enhancement method, a structured model training method, a task processing device, a text question and answer device, a model hallucination evaluation device, a retrieval enhancement device, a structured model training device, a task platform, a computing device, a computer readable storage medium and a computer program product, which are described in detail one by one in the following embodiments. Referring to FIG. 1, FIG. 1 shows a flowchart of a task processing method provided by an embodiment of the present disclosure, which includes the following specific steps: step 102: obtaining initial task data corresponding to a target language task. The embodiment of the present disclosure is applied to an application program, a website or a platform with natural language processing capability, for example, an application program, a website or a platform with a natural language model of a certain department, and for example, an application program calling an application program, a website or a platform with a natural language model through an application programming interface (Application Programming Interface, API for short). The language task is a natural language processing task performed by a deep learning model, including but not limited to: speech transcription task, document reading task, machine translation task, text question and answer task, model hallucination evaluation task and retrieval enhancement task. The target language task is a language task to be processed, for example, the target language task is a text question and answer task, which needs to reply to the question text input by the user and generate a reply text. The initial task data is the reference task data in the serialized format corresponding to the target language task, which is used as indirect reference data for the execution of the target language task, and the initial task data does not have obvious structured features. The initial task data includes but is not limited to: initial text of document reading task, machine translation task, text question and answer task, initial speech of speech transcription task, label reply text for training language model of model hallucination evaluation task, input data and multiple candidate material data of retrieval enhancement task. An optional way to obtain the initial task data corresponding to the target language task is to receive the task request of the target language task sent by the user, wherein the task request carries the initial task data corresponding to the target language task, and the task request of the target language task is an execution instruction request generated for the target language task.For example, a user initiates a text Q&A task and uploads an initial text in the text Q&A function area of the application front end, and the front end generates and sends a task request of the text Q&A task to the application back end. Alternatively, the initial task request corresponding to the target language task is obtained from the database, for example, a user initiates a text Q&A task and selects the function of retrieving and generating enhancement in the text Q&A function page of the application front end, and the initial text corresponding to the text Q&A task is obtained from the database. Illustratively, a certain sports service application calls a distributed model platform of a certain model provider through an application programming interface. A user inputs a question text: "Is there a track and field athlete who can win first place in both the 5000m and 10000m races at a single event?" in the text Q&A function page of the sports service application, and selects the function of retrieving and generating enhancement, generates and sends a task request of the text Q&A task to the distributed model platform, and obtains the initial text related to track and field from the text database: "A track and field athlete from X country specializes in long-distance track and field events. In his career, the athlete has won three A competition first places, five B competition first places, and four first places in C competition. The athlete held the 5000m record until it was broken by another athlete in recent years. At a B competition held that year, the athlete made history by winning first place in both the 5000m and 10000m races at the same event. Also that year, she and another female athlete were among the only two people to win first place in both short and long distance races at the same B competition. With the first place honors she achieved early in her career, she became the youngest first place holder in history at the age of less than 19. Growing up in a family with notable sports achievements, including multiple medalists, she lived in a high-altitude area from a young age and began training in track and field at the age of 14. Despite her origins, she later moved to live in a certain place." The initial task data corresponding to the target language task is obtained, providing data support for subsequent structured processing. Step 104: Based on the initial task data, a natural language model is used for semantic analysis to generate structured task data, wherein the structured task data includes multiple semantic level data elements, and the multiple semantic levels have semantic association. The natural language model is a natural language generative model that analyzes the context semantics of the input data. The natural language model achieves semantic level structured disassembly and reorganization of the input data through semantic analysis. The natural language model includes but is not limited to: large language models, structured models trained specifically for generating structured data (for example, BERT, T5, and small-scale generative models such as small-scale language models).Semantic analysis is an operation of converting serialized format data into structured data. It should be noted that semantic analysis is not direct data recognition and extraction, splicing, structured disassembly and reorganization of data, but structured disassembly and reorganization after understanding the structure of data from the semantic level. Structured task data is reference task data corresponding to the target language task and having multiple semantic levels, which is used as direct reference data for the target language task execution, and is a kind of structured format data with obvious structured characteristics. The structured task data includes but is not limited to: structured text of document reading task, machine translation task, text question and answer task, structured speech of speech transcription task, structured label answer text for training language model of model hallucination evaluation task, and multiple structured material data of retrieval enhancement task. The multiple semantic levels are multiple hierarchical structures divided based on the semantic characteristics of the initial task data, which are hierarchical relationship structures with semantic correlation and define the data format of the structured task data, including but not limited to: topic content semantic level, aspect dimension semantic level, description deduction semantic level, attribute data semantic level and instance data semantic level. Data elements are basic data elements constituting the structured task data, each data element belongs to a specific semantic level, and the data element can be a word, a phrase, a sentence or a paragraph according to actual needs, which is not limited here. The data elements include but are not limited to: data elements of the topic content semantic level, data elements of the aspect dimension semantic level, data elements of the description deduction semantic level, data elements of the attribute data semantic level and data elements of the instance data semantic level. FIG. 2 shows a schematic diagram of structured task data in a task processing method according to an embodiment of the present disclosure. As shown in FIG. 2, the initial task data is: “A track and field athlete from X country specializes in long-distance track and field events. During his career, the athlete has won three first places in A competition, five first places in B competition, and four first places in C competition. The athlete once held the 5000-meter record until it was broken by another athlete in recent years. At a B competition held in a certain year, the athlete made history by winning first place in both the 5000-meter and 10000-meter events in the same event. Also that year, she and another female athlete were among the only two people to win first place in both short and long distance events at the same B competition. With the first-place honors achieved in her early years, the athlete became the youngest first-place holder in history at the age of less than 19. Growing up in a family with notable sports achievements, including multiple medalists, she lived in a high-altitude area from a young age and began training in track and field at the age of 14.Despite of this, she later moved to live in a place. Based on the initial task data, semantic analysis is performed using a natural language model to generate structured task data.
[0006] "Summary of an athlete's career and achievements in track and field Personal background The athlete was born into a family with a strong sports background, with multiple medal winners in the family. He grew up in an environment with many siblings. He started training in track and field at a relatively young age of 14. He trained in high-altitude areas in his early years and later moved to a certain place. Athletic achievements In A competition, the athlete achieved three first places in track and field events, and in B competition, he won multiple first places. His performance in B competition was also outstanding, winning multiple first places and once holding the 5000m record until it was later broken. He created a remarkable record by winning both the 5000m and 10000m first places in the same B competition, and was the first place at a very young age. Highlights of track and field events In a certain B competition, the athlete successfully won the 5000m first place. In the same year, he also dominated the 5000m event in B competition, showcasing his overall ability. Looking back to the early days, the athlete won the 5000m first place in B competition, marking the beginning of his illustrious career. "Based on the initial text, semantic features are extracted using a structured model, three semantic levels are constructed based on the semantic features, and structured data is generated based on the data elements of the three semantic levels, obtaining the structured text shown in the above Figure 2 example. Based on the initial task data, semantic analysis is performed using a natural language model to generate structured task data, which includes data elements of multiple semantic levels. Through context semantic analysis by the natural language model, the initial task data is reorganized to accurately and generically generate structured task data composed of multiple semantic levels, providing structured data support for subsequent target language tasks. Step 106: Based on the structured task data, perform the target language task to obtain the task execution result. The task execution result is the output result of the target language task execution, which includes but is not limited to: summary text of document reading task, translation text of machine translation task, reply text of text question answering task, transcription text of speech transcription task, evaluation result of model hallucination evaluation task, and generation result of retrieval enhancement task. Based on the structured task data, perform the target language task to obtain the task execution result. One optional way is to use a natural language model to perform the target language task based on the structured task data to obtain the task execution result. For example, in the case of a large language model as the natural language model, construct the prompt information of the target language task based on the structured task data, input the prompt information into the large language model, perform the target language task, and obtain the task execution result.For example, the natural language model is a language model trained for a target language task, including encoding type, encoding-decoding type, and decoding type. Representative model structures include BERT, T5, GPT, and other small-scale language models trained for specific tasks. The structured task data is input into the language model, the target language task is performed, and the task execution result is obtained. For example, based on the question text and structured text, a prompt text is constructed, the prompt text is input into the large language model, the text question and answer task is performed, and the answer text is obtained: “A certain track and field athlete won first place in both the 5000-meter and 10000-meter races in a B competition.” In the embodiment of the disclosure, the initial task data is reorganized by the natural language model for context semantic analysis, and structured task data composed of multiple semantic levels is generated. The target language task is performed based on the structured task data, the accuracy of task processing is improved, and the application range and generalization ability of task processing are improved. In an optional embodiment of the disclosure, the natural language model is a large language model. Correspondingly, step 104 includes the following specific steps: obtaining indication information and example information of the semantic analysis task, wherein the example information includes example data and structured example data; based on the indication information, the initial task data, and the example information, the large language model is used to perform the semantic analysis task to generate the structured task data. The large language model has Few-Shot capability, that is, the large language model can understand the task content and task form of the semantic analysis task based on the example information, without the need to specially train a structured model for performing the semantic analysis task, so that the task processing has high generalization ability. The semantic analysis task is a natural language task of converting serialized format data into structured data. It should be noted that the semantic analysis task is not a direct data recognition and extraction, structured disassembly and reorganization, but a structured disassembly and reorganization after understanding the structure of the data from the semantic level. The indication information of the semantic analysis task is natural language information for instructing the large language model to perform the semantic analysis task, for example, the indication information of the semantic analysis task is “based on 3 semantic levels: topic content, aspect dimension, and description deduction, generate structured text of the input text.” The example information of the semantic analysis task is natural language information for assisting the large language model to understand the semantic analysis task from the perspective of format conversion of the example data and the structured example data. The example information plays a decisive role in the understanding of the semantic analysis task by the large language model with Few-Shot capability, and the example information enables the large language model to perform the semantic analysis task without specific training. The example information includes at least one pair of example data and structured example data.The example data is example information data without obvious structured features, and the example data is a serialized format data. The structured example data is example information data with obvious structured features, and the example data is a structured format data. For example, the example information of the semantic analysis task is: example data: “In the recent traffic forum, the focus is on the innovation of automatic driving technology, and it is estimated that in the next ten years, this technology will account for 30% of new car sales. The expected results include reducing the accident rate, smooth urban traffic flow, and industrial transformation. The forum calls for accelerating intelligent infrastructure, establishing unified standards, and professional personnel training to cope with the change.” The structured example data is:.
[0007] Event: Future Transportation Development Forum Topic Focus: Autonomous Driving Technology Innovation Expert Predictions: Technological Progress Outlook: It is predicted that autonomous vehicles will account for 30% of new car sales in the next decade Social Impact: Reduced accident rates. Optimized urban traffic flow. Market transformation. Conference Initiatives: Accelerate the construction of intelligent infrastructure. Develop unified standards. Personnel training. Based on the instruction information, the initial task data, and the example information, a large language model is used to perform a semantic analysis task to generate structured task data. One optional way is to construct prompt information for the semantic analysis task based on the instruction information, the initial task data, and the example information, input the prompt information into the large language model, perform the semantic analysis task, and generate the structured task data. FIG. 3 shows a schematic diagram of the large language model generating structured task data in a task processing method according to an embodiment of the present disclosure: the instruction information of the semantic analysis task is: "summarize the topic content, aspect dimension, and description derivation of the task data." The example information of the semantic analysis task is: (example data 1:, structured example data 1: ) ; (example data 2:, structured example data 2: ). The initial task data is: "A track and field athlete from X country specializes in long-distance track and field events. During his career, the athlete has won three A competition track and field first places, five B competition first places, and four first places in C competition. The athlete held the 5000-meter record until it was broken by another athlete in recent years. At a B competition held in a certain year, this athlete made history by becoming the first to win both the 5000-meter and 10000-meter first places in the same event. Also that year, she and another female athlete became one of only two people to win both the short-distance and long-distance first places in the same B competition. With the first-place honors she achieved early in her career, the athlete became the youngest first-place holder in history at the age of less than 19. Growing up in a family with notable sports achievements, including multiple medalists, she lived in a high-altitude area from a young age and began training in track and field at the age of 14. Despite her background, she later moved to live in a certain place."
[0008] "Topic: Overview of an athlete's career and achievements in track and field Aspect Dimension 1: Personal Background: Description Inference 1.1: The athlete was born into a family with a strong sports background, with multiple medal winners in the family, and grew up in a large sibling environment. Description Inference 1.2: Started track training at a relatively young age of 14. Early years were spent training at high altitudes, followed by a move to a certain location. Aspect Dimension 2: Athletic Achievements: Description Inference 2.1: At A Competition, the athlete achieved three first-place finishes in track and field, and at B Competition, accumulated multiple first-place finishes. Description Inference 2.2: His performance at B Competition was equally impressive, with multiple first-place finishes, and once held the 5000-meter record until it was later broken. Description Inference 2.3: Created an extraordinary record by winning both the 5000-meter and 10000-meter first places at the same B Competition, and was first place at a very young age. Aspect Dimension 3: Highlights of Track and Field Events: Description Inference 3.1: At a certain B Competition, the athlete successfully won the 5000-meter first place. Description Inference 3.2: In the same year, he also dominated the 5000-meter event at B Competition, showcasing his overall ability. Description Inference 3.3: Looking back to the early years, the athlete won the first place in the 5000-meter event at B Competition, writing a brilliant opening chapter for his career."The structured sample task data corresponding to the target language task is sample reference task data corresponding to the target language task and having multiple semantic levels, which is used to train a natural language model (structured model) in advance. The structured sample data is used as direct reference data for the execution of the target language task in the training process, so that the natural language model understands the structured features of the structured format data, and can convert the serialized format data without obvious structured features into structured format data. The structured model is a natural language generative model trained for a semantic analysis task, which analyzes the context semantics of the input data. The structured model realizes the semantic level structured disassembly and reorganization of the input data through semantic analysis. Compared with large language models, structured models are generally small-scale language models, which have flexibility and response speed to meet the needs of different natural language processing tasks. For example, the size of the structured model is 7B. The semantic analysis task is a natural language task of converting serialized format data into structured data. It should be noted that the semantic analysis task is not a direct data recognition and extraction, structured disassembly and reorganization of the data, but a structured disassembly and reorganization after understanding the structure of the data from the semantic level. The instruction information of the semantic analysis task is natural language information for instructing the large language model to perform the semantic analysis task. For example, the instruction information of the semantic analysis task is "generate the structured text of the input text based on 3 semantic levels: theme content, aspect dimension and description deduction." Based on the instruction information and the initial task data, the structured model is used to perform the semantic analysis task to generate structured task data. One optional way is to construct prompt information of the semantic analysis task based on the instruction information and the initial task data, input the prompt information into the structured model, perform the semantic analysis task, and generate the structured task data. For example, the instruction text Instruction of the pre-constructed semantic analysis task is obtained, the prompt text Prompt of the semantic analysis task is constructed based on the instruction text and the initial text, the prompt text is input into the structured model, and the structured model performs the semantic analysis task to obtain the structured text shown in the example of FIG. 2. In the embodiment of the present disclosure, the specially trained structured model completes the efficient and low-cost semantic analysis under the indication of the instruction information, and provides structured data support for subsequent execution of the target language task.In an optional embodiment of the present disclosure, before step 104, the following specific steps are further included: obtaining sample task data corresponding to the target language task, and indication information and example information of the semantic analysis task, wherein the example information includes example data and structured example data, the structured example data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic correlation; based on the indication information, the sample task data, and the example information, performing the semantic analysis task by using a large language model to generate structured sample task data; and based on the sample task data and the structured sample task data, training a natural language model to obtain a structured model. In the above embodiment, the structured sample task data used for training the natural language model (structured model) can be generated by using the large language model, and the sample task data and the structured sample task data are used as samples for completing supervised training. The sample task data is sample reference task data in a serialized format corresponding to the target language task and used for training the natural language model (structured model) in advance, and the sample task data is used as indirect reference data for the target language task in the training process. In the embodiment of the present disclosure, the sample task data is used as sample input for supervised training, and the structured sample task data is used as label output for supervised training. The example information of the semantic analysis task is natural language information used to assist the large language model in understanding the semantic analysis task from the perspective of format conversion of the example data and the structured example data. The example information plays a decisive role in the understanding of the semantic analysis task by the large language model with Few-Shot capability, and the example information enables the large language model to perform the semantic analysis task without targeted training. The example information includes at least one pair of example data and structured example data. The example data is example information data without obvious structured features, and the example data is a kind of serialized format data. The structured example data is example information data with obvious structured features, and the structured example data is a kind of structured format data. The structured example data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic correlation. For example, the example information of the semantic analysis task is: example data: “In the recent traffic forum, the focus is on automatic driving technology innovation, and it is estimated that in the next ten years, this technology will account for 30% of new car sales. The expected results include reducing the accident rate, smooth urban traffic flow, and industrial transformation. The forum calls for accelerating intelligent infrastructure, establishing unified standards, and professional personnel training to cope with the change.” The structured example data is:.
[0009] Event: Future Transportation Development Forum Topic Focus: Autonomous Driving Technology Innovation Expert Predictions: Outlook on Technological Progress: It is expected that autonomous vehicles will account for 30% of new car sales in the next decade Social Impact: Reduced accident rates. Optimized urban traffic flow. Market transformation. Conference initiatives: Accelerate the construction of intelligent infrastructure. Develop unified standards. Personnel training. Based on the instruction information, sample task data, and example information, a large language model is used to perform a semantic analysis task to generate structured sample task data. One optional way is to construct prompt information for the semantic analysis task based on the instruction information, sample task data, and example information, input the prompt information into the large language model, perform the semantic analysis task, and generate structured sample task data. For details, see the embodiments of the large language model described above, which will not be repeated. Based on the sample task data and the structured sample task data, a natural language model is trained to obtain a structured model. One optional way is to use a natural language model to perform semantic analysis based on sample task data to generate structured prediction task data, calculate a loss value based on the structured prediction task data and the structured sample task data, and adjust the model parameters of the natural language model based on the loss value to obtain a structured model. For details, see the process of supervised training. FIG. 4 shows a schematic diagram of a structured model generating structured task data in a task processing method according to an embodiment of the present disclosure. The instruction information of the semantic analysis task is: "summarize the topic content, aspect dimension, and description derivation of the task data." The example information of the semantic analysis task is: (example data 1:, structured example data 1: ) ; (example data 2:, structured example data 2: >) o The sample task data is: "This technology promoter born into a musical family grew up under the influence of art, but at the age of 16, he decided to turn to the field of technology and entered an excellent science and technology college to specialize in artificial intelligence. As a technology officer of a global technology company, he not only led the development of an AI assistant and won the XX Technology Award, but also published multiple high-impact papers in machine learning research, and his contribution to deep learning optimization algorithms was widely recognized by the industry. At the technology summit, he won the reputation of "next-generation AI promoter" with his deep insight into the future development trend of AI. In addition, he led his team to innovate and develop an adaptive system, which helped the AI medical auxiliary diagnosis platform win the YY competition, and he also created an immersive distance education platform, demonstrating his outstanding contributions in the fields of smart home, medical health, and education." Based on the instruction information, sample task data, and example information, a large language model is used to perform a semantic analysis task to generate structured sample task data:
[0010] "Topic: Overview of a tech pioneer's career and innovation achievements Aspect Dimension 1: Personal Background Description Derivation 1.1: Born into a musical family, but chose the tech path, enrolled in a tech institute at 16, specializing in AI, deviating from family tradition. Aspect Dimension 2: Career Achievements Description Derivation 2.1: Held CTO positions at top tech companies, led the development of revolutionary AI products, won numerous awards, including the XX Tech Award. Description Derivation 2.2: Published multiple high-impact papers, especially in machine learning, research results widely cited, driving industry development. Description Derivation 2.3: As a keynote speaker at tech summits, presented future AI trend predictions, won the "Next-Generation AI Pioneer" title. Aspect Dimension 3: Highlights of Tech Innovation Description Derivation 3.1: Led the development of self-learning smart home systems, improving life quality. Description Derivation 3.2: Crossed into medical health, launched an AI-assisted diagnosis platform, improving diagnosis efficiency, won first place in YY competition. Description Derivation 3.3: Integrated VR / AR technology, created an immersive remote education platform, promoting education development." Based on the sample task data and structured sample task data, train a natural language model to obtain a structured model. The initial task data is: "A track and field athlete from X country specializes in long-distance track events. During his career, the athlete won three A competition first places, five B competition first places, and four first places in C competition. The athlete held the 5000-meter record until it was broken by another athlete in recent years. At a B competition held in a certain year, this athlete became the first to win both the 5000-meter and 10000-meter first places in the same event. Also that year, she and another female athlete became one of only two people to win both short and long distance first places in the same B competition. With early first place honors, the athlete became the youngest first place holder in history at the age of less than 19. Growing up in a family with notable sports achievements, including multiple medalists, she lived in a high-altitude area from a young age and began track training at 14. Despite this, she later moved to live in a certain place." Based on the instruction information and initial task data, use the structured model to perform a semantic analysis task, generating structured task data as:
[0011] "Topic: Overview of an athlete's career and achievements in track and field Aspect Dimension 1: Personal Background: Describe Inference 1.1: The athlete was born into a family with a strong sports background, with multiple medal winners in the family, and grew up in a large sibling environment. Describe Inference 1.2: Started track training at a relatively young age of 14. Early years were spent training at high altitudes, followed by a move to a certain location. Aspect Dimension 2: Athletic Achievements: Describe Inference 2.1: At A competition, the athlete achieved three first-place finishes in track events, and at B competition, accumulated multiple first-place finishes. Describe Inference 2.2: Their performance at B competition was equally impressive, with multiple first-place finishes, and once held the 5000-meter record until it was later broken. Describe Inference 2.3: Created an extraordinary record by winning both the 5000-meter and 10000-meter events at the same B competition, and was first-place at a very young age. Aspect Dimension 3: Highlights of Track Events: Describe Inference 3.1: At a certain B competition, the athlete successfully won the 5000-meter event. Describe Inference 3.2: In the same year, they also dominated the 5000-meter event at B competition, showcasing their overall abilities. Describe Inference 3.3: Looking back to the early years, the athlete won the 5000-meter event at B competition, marking a brilliant beginning to their career."In an optional embodiment of the present disclosure, before step 106, the following specific steps are further included: obtaining instruction information of the target language task; correspondingly, step 106 includes the following specific steps: constructing prompt information of the target language task based on the instruction information and the structured task data; inputting the prompt information into the large language model to execute the target language task and obtain a task execution result. The instruction information of the target language task is natural language information used to instruct the large language model to execute the target language task. The instruction information can be information directly input by a user in the interaction process of the large language model, including but not limited to: instruction text of a document reading task, instruction text of a machine translation task, question text of a text question answering task, instruction text of a speech transcription task, question text of a model hallucination evaluation task, and instruction text and retrieval enhancement instruction of a retrieval enhancement task. For example, the target language task is a text question answering task, and the instruction information of the target language task is “Based on the provided text content, please ask what is the core idea that this passage wants to express? The answer should be concise and clear, directly derived from the text information or based on reasonable inference.” For another example, the target language task is a model hallucination evaluation task, and the instruction information of the target language task is “Evaluate the quality and consistency of the generated text, determine whether there are logical errors, factual inconsistencies, or semantic confusion, and output the evaluation score and main problems.” For still another example, the target language task is a retrieval enhancement task, and the instruction information of the target language task is “Analyze the query requirements, retrieve the most relevant information fragments from the database, optimize the retrieval results based on user preferences and context, and output an enhanced information summary to ensure that the core points are covered.” The prompt information of the target language task is natural language information used to prompt the large language model to understand the target language task from the instruction information, reference task data, and / or example information. Generally, the prompt information is obtained by splicing the instruction information, the reference task data, and / or the example information. The prompt information is the direct input of the large language model. For example, the target language task is a model hallucination evaluation task, and the prompt information is: “Example information: Topic content: The life and career of a certain director: Aspect dimension 1: Early life and family background Description inference 1.1: The director was born in a region of a certain large city in a certain country, and was the second son in the family …… Description inference 1.2: His parents deliberately chose the name of a certain historical figure as his middle name as a sign of respect …… Aspect dimension 2: Career highlights Description inference 2.1: The director won an outstanding director award for a film work, and the film …… Description inference 2.2: His artistic career continued to flourish until the XX century …… Instruction information: According to the above quoted content, evaluate the authenticity of the statement.”In the embodiment of the present disclosure, the specific manner of each step can refer to the above-mentioned implementation examples, which will not be repeated here. For example, the question text of the text question input by the user is obtained: "Is there a track and field athlete who can win the first place in both the 5000-meter and 10000-meter races in one competition?" Based on the question text and the structured text, the prompt text of the target language task is constructed, the prompt text is input into the large language model, the text question task is executed, and the reply text is obtained: "A track and field athlete won the first place in both the 5000-meter and 10000-meter races in a B competition." In the embodiment of the present disclosure, the large language model interaction mode is adopted to effectively guide the large language model to deeply understand the target language task, and further improve the accuracy of task processing and the application range and generalization ability of task processing. In an optional embodiment of the present disclosure, before step 104, the following specific steps are further included: identifying whether the number of data elements of the initial task data reaches a preset threshold value; correspondingly, step 104 includes the following specific steps: if yes, based on the initial task data, performing semantic analysis by using the natural language model to generate structured task data. Before step 104 is executed, it is further necessary to pre-judge whether semantic analysis needs to be performed to generate structured task data, for example, if the initial task data only has one declarative sentence, semantic analysis is not needed. The data element of the initial task data is the basic unit constituting the initial task data, and each element represents an independent information unit. The data element can be a word, a phrase, a sentence or a paragraph. The number of data elements of the initial task data is the number of basic units constituting the initial task data, which can be the number of words, the number of phrases, the number of sentences or the number of paragraphs. The preset threshold value is a condition for judging whether the number of data elements of the initial task data reaches the condition of needing to perform semantic analysis. When the number of data elements reaches the preset threshold value, it indicates that the initial task data is rich or complex enough. For example, it is identified whether the number of tokens of the initial text reaches a preset threshold value (1000), if yes, based on the initial text, semantic features are extracted by using the structured model, three semantic levels are constructed based on the semantic features, and structured data is generated based on the data elements of the three semantic levels to obtain the structured text shown in the example of FIG. 2. In the embodiment of the present disclosure, whether semantic analysis needs to be performed is pre-judged by the number of data elements, and semantic analysis is performed only when it is needed, thereby improving the effectiveness of semantic analysis. In an optional embodiment of the present disclosure, after identifying whether the number of data elements of the initial task data reaches the preset threshold value, the following specific steps are further included: if no, based on the initial task data, the target language task is executed to obtain the task execution result.Based on the initial task data, the target language task is performed to obtain a task execution result. An optional manner is that based on the initial task data, a natural language model is used to perform the target language task to obtain the task execution result. For example, in the case of a large language model as the natural language model, prompt information of the target language task is constructed based on the initial task data, the prompt information is input into the large language model, the target language task is performed, and the task execution result is obtained. For another example, in the case of a language model trained specifically for the target language task, including encoding, encoding-decoding, and decoding, and a representative model structure such as BERT, T5, GPT, and a small-scale language model trained for a specific task, the initial task data can be input into the language model to perform the target language task and obtain the task execution result. In some applications, the task can also be performed based on a large language model and a small-scale language model trained for the target language task, for example, the key information extraction is performed using a small-scale language model, the content summary is performed using a large language model, and the target language task is performed by combining the two. FIG. 5 shows a flowchart of a task processing method according to an embodiment of the present disclosure. As shown in FIG. 5, initial task data and indication information of a target language task are obtained. It is determined whether semantic analysis is needed for the initial task data to generate structured task data. If yes, semantic analysis is performed on the initial task data using a natural language model to generate structured task data, and the target language task is performed using a large language model based on the indication information and the structured task data to obtain a task execution result. If no, the target language task is performed based on the indication information and the initial task data to obtain a task execution result. For example, if no, a prompt text is constructed based on the question text and the initial text, the prompt text is input into a large language model, a text question answering task is performed, and a reply text is obtained: “This athlete created the first case of winning both the 5000m and 10000m races in the same event.” In the embodiment of the present disclosure, it is determined in advance whether semantic analysis is needed based on the number of data elements, and semantic analysis is skipped when it is not needed, thereby improving the feasibility and efficiency of task processing. In an optional embodiment of the present disclosure, the plurality of semantic levels include at least two of a theme content level, an aspect dimension level, and a description deduction level. The structured task data of the plurality of semantic levels is used to simulate the cognitive process of humans in the execution stage of the target language task, and to convert simple, linear, and serialized format data into well-organized and hierarchical structured format data. An example of at least two hierarchical structures is provided in the embodiment of the present disclosure to present the knowledge structure of the data, as shown in FIG. 2.The topic content level is a content level summarizing the topic and boundary of the initial task data, represents the central knowledge of the initial task data, and covers the boundary range. The aspect dimension level is a level of further subdividing the initial task data into several aspect dimensions, lists the aspects or dimensions that must be considered to fully understand the topic and boundary. The description derivation level is a semantic level of specific description or derivation, which provides more detailed and in-depth description and derivation, and is used to support each aspect dimension under the topic content of the initial task data. It should be noted that although the embodiments of the present disclosure limit a three-layer structure to disassemble the original text content, there is a certain limitation. In actual scenarios, a deeper and more flexible structure (such as a mind map, a knowledge graph, etc.) can be more flexible and better applicable. However, how to use the results after structuring to reorganize the original text so that the information structure is more prominent is independent of the specific structure design and can be reused on different structures. The three semantic levels provided in the embodiments of the present disclosure simulate the process of human organization and understanding of information, change the initial task data of the serialized schema into a hierarchical knowledge tree structure, allow the model to efficiently search, connect and compare information between different semantic levels like humans, and complete higher-accuracy task processing. As shown in the example of FIG. 1, the structured task data of multiple semantic levels is generated through semantic analysis, which can more accurately perform the target language task. Moreover, the structured task data can be freely assembled into various natural language formats according to specific downstream tasks. Compared with the aspect-dependent abstract generation method, the following characteristics are possessed.
[0012] 1. Extensive application range: Through hierarchical structured processing, it is not limited to specific types of task data and can be applied to processing more extensive and complex scenarios, expanding the application range.
[0013] 2. Reduce dependence on prior knowledge: It does not depend on a pre-defined aspect list, has better generalization ability, and can adapt to different fields and content.
[0014] 3、 Improve accuracy and information integrity: Through comprehensive structured reorganization, avoid information omission and errors, can maintain the integrity of task data and improve the accuracy of task processing. Therefore, this method will bring significant performance improvement to multiple application scenarios, especially in intelligent assistants, content creation, knowledge management and educational technology scenarios, and provide deep insights into the underlying problems of machine understanding and information processing, and promote the development of natural language processing as a whole. The following three application scenarios are described: text question answering task, model hallucination evaluation task and retrieval enhancement task: Currently, text question answering based on long text (such as an 8K word article) is a new field that requires large language models to accurately find target information and generate reliable answers to question texts. Large language models often "lose" in the large text content of the initial text and cannot locate the information related to the question text in the initial text. But after semantic analysis, after deeply understanding the structure of the data from the semantic level, the structured disassembly and reorganization highlight the data elements of the relevant semantic level, and can use the "dynamic weighting strategy" target information and generate reliable answers. Referring to FIG. 6, FIG. 6 is a flowchart of a text question answering method according to an embodiment of the present disclosure, which includes the following specific steps: step 602: obtaining the question text of the text question answering task and the initial text corresponding to the text question answering task. Step 604: based on the initial text, performing semantic analysis using a natural language model to generate a structured text, wherein the structured text includes a plurality of semantic level text elements, and the plurality of semantic levels have semantic relevance. Step 606: based on the question text and the structured text, performing the text question answering task to obtain an answer text. The embodiment of the present disclosure is applied to an application program, website or platform with text question answering capability, for example, an application program, website or platform deployed with a natural language model, and for example, an application program calling a natural language model through an application programming interface (API) Application Programming Interface, API for short) of the application program, website or platform. The question text is a natural language text directly used to define and execute the text question answering task, and the question text is directly input by the user. The initial text is a serialized format reference text corresponding to the text question answering task, and the initial text is used as an indirect reference text for text question answering task execution, and the initial text does not have obvious structured features. The structured text is a reference text with multiple semantic levels corresponding to the text question answering task, and the structured text is used as a direct reference text for text question answering task execution, and the structured text is a structured format text with obvious structured features.The plurality of semantic levels are a plurality of hierarchical structures divided based on semantic features of the initial text, and represent hierarchical relationship structures with semantic correlation. The structured text defines a text format, and a text element is a basic text element constituting the structured text. Each text element belongs to a specific semantic level. According to actual needs, the text element can be a word, a phrase, a sentence, or a paragraph. The reply text is output text of the text question answering task. The embodiments of the present disclosure belong to the same concept as the description embodiments of FIG. 1 described above. The technical solutions of the text question answering method that are not described in detail are described in the technical solutions of the task processing method described above, and will not be described here again. FIG. 7 shows a schematic diagram of a text question answering method according to an embodiment of the present disclosure. As shown in FIG. 7, the initial text is: "A track and field athlete from X country specializes in long-distance track events. During their career, the athlete has won three first places in A competition, five first places in B competition, and four first places in C competition. The athlete once held the 5000-meter record until it was broken by another athlete in recent years. At a B competition held in a certain year, this athlete made history by becoming the first to win both the 5000-meter and 10000-meter races in the same event. Also that year, she and another female athlete were among the only two people to win both the short-distance and long-distance races in the same B competition. With the first-place honors she achieved early in her career, the athlete became the youngest first-place holder in history at the age of less than 19. Growing up in a family with notable sports achievements, including multiple medalists, she lived in high-altitude areas from a young age and began track training at the age of 14. Despite her background, she later moved to live in a certain place." Unstructured text question answering: based on the initial text, a large language model is used to perform a text question answering task to obtain a reply text: "There is no such track and field athlete." Structured text question answering: based on the initial text, a natural language model is used for semantic analysis to generate structured text.
[0015] "Topic: Overview of the athletic career and achievements of a certain track and field athlete Aspect Dimension 1: Personal Background: Describe Inference 1.1: The athlete was born into a family with a strong sports background, with multiple medal winners in the family, and grew up in a large sibling environment. Describe Inference 1.2: Started track and field training at a relatively young age of 14. Early years were spent training at high altitudes, followed by a move to a certain location. Aspect Dimension 2: Athletic Achievements: Describe Inference 2.1: At A competition, the athlete achieved three first-place finishes in track and field events, and at B competition, accumulated multiple first-place finishes. Describe Inference 2.2: At B competition, the athlete also had impressive performances, winning multiple first-place finishes, and once held the 5000-meter record until it was later broken. Describe Inference 2.3: Created an extraordinary record by winning first place in both the 5000-meter and 10000-meter events at the same B competition, and achieved this at a very young age. Aspect Dimension 3: Highlights of Track and Field Events: Describe Inference 3.1: At a certain B competition, the athlete successfully won the 5000-meter event. Describe Inference 3.2: In the same year, the athlete also dominated the 5000-meter event at B competition, showcasing their overall abilities. Describe Inference 3.3: Looking back to the early years, the athlete won the 5000-meter event at B competition, marking a brilliant start to their career." Based on the question text and structured text, use the large language model to perform the text question answering task, and obtain the answer text: "A certain track and field athlete won first place in both the 5000-meter and 10000-meter events at the same B competition." In this embodiment of the disclosure, the initial task data is reorganized through natural language model context semantic analysis, generating a structured text composed of multiple semantic levels, and the multiple semantic levels have semantic relevance. Based on the question text and structured text, the text question answering task is performed, improving the accuracy of text question answering and the application range and generalization ability of text question answering. Currently, the illusion problem of question and answer models is a research hotspot, and how to measure whether the predicted answer text output by a question and answer model during training has illusion, and where the illusion is, is also a pending problem. If the answer text of a question is long, even if the standard label answer text is given, the illusion evaluator (usually another natural language model) is also difficult to determine the degree of illusion between the predicted answer text and the label answer text. One key problem is that the illusion evaluator is difficult to accurately find the target information from the large number of descriptive sentences in the given label answer text, so it cannot determine whether a predicted answer text is an illusion or a fact.To alleviate this problem, the label reply text can be subjected to semantic analysis to generate a structured label reply text, highlighting the information / knowledge structure and enhancing the illusion evaluator's understanding of the label reply text, so as to make more accurate model illusion evaluation. Referring to FIG. 8, which shows a flowchart of a model illusion evaluation method according to an embodiment of the present disclosure, the method comprises the following steps: in step 802, a predicted reply text output by a trained question and answer model and a label reply text used to train the question and answer model are obtained. In step 804, based on the label reply text, a natural language model is used to perform semantic analysis and generate a structured label reply text, wherein the structured label reply text comprises text elements of multiple semantic levels, and the multiple semantic levels have semantic relevance. In step 806, based on the predicted reply text and the structured label reply text, a model illusion evaluation task is performed to obtain an evaluation result. The embodiments of the present disclosure are applied to an application, website or platform with model illusion evaluation capability, for example, an application, website or platform of a certain department with a natural language model, and for example, an application, website or platform of an application that calls a natural language model through an application programming interface (API). The predicted reply text is the output text of the trained question and answer model, and the accuracy of the predicted reply text cannot be guaranteed because it is uncertain whether the question and answer model has illusion. The label reply text is a standard reply text used to train the language model, which is a pre-labeled standard reply text. The structured label reply text is a standard reply text with multiple semantic levels, which is obtained by structuring, disassembling and recombining the label reply text after understanding the structure of the label reply text from the semantic level. The evaluation result is the output result of the model illusion evaluation task. The embodiments of the present disclosure belong to the same concept as the description of the above-mentioned FIG. 1, and the details of the technical solutions of the model illusion evaluation method that are not described in detail can be referred to the description of the technical solutions of the task processing method, which will not be described here. FIG. 9 shows a schematic diagram of a model illusion evaluation method according to an embodiment of the present disclosure, as shown in FIG. 9: the predicted reply text is: "A certain director won the Best Director Award." After step 804, the structured label reply text is:
[0016] "Topic content: the life and career of a certain director: aspect dimension 1: early life and family background description inference 1.1: the director was born in a region of a certain large city in a country, the second son in the family … … Description inference 1.2: his parents deliberately chose a certain historical figure's name as his middle name as a tribute Aspect dimension 2: career highlights Description inference 2.1: the director won the best director award for a film … … Description inference 2.2: his artistic career continued to flourish until the XX century … … "The instruction information of the model hallucination evaluation task is: "According to the above content, evaluate the truthfulness of the statement." After step 806, the evaluation result is: "True. This director did win the best director award for a certain film." In the embodiment of the disclosure, the natural language model is used for context semantic analysis, the label reply text is reorganized, a structured label reply text composed of multiple semantic levels is generated, the multiple semantic levels have semantic relevance, based on the predicted reply text and the structured label reply text, the model hallucination evaluation task is performed, and the accuracy of the model hallucination evaluation is improved. At present, it has been proved that retrieval enhancement can significantly enhance the field knowledge when processing natural language tasks in professional fields. In the retrieval enhancement process, the accuracy of the target material data retrieved and the context understanding ability of the model directly determine the quality of the output data. Structured material data can even enhance the feature extraction capability, thereby improving the accuracy of the target material data retrieved. Referring to FIG. 10, FIG. 10 is a flowchart of a retrieval enhancement method according to an embodiment of the disclosure, which includes the following steps: step 1002: obtaining initial task data of a retrieval enhancement task, wherein the initial task data includes input data and multiple candidate material data. Step 1004: based on the multiple candidate material data, performing semantic analysis on the natural language model respectively, and generating multiple structured candidate material data, wherein the structured candidate material data includes multiple semantic level data elements, and the multiple semantic levels have semantic relevance. Step 1006: encoding the multiple structured candidate material data to obtain material data features of the multiple structured candidate material data, and encoding the input data to obtain input features. Step 1008: determining the structured target material data based on the feature correlation between the input features and the multiple material data features. Step 1010: performing the retrieval enhancement task based on the input data and the structured target material data to obtain the output data.The embodiments of the present disclosure are applied to an application program, a website or a platform with retrieval enhancement capability, for example, an application program, a website or a platform deployed with a natural language model, and for example, an application program that calls a natural language model through an application programming interface (API). The input data is input data of a retrieval enhancement task, used to start or guide the execution of a retrieval enhancement task. The input data can be a text, a query, a question, a command or other forms of data, and the purpose is to retrieve target material data to execute the retrieval enhancement task. The candidate material data is serialized format reference material data corresponding to the retrieval enhancement task to be retrieved, and the candidate material data is used as indirect reference data for the execution of the retrieval enhancement task. The candidate material data does not have obvious structured features. The candidate material data can be derived from an open source database, web crawling or a pre-stored database, and each candidate material data is a potential matching item, but has not been subjected to semantic analysis. The structured candidate material data is structured format reference material data corresponding to the retrieval enhancement task to be retrieved, and the structured candidate material data is used as direct reference data for the execution of the retrieval enhancement task. The structured candidate material data has obvious structured features. The material data feature is a quantitative coding feature of the candidate material data. The input feature is a quantitative coding feature of the input data. The structured target material data is structured format candidate material data matched with the input data, and is structured candidate material data meeting the requirements of the retrieval enhancement task, directly meeting or approaching the task requirements of the retrieval enhancement task. The embodiments of the present disclosure belong to the same concept as the description of the embodiments of the above FIG. 1. The technical solutions of the retrieval enhancement method that are not described in detail can be referred to the description of the technical solutions of the task processing method, and will not be described here. FIG. 11 shows a schematic diagram of a retrieval enhancement method according to an embodiment of the present disclosure. As shown in FIG. 11, one structured candidate material data obtained through step 1004 is:
[0017] "Topic content: DNA methylation applied to human peripheral blood mononuclear cells Aspect dimension 1: role of DNA methylation Description inference 1.1: DNA methylation plays an important role in the health and disease process of a certain cell type in the human body. Aspect dimension 2: technological progress Description inference 2.1: … … Aspect dimension 3: whole genome bisulfite sequencing Description inference 3.1: A technology called whole genome bisulfite sequencing is used to sequence and analyze samples at a certain coverage ratio … … " In the embodiment of the disclosure, the candidate material data is reorganized by the way of context semantic analysis of the natural language model, the structured candidate material data composed of multiple semantic levels is generated, the semantic correlation between the multiple semantic levels is generated, the feature coding capability is improved, the structured target material data is determined based on the feature correlation degree of the input data and the multiple structured candidate material data, the accuracy of the retrieval is improved, the retrieval enhancement task is executed based on the retrieval result with high accuracy, and the accuracy of the retrieval enhancement is improved. Fig. 12 shows a flowchart of a structured model training method according to an embodiment of the disclosure, which includes the following specific steps: Step 1202: Obtain sample task data corresponding to a target language task, and indication information and example information of a semantic analysis task, wherein the example information includes example data and structured example data, the structured example data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic correlation. Step 1204: Based on the indication information, the sample task data and the example information, perform a semantic analysis task by using a large language model to generate structured sample task data. Step 1206: Train the natural language model based on the sample task data and the structured sample task data to obtain a structured model. The embodiment of the disclosure is applied to a model training platform with model training capability. The embodiment of the disclosure belongs to the same concept as the description of the embodiment of Fig. 1 described above, and the details of the technical scheme of the structured model training method are not described in detail. Please refer to the description of the technical scheme of the task processing method described above. Here, it is not repeated. In the embodiment of the disclosure, the structured example data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic correlation. By using such example data, the large language model generates corresponding structured sample task data as label data for training the structured model, improves the ability of the structured model obtained by training to perform context semantic analysis, and improves the accuracy, application range and generalization capability of the structured model in task processing. Corresponding to the above method embodiment, the disclosure also provides a task processing device embodiment. Fig. 13 shows a structural schematic diagram of a task processing device according to an embodiment of the disclosure.As shown in FIG. 13, the apparatus includes: a first acquisition module 1302 configured to acquire initial task data corresponding to a target language task; a first semantic analysis module 1304 configured to perform semantic analysis based on the initial task data by using a natural language model to generate structured task data, wherein the structured task data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; and a first execution module 1306 configured to execute the target language task based on the structured task data to obtain a task execution result. Optionally, the natural language model is a large language model. Correspondingly, the first semantic analysis module 1304 is further configured to: acquire indication information and example information of a semantic analysis task, wherein the example information includes example data and structured example data; and perform the semantic analysis task by using the large language model based on the indication information, the initial task data and the example information to generate the structured task data. Optionally, the natural language model is a structured model pre-trained based on structured sample task data corresponding to the target language task. Correspondingly, the first semantic analysis module 1304 is further configured to: acquire indication information of a semantic analysis task; and perform the semantic analysis task by using the structured model based on the indication information and the initial task data to generate the structured task data. Optionally, the apparatus further includes: a training module configured to acquire sample task data corresponding to the target language task, and indication information and example information of a semantic analysis task, wherein the example information includes example data and structured example data, the structured example data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; perform the semantic analysis task by using the large language model based on the indication information, the sample task data and the example information to generate structured sample task data; and train the natural language model based on the sample task data and the structured sample task data to obtain the structured model. Optionally, the apparatus further includes: an execution information acquisition module configured to acquire indication information of the target language task. Correspondingly, the first execution module 1306 is further configured to: construct prompt information of the target language task based on the indication information and the structured task data; and input the prompt information into the large language model to execute the target language task and obtain the task execution result. Optionally, the apparatus further includes: an identification module configured to identify whether a number of data elements of the initial task data reaches a preset threshold. Correspondingly, the first semantic analysis module 1304 is further configured to: if yes, perform semantic analysis based on the initial task data by using the natural language model to generate the structured task data.Optionally, the apparatus further comprises a direct execution module configured to, if no, execute the target language task based on the initial task data to obtain a task execution result. Optionally, the plurality of semantic levels comprise at least two of a topic content level, an aspect dimension level, and a description derivation level. In the embodiment of the disclosure, the initial task data is reorganized by means of context semantic analysis of the natural language model, the structured task data composed of the plurality of semantic levels is generated, the target language task is executed based on the structured task data, and the accuracy of task processing is improved, and the application range and generalization capability of task processing are improved. The above is a schematic scheme of a task processing apparatus of the embodiment. It should be noted that the technical scheme of the task processing apparatus belongs to the same concept as the technical scheme of the task processing method described above, and the details of the technical scheme of the task processing apparatus that are not described in detail can be referred to the description of the technical scheme of the task processing method. Corresponding to the method embodiment described above, the disclosure further provides a text question and answer apparatus embodiment, and FIG. 14 shows a structural schematic diagram of a text question and answer apparatus provided by an embodiment of the disclosure. As shown in FIG. 14, the apparatus comprises: a second acquisition module 1402 configured to acquire question text of a text question and answer task and initial text corresponding to the text question and answer task; a second semantic analysis module 1404 configured to perform semantic analysis on the initial text by using a natural language model to generate structured text, wherein the structured text comprises text elements of a plurality of semantic levels, and the plurality of semantic levels have semantic correlation; and a second execution module 1406 configured to execute the text question and answer task based on the question text and the structured text to obtain answer text. In the embodiment of the disclosure, the initial task data is reorganized by means of context semantic analysis of the natural language model, the structured text composed of the plurality of semantic levels is generated, the text question and answer task is executed based on the question text and the structured text, and the accuracy of the text question and answer is improved, and the application range and generalization capability of the text question and answer are improved. The above is a schematic scheme of a text question and answer apparatus of the embodiment. It should be noted that the technical scheme of the text question and answer apparatus belongs to the same concept as the technical scheme of the text question and answer method described above, and the details of the technical scheme of the text question and answer apparatus that are not described in detail can be referred to the description of the technical scheme of the text question and answer method. Corresponding to the method embodiment described above, the disclosure further provides a model hallucination evaluation apparatus embodiment, and FIG. 15 shows a structural schematic diagram of a model hallucination evaluation apparatus provided by an embodiment of the disclosure.As shown in FIG. 15, the apparatus includes: a third acquisition module 1502 configured to acquire a predicted reply text output by a trained question and answer model and a labeled reply text used for training the question and answer model; a third semantic analysis module 1504 configured to perform semantic analysis on the labeled reply text respectively based on a natural language model to generate a structured labeled reply text, wherein the structured labeled reply text includes a plurality of semantic level text elements, and the plurality of semantic levels have semantic relevance; a third execution module 1506 configured to perform a model hallucination evaluation task based on the predicted reply text and the structured labeled reply text to obtain an evaluation result. In the embodiment of the present disclosure, the labeled reply text is reorganized by the way of context semantic analysis of the natural language model to generate the structured labeled reply text composed of a plurality of semantic levels, and the model hallucination evaluation task is performed based on the predicted reply text and the structured labeled reply text, thereby improving the accuracy of the model hallucination evaluation. The above is a schematic scheme of the model hallucination evaluation apparatus of the embodiment. It should be noted that the technical scheme of the model hallucination evaluation apparatus belongs to the same concept as the technical scheme of the model hallucination evaluation method described above, and the details of the technical scheme of the model hallucination evaluation apparatus which are not described in detail can be referred to the description of the technical scheme of the model hallucination evaluation method. Corresponding to the above method embodiment, the present disclosure also provides a retrieval enhancement apparatus embodiment, and FIG. 16 shows a structural schematic diagram of a retrieval enhancement apparatus provided by an embodiment of the present disclosure. As shown in FIG. 16, the apparatus includes: a fourth acquisition module 1602 configured to acquire initial task data of a retrieval enhancement task, wherein the initial task data includes input data and a plurality of candidate material data; a fourth semantic analysis module 1604 configured to perform semantic analysis on the plurality of candidate material data respectively based on a natural language model to generate a plurality of structured candidate material data, wherein the structured candidate material data includes a plurality of semantic level data elements, and the plurality of semantic levels have semantic relevance; an encoding module 1606 configured to encode the plurality of structured candidate material data to obtain material data features of the plurality of structured candidate material data, and encode the input data to obtain input features; a screening module 1608 configured to determine structured target material data based on feature correlation between the input features and the plurality of material data features; and a fourth execution module 1610 configured to perform the retrieval enhancement task based on the input data and the structured target material data to obtain output data.In the embodiment of the present disclosure, the candidate material data is reorganized by the way of context semantic analysis of the natural language model, structured candidate material data composed of multiple semantic levels is generated, the feature coding capability is improved on this basis, the structured target material data is determined based on the feature relevance of the input data and the multiple structured candidate material data, the accuracy of the retrieval is improved, the retrieval enhancement task is performed based on the high-accuracy retrieval result, and the accuracy of the retrieval enhancement is improved. The above is a schematic scheme of a retrieval enhancement device according to the embodiment. It should be noted that the technical scheme of the retrieval enhancement device belongs to the same concept as the technical scheme of the retrieval enhancement method described above, and the details of the technical scheme of the retrieval enhancement device that are not described in detail can be referred to the description of the technical scheme of the retrieval enhancement method. Corresponding to the method embodiment described above, the present disclosure also provides a structured model training device embodiment, and FIG. 17 shows a structural schematic diagram of a structured model training device according to an embodiment of the present disclosure. As shown in FIG. 17, the device comprises: a fifth acquisition module 1702 configured to acquire sample task data corresponding to a target language task, and indication information and example information of a semantic analysis task, wherein the example information comprises example data and structured example data, the structured example data comprises data elements of multiple semantic levels, and the multiple semantic levels have semantic association; a fifth semantic analysis module 1704 configured to perform a semantic analysis task based on the indication information, the sample task data and the example information, and generate structured sample task data by using a large language model; and a training module 1706 configured to train the natural language model based on the sample task data and the structured sample task data, and obtain a structured model. In the embodiment of the present disclosure, the structured example data comprises data elements of multiple semantic levels, and the multiple semantic levels have semantic association, and by using such example data, the corresponding structured sample task data is generated by using the large language model as label data for training the structured model, the capability of the structured model obtained by training to perform context semantic analysis is improved, and the accuracy, application range and generalization capability of the structured model in task processing are improved. The above is a schematic scheme of a structured model training device according to the embodiment. It should be noted that the technical scheme of the structured model training device belongs to the same concept as the technical scheme of the structured model training method described above, and the details of the technical scheme of the structured model training device that are not described in detail can be referred to the description of the technical scheme of the structured model training method. Corresponding to the method embodiment described above, the present disclosure also provides a task platform embodiment, and FIG. 18 shows a structural schematic diagram of a task platform according to an embodiment of the present disclosure.As shown in FIG. 18, the task platform includes a request interface 1802 and a response unit 1804; the request interface 1802 is configured to receive a task processing request sent by a terminal device, wherein the task processing request includes initial task data corresponding to a target language task; the response unit 1804 is configured to perform semantic analysis based on the initial task data by using a natural language model, generate structured task data, execute the target language task based on the structured task data, and obtain a task execution result, wherein the structured task data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic correlation. In the embodiment of the present disclosure, after the request interface receives the task processing request sent by the terminal device, the response unit reorganizes the initial task data by using the natural language model to perform context semantic analysis, generates structured task data composed of multiple semantic levels, the multiple semantic levels have semantic correlation, executes the target language task based on the structured task data, improves the accuracy of task processing, and improves the application range and generalization ability of task processing. The above is a schematic scheme of a task platform according to the embodiment. It should be noted that the technical scheme of the task platform belongs to the same concept as the technical scheme of the task processing method described above, and the details of the technical scheme of the task platform that are not described in detail can be referred to the description of the technical scheme of the task processing method. FIG. 19 shows a structural block diagram of a computing device according to an embodiment of the present disclosure. The components of the computing device 1900 include but are not limited to a memory 1910 and a processor 1920. The processor 1920 is connected to the memory 1910 through a bus 1930. A database 1950 is configured to save data. The computing device 1900 further includes an access device 1940, which enables the computing device 1900 to communicate via one or more networks 1960. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet.The access device 1940 can include one or more of wired or wireless network interfaces (e.g., network interface cards (NICs)) such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (WiMAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, etc. In an embodiment of the disclosure, the aforementioned components of the computing device 1900, and other components not shown in FIG. 19, can be connected to each other by a bus or the like. It should be understood that the structure diagram of the computing device shown in FIG. 19 is merely for the purpose of example, and is not a limitation on the scope of the disclosure. Those skilled in the art can add or replace other components as needed. The computing device 1900 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 1900 can also be a mobile or stationary server. The processor 1920 is configured to execute computer program / instructions that implement the steps of the task processing method, the text question answering method, the model hallucination evaluation method, the retrieval enhancement method, or the structured model training method when the computer program / instructions are executed by the processor. The above is a schematic scheme of a computing device according to the present embodiment. It should be noted that the technical scheme of the computing device belongs to the same concept as the technical schemes of the task processing method, the text question answering method, the model hallucination evaluation method, the retrieval enhancement method, and the structured model training method. Details of the technical scheme of the computing device that are not described in detail can be found in the description of the technical schemes of the task processing method, the text question answering method, the model hallucination evaluation method, the retrieval enhancement method, or the structured model training method.The embodiment of the present disclosure further provides a computer readable storage medium, which stores computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps of the above task processing method, text question answering method, model hallucination evaluation method, retrieval enhancement method or structured model training method. The above is a schematic scheme of the computer readable storage medium of the embodiment. It should be noted that the technical scheme of the storage medium belongs to the same concept as the technical scheme of the above task processing method, text question answering method, model hallucination evaluation method, retrieval enhancement method and structured model training method, and the details of the technical scheme of the storage medium which are not described in detail can be referred to the description of the technical scheme of the above task processing method, text question answering method, model hallucination evaluation method, retrieval enhancement method or structured model training method. The embodiment of the present disclosure further provides a computer program product, which includes computer programs / instructions, and the computer programs / instructions are executed by a processor to implement the steps of the above task processing method, text question answering method, model hallucination evaluation method, retrieval enhancement method or structured model training method. The above is a schematic scheme of the computer program product of the embodiment. It should be noted that the technical scheme of the computer program product belongs to the same concept as the technical scheme of the above task processing method, text question answering method, model hallucination evaluation method, retrieval enhancement method and structured model training method, and the details of the technical scheme of the computer program product which are not described in detail can be referred to the description of the technical scheme of the above task processing method, text question answering method, model hallucination evaluation method, retrieval enhancement method or structured model training method. The above describes specific embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still accomplish desirable results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve desirable results. In certain implementations, multitasking and parallel processing can be advantageous. The computer instructions include computer program code, which can be in source code, object code, executable code, or some intermediate form. The computer readable medium can include any entity or apparatus capable of carrying the computer program code, recording medium, USB flash disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.It should be noted that the contents included in the computer readable medium can be appropriately increased or decreased according to requirements of patent practices, for example, according to patent practices in some regions, the computer readable medium does not include electric carrier signals and telecommunication signals. It should be noted that, for the foregoing method embodiments, in order to facilitate description, each is expressed as a combination of a series of actions, but those skilled in the art should know that the disclosed embodiments are not limited to the action sequence described, because according to the disclosed embodiments, some steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily essential to the disclosed embodiments. In the foregoing embodiments, the description of each embodiment is focused on, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments. The preferred embodiments of the disclosure disclosed above are only used to better explain the disclosure. The optional embodiments do not describe all the details, and the invention is not limited to the specific embodiments described. Obviously, according to the content of the disclosed embodiments, many modifications and changes can be made. The disclosure selects and specifically describes these embodiments in order to better explain the principles and practical applications of the disclosed embodiments, so that those skilled in the art can well understand and use the disclosure. The disclosure is limited only by the claims and their full scope and equivalents.
Claims
CLAIM 1. A method of task processing, comprising: obtaining initial task data corresponding to a target language task; performing semantic analysis on the initial task data based on the initial task data using a natural language model to generate structured task data, wherein the structured task data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; and executing the target language task based on the structured task data to obtain a task execution result.
2. The method of claim 1, wherein the natural language model is a large language model; and wherein the generating, based on the initial task data, structured task data by performing semantic analysis using a natural language model comprises: obtaining instruction information and example information of a semantic analysis task, wherein the example information includes example data and structured example data; and performing the semantic analysis task using the large language model based on the instruction information, the initial task data, and the example information to generate structured task data.
3. The method of claim 1, wherein the natural language model is a structured model pre-trained based on structured sample task data corresponding to a target language task; and the generating structured task data by performing semantic analysis on the initial task data using the natural language model comprises: obtaining instruction information of a semantic analysis task; performing the semantic analysis task using the structured model based on the instruction information and the initial task data to generate structured task data.
4. The method of claim 3, before the performing, based on the indication information and the initial task data, the semantic analysis task using the structured model to generate structured task data, further comprising: obtaining sample task data corresponding to a target language task, and instruction information and example information of a semantic analysis task, wherein the example information includes example data and structured example data, the structured example data includes data elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; performing the semantic analysis task using a large language model based on the instruction information, the sample task data, and the example information to generate structured sample task data; and training a natural language model based on the sample task data and the structured sample task data to obtain a structured model.
5. The method of any of claims 1-4, before the performing the target language task based on the structured task data, obtaining a task execution result, further comprising: obtaining instruction information of the target language task; performing the target language task based on the instruction information and the structured task data to obtain a task execution result, including: constructing prompt information of the target language task based on the instruction information and the structured task data; inputting the prompt information into a large language model to perform the target language task and obtain a task execution result.
6. The method of any one of claims 1-5, before the generating the structured task data based on the initial task data using a natural language model to perform semantic analysis, further comprising: determining whether the number of data elements of the initial task data reaches a preset threshold; 25 performing semantic analysis on the initial task data using a natural language model to generate structured task data, including: if yes, performing semantic analysis on the initial task data using a natural language model to generate structured task data.
7. The method of any one of claims 1-6, wherein the multiple semantic levels include at least two of a topic content level, an aspect dimension level, and a description derivation level.
8. A method of text question answering, comprising: obtaining question text of a text question and answer task and initial text corresponding to the text question and answer task; performing semantic analysis on the initial text using a natural language model to generate structured text, wherein the structured text includes text elements of multiple semantic levels, and the multiple semantic levels have semantic relevance; and executing the text question and answer task based on the question text and the structured text to obtain answer text.
9. A method of model hallucination assessment, comprising: obtaining a predicted reply text output by a trained question and answer model, and a labeled reply text used for training the question and answer model; based on the labeled reply text, performing semantic analysis on the natural language model respectively to generate a structured labeled reply text, wherein the structured labeled reply text includes a plurality of semantic level text elements, and the plurality of semantic levels have semantic relevance; based on the predicted reply text and the structured labeled reply text, performing the model hallucination evaluation task to obtain an evaluation result.
10. A method of retrieving augmentation, comprising: obtaining initial task data of a retrieval enhancement task, wherein the initial task data includes input data and a plurality of candidate material data; based on the plurality of candidate material data, performing semantic analysis on the natural language model respectively to generate a plurality of structured candidate material data, wherein the structured candidate material data includes a plurality of semantic level data elements, and the plurality of semantic levels have semantic relevance; encoding the plurality of structured candidate material data to obtain material data features of the plurality of structured candidate material data, and encoding the input data to obtain input features; based on the feature correlation degree between the input features and the plurality of material data features, determining structured target material data; based on the input data and the structured target material data, performing the retrieval enhancement task to obtain output data.
11. A method of training a structured model, comprising: obtaining sample task data corresponding to a target language task, and instruction information and example information of a semantic analysis task, wherein the example information includes example data and structured example data, and the structured example data includes a plurality of semantic level data elements, and the plurality of semantic levels have semantic relevance; based on the instruction information, the sample task data and the example information, performing the semantic analysis task on the large language model to generate structured sample task data; based on the sample task data and the structured sample task data, training the natural language model to obtain a structured model.
12. A task platform, comprising a request interface and a response unit; the request interface is configured to receive a task processing request sent by a terminal device, wherein, The task processing request includes initial task data corresponding to a target language task. The response unit is configured to perform semantic analysis on the natural language model based on the initial task data to generate structured task data, and perform the target language task based on the structured task data to obtain a task execution result, wherein the structured task data includes a plurality of semantic level data elements, and the plurality of semantic levels have semantic relevance.
13. A computing device comprising: a memory and a processor; The memory is configured to store computer programs / instructions, and the processor is configured to execute the computer programs / instructions, so as to realize the steps of the method in any one of claims 1 to 11.
14. A computer readable storage medium having stored thereon computer programs / instructions, which when executed by a processor implement the steps of the method of any one of claims 1 to 11.
15. A computer program product comprising computer programs / instructions, which when executed by a processor implement the steps of the method of any one of claims 1 to 11.
Citation Information
Patent Citations
Hierarchical machine translation method and system based on predicate argument structures
CN103577398A
Building information model intelligent extraction method and system based on large language model
CN117332069A
Knowledge processing method and device based on large model, knowledge question and answer method and device based on large model, and medium
CN117743558A
Personalized table of contents (TOC) generation based on search results
US20200159795A1
Cited By
Method and device for retrieving medical information and storage medium
CN122025108A