Semantic analysis-based AI agent question and answer text generation method
Through semantic analysis methods, the semantic differences between the keyword set of question pairs and the question and answer keyword set are obtained, the semantic change vector and abnormal deviation are calculated, the question pairs in historical question and answer records are eliminated, and a high-quality FQA corpus is constructed. This solves the accuracy problem caused by semantic ambiguity in the AI intelligent question and answer system and improves the accuracy of question and answer text generation.
Patent Information
- Application Number
- CN202511095057.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-08-06
AI Technical Summary
Existing AI agent question-answering systems fail to fully consider the semantic ambiguity of questions in historical question-answering records, resulting in poor accuracy of questions and their answer results in the FQA corpus, which affects the accuracy of question-answer text generation.
Through semantic analysis methods, the semantic differences between the keyword set of question pairs and the question-answer keyword set are obtained, the semantic change vector and abnormal deviation are calculated, and the question pairs in historical question-answer records are eliminated based on the question-answer matching degree to construct a high-quality FQA corpus.
The accuracy of questions and their question-and-answer results in the FQA corpus is improved, ensuring the accuracy of question-and-answer text generation by AI agents and reducing the impact of semantic ambiguity on question-and-answer results.
Smart Images

Figure CN120596641A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of semantic analysis technology, and specifically to a method for generating question-answering texts for an AI agent based on semantic analysis. Background Art
[0002] AI-agent question-answering systems are a key area of artificial intelligence application. They provide users with uninterrupted service and quickly respond to user queries, improving user satisfaction. Currently, the demand for AI-agent question-answering accuracy is increasing. AI-agent question-answering systems answer user questions in natural language accurately and concisely, and can provide citations for generated text or explain the reasoning behind the question-answering process, thereby increasing user trust in the AI-agent's answering results.
[0003] In existing technologies, most AI agent question-answering systems use the FQA (Frequently-Asked Questions) approach. This approach creates an FQA corpus by recording historical question-answer records. A series of questions and their corresponding answer results from the FQA corpus are then stored in the AI agent question-answering system, enabling rapid response to user Q&A requests and reducing user wait times. However, due to potential semantic ambiguity in historical Q&A records, existing technologies fail to fully consider this semantic ambiguity when building FQA corpora. This makes it difficult to effectively identify high-quality questions and their answer results, resulting in poor accuracy in the questions and their answer results within the FQA corpus, impacting the accuracy of the generated AI agent Q&A text. Summary of the Invention
[0004] In order to solve the above technical problems, this application provides an AI agent question and answer text generation method based on semantic analysis to solve existing problems.
[0005] The AI agent question-answering text generation method based on semantic analysis in this application adopts the following technical solutions:
[0006] One embodiment of the present application provides a method for generating AI agent question-answer text based on semantic analysis, comprising the following steps:
[0007] Obtain each question pair and its question and answer time in the historical question and answer records, and extract the keywords of the question text and the question and answer generated text of each question pair to obtain the question keyword set and question and answer keyword set for each question pair;
[0008] The semantic difference between the keywords in the question keyword set and the question-answer keyword set of each question pair is used to obtain the semantic change vector of each keyword. Based on the semantic correlation between the semantic change vector of each keyword and the word frequency of each keyword in the question-answer keyword set, combined with the change trend of the elements in the semantic change vector, the semantic abnormal deviation of each keyword in the question keyword set of each question pair is obtained.
[0009] The semantic fuzziness of the question text in each question pair is obtained by combining the semantic correlation between the semantic anomaly deviation of the keywords in the question keyword set of each question pair and the word frequency of the keywords, and the difference between the semantic anomaly deviations of different keywords in the question keyword set. The question-answer matching degree of each question pair is obtained based on the matching degree between the question keyword set of each question pair and the question-answer keyword set, as well as the similarity between each question pair and its neighboring question pairs in terms of the question keyword set.
[0010] The question-answer matching degree is used to eliminate question pairs in historical question-answer records to build an FQA corpus, and the AI agent is combined to generate corresponding question-answer texts based on the user's questions.
[0011] Preferably, the method for obtaining the semantic change vector of each keyword is:
[0012] Calculate the normalized Google distance between each keyword in the question keyword set of each question pair and all keywords in its question-answer keyword set, and arrange all normalized Google distances from small to large according to the word frequency of the keywords in the question-answer generated text, and obtain the semantic change vector of each keyword in the question keyword set of each question pair.
[0013] Preferably, the method for obtaining the semantic abnormality deviation of each keyword in the question keyword set of each question pair is:
[0014] Extract the word frequency weight vector of the question and answer keyword set of each question pair, calculate the scalar product between the semantic change vector of each keyword in the question keyword set of each question pair and the word frequency weight vector of the question and answer keyword set of each question pair, and count the ratio of the number of positive elements in the first-order difference vector of the semantic change vector to the total number of elements, and multiply the scalar product by the ratio as the semantic abnormality deviation of each keyword in the question keyword set of each question pair.
[0015] Preferably, the method for extracting the word frequency weight vector of the question and answer keyword set of each question pair is: arranging the word frequencies of all keywords in the question and answer keyword set of each question pair from small to large to form the word frequency weight vector of the question and answer keyword set of each question pair.
[0016] Preferably, the method for calculating the semantic ambiguity of the question text in each question pair is:
[0017] Where, is the semantic ambiguity of the question text in the i-th question pair, is the product of the semantic deviation vector of the question keyword set of the i-th question pair and the word frequency weight vector of the question keyword set, is the number of elements in the semantic deviation vector of the question keyword set of the i-th question pair, and They are respectively the sth and s-1th elements in the semantic deviation vector of the question keyword set of the i-th question pair.
[0018] Preferably, the semantic anomaly deviations of the keywords in the question keyword set of each question pair are arranged from small to large according to the word frequency of the keywords in the question text, which are used as the semantic deviation vector of the question keyword set of each question pair, and the word frequencies of all keywords in the question keyword set in the question text are arranged from small to large to form the word frequency weight vector of the question keyword set of each question pair.
[0019] Preferably, multiple question pairs with the closest question-answer time interval between each question pair are regarded as neighboring question pairs of each question pair.
[0020] Preferably, the method for calculating the question-answer matching degree of each question pair is:
[0021] Where, is the question-answer matching degree of the i-th question pair, is the semantic ambiguity of the question text in the i-th question pair, is the Jaccard similarity coefficient between the question keyword set and the question-answer keyword set of the i-th question pair, is an exponential function with a natural constant as base, is the question similarity of the i-th question pair.
[0022] Preferably, the method for obtaining the question similarity of each question pair further includes: calculating the average value of the Jaccard similarity coefficients between the question keyword set of each question pair and the question keyword sets of its neighboring question pairs as the question similarity of each question pair.
[0023] Preferably, the use of question-answer matching to eliminate question pairs in historical question-answer records includes: normalizing the question-answer matching of all question pairs in the historical question-answer records; if the normalized question-answer matching is less than a question-answer matching threshold, the question pair is eliminated from the historical question-answer records.
[0024] This application has at least the following beneficial effects:
[0025] This application takes into account that the existing technology does not fully analyze the semantic ambiguity of questions in historical question and answer records to establish an FQA corpus, making it impossible to effectively identify high-quality questions and their question and answer results, resulting in poor accuracy of questions and their question and answer results in the FQA corpus, affecting the accuracy of the AI agent's question and answer text generation. Therefore, this application considers the strength of the semantic relationship between keywords in the question text and its question and answer text, and at the same time considers the abnormal characteristics of the semantic relationship between keywords that change with word frequency, accurately measuring the abnormal deviation characteristics of the semantic relationship between keywords, which is used for subsequent more accurate feature extraction of the semantic ambiguity of the question text;
[0026] Furthermore, this application accurately measures the semantic ambiguity of question text within a question pair by focusing on the semantic anomaly deviation characteristics of keywords with high word frequency and combining them with the changing characteristics of semantic anomaly deviation, which is conducive to the subsequent identification of high-quality questions and their question-answering results.
[0027] At the same time, this application extracts features from the question-answer matching of each question pair in the historical question-answer records through the semantic ambiguity of the question text and the similarity of questions in multiple question-answering processes, and uses the question-answer matching to effectively identify high-quality questions and their question-answer results in the historical question-answer records, thereby constructing an FQA corpus, improving the accuracy of questions and their question-answer results in the FQA corpus, and avoiding affecting the accuracy of the question-answer text generation of the AI intelligent agent. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0029] Figure 1 A flowchart of the steps of the AI agent question and answer text generation method based on semantic analysis provided in this application. DETAILED DESCRIPTION
[0030] In order to further illustrate the technical means and effects adopted by this application to achieve the predetermined invention purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation method, structure, features and effects of the AI intelligent agent question-answering text generation method based on semantic analysis proposed in this application. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0031] Unless otherwise defined, terms such as "comprises," "comprising," or any other variants thereof are intended to encompass non-exclusive inclusion, such that a circuit structure, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such article or device. In the absence of further restrictions, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the article or device comprising the element. In addition, the term "and\or" as used herein includes any and all combinations of one or more related listed items. All technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains.
[0032] The specific scheme of the AI intelligent agent question and answer text generation method based on semantic analysis provided by this application is described in detail below with reference to the accompanying drawings.
[0033] An embodiment of this application provides an AI agent question-answering text generation method based on semantic analysis. For details, please refer to Figure 1 , including the following steps:
[0034] Step 1: Obtain each question pair and its question-answer time in the historical question-answer record, and extract the keywords of the question text and the question-answer generated text of each question pair to obtain the question keyword set and question-answer keyword set for each question pair.
[0035] The AI agent question-answering system server is used to query historical question-answering records in the past six months, and each question pair and its corresponding question-answering time are obtained from the database where the historical question-answering records are located. The question pair includes the question text of the user's question and answer and the question-answering generated text.
[0036] In order to facilitate more accurate semantic analysis in the future and thus more effectively identify high-quality questions and their question-answer results, a regular matching algorithm is used to remove punctuation marks and meaningless characters in the question text and question-answer generated text of each question pair, and then the removed question text and its corresponding question-answer generated text are used as inputs of the keyword extraction algorithm respectively. The keyword extraction algorithm can be the TF-IDF algorithm or the TextRank algorithm. This embodiment uses the TF-IDF algorithm to obtain the question keyword set of the question text and the question-answer keyword set of the question-answer generated text in each question pair. Among them, the regular matching algorithm and the TF-IDF algorithm are both well-known technologies, and the specific process will not be repeated here.
[0037] Step 2: Obtain the semantic change vector of each keyword through the semantic difference between the keywords in the question keyword set and the question-answer keyword set of each question pair. According to the semantic correlation between the semantic change vector of each keyword and the word frequency of each keyword in the question-answer keyword set, combined with the change trend of the elements in the semantic change vector, obtain the semantic abnormal deviation of each keyword in the question keyword set of each question pair.
[0038] When building an FQA corpus by recording historical Q&A records, semantic ambiguity can exist in these records, making the meaning of words or concepts in the user's question text unclear. This can affect the accuracy of the questions and answers in the FQA corpus, and in turn, the accuracy of the AI agent's generated Q&A text. Therefore, to avoid negatively impacting the accuracy of the AI agent's generated Q&A text, semantic analysis is necessary to accurately extract features from the semantic ambiguity of questions in historical Q&A records.
[0039] A semantic analysis is performed on the relationship between the keywords in the question text and the keywords in the question-answer generated text. The normalized Google distance between the jth keyword in the question keyword set of the i-th question pair and all keywords in its question-answer keyword set is calculated, and all normalized Google distances are arranged in ascending order according to the keyword frequency in the question-answer generated text. If the keyword frequency in the question-answer generated text is equal, random arrangement is performed to obtain the semantic change vector of the jth keyword in the question keyword set of the i-th question pair. The semantic change vector reflects the change in the semantic relationship between the keywords in the question text and all keywords in the question-answer generated text.
[0040] Generally speaking, keywords with high frequency in the Q&A generated text often have a strong semantic relationship with keywords in the question text. Therefore, the frequency of all keywords in the Q&A keyword set for the i-th question pair is arranged in ascending order. If the frequency of keywords in the Q&A generated text is equal, they are randomly arranged and recorded as the frequency weight vector of the Q&A keyword set for the i-th question pair.
[0041] Furthermore, through the word frequency weight vector, the vector scalar product calculation method is adopted to perform weighted summation on all elements in the semantic change vector. Specifically, the scalar product between the semantic change vector and the word frequency weight vector of the question and answer keyword set is calculated. In this embodiment, for the convenience of distinction and expression, it is recorded as the first scalar product. The larger the first scalar product, the weaker the semantic relationship between the keywords in the question text and all the keywords in the question and answer generated text, the more likely the question is to have semantic ambiguity, and the more likely the quality of the question and its question and answer results will be affected.
[0042] At the same time, the first-order difference vector of the semantic change vector is calculated, and the number of positive elements in the first-order difference vector is counted, and the ratio of the number of positive elements to the total number is calculated. Under normal circumstances, since the keywords with higher word frequency in the question-answering generated text often have a strong semantic relationship with the keywords in the question text, the semantic change vector should strictly follow a decreasing trend. If the ratio is higher, the decreasing trend in the semantic change vector is less obvious, and the abnormal characteristics of the semantic change are more significant, that is, the problem is more likely to have semantic ambiguity.
[0043] Therefore, in this embodiment, preferably, the product between the ratio corresponding to the jth keyword in the question keyword set of the i-th question pair and the first quantitative product is recorded as the semantic abnormality deviation of the jth keyword in the question keyword set of the i-th question pair, wherein the semantic abnormality deviation reflects the abnormal deviation characteristics of the semantic relationship between the keywords in the question keyword set and all the keywords in the corresponding question and answer keyword set. The larger the abnormal deviation characteristics of the semantic relationship, the more likely it is that the keyword has an inaccurate expression feature, and the more likely the question text containing the keyword is to have semantic ambiguity, and the more likely it is to affect the accuracy of the subsequent FQA corpus construction, and thus affect the accuracy of the AI intelligent agent question and answer text generation.
[0044] Step 3: The semantic ambiguity of the question text in each question pair is obtained by combining the semantic correlation between the semantic anomaly deviation of the keywords in the question keyword set of each question pair and the word frequency of the keywords, and the difference between the semantic anomaly deviations of different keywords in the question keyword set. The question-answer matching degree of each question pair is obtained based on the matching degree between the question keyword set of each question pair and the question-answer keyword set, as well as the similarity between each question pair and its neighboring question pairs regarding the question keyword set.
[0045] Generally speaking, if the question text given by the user in the historical record contains semantic ambiguity, then the semantic anomaly deviation characteristics of all keywords in the question text are at a higher level and the changes in semantic anomaly deviation are more inconsistent. Therefore, the semantic anomaly deviations of all keywords in the question keyword set of the i-th question pair are arranged in order of the keyword frequency in the question text from small to large. If the keyword frequency in the question-answer generated text is equal, they are randomly arranged and used as the semantic deviation vector of the question keyword set of the i-th question pair.
[0046] At the same time, all keywords in the question keyword set of the i-th question pair are arranged in ascending order according to their frequency of appearance in the question text. If the keyword frequencies in the question-answer generated text are equal, they are randomly arranged to obtain the frequency weight vector of the question keyword set of the i-th question pair.
[0047] Furthermore, the scalar product between the semantic deviation vector and the word frequency weight vector of the question keyword set is calculated, and the semantic anomaly deviation in the semantic deviation vector is weighted and summed using the scalar product calculation method, so that the semantic analysis focuses more on the semantic anomaly deviation characteristics of keywords with higher word frequency, thereby improving the accuracy of subsequent measurement of the semantic ambiguity phenomenon in the question text.
[0048] Through the above analysis, the semantic ambiguity of the question text in the i-th question pair is calculated:
[0049] ;
[0050] Where, is the semantic ambiguity of the question text in the i-th question pair, is the product of the semantic deviation vector of the question keyword set of the i-th question pair and the word frequency weight vector of the question keyword set, is the number of elements in the semantic deviation vector of the question keyword set of the i-th question pair, and They are respectively the sth and s-1th elements in the semantic deviation vector of the question keyword set of the i-th question pair.
[0051] Semantic ambiguity reflects the degree of ambiguity of semantic expression in historical question texts. The higher the ambiguity of semantic expression, the easier it is to interfere with the matching between the question-answering generated text and the question text generated by the AI agent. That is, the question-answering generated text is more likely to fail to solve the question raised by the user, and the question and its question-answer results are less suitable for participating in the construction of the FQA corpus.
[0052] Generally speaking, if the questions raised by users have significant semantic ambiguity, the Q&A generated by the AI agent will not be able to effectively answer the user's questions. In this case, the user is more likely to ask and answer the same question multiple times. Therefore, in this embodiment, all question pairs and their corresponding Q&A times in the historical Q&A records are traversed, and the K question pairs with the closest Q&A time interval between each question pair are used as the K nearest neighbor question pairs of each question pair. In this embodiment, the value of K is 30, and implementers can adjust the value according to actual conditions.
[0053] Furthermore, the average value of the Jaccard similarity coefficient between the question keyword set of the i-th question pair and the question keyword sets of its K nearest neighboring question pairs is calculated and used as the question similarity of the i-th question pair. The greater the question similarity, the more likely the user is to ask and answer the same question multiple times, and the more likely the question-answering generated text within the question pair is to fail to accurately solve the problem given in the question text.
[0054] Therefore, based on the semantic ambiguity of the question text in each question pair, combined with the matching degree between the question keyword set and the question-answer keyword set of each question pair, as well as the similarity between each question pair and its neighboring question pairs regarding the question keyword set, the question-answer matching degree of each question pair in the historical question-answer record is calculated:
[0055] ;
[0056] Where, is the question-answer matching degree of the i-th question pair, is the Jaccard similarity coefficient between the question keyword set and the question-answer keyword set of the i-th question pair, is an exponential function with a natural constant as base, is the question similarity of the i-th question pair.
[0057] Among them, the question-answer matching degree reflects the influence of semantic ambiguity on the matching of question-answer results. The smaller the question-answer matching degree, the greater the influence of semantic ambiguity on the question, which makes the matching between the question-answer result and the question poor. The question and its question-answer result are less suitable for participating in the construction of the FQA corpus, and should be eliminated when constructing the FQA corpus.
[0058] Step 4: Use the question-answer matching degree to eliminate question pairs in historical question-answer records to build an FQA corpus, and combine it with the AI agent to generate corresponding question-answer text based on the user's questions.
[0059] In order to improve the accuracy of questions and their question-answer results in the FQA corpus, preferably, in this embodiment, the question-answer matching degrees of all question pairs in the historical question-answer records are subjected to exponential normalization. If the question-answer matching degree after exponential normalization is less than the question-answer matching threshold, it indicates that the corresponding question pair has serious semantic ambiguity problems, which affects the accuracy of the question-answer results. In this case, the question pair is removed from the historical question-answer records. The value of the question-answer matching threshold in this embodiment is 0.3.
[0060] Furthermore, all question pairs in the historical question and answer records after elimination are deduplicated to ensure the uniqueness of each question and its question and answer result, and all question pairs after deduplication are standardized to ensure the uniformity of the data format in the question pairs. The FQA corpus is constructed from all the standardized question pairs. The construction of the FQA corpus is a well-known technology and the specific process will not be repeated here.
[0061] All question pairs in the FQA corpus are stored in the AI intelligent agent question-answering system in JSON format, and the FQA corpus is updated and stored using the same method every week to ensure the real-time performance of the FQA corpus. At the same time, the AI intelligent agent question-answering system is connected to the large language model through the API interface. The AI intelligent agent question-answering system can communicate with the large language model through the API interface. In this embodiment, the large language model connected to the AI intelligent agent question-answering system is the Alibaba Cloud Tongyi Qianwen model. Implementers can choose other large language models during actual application.
[0062] When a user asks a question, if the AI agent question-answering system can find a question that successfully matches the question text asked by the user through a text matching algorithm, it generates a question-answer text corresponding to the question and returns it to the user. The text matching algorithm can be Jaccard similarity or Levenshtein edit distance. In this embodiment, Levenshtein edit distance is used for text matching. Using Levenshtein edit distance for text matching is a well-known technology, and the specific process will not be repeated here.
[0063] If the AI intelligent question-answering system cannot find a question that successfully matches the question text asked by the user through the text matching algorithm, it means that the question asked by the user does not exist in the current FQA corpus. In this case, the question asked by the user is sent to the large language model. The large language model performs semantic reasoning on the question text asked by the user, and then generates a question-answer text based on the semantic reasoning and returns it to the user.
[0064] It is understood that references to "one embodiment" or "some embodiments" in the present specification mean that one or more embodiments of the present application include a particular feature, structure, or characteristic described in conjunction with that embodiment. Thus, if "in one embodiment," "in some embodiments," "in other embodiments," or "in other embodiments" appear in different places in this specification, they do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and their variations all mean "including but not limited to," unless otherwise specifically emphasized.
[0065] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above description is of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-tasking and parallel processing are also possible or may be advantageous. At the same time, the size of the sequence number of each step in the embodiment does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments in this specification.
[0066] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. The AI agent question-answering text generation method based on semantic analysis is characterized by: The following steps are involved: Obtain each question pair and its question and answer time in the historical question and answer records, and extract the keywords of the question text and the question and answer generated text of each question pair to obtain the question keyword set and question and answer keyword set for each question pair; The semantic difference between the keywords in the question keyword set and the question-answer keyword set of each question pair is used to obtain the semantic change vector of each keyword. Based on the semantic correlation between the semantic change vector of each keyword and the word frequency of each keyword in the question-answer keyword set, combined with the change trend of the elements in the semantic change vector, the semantic abnormal deviation of each keyword in the question keyword set of each question pair is obtained. The semantic fuzziness of the question text in each question pair is obtained by combining the semantic correlation between the semantic anomaly deviation of the keywords in the question keyword set of each question pair and the word frequency of the keywords, and the difference between the semantic anomaly deviations of different keywords in the question keyword set. The question-answer matching degree of each question pair is obtained based on the matching degree between the question keyword set of each question pair and the question-answer keyword set, as well as the similarity between each question pair and its neighboring question pairs in terms of the question keyword set. The question-answer matching degree is used to eliminate question pairs in historical question-answer records to build an FQA corpus, and the AI agent is combined to generate corresponding question-answer texts based on the user's questions.
2. The method for generating AI agent question-answering text based on semantic analysis according to claim 1, characterized in that: The method for obtaining the semantic change vector of each keyword is: Calculate the normalized Google distance between each keyword in the question keyword set of each question pair and all keywords in its question-answer keyword set, and arrange all normalized Google distances from small to large according to the word frequency of the keywords in the question-answer generated text, and obtain the semantic change vector of each keyword in the question keyword set of each question pair.
3. The method for generating AI agent question-answer text based on semantic analysis according to claim 1, wherein: The method for obtaining the semantic abnormality deviation of each keyword in the question keyword set of each question pair is: Extract the word frequency weight vector of the question and answer keyword set of each question pair, calculate the scalar product between the semantic change vector of each keyword in the question keyword set of each question pair and the word frequency weight vector of the question and answer keyword set of each question pair, and count the ratio of the number of positive elements in the first-order difference vector of the semantic change vector to the total number of elements, and multiply the scalar product by the ratio as the semantic abnormality deviation of each keyword in the question keyword set of each question pair.
4. The method for generating AI agent question-answer text based on semantic analysis according to claim 1, wherein: The method for extracting the word frequency weight vector of the question and answer keyword set of each question pair is: arranging the word frequencies of all keywords in the question and answer keyword set of each question pair from small to large to form the word frequency weight vector of the question and answer keyword set of each question pair.
5. The method for generating AI agent question-answer text based on semantic analysis according to claim 1, wherein: The calculation method of the semantic ambiguity of the question text in each question pair is: Where, is the semantic ambiguity of the question text in the i-th question pair, is the product of the semantic deviation vector of the question keyword set of the i-th question pair and the word frequency weight vector of the question keyword set, is the number of elements in the semantic deviation vector of the question keyword set of the i-th question pair, and They are respectively the sth and s-1th elements in the semantic deviation vector of the question keyword set of the i-th question pair.
6. The method for generating AI agent question-answer text based on semantic analysis according to claim 5, characterized in that: The semantic anomaly deviations of the keywords in the question keyword set of each question pair are arranged from small to large according to the word frequency of the keywords in the question text, which are used as the semantic deviation vector of the question keyword set of each question pair. The word frequency of all keywords in the question keyword set in the question text is arranged from small to large to form the word frequency weight vector of the question keyword set of each question pair.
7. The method for generating AI agent question-answer text based on semantic analysis according to claim 1, wherein: The multiple question pairs with the closest time interval between the question and answer of each question pair are regarded as the neighboring question pairs of each question pair.
8. The method for generating AI agent question-answer text based on semantic analysis according to claim 1, wherein: The calculation method of the question-answer matching degree of each question pair is: Where, is the question-answer matching degree of the i-th question pair, is the semantic ambiguity of the question text in the i-th question pair, is the Jaccard similarity coefficient between the question keyword set and the question-answer keyword set of the i-th question pair, is an exponential function with a natural constant as base, is the question similarity of the i-th question pair.
9. The method for generating AI agent question-answer text based on semantic analysis according to claim 8, characterized in that: The method for obtaining the question similarity of each question pair further includes: calculating the average value of the Jaccard similarity coefficients between the question keyword set of each question pair and the question keyword sets of its neighboring question pairs as the question similarity of each question pair.
10. The method for generating AI agent question-answer text based on semantic analysis according to claim 1, wherein: The method of using the question-answer matching degree to eliminate question pairs in the historical question-answer records includes normalizing the question-answer matching degrees of all question pairs in the historical question-answer records; if the normalized question-answer matching degree is less than the question-answer matching threshold, the question pair is eliminated from the historical question-answer records.
Citation Information
Patent Citations
Answering system based on artificial intelligence
CN117407515A
Innovation and entrepreneurship coaching question and answer matching method and system based on semantic understanding
CN120256590A
AI agent interaction method and system based on semantic analysis
CN120260554A
Artificial intelligence-based answer generation method and apparatus, device, and storage medium
WO2022252636A1
Cited By
Semantic analysis-based studio question and answer method and system
CN122242752A
