A personalized cognitive path extraction method based on a large language model
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING UNIV OF TECH
- Filing Date
- 2025-02-26
- Publication Date
- 2026-06-12
AI Technical Summary
Existing large-scale language models lack targeted guidance in cognitive path extraction tasks, making it difficult to effectively capture complex cognitive logic chains and key nodes. Furthermore, the generated results lack interpretability, limiting their practical application in the field of psychology.
By combining similarity retrieval and prompting engineering, basic prompts, few-sample prompts, and thought chain prompts are designed to guide the large language model to gradually extract cognitive paths. Automated checking and large model self-evaluation feedback are introduced to optimize the accuracy and interpretability of the generated paths.
It significantly improves the completeness and interpretability of cognitive path extraction, and the generated results are more in line with the practical application needs of the field of psychology, thereby improving the model's task understanding and adaptability.
Smart Images

Figure CN120067299B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a personalized cognitive path extraction method based on a large language model, belonging to the field of natural language processing. Background Technology
[0002] In recent years, large language models (LLMs) have made significant progress in the field of natural language processing, demonstrating superior performance in tasks such as text understanding and generation, and sentiment analysis. This has provided new technical means for text analysis in the field of psychology. However, although LLMs have been initially applied in areas such as emotion recognition and mental state analysis, there are still significant gaps in the sub-field of cognitive path extraction, specifically in the following aspects:
[0003] 1. Lack of targeted prompt design: Existing large-scale language models mostly rely on prompts for task-driven processing. However, in the field of psychology, general prompts may not fully reflect the dynamics and contextuality of individual cognitive processes. This makes it difficult for models to effectively capture complex cognitive logic chains and key nodes.
[0004] 2. Insufficient Interpretability: Cognitive path extraction tasks inherently involve the layered analysis of complex psychological processes, which places high demands on the interpretability of the model. However, existing language models often exhibit "black box" characteristics when generating results, meaning they struggle to clearly demonstrate the reasoning logic from input to output. This not only hinders researchers' understanding and optimization of the model's behavior but also limits its credibility and adoption in practical applications such as clinical psychology and educational intervention. Summary of the Invention
[0005] To address the aforementioned challenges, this invention proposes a personalized cognitive path extraction method based on a large-scale language model. This method combines similarity retrieval and prompting engineering to guide the large language model to deeply understand and accurately extract cognitive path-related information, thereby generating more reasonable and accurate results. Specifically, basic prompts clarify the task objective, helping the model establish a clear task direction; few-sample prompts, combined with cognitive path extraction examples, improve the model's understanding and adaptability to the task; and thought chain prompts progressively decompose the task structure, guiding the model to identify the core components of the cognitive path, including triggering events, irrational beliefs, emotional reactions, and refutation methods. Through this systematic prompting strategy design, this method significantly improves the completeness and interpretability of cognitive path extraction. Furthermore, this invention introduces automated checking and large-scale model self-evaluation feedback to further improve the accuracy and psychological consistency of the generated paths, making the model output more in line with the practical application needs of the field of psychology.
[0006] The technical solution of this invention includes the following steps: First, preprocessing and encoding individual statement data; then, retrieving similar examples from the cognitive path database using semantic similarity technology to provide reference and support for subsequent few-shot prompts; subsequently, designing a comprehensive prompting strategy that organically combines basic prompts, few-shot prompts, and thought chain prompts to guide the large language model to gradually extract the patient's cognitive path; finally, automatically checking the generated cognitive path and combining it with the large model's self-evaluation feedback to further optimize the path from three dimensions: fluency, accuracy, and psychological professionalism, thereby ensuring the quality and application value of the cognitive path.
[0007] The specific solution of the present invention is attached. Figure 1 As shown.
[0008] Step 1: Receive input text and encoding
[0009] This step aims to preprocess and encode the text statements provided by individuals, extract useful features, and lay the foundation for subsequent steps.
[0010] Step 1.1: Text Preprocessing. Receive the declarative text X. To protect individual privacy and improve data quality, preprocess the text by removing privacy information and cleaning up meaningless characters.
[0011] Step 1.2: Text Semantic Encoding. Utilize the BERT model to encode each segmented sentence. Semantic embeddings are generated. BERT captures the contextual semantic features of text, generating high-dimensional vector representations to express the semantic characteristics of sentences. The embedding vectors of all sentences constitute the semantic feature set of the text. .
[0012] Step 1.3: Sentiment Feature Extraction and Fusion. A sentiment dictionary is used to match sentiment words in the text, extracting the sentiment features for each sentence. These sentiment features are then fused with the semantic feature vector generated by BERT to form a sentiment-enhanced semantic feature vector. .
[0013] Step 1.4: Normalization Process: Normalization of the semantic feature vector for sentiment enhancement L2 norm normalization is performed to eliminate scale differences in features and improve the consistency of feature processing by the model. The normalized feature set is represented as follows: .
[0014] Step 1.5: Mean Pooling Aggregation: Generate the overall feature embedding of the statement text by performing mean pooling on the sentence feature vectors. This global feature will serve as the query vector in the retrieval phase, providing input for the next step of similar example retrieval.
[0015] Step 2: Data Preprocessing
[0016] This step uses vector retrieval technology to obtain the most similar examples to the individual's statement text from the cognitive path knowledge base, thus constructing a reference for few-sample prompts.
[0017] Step 2.1: Knowledge Base Construction. A cognitive path database D is constructed. All data is annotated by psychology experts to ensure the authority and accuracy of the annotation results. Each text... The cognitive path is labeled as BERT is used to encode each piece of text in the knowledge base, generating an embedding vector. And use FAISS to build an index library.
[0018] Step 2.2: Retrieval and Ranking. Based on the overall feature vector of the statement text. Vector retrieval is performed using the FAISS index, and the retrieved examples are sorted according to cosine similarity to ensure that the similarity of the selected statement texts is maximized.
[0019] Step 2.3: Example Filtering. Due to the complexity of cognitive path structures, the extracted results often contain long text sequences, and large models have input token length limitations. Therefore, in this step, the two cognitive path examples with the highest cosine similarity are selected based on cosine similarity. ,in, This indicates two similar example texts retrieved. This is the result of extracting the corresponding cognitive path.
[0020] Step 3: Prompt for project construction
[0021] Cueing engineering is a crucial step in guiding large language models to extract cognitive paths. This step designs a comprehensive strategy that integrates basic cues, few-shot cues, and thought chain cues:
[0022] Step 3.1: Basic Tips Clearly define the role and task objectives of the model.
[0023] Step 3.2: Few Samples Hint The example text retrieved from step 2 provides the model with specific references to the task. These example texts and their corresponding cognitive path annotations help the model understand the task details and generation requirements.
[0024] Step 3.3: Mind Chain Hints Based on the structural characteristics of the cognitive path, the model is guided step-by-step to extract four core components: triggering events, irrational beliefs, emotional reactions, and refutation methods. Each step provides specific prompts to help the model move from a global understanding to progressively refining task outputs.
[0025] Step 3.3: Hint Combination: Integrate basic hints, few-sample hints, and thought chain hints into a complete hint. It provides multi-level, step-by-step task guidance.
[0026] Step 4: Cognitive Path Extraction
[0027] The designed integrated prompts and declarative text are input into the large language model to generate a preliminary cognitive path.
[0028] Step 5: Cognitive Path Optimization
[0029] To improve the quality of the generated paths, adjustments and improvements were made by combining two stages: automatic optimization and large model self-evaluation feedback optimization.
[0030] Step 5.1: Automatic Optimization: Through consistency checks, verify whether the subcategory logically matches its parent category, and the cognitive path parent-child nodes are as follows. Figure 2 As shown.
[0031] Step 5.2: Self-Assessment Feedback Generation and Optimization: The automatically checked cognitive path is further submitted to the LLM for scoring based on three dimensions: fluency, accuracy, and psychological expertise. Each dimension has a maximum score of 10 points, and a score of ≥8 is considered passing. If all dimensions are passing, the cognitive path can be directly output; otherwise, the LLM generates self-assessment feedback based on the evaluation results. The generated cognitive path is then adjusted and optimized based on feedback to produce the final version of the cognitive path:
[0032] The above technical solution has the following advantages or beneficial effects:
[0033] I. The personalized cognitive path extraction method based on a large language model proposed in this invention makes full use of prompt design templates, including basic prompts, few-sample prompts, and thought chain prompts, to gradually guide the large language model to complete the complex task of extracting cognitive paths, effectively improving the model's understanding of the task and the quality of generation; in addition, the prompt templates can be adjusted according to specific needs, and the method has good scalability.
[0034] Second, the personalized cognitive path extraction method based on a large language model proposed in this invention is based on the theoretical framework of cognitive behavioral therapy and combines thought chain prompts to gradually extract the core components of the cognitive path. In this way, the generated cognitive path has high accuracy and interpretability. Attached Figure Description
[0035] Figure 1 This is a diagram illustrating the overall architecture of the method proposed in this invention.
[0036] Figure 2 This is an ABCD model diagram of the cognitive path. Detailed Implementation
[0037] The following detailed description of embodiments of the present invention is provided in conjunction with the accompanying drawings:
[0038] This invention is a personalized cognitive path extraction method based on a large language model. By combining semantic similarity retrieval and prompting engineering, this method guides the large language model to deeply understand and accurately extract cognitive path-related information of individuals from multiple perspectives.
[0039] This invention employs the following technical solution: First, the individual's statement data is preprocessed and encoded; then, semantic similarity technology is used to retrieve examples from an expert-annotated cognitive path database to support subsequent few-sample prompts; subsequently, a comprehensive prompting strategy is designed, combining basic prompts, few-sample prompts, and thought chain prompts to guide the large language model to gradually extract personalized cognitive paths; finally, an automatic optimization mechanism is used to check the consistency of the generated cognitive paths, and combined with self-evaluation feedback, the paths are further optimized from dimensions such as fluency, accuracy, and psychological professionalism, thereby ensuring the quality and application value of the cognitive paths.
[0040] Specifically, the method includes the following steps:
[0041] Step 1: Receive input text X and encoding: Receive individual statement text, preprocess it, use BERT to perform text semantic encoding, then use a sentiment dictionary to extract sentiment features and fuse the two.
[0042] Step 1.1: Text Preprocessing
[0043] Obtain the statement text X, remove private information from the text, remove meaningless characters (HTML tags, special characters, and URL links), handle spelling errors, and use the NLTK toolkit to segment the preprocessed statement text into sentences. ;
[0044] Step 1.2: Text Semantic Encoding
[0045] For each sentence Using the BERT model for semantic embedding generation, semantic features are extracted, i.e. The sequence of embedding vectors for all sentences is as follows ;
[0046] Step 1.3: Sentiment Feature Extraction and Fusion
[0047] The Harbin Institute of Technology's sentiment dictionary is used to match sentiment words in each sentence, and then the sentiment features of each sentence are calculated. This is then fused with semantic embedding to form a semantic feature vector that enhances emotion. Finally, the feature vectors of all sentences are .
[0048] Step 1.4: Normalization
[0049] Sentiment-enhanced semantic feature vectors for each sentence L2 norm normalization is performed to ensure feature consistency in subsequent processing. Normalized sentence feature set: .
[0050] Step 1.5: Mean Pooling Aggregation
[0051] Mean pooling is used to generate an overall feature embedding for retrieving patient text. .
[0052] Step 2: Data Preprocessing
[0053] This step uses vector retrieval technology to obtain the most similar examples to the stated text from the labeled cognitive path knowledge base, thus building a reference for few-sample prompts.
[0054] Step 2.1: Knowledge Base Construction: For each statement text, three qualified psychology experts independently annotate it according to the defined cognitive path labels. If the consistency of labeling among experts is less than 80%, a review mechanism is triggered to review and re-annotate the disputed data to ensure consistency. Through the above operations, a cognitive path dataset is constructed. ,in Represents individual statements in text. The labeled cognitive path. According to cognitive behavioral therapy, the defined cognitive path label consists of four parts:
[0055] A: Triggering events (A1: Disease symptoms, A2: Social relationships, A3: Life, A4: Study / Work, A5: Emotions)
[0056] B: Irrational Beliefs (B1: Black-and-White, B2: Generalization, B3: Psychological Filtering, B4: Denying Positive Thinking, B5: Jumping to Conclusions, B6: Exaggeration and Minimization, B7: Emotional Reasoning, B8: "Should" Phrases, B9: Random Labeling, B10: Blaming Oneself / Others)
[0057] C: Emotional response (C1: Affective effect, C2: Behavioral effect)
[0058] D: Refutation (D1: Habitual refutation, D2: Effective refutation).
[0059] Finally, an index is built based on FAISS. Specifically, in the FAISS index building process, the BERT model is first used to analyze each text data in the dataset. Encode to obtain feature vector representation ,These Vectors, as storage items in the index database, are used for subsequent similar example retrieval, and are defined as follows:
[0060]
[0061] in, This represents the index building function, implemented based on the FAISS vector retrieval algorithm.
[0062] S22 Retrieval and Ranking: In the retrieval phase, based on the query vector obtained in step S1... Retrieve similar index vectors from the Index database. And sorted according to cosine similarity:
[0063]
[0064]
[0065] Among them, Retrieve This indicates a vector retrieval operation. For similarity measurement function, and Representing vectors respectively and The L2 norm is used for normalized dot product calculation.
[0066] S23 Filtering: Due to the complexity of cognitive path structures, the extracted results often contain long text sequences, and large models have input token length limitations. Therefore, in this step, the two cognitive path examples with the highest cosine similarity are selected based on cosine similarity. ,in, This indicates two similar example texts retrieved. This is the result of extracting the corresponding cognitive path.
[0067] Step 3: Prompt for project construction
[0068] This step incorporates a comprehensive strategy that integrates basic hints, few-sample hints, and thought chain hints:
[0069] Step 3.1: Basic Tips This is used to clarify the model's role (psychology expert) and task objectives, thereby better guiding it to extract cognitive paths based on psychological knowledge. The basic prompt template is as follows:
[0070] As an experienced psychology expert specializing in cognitive behavioral therapy, you excel at analyzing individual cognitive structures and thinking patterns. Based on the given individual's statement, extract their personalized cognitive path.
[0071] Step 3.2: Few Samples Hint Provides specific examples of cognitive path extraction to help the model better understand task requirements and output format. The few-shot hint template is as follows:
[0072] Example 1:
[0073] {Individual Statement Text 1}
[0074] {Cognitive Path Extraction Result 1}
[0075] Example 2:
[0076] {Individual Statement Text 2}
[0077] {Cognitive Path Extraction Result 2}
[0078] Step 3.3: Mind Chain Hints Based on the structural characteristics of cognitive paths, a thought chain prompting model is constructed to progressively guide the extraction of four components: triggering events, irrational beliefs, emotional reactions, and refutations. Specifically, the thought chain prompt template is as follows:
[0079] The cognitive path consists of four parts: triggering event, irrational belief, emotional reaction, and refutation. Please extract these four parts from the text in sequence:
[0080] Part 1: Triggering event identification, which involves identifying key events from the text that lead to changes in the individual's emotions or cognition, including five aspects: disease symptoms, social relationships, life, study and work, and emotions.
[0081] Part Two: Identifying Irrational Beliefs. This involves identifying cognitive distortions in the text, specifically the ten types of cognitive distortions mentioned in Burns' New Mood Therapy (either / or, generalization, psychological filtering, denying positive thinking, jumping to conclusions, exaggeration and minimization, emotional reasoning, "should" statements, labeling, and blaming oneself / others).
[0082] Part Three: Emotional Response Recognition, including both emotional and behavioral effects;
[0083] Part Four: Refutation Identification, which extracts from the text the ways in which individuals refute their own cognitive distortions, including habitual refutation and effective refutation.
[0084] Finally, the contents obtained from the four parts are combined to obtain the final cognitive path.
[0085] Step 3.4 Prompt Project Construction: Basic prompts, sample prompts, and mind chain prompts are combined to form a complete Prompt:
[0086]
[0087] The complete Prompt is as follows:
[0088] As an experienced psychology expert specializing in cognitive behavioral therapy, you excel at analyzing individual cognitive structures and thinking patterns. Based on the given individual's statement, extract their personalized cognitive path.
[0089] Example 1:
[0090] {Individual Statement Text 1}
[0091] {Cognitive Path Extraction Result 1}
[0092] Example 2:
[0093] {Individual Statement Text 2}
[0094] {Cognitive Path Extraction Result 2}
[0095] The cognitive path consists of four parts: triggering event, irrational belief, emotional reaction, and refutation. Please extract these four parts from the text in sequence:
[0096] Part 1: Triggering event identification, which involves identifying key events from the text that lead to changes in the individual's emotions or cognition, including five aspects: disease symptoms, social relationships, life, study and work, and emotions.
[0097] Part Two: Identifying Irrational Beliefs. This involves identifying cognitive distortions in the text, specifically the ten types of cognitive distortions mentioned in Burns' New Mood Therapy (either / or, generalization, psychological filtering, denying positive thinking, jumping to conclusions, exaggeration and minimization, emotional reasoning, "should" statements, labeling, and blaming oneself / others).
[0098] Part Three: Emotional Response Recognition, including both emotional and behavioral effects;
[0099] Part Four: Refutation Identification, which extracts from the text the ways in which individuals refute their own cognitive distortions, including habitual refutation and effective refutation.
[0100] Finally, the contents obtained from the four parts are combined to obtain the final cognitive path.
[0101] Step 4: Cognitive Path Extraction
[0102] The constructed prompts and statements are then fed into a large language model to generate the corresponding cognitive paths:
[0103]
[0104] Here, LLM stands for Large Language Model. This represents the extracted cognitive path. This represents the parent label in the cognitive path (i.e., the triggering event, irrational belief, emotional reaction, and refutation mentioned in step S21). Parent tag The corresponding set of all sub-labels (for example, triggering events correspond to the five sub-labels: learning and work, social relationships, life, learning and work, and emotions; the sub-labels corresponding to the three parent labels: irrational beliefs, emotional reactions, and refutation can be viewed in detail in step S21). Detailed definitions of cognitive path parent and child labels are as follows: Figure 2 As shown.
[0105] Step 5: Cognitive Path Optimization
[0106] To improve the quality of the generated paths, adjustments and improvements were made by combining automated checks with LLM feedback generation and optimization in two stages.
[0107] Step 5.1: Automated Check: In this stage, an automated consistency check is performed on the generated cognitive path to ensure logical matching between child tags and parent tags. For example, the tag "learning work" extracted from the text should belong to the parent tag "triggering event," not be refuted. The specific steps are as follows:
[0108] By traversing each parent category in the path and subcategories Check subcategories Does it belong to the parent category? legal subclass set :
[0109]
[0110] For all The items that are inconsistent are marked as inconsistent subcategories for improvement in the accuracy dimension in the next step:
[0111]
[0112] in, Indicates the parent category A subcategory node.
[0113] After the above processing, the cognitive path It includes two parts:
[0114]
[0115] Step 5.2: Feedback Generation and Optimization: In step S4, the LLM acts as the generator of the cognitive path. In this stage, the LLM acts as the evaluator and optimizer. The automatically checked cognitive path is further submitted to the LLM for scoring based on three dimensions: fluency, accuracy, and psychological expertise. Each dimension has a maximum score of 10 points, and a score of ≥8 is considered passing. If all dimensions are passing, the cognitive path can be directly output; otherwise, the LLM generates self-evaluation feedback based on the evaluation results. The generated cognitive path is then adjusted and optimized based on feedback to produce the final version of the cognitive path:
[0116]
[0117]
[0118] in, , and These represent the feedback suggestions generated by LLM based on three rating perspectives, including error descriptions and adjustment suggestions. This describes the process by which LLM automatically adjusts and optimizes cognitive paths based on feedback. If any dimension still scores below 8 after optimization, LLM performs a second optimization until all evaluation criteria are met. Finally, the qualified cognitive path is output as the final extraction result.
[0119] The detailed scoring criteria are as follows:
[0120]
[0121] References:
[0122] [1]Wei J, Wang
[0123] [2]Ji B, Liu H, Du M, et al. Chain-of-Thought Improves TextGeneration with Citations in Large Language Models[C] / / Proceedings of theAAAI Conference on Artificial Intelligence. 2024, 38(16): 18345-18353.
[0124] [3]Gu X, Chen X, Lu P, et al. AGCVT-prompt for sentimentclassification: Automatically generating chain of thought and verbalizer inprompt learning[J]. Engineering Applications of Artificial Intelligence,2024, 132: 107907.
Claims
1. A personalized cognitive path extraction method based on a large-scale language model, characterized in that, Includes the following steps: S1: Input Text Reception and Encoding: First, the user-provided statement text is preprocessed, including removing personal identification information and redundant information; the BERT model is used to encode the statement text, and sentiment analysis is performed on the text using a sentiment dictionary; finally, the final vector representation is obtained by fusing BERT semantic embedding and sentiment feature vectors. ; S2: Similar example retrieval: Retrieve cognitive path examples that are similar to the stated text from the constructed cognitive path knowledge base; S3: Hint Engineering Construction: Design a comprehensive hint strategy that combines basic hints, few-sample hints, and thought chain hints to improve the accuracy and rationality of cognitive path extraction by gradually guiding a large language model; S4: Cognitive Path Extraction: Input the constructed comprehensive prompt and statement text into a large language model to extract the corresponding cognitive path; S5: Cognitive Path Optimization: Combining automated checks with large model self-evaluation feedback, the generated cognitive paths are checked for consistency, corrected for errors, and optimized to improve their logical rationality, content accuracy, and consistency with psychological theories. S3, as detailed below: S31: Basic Tips This is used to clarify the roles of the large model, namely the psychology expert and the task objective, so as to better guide it to extract cognitive paths based on psychological knowledge. The basic prompt template is as follows: As an experienced psychology expert specializing in cognitive behavioral therapy, you are adept at analyzing an individual's cognitive structure and thinking patterns. Based on the given individual's statement text, extract their personalized cognitive path. S32: Few Samples Hint Provides specific examples of cognitive path extraction to help the model better understand task requirements and output format; S33: Mind Chain Hint Based on the structural characteristics of cognitive paths, a thought chain prompt model is constructed to progressively guide the extraction of four parts: triggering events, irrational beliefs, emotional reactions, and refutations. Specifically, the thought chain prompt template is as follows: The cognitive path consists of four parts: triggering event, irrational belief, emotional reaction, and refutation. Please extract these four parts from the text in sequence: Part 1: Triggering event identification, which involves identifying key events from the text that lead to changes in the individual's emotions or cognition, including five aspects: disease symptoms, social relationships, life, study and work, and emotions. Part Two: Irrational Belief Identification, identifying cognitive distortions in the text; Part Three: Emotional Response Recognition, which identifies the emotional responses reflected in the text, including both affective and behavioral effects; Part Four: Refutation Identification: Extracting individuals' refutation methods regarding their own cognitive distortions from the text, including habitual refutations and effective refutations; Finally, the content obtained from the four parts is combined to obtain the final cognitive path; S34 Prompt Construction: Basic prompts, sample prompts, and mind chain prompts are combined into a complete Prompt. 。 2. The personalized cognitive path extraction method based on a large language model according to claim 1, characterized in that... S2, as detailed below: S21 Knowledge Base Construction: For each statement text, three qualified psychology experts independently annotated it according to defined cognitive path labels. If the consistency of labeling among experts is less than 80%, a review mechanism is triggered to review and re-annotate the disputed data to ensure consistency. Through the above operations, a cognitive path dataset is constructed. ,in This represents the statement text. The labeled cognitive path; according to cognitive behavioral therapy, the defined cognitive path label consists of four parts: A: Triggering events include A1: disease symptoms, A2: social relationships, A3: daily life, A4: study and work, and A5: emotions; B: Irrational beliefs include B1: either / or, B2: generalization, B3: psychological filtering, B4: denying positive thinking, B5: jumping to conclusions, B6: exaggeration and minimization, B7: emotional reasoning, B8: "should" statements, B9: labeling indiscriminately, and B10: blaming oneself / others. C: Emotional response includes C1: Affective effect and C2: Behavioral effect; D: Refutation includes D1: habitual refutation and D2: effective refutation; Finally, an index is built based on FAISS; specifically, in the FAISS index building process, the BERT model is first used to analyze each text data in the dataset. Encode to obtain feature vector representation ,These Vectors, as storage items in the index database, are used for subsequent similar example retrieval, and are defined as follows: ;in, This represents the index building function, implemented based on the FAISS vector retrieval algorithm; S22 Retrieval and Ranking: In the retrieval phase, based on the query vector obtained in step S1... Retrieve similar index vectors from the Index database. And sorted according to cosine similarity: ; Among them, Retrieve This indicates a vector retrieval operation. For similarity measurement function, and Representing vectors respectively and The L2 norm is used for normalized dot product calculation; S23 Filtering: Due to the complexity of the cognitive path structure, the extracted results contain long text sequences, and the input tokens of large models have length limitations. Therefore, in this step, the two cognitive path examples with the highest cosine similarity are selected based on cosine similarity. ,in, This indicates two similar example texts retrieved. This is the result of extracting the corresponding cognitive path.
3. The personalized cognitive path extraction method based on a large language model according to claim 1, characterized in that... S4, as detailed below: S41 Prompt Input and Cognitive Path Generation: The constructed prompts and statement text are input into a large language model to generate the corresponding cognitive paths. Wherein, LLM stands for Large Language Model. This represents the extracted cognitive path. Indicates the parent label in the cognitive path. Parent tag The set of all corresponding child tags.
4. The personalized cognitive path extraction method based on a large language model according to claim 1, characterized in that... S5, as detailed below: S51: Automated Check: At this stage, an automated consistency check is performed on the generated cognitive path to ensure logical matching between child tags and parent tags; the "learning work" tag extracted from the text should belong to the triggering event parent tag, rather than being refuted; the specific operation is as follows: By traversing each parent category in the path and subcategories Check subcategories Does it belong to the parent category? legal subclass set : For all The items that are inconsistent are marked as inconsistent subcategories for improvement in the accuracy dimension in the next step: ;in, Indicates the parent category A subcategory node; After the above processing, the cognitive path It includes two parts: S52: Self-Assessment Feedback Generation and Optimization: In step S4, the large model acts as the generator of the cognitive path. In this stage, the large model acts as the evaluator and optimizer. The cognitive path, which has undergone automated checks, is further submitted to the large model for scoring based on three dimensions: fluency, accuracy, and psychological professionalism. Each dimension has a maximum score of 10 points, and a score of ≥8 is considered passing. If all dimensions are passing, the cognitive path can be directly output; otherwise, the large model generates self-assessment feedback based on the evaluation results. The generated cognitive path is then adjusted and optimized based on feedback to produce the final version of the cognitive path: ; ;in, , and These represent the feedback generated by the large model based on three scoring dimensions, including error descriptions and adjustment suggestions; This represents the process by which the large model automatically adjusts and optimizes the cognitive path based on feedback. If there are still dimensions with scores below 8 after optimization, the large model will perform a second optimization until all evaluation criteria are met. Finally, the qualified cognitive path is output as the final extraction result.