Generative ai text reasoning and representation method based on loyalty perception mechanism
By constructing a complete thought chain and combining it with a fidelity scoring mechanism, the problems of insufficient logical consistency and difficulty in quantifying semantic credibility in unstructured text processing by generative AI models are solved, thus achieving controllability and interpretability of generated content.
Patent Information
- Application Number
- CN202511537835.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-27
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2045-10-27
AI Technical Summary
Existing generative AI models lack logical structure guidance when processing unstructured text, resulting in opaque and unreliable generated content, and making it difficult to quantify semantic credibility.
By constructing a complete thought chain, generating content through segmentation and truncation, and combining a loyalty scoring mechanism with a pre-trained BERT model, a unified entity-level text semantic vector representation is generated, enhancing logical consistency and credibility.
It achieves controllability and interpretability of generated content, improves the logical consistency and semantic credibility of generative models in unstructured text processing, and reduces the risk of hallucinations.
Smart Images

Figure CN120996214B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to a generative AI text reasoning and representation method based on loyalty awareness mechanism. BACKGROUND
[0002] In recent years, with the development of generative artificial intelligence (Gen AI) and large language models, it has shown great ability in text generation, understanding and reasoning. Especially when dealing with unstructured text data, generative AI models can automatically generate explanatory analysis content in the absence of explicit structure, providing auxiliary information for downstream tasks.
[0003] In related technologies, to enhance the reasoning ability and transparency of the model, the "Chain-of-Thought (CoT)" prompting mechanism has been introduced, which guides the model to generate answers step by step along the logical path through a series of predefined reasoning steps. This mechanism has been used in some mathematical problem solving, question and answer systems, etc. and has shown good performance in improving reasoning accuracy. However, most of these methods only focus on the logical coherence of the output. Since the generation behavior of large language models is still based on probabilistic language modeling, there is a risk that the actual reasoning path deviates from the explicit prompt steps, i.e. "surface logic is consistent but internal decision mechanism is not transparent", leading to user misbelief in the model's judgment.
[0004] Some other methods try to extract sentence embeddings or semantic representations from the output content as feature input for downstream analysis, such as using BERT, RoBERTa, etc. to encode the text and directly aggregate the representation for classification or sorting. However, such methods usually ignore the position and credibility of each piece of generated text in the logical chain, and cannot distinguish which text sentences are high-loyalty reasoning products and which may deviate from the reasoning chain, ultimately leading to uncontrollable and unreliable overall representation, affecting the performance and explainability of subsequent models.
[0005] Based on this, existing generative models are mostly generated based on implicit statistical patterns in deep neural networks, lack controllable logical structure, and there are phenomena of opaque, unreliable, and even logically deviating from the preset target. The generative model has the problems of insufficient logical consistency and difficulty in quantifying semantic credibility when processing unstructured text. SUMMARY
[0006] To solve the problems of insufficient logical consistency and difficulty in quantifying semantic credibility of the existing generative model when processing unstructured text, the present application provides a generative AI text reasoning and representation method based on loyalty awareness mechanism.
[0007] To achieve the above object, the application is implemented by the following technical solutions:
[0008] In a first aspect, the embodiments of the present application provide a generative AI text reasoning and representation method based on loyalty awareness mechanism, which comprises: constructing a complete thought chain, guiding the construction of generative analysis content based on the complete thought chain, and segmenting the generative analysis content to obtain segmented content; step-by-step truncation of the complete thought chain to obtain multi-level truncated thought chains, and collection of multiple AI analysis contents generated by the truncated thought chains, and measurement of the loyalty of each sentence in the generative analysis content constructed based on the complete thought chain; construction of a loyalty scoring mechanism based on semantic similarity to measure the logical consistency of each sentence in the generated content under the complete thought chain to calculate a sentence-level comprehensive loyalty score; construction of a semantic vector of the complete thought chain sentence through a pre-trained BERT model, and integration of the sentence-level comprehensive loyalty score to obtain a document-level semantic vector fused with loyalty; using a sequence modeling mechanism based on a BiGRU structure to combine a global attention module to assign different weights to different generated content, perform document aggregation, and generate a unified entity-level text semantic vector representation; integrating the entity-level text semantic vector representation with target structured data for structured task integration, and processing through a multi-layer perception network MLP to complete task output; wherein the target structured data corresponds to the research subject information.
[0009] According to the first aspect of the embodiments of the present application, the aforementioned construction of a complete thought chain, guiding the construction of generative analysis content based on the complete thought chain, and segmenting the generative analysis content to obtain segmented content can specifically include the following steps: obtaining unstructured original text information and research subject information corresponding to the original text information, one research subject corresponding to one entity; inputting the original text information and the research subject information into a generative artificial intelligence model; decomposing each sub-problem corresponding to the actual demand according to the actual demand and domain expert knowledge of the task scene, and establishing a complete thought chain; the complete thought chain is composed of reasoning steps and satisfies the expression: , represents the reasoning step; generating generative analysis content for analyzing text content based on the prompt guidance of the complete thought chain, the generative analysis content being step-by-step reasoning content and being able to represent research subject characteristics and subject-related content; sentence-level segmentation of the generative analysis content, each document being segmented into sentences to obtain segmented content for further sentence-level semantic representation, is a positive integer.
[0010] According to a first aspect of the embodiments of the present application, the foregoing step-by-step truncation of the complete thought chain to obtain a multi-level truncated thought chain, and collecting a plurality of AI analysis contents generated by the truncated thought chain, measuring the loyalty of each sentence in the generative analysis content constructed based on the complete thought chain, can specifically include the following steps: sequentially truncating each reasoning step of the complete thought chain to generate k truncated thought chains of different lengths; wherein each truncated thought chain uses the same input and target task as the complete thought chain; based on the same input and target task, using the truncated thought chain to guide the GenAI to generate corresponding AI analysis content; calculating the semantic similarity between each sentence of the generative analysis content determined by the complete thought chain and the AI analysis content corresponding to the truncated version of the truncated thought chain; using a BERT-based sentence-level embedding model SBERT to generate an embedding vector, and using a cosine similarity index to compare to obtain semantic similarity information to measure the loyalty of each sentence in the generative analysis content.
[0011] According to a first aspect of the embodiments of the present application, the foregoing k truncated thought chains include: a first truncated thought chain containing a single reasoning step , a second truncated thought chain containing two reasoning steps , and an i-1 truncated thought chain containing i-1 reasoning steps.
[0012] According to a first aspect of the embodiments of the present application, the foregoing loyalty score mechanism is constructed based on semantic similarity to measure the logical consistency of the generated content of each sentence under the complete thought chain to calculate a sentence-level comprehensive loyalty score, including: for the semantic similarity information corresponding to the k truncated thought chains, sequentially calculating the complement, summing and averaging to obtain a sentence-level comprehensive loyalty score of each sentence in the AI analysis content to measure the logical consistency of the generated content of each sentence under the complete thought chain.
[0013] According to a first aspect of the embodiments of the present application, the foregoing semantic vector of the complete thought chain sentence is constructed by pre-training the BERT model, and the sentence-level comprehensive loyalty score is integrated to obtain a document-level semantic vector with fusion loyalty, which can specifically include the following steps: using a pre-trained BERT model for a specific text type to construct a semantic vector for each sentence to obtain a document embedding vector of the research subject; based on the sentence-level comprehensive loyalty score, dot product with the semantic vector of the corresponding sentence to obtain a sentence-level vector with fusion loyalty awareness mechanism, so as to integrate the sentence-level comprehensive loyalty score as an attention factor into the text vector representation, and realize dynamic adjustment of the weight of different sentences; summing and averaging the sentence-level vectors of multiple fusion loyalty awareness mechanisms to obtain a document-level semantic vector with fusion loyalty, and realizing the credibility optimization of the overall representation of the text.
[0014] According to the first aspect of the embodiments of the present application, the sequence modeling mechanism based on the BiGRU structure is used to assign different weights to different generated contents by combining the global attention module, aggregate the documents, and generate a unified entity-level text semantic vector representation. Specifically, it can include the following steps: using the sequence modeling mechanism based on the BiGRU structure, based on the preset BiGRU module, processing the plurality of document-level semantic vectors through two different direction GRU units, integrating the context information into the document-level semantic representation, and obtaining the document-level input information; through the global attention mechanism, each text is adaptively assigned an importance weight, the document-level input information is input into a linear layer, and the input of the candidate state is obtained through a nonlinear activation function; the attention score is normalized by using the softmax function, the weighted average of all document-level inputs is obtained, and the entity-level text semantic vector representation is obtained.
[0015] According to the first aspect of the embodiments of the present application, the entity-level text semantic vector representation is integrated with the target structured data for structured task, and is processed through the multi-layer perception network MLP to complete the task output, including: splicing and inputting the entity-level text semantic vector representation and the target structured data containing statistical indicators and quantitative features;
[0016] The information after splicing processing is input into the multi-layer perception network MLP for processing to complete the final task output; the processing steps of the multi-layer perception network MLP satisfy the expression:
[0017]
[0018]
[0019]
[0020] Wherein, , , , , and are training parameters; is the target structured data, is the entity-level text semantic vector representation; and are two different intermediate values, and are activation functions; represents the final task output.
[0021] In a second aspect, the embodiments of the present application provide a generative AI text reasoning and representation system based on a loyalty awareness mechanism, which comprises a content segmentation module, a first metric module, a second metric module, a loyalty fusion module, a document aggregation module, and a task integration output module.
[0022] Specifically, the content segmentation module is configured to construct a complete thought chain, guide the construction of generative analysis content based on the complete thought chain, and segment the generative analysis content to obtain segmented content; the first metric module is configured to truncate the complete thought chain step by step to obtain a plurality of truncated thought chains, collect a plurality of AI analysis contents generated based on the truncated thought chains, and measure the loyalty of each sentence in the generative analysis content constructed based on the complete thought chain; the second metric module is configured to construct a loyalty scoring mechanism based on semantic similarity, measure the logical consistency of each sentence in the generated content under the complete thought chain, and calculate a sentence-level comprehensive loyalty score; the loyalty fusion module is configured to construct a semantic vector of a sentence in the complete thought chain by using a pre-trained BERT model, integrate the sentence-level comprehensive loyalty score, and obtain a document-level semantic vector of fused loyalty; the document aggregation module is configured to use a sequence modeling mechanism based on a BiGRU structure, combine a global attention module to assign different weights to different generated content, perform document aggregation, and generate a unified entity-level text semantic vector representation; and the task integration output module is configured to perform structured task integration on the entity-level text semantic vector representation and target structured data corresponding to the research subject information, process the target structured data through a multi-layer perception network MLP, and complete task output.
[0023] In a third aspect, the embodiments of the present application provide an electronic device, which comprises a processor, a memory, and a program stored on the memory and executable on the processor, and the program is executed by the processor to implement the generative AI text reasoning and representation method based on the loyalty awareness mechanism in the first aspect.
[0024] In a fourth aspect, the embodiments of the present application provide a computer-readable storage medium, which stores a program or instructions, and the program or instructions are executed by a processor to implement the generative AI text reasoning and representation method based on the loyalty awareness mechanism in the first aspect.
[0025] The present application provides a generative AI text reasoning and representation method based on a loyalty awareness mechanism. Compared with the prior art, the present application has the following beneficial effects:
[0026] In generative AI text reasoning and representation analysis, this application constructs a complete thought chain to effectively identify whether AI-generated content truly follows the designed reasoning path and reduce the risk of illusion. This complete thought chain is then progressively truncated to obtain multi-level truncated thought chains. Based on the complete and truncated thought chains, fidelity is measured. First, a fidelity scoring mechanism is used to calculate a sentence-level comprehensive fidelity score, enhancing the logical consistency and credibility of the generated content. Then, a pre-trained BERT model is used to construct semantic vectors for sentences within the complete thought chain, integrating the sentence-level comprehensive fidelity scores to obtain document-level semantic vectors. Furthermore, different weights are assigned to different generated content, and document aggregation is performed to generate a unified entity-level text semantic vector representation. By assigning weights, high-fidelity content is enhanced in the final semantic representation, making the model more focused on reliable information and improving the task relevance and discriminative ability of the text representation. This application achieves structural supervision of the output of the black-box model through structured reasoning guidance and explicit fidelity feedback mechanism, which solves the problems of insufficient logical consistency and difficulty in quantifying semantic credibility in generative models when processing unstructured text, and enhances the controllability and interpretability of generative models. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 This is a flowchart illustrating a generative AI text reasoning and representation method based on a fidelity-aware mechanism provided in an embodiment of this application.
[0029] Figure 2 This is an exemplary detailed operation flowchart of the generative AI text reasoning and representation method based on a fidelity perception mechanism provided in the embodiments of this application;
[0030] Figure 3 This is an exemplary flowchart illustrating loyalty analysis based on complete and truncated thought chains, provided in an embodiment of this application.
[0031] Figure 4 This is a schematic diagram of the structure of a generative AI text reasoning and representation system based on a fidelity perception mechanism provided in an embodiment of this application;
[0032] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0033] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application are described clearly and completely. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0034] It should be noted that, in this document, relational terms such as first and second and the like can only be used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual such relationship or order between or among the entities or operations. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0035] The embodiments of the present application provide a generative AI text reasoning and representation method based on loyalty awareness mechanism, and solve the problems of insufficient logical consistency and difficult quantification of semantic reliability of generative models in processing unstructured text.
[0036] The technical solutions in the embodiments of the present application are as follows to solve the above technical problems:
[0037] In recent years, with the development of generative artificial intelligence (Gen AI) and large language models, it has shown great ability in text generation, understanding and reasoning. Especially when dealing with unstructured text data, generative AI models can automatically generate explanatory analysis content in the absence of explicit structure, providing auxiliary information for downstream tasks.
[0038] In related technologies, to enhance the inference ability and transparency of the model, the prior art introduces a "Chain-of-Thought (CoT)" prompting mechanism, which guides the model to generate answers step by step along a logical path through a series of predefined reasoning steps. This mechanism has been used in some mathematical problem solving, question and answer systems and other tasks, and has shown good performance in improving reasoning accuracy. This method explicitly lists the multi-step reasoning process in the prompt, guiding the generative language model (such as GPT) to complete the analysis task according to the specified steps. For example, in complex problem solving or logical judgment tasks, a prompt structure such as "first step analysis …, second step judgment …, third step conclusion" can be constructed to guide the model to generate reasoning content step by step. Although this method improves the logical coherence of the generated text content in form, it still has two key defects: on the one hand, the current mainstream generative model does not have the ability to actually execute the logical path, and its generation process is still based on language probability modeling, so the output reasoning steps may not be the actual internal cognitive path of the model; on the other hand, there is still a lack of systematic mechanism in the prior art to measure the degree of adherence of the model-generated content to the preset reasoning path, and it is impossible to determine whether the generated analysis is truly "faithful" to the logical framework in the prompt. This potential deviation may lead to the problem that the generated content, although surface reasonable and structurally complete, actually contains false information or reasoning errors, thereby misleading the user.
[0039] Some other methods try to extract sentence embeddings or semantic representations from the output content as feature inputs for downstream analysis. These methods usually input the original text into encoders such as BERT or RoBERTa, extract sentence or document-level embedding vectors as semantic features, and use them for subsequent classification, prediction or ranking tasks. For example, in the text classification scenario, the representation vectors can be extracted and input into a shallow neural network or logistic regression model to determine the category or risk level of the text. However, this method has significant shortcomings: first, the model does not perform structural and logical analysis on the text content, and the semantic representation cannot reflect the reasoning relationship between information; second, the generated feature vectors lack interpretability, and it is difficult to determine whether the model has captured the key semantics related to the task, especially in high-risk application scenarios, it is difficult to ensure the reliability of the output.
[0040] Therefore, existing generative models are generated based on the implicit statistical patterns in deep neural networks, lack controllable logical structures, and there are phenomena of opaque, unreliable, and even logical deviation from the preset target. The generative model has the problems of insufficient logical consistency and difficulty in quantifying semantic credibility in processing unstructured text.
[0041] In summary, the prior art has two common problems in using generative artificial intelligence to process complex text: one is the lack of logical structure guidance, which leads to a lack of depth and transparency in the model's understanding of unstructured text; the other is the lack of a mechanism to measure the reliability of generated reasoning content, especially the difficulty in determining whether the model truly follows the specified thinking chain for reasoning. To address the above problems, the present application proposes a generative AI text processing method that integrates logical guidance and semantic fidelity control mechanisms to improve the controllability, credibility, and semantic quality of generated content.
[0042] In order to better understand the above technical solutions, the above technical solutions will be described in detail below in conjunction with the drawings in the specification and specific embodiments.
[0043] First, a generative AI text reasoning and representation method based on a fidelity perception mechanism provided by the embodiments of the present application will be introduced.
[0044] The flowchart of the generative AI text reasoning and representation method based on the fidelity perception mechanism provided by the embodiments of the present application is shown in Figure 1 The generative AI text reasoning and representation method based on the fidelity perception mechanism can include the following steps S110-S160.
[0045] S110, construct a complete thinking chain, guide the construction of generative analysis content based on the complete thinking chain, and segment the generative analysis content to obtain segmented content;
[0046] S120, truncate the complete thinking chain step by step to obtain multi-level truncated thinking chains, collect multiple AI analysis contents generated by the truncated thinking chains, and measure the fidelity of each sentence in the generative analysis content based on the complete thinking chain;
[0047] S130, construct a fidelity scoring mechanism based on semantic similarity, measure the logical consistency of the generated content of each sentence under the complete thinking chain, and calculate the sentence-level comprehensive fidelity score;
[0048] S140, construct the semantic vector of the complete thinking chain sentence through the pre-trained BERT model, and integrate the sentence-level comprehensive fidelity score to obtain a document-level semantic vector fused with fidelity;
[0049] S150, use a sequence modeling mechanism based on the BiGRU structure to assign different weights to different generated content by combining a global attention module, perform document aggregation, and generate a unified entity-level text semantic vector representation;
[0050] S160, the entity-level text semantic vector representation is integrated with the target structured data for a structured task, and is processed through a multi-layer perception network (MLP) to complete task output; wherein the target structured data corresponds to the subject information.
[0051] The above is a specific implementation of the method for generative AI text reasoning and representation provided by the embodiments of the present application based on the fidelity perception mechanism. Please refer to Figure 1 and Figure 2 The present application provides a systematic mechanism combining reasoning chain guidance, fidelity evaluation and semantic representation adjustment. In the analysis of generative AI text reasoning and representation, in order to effectively identify whether the AI generated content truly follows the designed reasoning path and reduce the illusion risk, a complete thought chain is constructed, and the complete thought chain is gradually truncated to obtain a multi-level truncated thought chain. The fidelity is measured based on the complete thought chain and the truncated thought chain.
[0052] Specifically, the analysis process of the subject of the present application focuses on three stages of sentence-level comprehensive fidelity score, document-level semantic vector and entity-level text semantic vector representation. The present application first calculates the sentence-level comprehensive fidelity score through the fidelity score mechanism to enhance the logical consistency and credibility of the generated content. Then, the semantic vector of the complete thought chain sentence is constructed through the pre-trained BERT model, the sentence-level comprehensive fidelity score is integrated, and the document-level semantic vector is obtained by fusing the fidelity. Further, different weights are assigned to different generated content, the documents are aggregated, and a unified entity-level text semantic vector representation is generated. By assigning weights, high-fidelity content is enhanced in the final semantic representation, making the model focus more on reliable information and improving the task relevance and discriminability of text representation.
[0053] Based on this, the present application realizes the structural supervision of the black box model output through the structured reasoning guidance and explicit fidelity feedback mechanism, solves the problems of insufficient logical consistency and difficult quantification of semantic credibility in the process of processing unstructured text by the generative model, and enhances the controllability and explainability of the generative model. The present method can be applied to various scenarios involving generative AI text analysis, such as financial evaluation, legal assistance, medical document interpretation, etc.
[0054] The present application performs structural logical analysis on the text content, reflects the reasoning relationship between information, and generates a feature vector (such as an entity-level text semantic vector) with interpretability, which can determine whether the task-related key semantics are captured, and especially ensure the reliability of the output in high-risk application scenarios. On the one hand, it has the ability to execute a real logical path, and its generation process is not based on single language probability modeling, and the output reasoning steps correspond to the real internal cognitive path of the model. On the other hand, it can also measure the degree of compliance of the model-generated content to the preset reasoning path, and determine whether the generated analysis is truly "faithful" to the logical framework in the prompt. The present application can be widely applied in the fields of semantic understanding, automatic reasoning, feature extraction and task decision of unstructured text information, has wide deployment value, good scalability and application universality.
[0055] In some embodiments, the foregoing constructs a complete thought chain, guides the construction of the generative analysis content based on the complete thought chain, and segments the generative analysis content to obtain segmented content, that is, the foregoing S110 can specifically include the following steps:
[0056] S210, obtaining unstructured original text information and research subject information corresponding to the original text information, one research subject corresponding to one entity;
[0057] S220, inputting the original text information and the research subject information into a generative artificial intelligence model;
[0058] S230, combining the actual needs of the task scene and the field expert knowledge, decomposing each sub-problem corresponding to the actual needs, and establishing a complete thought chain; the complete thought chain is composed of a reasoning step and satisfies the expression: , represents the th reasoning step;
[0059] S240, generating generative analysis content for analyzing the text content based on the prompt guidance of the complete thought chain, the generative analysis content being step-by-step reasoning content and being capable of representing the research subject characteristics and the subject-related content;
[0060] S250, performing sentence-level segmentation on the generative analysis content, each document being segmented into sentences to obtain segmented content for further sentence-level semantic representation, is a positive integer.
[0061] In the embodiments of the present application, it can be understood that the present application obtains unstructured original text information such as industry announcements, business records or public documents, and research subject information, and inputs them into a generative artificial intelligence model GenAI together, to generate step-by-step reasoning content for analyzing the text content under the complete structured complete thinking chain prompt designed by experts , represents a thinking chain; can reflect the characteristics of the research subject and the subject-related content, and divide the content into sentences, denoted as , wherein each document is thus divided into sentences for further sentence-level semantic representation, represents the first sentence obtained by division, represents the second sentence obtained by division, represents the nth sentence obtained by division, represents a set of n sentences obtained by division. The complete thinking chain design includes multiple logical steps, covering tasks such as semantic extraction, comparison judgment and conclusion summary.
[0062] It should be noted that the present application designs a set of multi-step thinking chain prompt structure guided by domain expert knowledge and task requirements, which explicitly decomposes complex problems into step-by-step logical reasoning tasks, and guides the generative AI (such as large language model) to perform information extraction, content comparison and comprehensive judgment step by step. This structured prompt is different from general prompt or open dialogue generation, and can significantly improve the transparency of the model reasoning path and the completeness of the analysis content.
[0063] In some embodiments, the foregoing complete thinking chain is truncated step by step to obtain a plurality of truncated thinking chains, and a plurality of AI analysis contents generated by the truncated thinking chains are collected, and the fidelity of each sentence in the generative analysis content constructed based on the complete thinking chain is measured, that is, the foregoing S120 can include the following steps:
[0064] S310, sequentially truncating each reasoning step of the complete thinking chain to generate k truncated thinking chains of different lengths; wherein each truncated thinking chain uses the same input and target task as the complete thinking chain;
[0065] S320, based on the same input and target task, using the truncated thinking chain to guide the GenAI to generate corresponding AI analysis content;
[0066] S330, calculating the semantic similarity between each sentence corresponding to the generative analysis content determined by the complete thinking chain and the AI analysis content corresponding to the truncated thinking chain of different truncated versions;
[0067] S340, generate embedding vectors using a BERT-based sentence-level embedding model SBERT, and compare using a cosine similarity index to obtain semantic similarity information to measure the fidelity of each sentence in the generative analysis content.
[0068] Exemplarily, the aforementioned k truncated thought chains include: a first truncated thought chain containing a single reasoning step , a second truncated thought chain containing two reasoning steps , and an i-1th truncated thought chain containing i-1 reasoning steps.
[0069] In the embodiments of the present application, it can be understood that Figure 3 , the present application constructs a complete thought chain composed of reasoning steps, and obtains a total of k truncated thought chains through truncation processing. , the kth truncated thought chain. Then the present application collects AI analysis content generated by different truncated thought chains: based on the same original input and target task, using these truncated thought chains to guide GenAI to generate corresponding analysis content. Each truncated thought chain generates corresponding analysis content based on m sets of unstructured original text information; , the analysis content generated by the kth truncated thought chain based on m sets of unstructured original text information.
[0070] Further, the present application measures the fidelity of each sentence based on the complete thought chain: calculates the semantic similarity between each sentence of the complete CoT generated analysis content and the corresponding analysis content documents of different truncated versions, generates embedding vectors using a BERT model (denoted as SBERT) that can convert text into sentence vectors, and compares using a cosine similarity index.
[0071]
[0072] In the formula, , the semantic similarity between the i-th sentence of the i-th AI analysis content generated by the complete thought chain and the j-th AI analysis content generated by the j-th truncated thought chain.
[0073] It should be noted that the application provides a multi-version comparison mechanism based on truncated thought chains. To measure whether the AI generated content truly follows the preset reasoning chain logic, the application designs and constructs multiple "truncated version" thought chains based on the complete thought chain design, each of which only contains part of the steps of the original reasoning chain. By generating multiple analysis content versions under different length thought chain prompts for the same input text, a "reasoning path integrity" based comparison system is built, providing a basis for subsequent fidelity evaluation.
[0074] In some embodiments, the aforementioned semantic similarity based fidelity score mechanism measures the logical consistency of each sentence in the complete thought chain generated content to calculate the sentence level comprehensive fidelity score. Specifically, S130 can include: taking the semantic similarity information corresponding to the k truncated thought chains in turn, calculating the complement, summing and taking the average to obtain the sentence level comprehensive fidelity score of each sentence in the AI analysis content, to measure the logical consistency of each sentence in the complete thought chain generated content.
[0075] In the embodiments of the application, it can be understood that a low similarity represents a higher uniqueness and reasoning depth. The application calculates the fidelity by taking the complement, summing and taking the average of the similarity scores of the k truncated thought chains. Accordingly, the comprehensive fidelity score of the first sentence in the first AI analysis content generated by the complete thought chain is as follows:
[0076]
[0077]
[0078]
[0079] wherein, represents the result obtained by traversing all m parts of the analysis content corresponding to the sentences, i.e., m parts of the analysis content include a total of sentences, and the sentence level comprehensive fidelity score is integrated into the text vector representation as an attention factor, achieving dynamic adjustment of the weights of different sentences.
[0080] It should be noted that the application constructs a sentence level fidelity score mechanism to measure the logical consistency of each sentence in the complete thought chain generated content. In the generated complete analysis text, the application cuts the content by sentence and compares the similarity changes of each sentence under the complete thought chain and each truncated thought chain. The sentences generated from simplified prompts are considered to have higher "logical dependence" and "reasoning fidelity"; this mechanism effectively selects the most representative and most reliable language information in the reasoning path.
[0081] In some embodiments, the aforementioned construction of the semantic vector of a complete thought chain sentence using a pre-trained BERT model, and integration of sentence-level comprehensive fidelity scores, yields a document-level semantic vector with fused fidelity. Specifically, S140 may include the following steps:
[0082] S410. Using a pre-trained BERT model for a specific text type, construct semantic vectors for each sentence to obtain the document embedding vector of the research subject.
[0083] S420. Based on the sentence-level comprehensive loyalty score, a dot product is performed with the semantic vector of the corresponding sentence to obtain a sentence-level vector that integrates the loyalty perception mechanism. This allows the sentence-level comprehensive loyalty score to be integrated as an attention factor into the text vector representation, enabling dynamic adjustment of the weights of different sentences.
[0084] S430. Sum and average the sentence-level vectors of multiple fusion fidelity perception mechanisms to obtain the document-level semantic vector of fusion fidelity, thereby optimizing the credibility of the overall text representation.
[0085] In the embodiments of this application, it can be understood that this application uses a pre-trained language model (denoted as XBERT) for a specific text type to construct semantic vectors for each sentence.
[0086]
[0087] make This indicates that a research subject produces [something] sequentially over a period of time (e.g., one year). The document embedding vectors of the reports, where each report is composed of... The system consists of several sentences, each semantically represented using a language model. Then, the overall loyalty score is combined with the corresponding sentence's semantic vector and multiplied by a dot product to obtain a sentence-level vector that incorporates the loyalty-aware mechanism.
[0088]
[0089] In the formula, This represents a sentence-level representation that incorporates fidelity scores. A higher fidelity score indicates that the sentence guided by the complete thought chain has higher fidelity. The greater the impact on model predictions.
[0090] This application provides a sentence-level text vector that incorporates a complete thought chain-guided AI-generated analysis content fidelity. Summation and averaging are performed to obtain the document-level semantic vector with fused fidelity. The sentence-level vectors are aggregated to generate a document-level semantic representation, and the credibility of the overall text representation is optimized. The document-level semantic vector satisfies the expression:
[0091]
[0092] It should be noted that the present application constructs a text vector enhancement mechanism based on loyalty awareness. The above-mentioned sentence-level comprehensive loyalty score is used as a weight factor and is fused into the semantic vector of each sentence. Unlike traditional models that directly aggregate all text content, this mechanism emphasizes the contribution of high-loyalty sentences and weakens content that is not clear or may deviate from the reasoning path, thereby generating a more logically interpretable and more reliable overall text representation. This mechanism can be widely embedded into the representation learning module of various natural language processing tasks.
[0093] In some embodiments, the aforementioned sequence modeling mechanism based on the BiGRU structure is used to assign different weights to different generated content through a global attention module, aggregate the documents, and generate a unified entity-level text semantic vector representation. Specifically, the aforementioned S150 can include the following steps:
[0094] S510, a sequence modeling mechanism based on the BiGRU structure is used to process a plurality of document-level semantic vectors based on a preset BiGRU module, integrate context information into the document-level semantic representation through two GRU units in different directions, and obtain document-level input information;
[0095] S520, a global attention mechanism is used to adaptively assign importance weights to each text, input the document-level input information into a linear layer, and obtain the input of the candidate state through a nonlinear activation function;
[0096] S530, a softmax function is used to normalize the attention score, and an entity-level text semantic vector representation is obtained by weighted averaging all document-level inputs.
[0097] In the embodiments of the present application, it can be understood that, first, for the case where there are multiple related texts (such as multi-round analysis, multi-document input), and there is a time sequence and heterogeneous importance between texts, a sequence modeling mechanism based on the BiGRU structure is used to assign different weights to different generated content through a global attention module, and a unified entity-level text semantic vector representation is generated . The BiGRU module integrates context information into the document-level semantic representation through two GRU units in different directions to obtain document-level input information . The process can be represented as:
[0098]
[0099] The global attention mechanism adaptively assigns importance weights to each text. Specifically, the document-level input information is first input to a linear layer, and the input of the candidate state is obtained through a nonlinear activation function . Then, the attention score is normalized using the softmax function. Finally, the entity-level text semantic vector representation is obtained by weighted averaging all document-level inputs.
[0100] It should be noted that the present application constructs a structured-unstructured fusion representation modeling and prediction mechanism. In downstream tasks, the enhanced text representation and structured data (such as table data, time series indicators, etc.) are jointly modeled. A sequence neural network with attention mechanism (such as BiGRU+Attention) can be used to further realize dynamic weighting processing of different time points and different text types, so that the model can more accurately grasp the key text signals at the point in time, and finally output the task results (such as classification probability or decision judgment) through the full connection prediction module. This structure realizes the reliability control of AI generated text, the unified expression of information source diversity, and the modeling ability of text time evolution.
[0101] In some embodiments, the aforementioned entity-level text semantic vector representation and target structured data are integrated into a structured task, and are processed through a multi-layer perception network MLP to complete the task output, that is, the aforementioned S160 can include the following steps:
[0102] S610, the entity-level text semantic vector representation is spliced and input with the target structured data containing statistical indicators and quantitative features;
[0103] S620, the spliced information is input to the multi-layer perception network MLP for processing to complete the final task output;
[0104] The processing steps of the aforementioned multi-layer perception network MLP satisfy the expression:
[0105]
[0106]
[0107]
[0108] wherein, , , , , and are training parameters; for structured data, for entity-level text semantic vector representation; and are two different intermediate values, and are activation functions; represent the final task output.
[0109] In some embodiments, the present application provides a generation AI text reasoning and representation system 700 based on fidelity perception mechanism, as shown in Figure 4 The generation AI text reasoning and representation system 700 based on fidelity perception mechanism can include the following modules:
[0110] A content segmentation module 710 is configured to construct a complete thought chain, guide the construction of generative analysis content based on the complete thought chain, and segment the generative analysis content to obtain segmented content.
[0111] A first measurement module 720 is configured to stepwise truncate the complete thought chain to obtain a plurality of truncated thought chains, collect a plurality of AI analysis contents generated by the truncated thought chains, and measure the fidelity of each sentence in the AI analysis content based on the sentence in the generative analysis content constructed based on the complete thought chain.
[0112] A second measurement module 730 is configured to construct a fidelity scoring mechanism based on semantic similarity, measure the logical consistency of each sentence in the generated content under the complete thought chain, and calculate a sentence-level comprehensive fidelity score.
[0113] A fidelity fusion module 740 is configured to construct a semantic vector of a sentence in the complete thought chain through a pre-trained BERT model, and integrate the sentence-level comprehensive fidelity score to obtain a document-level semantic vector of the fused fidelity.
[0114] A document aggregation module 750 is configured to use a sequence modeling mechanism based on a BiGRU structure, combine a global attention module to assign different weights to different generated content, perform document aggregation, and generate a unified entity-level text semantic vector representation.
[0115] A task integration output module 760 is configured to perform structured task integration on the entity-level text semantic vector representation and the target structured data, and process it through a multi-layer perception network MLP to complete the task output; wherein the target structured data corresponds to the subject information.
[0116] According to embodiments of the present application, any of the plurality of modules of the content segmentation module 710, the first metric module 720, the second metric module 730, the loyalty fusion module 740, the document aggregation module 750, and the task integration output module 760 can be combined in one module, or any of the modules can be split into multiple modules. Alternatively, at least part of the function of one or more of the modules can be combined with at least part of the function of other modules and implemented in one module.
[0117] Figure 4 Each of the modules in the illustrated system has the function of implementing each step of the aforementioned generative AI text reasoning and representation method based on the loyalty awareness mechanism, and can achieve its corresponding technical effects. For the sake of brevity, the details are not repeated here.
[0118] In some embodiments, the present application provides an electronic device, a structural schematic diagram of which is shown as Figure 5
[0119] The electronic device can include a processor 810 and a memory 820 having computer program instructions stored therein.
[0120] Specifically, the processor 810 described above can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured as one or more integrated circuits that implement embodiments of the present application.
[0121] The memory 820 can include a mass storage for data or instructions. By way of example and not limitation, the memory 820 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. The memory 820 can include removable or non-removable (or fixed) media, where appropriate. The memory 820 can be internal or external to the integrated gateway disaster recovery device, as appropriate. In particular embodiments, the memory 820 is non-volatile solid-state memory.
[0122] The memory 820 can include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, generally, the memory 820 includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software that, when executed (e.g., by the one or more processors), is configured to perform the operations described above in any of the embodiments of the generation of AI text reasoning and representation based on loyalty awareness mechanisms.
[0123] The processor 810 implements any of the embodiments of the generation of AI text reasoning and representation based on loyalty awareness mechanisms by reading and executing computer program instructions stored in the memory 820.
[0124] In one example, the electronic device can further include a communication interface 830 and a bus 800. As shown, the processor 810, the memory 820, and the communication interface 830 are connected through the bus 800 and complete communication with each other. Figure 5
[0125] The communication interface 830 is mainly used to realize the communication between the modules, devices, units, and / or equipment in the embodiments of the present application.
[0126] The bus 800 includes hardware, software, or both, which couples the components of the online data traffic billing device to each other. By way of example, and not limitation, the bus can include an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front-side bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (ISA) bus, an infiniband interconnect, a low pin count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standards association local (VLB) bus, or another suitable bus or a combination of two or more of these. Where appropriate, the bus 800 can include one or more buses. Although the present application describes and illustrates a particular bus, the present application contemplates any suitable bus or interconnect.
[0127] In addition, in combination with the generation of AI text reasoning and representation based on loyalty awareness mechanisms in the above embodiments, the embodiments of the present application can provide a computer storage medium to realize. The computer storage medium has computer program instructions stored thereon; the computer program instructions are executed by the processor to realize any of the embodiments of the generation of AI text reasoning and representation based on loyalty awareness mechanisms.
[0128] It is to be understood that the present application is not limited to the particular examples described and illustrated herein, and that the application includes a variety of configurations and processes. For simplicity, detailed descriptions of well-known methods and apparatuses are omitted so as not to obscure the description of the present application. In the above embodiments, several specific steps are described and illustrated as examples. However, the methods of the present application are not limited to the specific steps described and illustrated, and one skilled in the art can make various changes, modifications and additions, or can change the order of steps, after understanding the spirit of the present application.
[0129] The functional blocks shown in the structural block diagrams above can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, functional cards, and the like. When implemented in software, the elements of the present application are program or code segments that are used to perform the required tasks. The program or code segments can be stored in a machine-readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. The "machine-readable medium" can include any medium that can store or transfer information. Examples of the machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, and the like. The code segments can be downloaded via a computer network such as the Internet, an intranet, and the like.
[0130] It is also to be understood that the example embodiments described in the present application are based on a series of steps or apparatuses to describe some methods or systems. However, the present application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps can be performed simultaneously.
[0131] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other processing devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other processing devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0132] The above examples are only used to illustrate the technical solutions of the present application, but not to limit the present application; although the present application has been described in detail with reference to the foregoing examples, those ordinarily skilled in the art should understand: the technical solutions recorded in the foregoing examples can be modified, or some technical features can be replaced equivalently; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for generative AI text reasoning and representation based on loyalty awareness mechanism, characterized in that, The method comprises the following steps: constructing a complete thought chain, guiding the construction of generative analysis content based on the complete thought chain, and segmenting the generative analysis content to obtain segmented content; gradually truncating the complete thought chain to obtain multiple levels of truncated thought chains, collecting multiple AI analysis contents generated by the truncated thought chains, and measuring the fidelity of each sentence in the generative analysis content based on the complete thought chain; building a fidelity scoring mechanism based on semantic similarity to measure the logical consistency of each sentence in the generated content under the complete thought chain to calculate a sentence-level comprehensive fidelity score; building a semantic vector of the complete thought chain sentence by pre-training a BERT model, and integrating the sentence-level comprehensive fidelity score to obtain a document-level semantic vector with fused fidelity; adopting a sequence modeling mechanism based on a BiGRU structure, combining a global attention module to assign different weights to different generated content, performing document aggregation, and generating a unified entity-level text semantic vector representation; integrating the entity-level text semantic vector representation with target structured data for structured task integration, and processing through a multi-layer perception network MLP to complete task output; wherein the target structured data corresponds to research subject information.
2. The loyalty-awareness mechanism based generative AI text reasoning and representation method of claim 1, wherein, The method comprises the following steps: obtaining unstructured original text information and research subject information corresponding to the original text information, one research subject corresponding to one entity; inputting the original text information and the research subject information into a generative artificial intelligence model; Combining the actual needs of the task scenario with domain expert knowledge, we break down the sub-problems corresponding to the actual needs and establish a complete thought chain; the complete thought chain consists of... The reasoning steps consist of a set of steps and satisfy the expression: , Indicates the first One reasoning step; generating generative analysis content for analyzing text content based on the prompt guidance of the complete thought chain, the generative analysis content being step-by-step reasoning content and being able to represent research subject characteristics and subject-related content; The generative analysis content is sentence-level segmented, each document is segmented into a plurality of sentences, obtaining segmented content for further sentence-level semantic representation, is a positive integer.
3. The loyalty-awareness mechanism based generative AI text reasoning and representation method of claim 2, wherein, The method comprises the following steps: sequentially truncating each reasoning step of the complete thought chain to generate k truncated thought chains of different lengths; wherein each truncated thought chain uses the same input and target task as the complete thought chain; generating corresponding AI analysis content using the truncated thought chain based on the same input and target task; calculating the semantic similarity between each sentence of the generative analysis content determined by the complete thought chain and the AI analysis content corresponding to the truncated thought chain of different truncated versions; generating embedding vectors using a BERT-based sentence-level embedding model SBERT, and comparing using a cosine similarity index to obtain semantic similarity information to measure the fidelity of each sentence in the generative analysis content.
4. The loyalty-awareness mechanism based generative AI text reasoning and representation method of claim 3, wherein, The method comprises the following steps: The semantic similarity information corresponding to the k truncated thought chains is sequentially calculated for complement, summation and average to obtain a sentence-level comprehensive fidelity score of each sentence in the AI analysis content, so as to measure the logical consistency of each sentence in the generated content under the complete thought chain; The k truncated thought chains comprise a first truncated thought chain comprising a single inference step a second truncated thought chain comprising two inference steps and an i-1 truncated thought chain comprising i-1 inference steps.
5. The loyalty-awareness mechanism based generative AI text reasoning and representation method of claim 1, wherein, The semantic vector of the sentence of the complete thought chain is constructed by the pre-trained BERT model, and the document-level semantic vector of the fusion fidelity is obtained by integrating the sentence-level comprehensive fidelity score, including: Using the pre-trained BERT model for a specific text type, the semantic vector of each sentence is constructed to obtain the document embedding vector of the research subject; Based on the sentence-level comprehensive fidelity score, the dot product of the semantic vector of the corresponding sentence is performed to obtain the sentence-level vector of the fusion fidelity awareness mechanism, so as to integrate the sentence-level comprehensive fidelity score into the text vector representation as an attention factor, and realize the dynamic adjustment of the weight of different sentences; The document-level semantic vector of the fusion fidelity is obtained by summing and averaging the sentence-level vectors of multiple fusion fidelity awareness mechanisms, so as to realize the credibility optimization of the overall representation of the text.
6. The loyalty-awareness mechanism based generative AI text reasoning and representation method of claim 1, wherein, The sequence modeling mechanism based on the BiGRU structure is adopted, and the global attention module is combined to assign different weights to different generated content, aggregate the document, and generate a unified entity-level text semantic vector representation, including: The sequence modeling mechanism based on the BiGRU structure is adopted, and the BiGRU module is based on the preset BiGRU module, which processes multiple document-level semantic vectors through two different direction GRU units, integrates the context information into the document-level semantic representation, and obtains the document-level input information; Through the global attention mechanism, each text is adaptively assigned an importance weight, the document-level input information is input into a linear layer, and the input of the candidate state is obtained through a nonlinear activation function; The attention score is normalized by using the softmax function, and the entity-level text semantic vector representation is obtained by weighted averaging all document-level inputs.
7. The loyalty-awareness mechanism based generative AI text reasoning and representation method of claim 1, wherein, The entity-level text semantic vector representation is integrated with the target structured data including statistical indicators and quantitative features, and is processed by a multi-layer perception network MLP to complete the task output, including: The entity-level text semantic vector representation is integrated with the target structured data including statistical indicators and quantitative features, and is processed by a multi-layer perception network MLP to complete the task output, including: The processing steps of the multi-layer perception network MLP satisfy the expression: including: wherein, , , , , and are training parameters; is target structured data, is an entity-level textual semantic vector representation; and are two different intermediate values, and are activation functions; represents the final task output.
8. A generative AI text reasoning and representation system based on loyalty awareness mechanism, characterized in that, A content segmentation module is configured to construct a complete thought chain, guide the construction of a generative analysis content based on the complete thought chain, and segment the generative analysis content to obtain segmented content; A first measurement module is configured to truncate the complete thought chain step by step to obtain multiple levels of truncated thought chains, collect multiple AI analysis contents generated based on the truncated thought chains, and measure the fidelity of each sentence in the generative analysis content constructed based on the complete thought chain. The second metric module is configured to construct a fidelity score mechanism based on semantic similarity, measure logical consistency of each sentence in the complete thought chain to generate content, and calculate a sentence-level comprehensive fidelity score; The fidelity fusion module is configured to construct a semantic vector of the complete thought chain sentence by using a pre-trained BERT model, and integrate the sentence-level comprehensive fidelity score to obtain a document-level semantic vector of the fused fidelity; The document aggregation module is configured to use a sequence modeling mechanism based on a BiGRU structure, combine a global attention module to assign different weights to different generated content, perform document aggregation, and generate a unified entity-level text semantic vector representation. The task integration output module is configured to perform structured task integration on the entity-level text semantic vector representation and target structured data corresponding to the subject information, process the target structured data through a multi-layer perception network (MLP), and complete task output.
9. An electronic device, comprising: The processor, the memory, and the program stored on the memory and executable on the processor, wherein the program is executed by the processor to implement the generative AI text reasoning and representation method based on the fidelity perception mechanism according to any one of claims 1 to 7. The computer-readable storage medium stores programs or instructions, which are executed by the processor to implement the generative AI text reasoning and representation method based on the fidelity perception mechanism according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that,
Citation Information
Patent Citations
Knowledge exploration method and system based on generative thinking chain and feedback mechanism
CN120258137A
Power transformer fault auxiliary decision-making method and system based on knowledge graph and large language model
CN120386873A