Method and system for visual analysis of user dialogue understanding and chatgpt answer quality
Through multi-granularity topic classification and visualization analysis methods, the problem of insufficient dialogue structure and context association in existing technologies is solved, and user dialogue understanding and ChatGPT answer quality are improved. Users can quickly recall and analyze historical dialogue content, improving ChatGPT's context association performance.
Patent Information
- Application Number
- CN202310815553.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-05
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-07-05
AI Technical Summary
Existing technologies mainly focus on topic evolution and model optimization in improving user conversation understanding and ChatGPT answer quality, ignoring the detailed presentation of content evolution and the integrity of conversation structure, and failing to fully tap the potential of user participation in improving model context relevance.
Through multi-granularity topic classification and visualization analysis methods, multi-level topic text data with time series information is obtained. The GPT3.5-turbo model is used for text summarization and topic extraction. Combined with cosine similarity matching and force-directed graph layout, the conversation development trends and knowledge associations are displayed, supporting users to explore historical conversation content and generate reliable answers through generative summaries.
Users can quickly and efficiently recall historical conversation content, improve ChatGPT's contextual relevance performance in multi-round conversation scenarios, and improve answer quality and user experience.
Smart Images

Figure CN116881441B_ABST
Abstract
Description
Technical Field
[0001] This article relates to the technical field of time-series topic text data analysis and conversation visualization, and in particular to a visual analysis method and system for improving user conversation understanding and ChatGPT answer quality. Background Art
[0002] As an AI-powered natural language processing tool, ChatGPT has demonstrated outstanding performance across various fields, particularly in natural language understanding and generation tasks. Leveraging its rich data base and efficient design, ChatGPT is able to interpret and understand user requests and generate reliable responses to complete complex tasks. In complex scenarios, users tend to engage in multiple rounds of conversation with ChatGPT to retain context and obtain more comprehensive responses. However, in these multi-round conversations, improving both user understanding and the quality of ChatGPT's responses is crucial.
[0003] To improve user conversation understanding, existing methods mainly focus on topic evolution and the visual presentation of conversation content and relationships, but ignore the detailed presentation of content evolution and the complete structure and complexity of the conversation, limiting users' comprehensive grasp and in-depth analysis of the overall conversation structure.
[0004] To improve the quality of ChatGPT answers, existing methods primarily focus on optimizing the model's internal structure and algorithms, such as applying more complex attention mechanisms. While internal optimization methods for large language models have made some progress, they haven't fully tapped the potential of user participation to improve the model's contextual relevance. Summary of the Invention
[0005] In order to solve the above problems, the present invention provides a visual analysis method and system for improving user conversation understanding and ChatGPT answer quality.
[0006] The visual analysis method for improving user conversation understanding and ChatGPT answer quality includes the following steps:
[0007] S1. Obtain the historical conversation between the user and ChatGPT and decompose it into multiple conversation nodes, each node contains a user question and the corresponding ChatGPT answer.
[0008] S2. Based on the data preprocessing module, the raw data is analyzed using a multi-granularity topic classification method to obtain multi-level topic text data with time series information, including the following steps:
[0009] S21. Use the GPT3.5-turbo model to perform text summarization for all dialogue nodes. The text summary should not exceed 100 Chinese characters.
[0010] S22. Use the GPT3.5-turbo model to extract topics from all dialogue nodes. Specifically, construct the following prompt: "Based on topic modeling, extract multiple topics from the given dialogue node information. The number of topics should not exceed 5, and topics should not be subdivided into subtopics. Output topics are separated by \n, and no other output is allowed. The following is all dialogue node information: ". This prompt, along with a summary of all dialogue nodes, is sent to GPT3.5-turbo to extract the topics from the conversation.
[0011] S23. Use the text-embedding-ada-002 model to vectorize the text for each historical conversation node and summarized topic, embedding the text into a 1536-dimensional numerical representation for subsequent calculation of text similarity.
[0012] S24. Use cosine similarity to match historical conversation nodes and corresponding topics. If the similarity exceeds a preset threshold, the conversation node is attributed to the topic to achieve topic classification;
[0013] S25. Use the GPT3.5-turbo model to extract subtopics from all dialogue nodes under each topic, and then use cosine similarity to match all dialogue nodes and subtopics under the topic. If the similarity exceeds the preset threshold, the dialogue node is assigned to the subtopic to achieve subtopic classification.
[0014] Data presentation module S3 imports multi-level topic text with temporal information into a pre-built visualization model for data presentation, including:
[0015] Step S31. The overall conversation, swing sorting presents the conversation development trend and topic switching;
[0016] Step S32: For a specific topic sub-item, the force-directed layout and the orthogonal grid layout present specific topic knowledge associations;
[0017] Step S33: Contextually associate questions and answers, associate context information to generate reliable questions and answers.
[0018] Specifically, step S31 selects a partial area by swiping the component to magnify and present the local conversation details on the conversation flow component, and present the development trend of the conversation and the switching of topics.
[0019] Preferably, in step S31, the topic positions on the brush selection component and the dialogue flow component are calculated by a swing sorting method, thereby reducing the movement distance perceived by the user visually.
[0020] Furthermore, for swing sorting, the existing conversation data can be represented as a graph G = (V, E i ), the adjacency matrix of this graph is represented as A=(a ij ), where a ij Indicates the number of times the conversation shifts from topic i to topic j. The positions of these topics are coded from top to bottom in a discrete manner and introduced into a 0-1 decision variable x ij , which means the following:
[0021]
[0022] Using the above decision variables, this patent constructs a mathematical optimization model in the following form:
[0023] min∑ i,j,k,l |jl|x ij x kl a ik (1)
[0024]
[0025] The constraints in formula (2) are assignment constraints, which ensure that each subject can only be in one position, and each position can only have one subject. Since the variables in formula (1) are discrete, the objective function is a quadratic function, and the constraints are linear conditions, the model is an integer quadratic programming model.
[0026] Specifically, step S32 provides two optional layout methods to display the knowledge associations of all question-answer nodes under the selected topic: uniform distribution force-directed graph layout and orthogonal grid layout. In the uniform distribution force-directed graph layout strategy, forces in the x- and y-axis directions are set respectively, so that the nodes are evenly distributed in the two-dimensional space. At the same time, the repulsive force between nodes is introduced, which is specifically expressed as:
[0027]
[0028] Here the constant k represents a scaling factor, and the constant r represents the desired spacing between nodes. represents the square of the Euclidean distance between node i and node j, and p i -p j Represents the vector from node i to node j.
[0029] In addition, the tension of the connecting line is set to be proportional to the similarity between the nodes, so that similar nodes are close to each other, which can be expressed as:
[0030]
[0031] Among them, s ijrepresents the similarity between node i and node j, d ij represents the Euclidean distance between nodes i and j. Finally, the center point of the force-directed graph layout is set at the center of the submodule to achieve better visualization. This layout allows users to explore related conversation history starting from the node of interest.
[0032] Furthermore, the implementation of the orthogonal grid layout described in step S32 includes the following steps:
[0033] Divide the two-dimensional space into a regular grid, and the number of rows and columns in the two-dimensional space is dynamically adjusted according to the number of nodes;
[0034] Assign each node to the subtopic set with the highest similarity. For each subtopic set, arrange the nodes in order from left to right and from top to bottom according to the temporal relationship;
[0035] Sort subtopics by their appearance time, with earlier subtopics appearing earlier in the layout. It also supports user feedback to understand which subtopics users are most interested in, and then sort subtopics based on user needs.
[0036] Specifically, step S33 includes a content viewing component, a context list, and a questioning component.
[0037] Specifically, after the user adds the historical conversation information presented in the content viewing component to the context list, in order to enable ChatGPT to more efficiently associate the context information provided by the user to provide reliable answers, the following steps are performed to compress and process the information:
[0038] The conversations that the user added to the context list are divided into paragraphs. Each paragraph is vectorized and the cosine similarity with the question is calculated. Only paragraphs with a cosine similarity above a threshold of 0.9 are retained.
[0039] We calculated cosine similarity between paragraphs and merged paragraphs with a similarity greater than 0.98 to reduce information redundancy. We also used the GPT model to extract topics from all paragraphs and asked users to rank these topics to determine the narrative logic of the context. Finally, we categorized the paragraphs by topic, and the order of the paragraphs within the topic was determined based on the similarity between the paragraphs and the topics.
[0040] Generative summary generation technology is used to extract key information from the reorganized conversation history for information abstraction;
[0041] Users are allowed to annotate the results of information abstraction, and these annotations will be provided to ChatGPT as additional contextual information that is more human-friendly.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] The visual analysis method provided by this invention improves user conversation understanding and ChatGPT answer quality. Users can explore historical conversations from different thematic levels, quickly and efficiently recall historical conversation content, and effectively solve the problem of human forgetfulness in multi-round conversation scenarios. After a user asks a question, a visualization is used to prompt the user of nodes in the historical conversation that may be highly relevant to the question, allowing the user to review and decide whether to add context to the question. This allows ChatGPT to associate with conversation content that is highly relevant to the question at any time, thereby improving ChatGPT's contextual relevance performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A flowchart of a visual analysis method for improving user conversation understanding and ChatGPT answer quality provided in this embodiment;
[0045] Figure 2 It is a specific flow chart of data analysis of the present invention;
[0046] Figure 3 is a schematic diagram of the visual analysis interface of the present invention;
[0047] Figure 4 It is a flow chart of the swing sorting of the present invention. Specific implementation plan
[0048] In order to explain the technical content, structural features, achieved objectives and effects of the technical solution in detail, the following is a detailed description in conjunction with specific embodiments and accompanying drawings. This detailed description should not be considered as a limitation of the present invention, but should be understood as a more detailed description of certain aspects, characteristics and implementation plans of the present invention.
[0049] Example 1
[0050] See also Figure 1 A visual analysis method for improving user conversation understanding and ChatGPT answer quality includes the following steps:
[0051] S1. Obtain the conversation history between the user and ChatGPT and decompose it into multiple conversation nodes. Each node contains a user question and the corresponding ChatGPT answer, including:
[0052] S11 first obtains the conversation history between the user and ChatGPT from the website.
[0053] S12 decomposes the conversation history into multiple conversation nodes, each of which contains a user question and the corresponding ChatGPT answer.
[0054] S2. Analyze the original data using a multi-granularity topic classification method to obtain multi-level topic text data with temporal information, including the following steps:
[0055] S21 performs text summarization on all dialogue nodes in the dialogue history, and the generated result is required to be less than 100 Chinese characters.
[0056] S22 extracts topics from all dialogue nodes. Construct the following prompt: "Based on topic modeling, extract multiple topics from the given dialogue node information. The number of topics should not exceed five, and no topics should be subdivided into subtopics. Output topics are separated by \n, and no other output should be included. The following is all dialogue node information:" This prompt, along with a summary of all dialogue nodes, is sent to GPT3.5-turbo to extract the topics from the conversation.
[0057] S23 vectorizes the text of each historical conversation node and summarized topic, embedding the text into a 1536-dimensional numerical representation for subsequent calculation of the similarity between texts.
[0058] S24 uses cosine similarity to match historical dialogue nodes and corresponding topics. If the similarity exceeds a preset value of 0.9, the dialogue node is attributed to the topic to achieve topic classification.
[0059] S25 extracts subtopics from all dialogue nodes under each topic, and then uses cosine similarity to match all dialogue nodes and subtopics under the topic. If the similarity exceeds the preset value of 0.9, the dialogue node is assigned to the subtopic to achieve subtopic classification.
[0060] S3. Import multi-level topic text data with temporal information into pre-built visualization models for data presentation, including:
[0061] S31 uses swing sorting to calculate the optimal topic sorting to present the development trend of the conversation and the switching of topics. Figure 2 ,
[0062] First, load the conversation data from the file. Based on the conversation data, map the topics in the conversation to the nodes of the graph and construct a relationship graph between the topics. Use the optimization model of the quadratic assignment problem to calculate the optimal topic ranking, aiming to minimize the objective function and taking into account the constraints. Finally, save the optimal ranking result and output it.
[0063] S32 uses a uniformly distributed force-directed graph layout and an orthogonal grid layout to display the knowledge associations of all question-and-answer nodes under the selected topic. In the uniformly distributed force-directed graph layout strategy, the forces in the x- and y-axis directions are set respectively, so that the nodes are evenly distributed in the two-dimensional space. At the same time, the repulsive force between the nodes is introduced. In addition, the tension of the connecting line is set to be proportional to the similarity between the nodes, so that similar nodes are close to each other. Finally, the center point of the force-directed graph layout is set at the center of the submodule to achieve better visualization effects. This layout method supports users to explore related conversation history starting from the node of interest.
[0064] Another optional orthogonal grid layout implementation includes the following steps: dividing the two-dimensional space into a regular grid, with the number of rows and columns in the two-dimensional space dynamically adjusted based on the number of nodes; assigning each node to the set of subtopics with the highest similarity to it. For each subtopic set, the nodes are arranged in chronological order from left to right and from top to bottom; and the subtopics are sorted chronologically based on the time of their appearance, with earlier subtopics appearing at the top of the layout. User feedback is also supported to understand which subtopics users are most interested in, and the subtopics are then sorted based on user needs.
[0065] S33 associates user-provided contextual information to generate reliable answers. The user first asks a question, and the global conversation view submodule prompts conversation nodes that are highly relevant to the question. The user can optionally add parts of the historical conversation to the context list. To enable ChatGPT to more efficiently associate user-provided contextual information to provide reliable answers, information compression and processing are performed through the following steps:
[0066] Divide the conversations in the context list into paragraphs, vectorize each paragraph, and calculate the cosine similarity with the question. Only paragraphs with a cosine similarity higher than a preset value of 0.9 are retained.
[0067] We calculated cosine similarity between paragraphs and merged paragraphs with a similarity greater than 0.98 to reduce information redundancy. We also used the GPT model to extract topics from all paragraphs and asked users to rank these topics to determine the narrative logic of the context. Finally, we categorized the paragraphs by topic, and the order of the paragraphs within the topic was determined based on the similarity between the paragraphs and the topics.
[0068] Generative summary generation technology is used to extract key information from the reorganized conversation history for information abstraction;
[0069] Users are allowed to annotate the results of information abstraction, and these annotations will be provided to ChatGPT as additional contextual information that is more human-friendly.
[0070] ChatGPT generates reliable answers based on the processed context information to improve the model's contextual association capabilities.
[0071] like Figure 2 As shown, the specific process of data analysis of the present invention includes:
[0072] Step 1: Generate a dialogue node. Capture the historical dialogue records between the user and ChatGPT from the web page and extract the questions and corresponding answers from them as a dialogue node.
[0073] Step 2: Text vectorization: Use a vectorization model based on GPT-3.5 to embed the text into a 1536-dimensional numerical representation for subsequent calculation of the similarity between texts.
[0074] Step 3: Topic extraction: Use GPT3.5-turbo to extract topics from all dialogue nodes. Specifically, construct a suitable prompt, require GPT3.5-turbo to summarize several topics for historical dialogue data, and then send the summaries and prompts of all dialogue nodes to GPT3.5-turbo to extract the topics in the dialogue.
[0075] Step 4: Topic classification. Use cosine similarity to match historical dialogue nodes and corresponding topics. If the similarity exceeds the preset threshold (0.9), the dialogue node is assigned to the topic. A dialogue node can belong to multiple topics at the same time, ultimately achieving topic classification.
[0076] like Figure 3 As shown, the visual interface provided by this embodiment includes:
[0077] A global view of the conversation, including conversation flow components (such as Figure 3 As shown in a1), select components (as shown in Figure 3 As shown in a2), the subject label (as Figure 3 As shown in a3 in the figure), search for components (such as Figure 3 a4 in the figure) and the topic distribution component (as shown in Figure 3 (shown in a5 in the figure), uses the metaphor of the GitLog graph to show the structure of the conversation, which is used to show the overall evolution trend of the conversation and support the exploration of local significant features.
[0078] like Figure 4 As shown, the swing sort is divided into four steps:
[0079] Step 1: Load conversation data: Load conversation data from a file and prepare it for subsequent processing.
[0080] Step 2: Build a graph: Based on the conversation data, map the topics in the conversation to the nodes of the graph and build a relationship graph between the topics.
[0081] Step 3: Optimize the sorting: Use the optimization model of the quadratic assignment problem to calculate the optimal node sorting, with the goal of minimizing the objective function and considering the constraints.
[0082] Step 4. Output results: Save the optimal sorting results to a file for subsequent use or further analysis.
[0083] Specifically, the optimization sorting in step 3 includes: creating an optimization model and initializing variables; constructing an objective function; adding assignment constraints to ensure that each topic and position has a unique correspondence; setting the optimization goal to minimize the objective function; setting a solution time limit; parsing the optimal solution and storing it in a result dictionary; and returning the optimal sorting result dictionary.
[0084] Specifically, the existing conversation data can be represented as a graph with a fixed number of nodes, represented as G = (V, E i ), the adjacency matrix of this graph is represented as A=(a ij ), where a ij Indicates the number of times the conversation shifts from topic i to topic j. The positions of these topics are coded from top to bottom in a discrete manner and introduce a 0-1 decision variable x ij , which means the following:
[0085]
[0086] Using the above decision variables, this patent constructs a mathematical optimization model in the following form:
[0087] min∑ i,j,k,l |jl|x ij x kl a ik (5)
[0088]
[0089] The constraints in formula (6) are assignment constraints, which ensure that each topic can only be in one position, and each position can only have one topic. Since the variables in formula (5) are discrete, the objective function is a quadratic function, and the constraints are linear conditions, the model is an integer quadratic programming model.
[0090] A specific topic view uses a knowledge graph structure to display all conversation nodes and their relationships within a specific topic, demonstrating the relevance and evolution of conversations under that topic.
[0091] Contextual Q&A view, including content viewing components (such as Figure 3 ), context list (as shown in c1 in Figure 3) and the question component (as shown in c2 in Figure 3 It is used to display detailed information of a specific dialogue node and allow users to provide specific context information when asking questions.
[0092] To better illustrate the technical effects of this invention, we'll use a real-world user case study. A user using our system first imports their conversation history with ChatGPT. In this example, the user uses ChatGPT to read a paper. Next, they use our system to quickly recall the historical conversation and add relevant historical conversation context to their questions.
[0093] In the global view of the conversation, the user first observes that the historical conversation is classified by topic, and each topic is coded with a different color (such as Figure 3 This helps users recall the overall content of the conversation at a macro level.
[0094] In the global view of the conversation, the topic distribution component (such as Figure 3 As shown in a5 in the figure, the user can view the number of dialogue nodes in each interval of each topic during the entire conversation process, thereby knowing the distribution of each topic in the conversation process. Figure 3 In order to gain a deeper understanding of the conversation details within a certain time period, the user selects the area of interest on the swipe component, and the conversation flow component (as shown in a2) Figure 3 (as shown in a1 in the figure) zooms in and displays the dialogue nodes in the selected area.
[0095] In the global view of the conversation, the word cloud of the selected area is displayed on the conversation flow component. The user is interested in the word "interpolation". When the mouse hovers over the word, the conversation nodes are highlighted to varying degrees according to the word frequency. Node 24 is highlighted most significantly. Placing the mouse over node 24 displays the overview of the conversation node. Clicking the conversation node displays the corresponding detailed conversation information (such as Figure 3 (as shown in c1).
[0096] In the above exploration process, the user noticed a new term “data story” and entered the term in the search box, and selected components (such as Figure 3 (As shown in a2) The global dialogue nodes that are highly relevant to the keyword are prompted to the user in the form of highlighted nodes.
[0097] After completing the exploration of the global view of the conversation, he wants to learn more about the related content under the topic of "Interpolator and Fact Embedder", so he clicks on the corresponding legend. Figure 3As shown in (b), the knowledge graph structure diagram of all dialogue nodes under the topic is displayed and the topic is further divided into three sub-topics.
[0098] By observing the color of the inner ring graph of node 24, he found that node 24 was closely related to two of the subtopics, one of which was the subtopic he was interested in. Therefore, he explored the nodes in the knowledge graph that were closely related to the subtopic. In addition, he noticed that node 24 was closely related to another 6 dialogue nodes, so he also explored the content viewing components (such as Figure 3 c1 in the figure to view their detailed information and further review other conversations related to this node.
[0099] Furthermore, by observing the color of the outer ring graph of node 24, he discovered that it was also related to the topic "Narrative Visualization," so he conducted a similar exploration process on this topic. After about five minutes of exploration, he had a general understanding of the overall context of the conversation history. Using the knowledge graph of the specific topic view, he conducted in-depth research on each subtopic to discover potential connections.
[0100] In the process of exploring historical dialogues, he gained new insights into narrative visualization and interpolators. He plans to use the question component under the contextual question and answer view (such as Figure 3 (as shown in c3 in the figure) and asked the following question: "What are the optimization directions of the interpolator proposed in this paper?" After asking this question, the brushing component under the global view of the conversation highlighted the dialogue nodes that are highly relevant to this question. He focused on the highlighted nodes before the forgetting line and added some historical conversations to the context list (as shown in the figure). Figure 3 (as shown in c2).
[0101] Finally, the user clicks the Submit button, and the visual analysis system provided by the present invention further processes the contextual information, including information filtering, reorganization, abstraction, and annotation. The visual analysis system submits the question and the processed contextual information to ChatGPT. ChatGPT fully contextualizes the content of the relevant conversation and provides an accurate and relevant answer. The system then retrieves the content of the question and answer and updates all views in real time after text processing.
[0102] During this process, users explored and quickly recalled and analyzed their past conversations with ChatGPT using the visual analysis system provided by this invention. ChatGPT also enabled them to correlate conversations across time, improving its contextual relevance in long conversations. This process demonstrated the effectiveness and reliability of the system, further confirming its value as a tool for analyzing and understanding conversation history.
[0103] Example 2
[0104] This embodiment relates to a system for implementing the visual analysis method described in Example 1 to improve user conversation understanding and ChatGPT answer quality.
[0105] A visual analysis system that improves user conversation understanding and ChatGPT answer quality, including data preprocessing, data analysis, and data presentation modules;
[0106] The data preprocessing module is used to obtain the conversation history between the user and ChatGPT and decompose it into multiple conversation nodes, each node containing a user question and a corresponding ChatGPT answer.
[0107] The data analysis module is based on the data preprocessing module and uses a multi-granularity topic classification method to analyze the original data to obtain multi-level topic text data with time series information, including the following steps:
[0108] Use the GPT3.5-turbo model to perform text summarization on all dialogue nodes. The text summary result should not exceed 100 Chinese characters.
[0109] Use the GPT3.5-turbo model to extract topics from all dialogue nodes. Specifically, construct the following prompt: "Based on topic modeling, extract multiple topics from the given dialogue node information. The number of topics should not exceed 5, and topics should not be subdivided into subtopics. Output topics are separated by \n, and no other output is allowed. The following is all dialogue node information:." This prompt, along with a summary of all dialogue nodes, is sent to GPT3.5-turbo to extract the topics from the conversation.
[0110] Use the text-embedding-ada-002 model to vectorize the text of each historical conversation node and summarized topic, embedding the text into a 1536-dimensional numerical representation for subsequent calculation of similarity between texts;
[0111] Use cosine similarity to match historical conversation nodes and corresponding topics. If the similarity exceeds a preset threshold, the conversation node is assigned to the topic to achieve topic classification.
[0112] The GPT3.5-turbo model is used to extract subtopics from all dialogue nodes under each topic. Then, cosine similarity is used to match all dialogue nodes and subtopics under the topic. If the similarity exceeds a preset threshold, the dialogue node is assigned to the subtopic to achieve subtopic classification.
[0113] The data presentation module imports the data processed by the data analysis module into a pre-built visualization model for data presentation. The data presentation module includes a global dialogue sub-module, a specific topic sub-module and a context-related question and answer sub-module.
[0114] Example 3
[0115] This embodiment relates to a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the visual analysis method for improving user conversation understanding and ChatGPT answer quality described in Example 1 is implemented.
[0116] Example 4
[0117] This embodiment relates to a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the visual analysis method for improving user conversation understanding and ChatGPT answer quality described in Example 1.
Claims
1. A visual analysis method to improve user conversation understanding and ChatGPT answer quality, characterized by: The following steps are involved: S1. Obtain the conversation history between the user and ChatGPT and decompose it into multiple conversation nodes, each node containing a user question and the corresponding ChatGPT answer; S2. Analyze the original data using a multi-granularity topic classification method to obtain multi-level topic text data with temporal information, including the following steps: S21. Use the GPT3.5-turbo model to perform text summarization for all dialogue nodes. The text summary should not exceed 100 Chinese characters. S22. Use the GPT3.5-turbo model to extract topics from all dialogue nodes. Specifically, construct the following prompt: "Based on topic modeling, extract multiple topics from the given dialogue node information. The number of topics should not exceed 5, and topics should not be subdivided into subtopics. Output topics should be separated by \n, and no other output should be included. The following is all dialogue node information:" This prompt, along with a summary of all dialogue nodes, is sent to GPT3.5-turbo to extract the topics from the conversation. S23. Use the text-embedding-ada-002 model to vectorize the text for each historical conversation node and summarized topic, embedding the text into a 1536-dimensional numerical representation for subsequent calculation of text similarity. S24. Use cosine similarity to match historical conversation nodes and corresponding topics. If the similarity exceeds a preset threshold, the conversation node is attributed to the topic to achieve topic classification; S25. Use the GPT3.5-turbo model to extract subtopics from all dialogue nodes under each topic. Then use cosine similarity to match all dialogue nodes and subtopics under the topic. If the similarity exceeds a preset threshold, the dialogue node is assigned to the subtopic, achieving subtopic classification. S3. Import multi-level topic text data with temporal information into pre-built visualization models for data presentation, including: Step S31. The overall conversation, swing sorting presents the conversation development trend and topic switching; Step S32: For a specific topic sub-item, the force-directed layout and the orthogonal grid layout present specific topic knowledge associations; Step S33: Contextually associate questions and answers, associate context information to generate reliable questions and answers.
2. The visual analysis method for improving user conversation understanding and ChatGPT answer quality according to claim 1 is characterized in that: In step S31, the topic positions on the brush selection component and the dialogue flow component are calculated by the swing sorting method to reduce the movement distance perceived by the user visually.
3. The visual analysis method for improving user conversation understanding and ChatGPT answer quality according to claim 2 is characterized in that: For swing sorting, the existing conversation data can be represented as a graph G with a fixed number of nodes = (V, E i ), the adjacency matrix of this graph is represented as A=(a ij ), where a ij represents the number of transitions from topic i to topic j during the conversation; the positions of these topics are coded from top to bottom in a discrete manner and introduce a 0-1 decision variable x ij , which means the following: Using the above decision variables, a mathematical optimization model of the following form is constructed: min∑ i,j,k,l |j-l|x ij x kl a ik (1) Among them, the constraints in formula (2) are assignment constraints, which ensure that each subject can only be in one position and each position can only have one subject; since the variables in formula (1) are discrete, the objective function is a quadratic function, and the constraints are linear conditions, the model is an integer quadratic programming model.
4. The visual analysis method for improving user conversation understanding and ChatGPT answer quality according to claim 1 is characterized in that: Step 32 provides two optional layout methods to display the knowledge associations of all question-answer nodes under the selected topic: uniform distribution force-directed graph layout and orthogonal grid layout. In the uniform distribution force-directed graph layout strategy, forces in the x- and y-axis directions are set respectively, so that the nodes are evenly distributed in the two-dimensional space. At the same time, repulsive forces between nodes are introduced, which are specifically expressed as follows: Here the constant k represents a scaling factor, and the constant r represents the desired spacing between nodes; represents the square of the Euclidean distance between node i and node j, and p i -p j represents the vector from node i to node j; In addition, the tension of the connection line is set to be proportional to the similarity between nodes, so that similar nodes are close to each other, which is specifically expressed as: Among them, s ij Represents the similarity between node i and node i, d ij represents the Euclidean distance between node i and node j; finally, the center point of the force-directed graph layout is set at the center of the submodule to achieve better visualization; this layout method supports users to explore related conversation history starting from the node of interest.
5. The visual analysis method for improving user conversation understanding and ChatGPT answer quality according to claim 4 is characterized in that: The implementation of the orthogonal grid layout described in step 32 includes: Divide the two-dimensional space into a regular grid, and the number of rows and columns in the two-dimensional space is dynamically adjusted according to the number of nodes; Assign each node to the subtopic set with the highest similarity; for each subtopic set, arrange the nodes in order from left to right and from top to bottom according to the temporal relationship; Subtopics are sorted in chronological order based on their appearance time, with subtopics that appear earlier positioned higher in the layout. User feedback is also supported to understand which subtopics users are more concerned about, and then the subtopics are sorted according to user needs.
6. The visual analysis method for improving user conversation understanding and ChatGPT answer quality according to claim 1 is characterized in that: Step S33 includes a content viewing component, a context list, and a questioning component.
7. The visual analysis method for improving user conversation understanding and ChatGPT answer quality according to claim 6 is characterized in that: After the user adds the historical conversation information presented in the content viewing component to the context list, in order to enable ChatGPT to more efficiently associate the context information provided by the user to provide reliable answers, the following steps are performed to compress and process the information: The conversations that the user has added to the context list are divided into paragraphs. Each paragraph is vectorized and its cosine similarity with the question is calculated. Only paragraphs with a score above the threshold are retained. Calculate the cosine similarity between paragraphs and merge paragraphs with a similarity greater than 0.98 to reduce information redundancy. Use the GPT model to extract topics from all paragraphs and ask users to sort these topics to determine the narrative logic of the context. Finally, categorize the paragraphs by topic and determine the order of the paragraphs within a topic based on the similarity between the paragraph and the topic. Generative summary generation technology is used to extract key information from the reorganized conversation history for information abstraction; Users are allowed to annotate the results of information abstraction, and these annotations will be provided to ChatGPT as additional contextual information that is more human-friendly.
8. A visual analysis system that improves user conversation understanding and ChatGPT answer quality, featuring: It includes data preprocessing module, data analysis module and data presentation module; The data preprocessing module is used to obtain the conversation history between the user and ChatGPT and decompose it into multiple conversation nodes, each node containing a user question and the corresponding ChatGPT answer; The data analysis module is based on the data preprocessing module and uses a multi-granularity topic classification method to analyze the original data to obtain multi-level topic text data with time series information, including the following steps: Use the GPT3.5-turbo model to perform text summarization on all dialogue nodes. The text summary result should not exceed 100 Chinese characters. Use the GPT3.5-turbo model to extract topics from all dialogue nodes. Specifically, construct the following prompt: "Based on topic modeling, extract multiple topics from the given multiple dialogue node information. The number of topics should not exceed 5, and topics should not be subdivided into subtopics. Output topics should be separated by \n, and no other output should be generated. The following is all dialogue node information:" This prompt, along with a summary of all dialogue nodes, is sent to GPT3.5-turbo to extract the topics in the conversation. Use the text-embedding-ada-002 model to vectorize the text of each historical conversation node and summarized topic, embedding the text into a 1536-dimensional numerical representation for subsequent calculation of similarity between texts; Use cosine similarity to match historical conversation nodes and corresponding topics. If the similarity exceeds a preset threshold, the conversation node is assigned to the topic to achieve topic classification. The GPT3.5-turbo model is used to extract subtopics from all dialogue nodes under each topic. Then, cosine similarity is used to match all dialogue nodes and subtopics under the topic. If the similarity exceeds a preset threshold, the dialogue node is assigned to the subtopic to achieve subtopic classification. The data presentation module imports the data processed by the data analysis module into a pre-built visualization model for data presentation. The data presentation module includes a global dialogue sub-module, a specific topic sub-module and a context-related question and answer sub-module.
9. A computer-readable storage medium, characterized in that A program is stored thereon, which, when executed by a processor, implements the visual analysis method for improving user conversation understanding and ChatGPT answer quality as described in any one of claims 1-7.
10. A computing device comprising a memory and a processor, wherein: The memory stores executable code, and when the processor executes the executable code, it implements the visual analysis method for improving user conversation understanding and ChatGPT answer quality described in any one of claims 1-7.