Intelligent question and answer method based on context semantics and dynamic retrieval

By combining contextual splicing and dynamic keyword generation techniques with large-scale model and few-sample learning, the problems of topic comprehension bias and incoherent answers in multi-turn dialogues of intelligent question answering systems are solved. This achieves efficient and accurate knowledge base retrieval and generative responses, making it suitable for professional domain question answering.

CN120873133APending Publication Date: 2025-10-31BEIJING XUECHENG GUILAI EDUCATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510970282.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

Existing intelligent question answering systems struggle to effectively capture the core themes within the dialogue context in multi-turn dialogue scenarios. The accuracy of knowledge base retrieval is limited by simple matching algorithms, generative models generate inaccurate answers, and the system integration is not efficient enough, resulting in answers that deviate from the user's intent and are inconsistent.

Method used

By combining contextual concatenation, core topic extraction, dynamic keyword generation, and multi-dimensional semantic concatenation with large-scale model and few-sample learning, a seamless integration of knowledge base retrieval and generative responses is achieved, and the BGE-M3 embedding model is used for efficient similarity calculation.

Benefits of technology

It significantly improves the semantic understanding depth, retrieval accuracy, and response coherence in multi-turn dialogue scenarios, making it particularly suitable for professional fields and providing a more accurate, coherent, and efficient question-and-answer experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120873133A_ABST
    Figure CN120873133A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent questioning and answering, in particular to an intelligent questioning and answering method based on context semantics and dynamic retrieval, which comprises the following steps of: splicing data to form a complete dialogue text, extracting a dialogue core theme by using a large model in combination with a thinking chain and small sample learning, and extracting the dialogue core theme based on the dialogue text and a current question. Generating a dynamic keyword set in combination with BM25 and BERT MLM, finally splicing the current problem, the keyword set and the core topic into a multi-dimensional semantic representation, and vectorizing the multi-dimensional semantic representation by using a BGE-M3 embedding model to generate an embedded vector; by combining context topic extraction and dynamic keyword generation technologies, the system can capture core intentions and semantic changes in multiple rounds of dialogues in real time, so that knowledge base retrieval does not depend on fixed keyword matching any more, but dynamically adjusts a retrieval strategy according to a dialogue context; therefore, the matching precision of the question and the knowledge base content is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent question answering technology, and in particular to an intelligent question answering method based on contextual semantics and dynamic retrieval. Background Technology

[0002] With the rapid development of artificial intelligence technology, intelligent question-answering systems have been widely used in customer service, education, healthcare, legal consulting, and other fields. These systems typically rely on pre-built knowledge bases or generative large models to answer user questions. Traditional knowledge base question-answering systems retrieve answers from structured data through keyword matching or simple semantic analysis, while generative large models can generate flexible and natural responses based on user input. However, in multi-turn dialogue scenarios, user questions often have context-dependent, semantically complex, and dynamically changing characteristics, which places higher demands on the system's semantic understanding, knowledge retrieval, and response generation capabilities.

[0003] Currently, many question-answering systems face the following challenges when handling multi-turn dialogues: First, they cannot effectively capture the core themes in the dialogue context, leading to answers that deviate from the user's intent; second, the accuracy of knowledge base retrieval is limited by simple matching algorithms, making it difficult to handle complex semantics; third, while generative models are flexible, they may generate inaccurate or unreliable answers, especially in specialized fields; fourth, the combination of knowledge base systems and generative models is not efficient enough, making it difficult to achieve real-time, accurate hybrid responses. Therefore, there is an urgent need for an intelligent question-answering system that can combine the high reliability of knowledge bases with the flexibility of large models, while achieving accurate semantic understanding and efficient retrieval in multi-turn dialogues.

[0004] Existing technologies rely on pre-built QA (question-answer) knowledge bases, using keyword matching, TF-IDF, BM25, or simple semantic embedding models (such as Word2Vec and BERT) to calculate the similarity between questions and knowledge base content, returning the answer with the highest matching degree. Common applications include FAQ systems, customer service robots, or directly generating responses using large language models (such as QWEN). These technologies can handle open-domain questions and support multi-turn dialogues through context windows. Some systems combine the RAG (Retrieval-Augmented Generation) framework, integrating knowledge base retrieval with generative models. However, when handling multi-turn dialogues, these technologies lack accurate extraction of the core themes and deep semantics of the dialogue context. Traditional keyword matching or simple semantic embedding struggles to capture the implicit intent in complex questions, causing retrieved or generated answers to deviate from user needs. Furthermore, in multi-turn dialogues, user intent may change as the conversation progresses. Existing systems typically handle context only by simple splicing or fixed windows, making it difficult to dynamically integrate historical information and maintain the coherence and consistency of answers. Moreover, generative models may generate inaccurate or unreliable answers when dealing with unseen questions, especially in fields requiring high credibility (such as healthcare and law), which limits their practical application.

[0005] Therefore, to address the above problems, this invention proposes an intelligent question-answering method based on contextual semantics and dynamic retrieval. Through contextual splicing, core topic extraction, dynamic keyword generation, multi-dimensional semantic splicing, and efficient similarity calculation, it achieves a seamless integration of knowledge base retrieval and generative responses, providing a more accurate, coherent, and efficient question-answering experience. Summary of the Invention

[0006] To overcome the problem of insufficient semantic understanding in existing technologies, this invention proposes an intelligent question-answering method based on contextual semantics and dynamic retrieval.

[0007] The technical solution of this invention is: an intelligent question-answering method based on contextual semantics and dynamic retrieval, comprising the following steps:

[0008] Get the user's current question Q_t and the historical dialogue context ({Q_{t-1},A_{t-1},Q_{t-2},A_{t-2},...});

[0009] Combine the current issue with the historical dialogue context to form a complete dialogue text T;

[0010] Use large models combined with thought chains and small sample learning to extract core topics from dialogues;

[0011] Based on the dialogue text T and the current question Q_t, a dynamic keyword set is generated by combining BM25 and BERT MLM;

[0012] The current problem Q_t, the set of keywords, and the core theme are concatenated into a multidimensional semantic representation;

[0013] The multidimensional semantic representation is vectorized using the BGE-M3 embedding model to generate the embedding vector E_{Input}.

[0014] Calculate the similarity between E_{Input} and the embedding vector of the question in the knowledge base. If the similarity exceeds a preset threshold, return the knowledge base answer A_{QA}; otherwise, call the large model to generate the response A_{Gen}.

[0015] Preferably, the core topic extraction step uses a large model to analyze the concatenated dialogue text, combines thought chain reasoning to clarify the core intent of the dialogue, and optimizes the model's ability to understand complex semantics through small sample learning, and finally outputs the core topic.

[0016] Preferably, the dynamic keyword generation step extracts high-frequency related words from the dialogue text using the BM25 algorithm, predicts semantically related supplementary words using BERT MLM, and generates a dynamic keyword set by combining the high-frequency words and supplementary words.

[0017] Preferably, the multidimensional semantic representation is as follows:

[0018] Input = {Q_t, Keywords, Theme}, where Q_t is the user's current question, Keywords is a dynamically generated set of keywords, and Theme is the core theme.

[0019] Preferably, the similarity calculation step includes:

[0020] The multidimensional semantic representation is vectorized into E_{Input} using the BGE-M3 embedding model;

[0021] Calculate the cosine similarity between E_{Input} and the embedding vectors of all questions in the knowledge base;

[0022] If the highest similarity exceeds the preset threshold, the question is determined to be in the knowledge base, and the corresponding answer A_{QA} is returned.

[0023] Preferably, the generative response step includes:

[0024] If the similarity is below the threshold, the large model is invoked to generate a new response A_{Gen} based on the dialogue context T and the current question Q_t;

[0025] The generated response A_{Gen} is returned to the user, and the conversation context is updated.

[0026] Preferably, the knowledge base is a structured QA knowledge base, which contains common domain-related questions and their standard answers, and is stored as structured data.

[0027] Preferably, the context splicing step includes:

[0028] Concatenate the current question Q_t with the historical dialogue context ({Q_{t-1},A_{t-1},Q_{t-2},A_{t-2},...}) in chronological order;

[0029] Form a complete dialogue text T = {Q_{t-1}, A_{t-1}, Q_t}.

[0030] Preferably, after concatenating the current question Q_t, the keyword set, and the core topic, the method uses the BGE-M3 model to obtain the corresponding vector representation and performs similarity calculation. If the result is greater than a threshold, it means that the user's question is similar to the data in the QA knowledge base, and the user is replied with the result matched by the QA knowledge base; if it is less than the threshold, it means that the user's question is not similar to the data in the QA knowledge base, and the result is replied directly based on the large model in the education field.

[0031] Preferably, the method uses a large model on the concatenated multi-turn dialogue text T, combining COT and Few-Shot learning to extract core topics and output the core intent of the dialogue.

[0032] The beneficial effects of this invention are:

[0033] 1. By combining contextual topic extraction and dynamic keyword generation technologies, the system can capture the core intent and semantic changes in multi-turn dialogues in real time. This allows knowledge base retrieval to no longer rely on fixed keyword matching, but to dynamically adjust the retrieval strategy according to the dialogue context, thereby significantly improving the matching accuracy between questions and knowledge base content.

[0034] 2. By employing multidimensional semantic representation and efficient similarity calculation mechanisms, the system can intelligently determine whether a user's question falls within the scope of the knowledge base. If a match is found, a highly reliable standard answer is returned; otherwise, a generative model is invoked to supplement the answer. This ensures both the accuracy of answers in professional fields and the flexibility of open-ended questions.

[0035] 3. Through context splicing and dynamic topic maintenance, the system can continuously track the semantic evolution of the dialogue, avoiding the problem of disjointed answers caused by ignoring historical information in traditional methods, and providing users with a more natural and consistent interactive experience. Attached Figure Description

[0036] Figure 1 The diagram shown illustrates the workflow of this invention. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0038] This invention provides an embodiment: an intelligent question-answering method based on contextual semantics and dynamic retrieval, comprising the following steps:

[0039] Obtain the user's current question (Q_t) and historical dialogue context ({Q_{t-1}, A_{t-1}, Q_{t-2}, A_{t-2}, ...});

[0040] Combine the current issue with the historical dialogue context to form a complete dialogue text (T);

[0041] Use large models combined with thought chains and small sample learning to extract core topics from dialogues;

[0042] Based on the dialogue text (T) and the current question (Q_t), a dynamic keyword set is generated by combining BM25 and BERT MLM;

[0043] The current problem (Q_t), the set of keywords, and the core theme are combined into a multi-dimensional semantic representation;

[0044] The multidimensional semantic representation is vectorized using the BGE-M3 embedding model to generate an embedding vector (E_{Input}).

[0045] Calculate the similarity between E_{Input} and the embedding vector of the question in the knowledge base. If the similarity exceeds a preset threshold, return the answer from the knowledge base (A_{QA}); otherwise, call the large model to generate a response (A_{Gen}).

[0046] Furthermore, this invention obtains the user's current question and historical dialogue context and concatenates them into a complete dialogue text. It then uses a large model combined with thought chain reasoning and few-shot learning techniques to extract core topics. Simultaneously, it generates a dynamic keyword set based on the BM25 algorithm and BERT MLM prediction. This keyword set is then concatenated with the current question and core topics to form a multi-dimensional semantic representation. After vectorization using the BGE-M3 embedding model, similarity is calculated with the knowledge base question. When the similarity exceeds a threshold, the knowledge base answer is returned; otherwise, the large model is invoked to generate a response. This method achieves accurate understanding of multi-turn dialogue context through dynamic topic extraction and keyword generation mechanisms, overcoming the retrieval bias problem caused by traditional knowledge base systems relying on fixed matching patterns. Furthermore, the intelligent switching mechanism between knowledge base retrieval and generative responses ensures both the accuracy of answers to known questions and the flexibility in handling unknown questions. Ultimately, this significantly improves the semantic understanding depth, retrieval accuracy, and response coherence of the intelligent question-answering system in multi-turn dialogue scenarios, making it particularly suitable for professional domain question-answering scenarios with high requirements for accuracy and adaptability.

[0047] The core topic extraction step uses a large model to analyze the concatenated dialogue text, combines thought chain reasoning to clarify the core intent of the dialogue, and optimizes the model's ability to understand complex semantics through small sample learning, ultimately outputting the core topic.

[0048] Furthermore, the system first concatenates the user's current question with the historical dialogue context in chronological order to form a complete dialogue text. Then, a large model is used to analyze and process the concatenated text. Next, the Cognitive Chain of Reasoning (COT) mechanism is activated, guiding the model step by step to execute a progressive thinking process of "identifying dialogue entities - analyzing semantic relationships - summarizing core issues - verifying topic consistency". At the same time, a few-shot learning module is embedded to provide the model with typical example pairs containing "question statement - topic labeling", enabling the model to master key capabilities such as understanding professional terms, disambiguation, and inferring implicit intentions through comparative learning. Finally, the system outputs topic information (Theme) that accurately reflects the core intention of the dialogue. By combining the semantic understanding capabilities of the large model with the structured reasoning advantages of COT, this invention effectively solves the problem of topic understanding deviation caused by the reliance on shallow semantic analysis or simple keyword matching in traditional question-answering systems in multi-turn dialogues. This allows the system to more accurately capture the core focus of the dialogue and the user's true intentions, significantly improving the accuracy and relevance of subsequent knowledge base retrieval and answer generation. It is especially suitable for intelligent question-answering application scenarios that require deep understanding of complex dialogue contexts.

[0049] The dynamic keyword generation step extracts high-frequency related words from the dialogue text using the BM25 algorithm, predicts semantically related supplementary words using BERTMLM, and combines the high-frequency words and supplementary words to generate a dynamic keyword set.

[0050] Furthermore, the concatenated dialogue text is first subjected to word frequency statistics and inverse document frequency weighting using the BM25 algorithm to filter out high-frequency core words that are highly relevant to the current dialogue content. Simultaneously, the dialogue text is input into BERT's Masked Language Model (MLM), which predicts candidate words at masked positions to supplement potential keywords that are semantically related but not explicitly present in the original text. Finally, the high-frequency words extracted by BM25 are fused with the semantically expanded words predicted by BERT MLM to remove duplicates, forming a dynamically adaptive keyword set that adapts to the dialogue context. This invention combines the advantages of statistical features and deep learning models, retaining the reliability of the BM25 algorithm in quantifying keyword importance while leveraging BERT MLM's powerful contextual semantic understanding capabilities to capture implicit related concepts. This effectively solves the limitations of traditional keyword extraction methods when facing complex expressions, synonym substitutions, or technical terms. The generated dynamic keyword set can more comprehensively represent the core elements and contextual information of the problem, providing more accurate query features for subsequent knowledge base retrieval and significantly improving retrieval recall and accuracy in multi-turn dialogue scenarios.

[0051] The multidimensional semantic representation is as follows:

[0052] Input = {Q_t, Keywords, Theme}, where Q_t is the user's current question, Keywords is a dynamically generated set of keywords, and Theme is the core theme.

[0053] Furthermore, the multidimensional semantic representation (Input) is composed of the current question (Q_t), a dynamic set of keywords (Keywords), and a core theme (Theme), providing more comprehensive semantic information and enhancing the robustness of the question representation. Compared with traditional single-dimensional embedding or simple matching algorithms (such as BM25), it significantly improves the accuracy and robustness of knowledge base retrieval.

[0054] The similarity calculation steps include:

[0055] The multidimensional semantic representation is vectorized into E_{Input} using the BGE-M3 embedding model;

[0056] Calculate the cosine similarity between E_{Input} and the embedding vectors of all questions in the knowledge base;

[0057] If the highest similarity exceeds the preset threshold, the question is determined to be in the knowledge base, and the corresponding answer (A_{QA}) is returned.

[0058] This step ensures the accuracy and real-time nature of the search results through efficient embedding and optimized matching mechanisms.

[0059] The generative response step includes:

[0060] If the similarity is below the threshold, the large model is invoked to generate a new response (A_{Gen}) based on the dialogue context (T) and the current question (Q_t);

[0061] The generated response (A_{Gen}) is returned to the user, and the conversation context is updated.

[0062] This mechanism combines the reliability of the knowledge base with the flexibility of the generative model to ensure that the system performs stably and naturally in unknown problems or scenarios not covered by the knowledge base.

[0063] The knowledge base is a structured QA knowledge base, containing common domain-related questions and their standard answers, stored as structured data.

[0064] The context splicing step includes:

[0065] Concatenate the current question (Q_t) with the historical dialogue context ({Q_{t-1}, A_{t-1}, Q_{t-2}, A_{t-2}, ...}) in chronological order;

[0066] Form a complete dialogue text T = {Q_{t-1}, A_{t-1}, Q_t}.

[0067] The method, after concatenating the current question (Q_t), keyword set, and core topic, uses the BGE-M3 model to obtain the corresponding vector representation and performs similarity calculation. If the result is greater than a threshold, it means that the user's question is similar to the data in the QA knowledge base, and the user is replied with the result matched by the QA knowledge base; if it is less than the threshold, it means that the user's question is not similar to the data in the QA knowledge base, and the result is replied directly based on the large model in the education field.

[0068] The method uses a large model to extract core topics from the concatenated multi-turn dialogue text (T), combining COT and Few-Shot learning, and outputs the core intent of the dialogue.

[0069] Please see Figure 1 Furthermore, the workflow of this invention will be described in detail below:

[0070] The system receives the user's current question Q_t, automatically extracts question-answer pairs {Q_{t-1}, A_{t-1}, Q_{t-2}, A_{t-2}...} from historical dialogue records, and concatenates these contents in chronological order to form a complete dialogue text T, ensuring that the contextual information of multi-turn dialogues is fully preserved and providing sufficient context for subsequent semantic analysis.

[0071] The concatenated dialogue text T is input into a pre-trained large language model (such as QWen), and the model is guided by the thought chain (COT) technology to perform step-by-step reasoning of "identifying entities - analyzing relationships - summarizing topics - verifying consistency". At the same time, domain examples are injected through few-shot learning to output a theme that accurately reflects the core intent of the dialogue, thus solving the problem of insufficient recognition of implicit intent by traditional methods.

[0072] The BM25 algorithm and BERT MLM model are applied to the dialogue text T. BM25 extracts high-frequency core words, and BERT MLM predicts semantically related potential keywords. The results of the two are combined to form a dynamic keyword set, which retains important surface features and captures deep semantic connections.

[0073] The current question Q_t, the generated keyword set Keywords, and the extracted theme are intelligently concatenated to form a multi-dimensional semantic representation Input that includes the surface question, core concepts, and the main theme of the dialogue, providing more comprehensive query features for retrieval.

[0074] The BGE-M3 embedding model is used to transform the multidimensional semantic representation Input into a vector E_{Input}. The cosine similarity between E_{Input} and all question vectors in the knowledge base is calculated. The degree of matching is judged by a preset threshold, thus achieving accurate semantic-level retrieval.

[0075] When the similarity exceeds the threshold, the standard answer A_{QA} that matches in the knowledge base is returned; otherwise, the generative big model is called to generate a context-appropriate response A_{Gen} based on the dialogue text T, thereby ensuring that the answer is both accurate and flexible.

[0076] The current question Q_t and its final answer (A_{QA} or A_{Gen}) are added to the dialogue history, dynamically updating the context state to provide the latest dialogue background for subsequent interactions and maintain the coherence of multi-turn dialogues.

[0077] Furthermore, this invention provides an embodiment for customer service scenario application:

[0078] Implementing this invention in an online customer service system, when a user inquires about "order delays," the system automatically constructs a historical dialogue such as "Order No. 1234 has been shipped but not received." Through COT inference, it identifies the core topic as "logistics anomaly handling." Combining BM25, it extracts keywords such as "order number" and "logistics," and BERT MLM supplements related words such as "courier company" and "delivery time." Finally, based on BGE-M3, it matches the standard answer in the knowledge base for "logistics anomaly handling process," achieving an accurate response. Compared with traditional customer service robots, this reduces the rate of transferring to human agents by 35%.

[0079] Furthermore, the present invention provides an embodiment for medical consultation:

[0080] When applied to an intelligent medical consultation platform, after a patient describes "headache and nausea lasting for 3 days" and asks "whether a CT scan is necessary," the system uses Few-Shot learning to identify the core topic as "screening for intracranial diseases" and dynamically generates keywords such as "imaging examination" and "nervous system." When the similarity calculation shows that there is no perfect match in the knowledge base, the system automatically calls the medical big data model to generate a professional response such as "it is recommended to consult a neurologist and assess the necessity of a CT scan," thus avoiding the mechanical response of traditional systems that directly recommend examinations.

[0081] Furthermore, this invention provides an embodiment of an educational robot application:

[0082] In a math tutoring scenario, when a student asks consecutive questions about "solving extrema of a quadratic function" and "the effects of parameter changes," the system identifies the topic as "analysis of the properties of quadratic functions," and then dynamically generates core terms such as "vertex coordinates and discriminant," accurately matching the problem-solving methodologies in the knowledge base. At the same time, it generates extended explanations containing specific calculation steps based on the dialogue context, improving the tutoring accuracy rate by 28%.

[0083] Through the above steps, by combining contextual topic extraction and dynamic keyword generation technologies, the system can capture the core intent and semantic changes in multi-turn dialogues in real time. This allows knowledge base retrieval to no longer rely on fixed keyword matching, but to dynamically adjust the retrieval strategy according to the dialogue context, thereby significantly improving the matching accuracy between questions and knowledge base content and solving the problem of insufficient semantic understanding in existing technologies.

Claims

1. An intelligent question-answering method based on contextual semantics and dynamic retrieval, characterized in that, It includes the following steps: Get the user's current question Q_t and the historical dialogue context ({Q_{t-1},A_{t-1},Q_{t-2},A_{t-2},...}); Combine the current issue with the historical dialogue context to form a complete dialogue text T; Use large models combined with thought chains and small sample learning to extract core topics from dialogues; Based on the dialogue text T and the current question Q_t, a dynamic keyword set is generated by combining BM25 and BERT MLM; The current problem Q_t, the set of keywords, and the core theme are concatenated into a multidimensional semantic representation; The multidimensional semantic representation is vectorized using the BGE-M3 embedding model to generate the embedding vector E_{Input}. Calculate the similarity between E_{Input} and the embedding vector of the question in the knowledge base. If the similarity exceeds a preset threshold, return the knowledge base answer A_{QA}; otherwise, call the large model to generate the response A_{Gen}.

2. The intelligent question-answering method based on contextual semantics and dynamic retrieval according to claim 1, characterized in that: The core topic extraction step uses a large model to analyze the concatenated dialogue text, combines thought chain reasoning to clarify the core intent of the dialogue, and optimizes the model's ability to understand complex semantics through small sample learning, ultimately outputting the core topic.

3. The intelligent question-answering method based on contextual semantics and dynamic retrieval according to claim 1, characterized in that: The dynamic keyword generation step extracts high-frequency related words from the dialogue text using the BM25 algorithm, predicts semantically related supplementary words using BERT MLM, and generates a dynamic keyword set by combining high-frequency words and supplementary words.

4. The intelligent question-answering method based on contextual semantics and dynamic retrieval according to claim 1, characterized in that, The multidimensional semantic representation is as follows: Input = {Q_t, Keywords, Theme}, where Q_t is the user's current question, Keywords is a dynamically generated set of keywords, and Theme is the core theme.

5. The intelligent question-answering method based on contextual semantics and dynamic retrieval according to claim 1, characterized in that, The similarity calculation steps include: The multidimensional semantic representation is vectorized into E_{Input} using the BGE-M3 embedding model; Calculate the cosine similarity between E_{Input} and the embedding vectors of all questions in the knowledge base; If the highest similarity exceeds the preset threshold, the question is determined to be in the knowledge base, and the corresponding answer A_{QA} is returned.

6. The intelligent question-answering method based on contextual semantics and dynamic retrieval according to claim 1, characterized in that, The generative response step includes: If the similarity is below the threshold, the large model is invoked to generate a new response A_{Gen} based on the dialogue context T and the current question Q_t; The generated response A_{Gen} is returned to the user, and the conversation context is updated.

7. The intelligent question-answering method based on contextual semantics and dynamic retrieval according to claim 1, characterized in that: The knowledge base is a structured QA knowledge base, containing common domain-related questions and their standard answers, stored as structured data.

8. The intelligent question-answering method based on contextual semantics and dynamic retrieval according to claim 1, characterized in that, The context splicing step includes: Concatenate the current question Q_t with the historical dialogue context ({Q_{t-1},A_{t-1},Q_{t-2},A_{t-2},...}) in chronological order; Form a complete dialogue text T = {Q_{t-1}, A_{t-1}, Q_t}.

9. The intelligent question-answering method based on contextual semantics and dynamic retrieval according to claim 1, characterized in that: After the method concatenates the current question Q_t, the keyword set, and the core topic, it uses the BGE-M3 model to obtain the corresponding vector representation and performs similarity calculation. If the result is greater than the threshold, it means that the user's question is similar to the data in the QA knowledge base, and the user is replied with the result matched in the QA knowledge base. If the result is less than the threshold, it means that the user's question is not similar to the data in the QA knowledge base, and the response is directly based on the large model in the education field.

10. The intelligent question-answering method based on contextual semantics and dynamic retrieval according to claim 1, characterized in that: The method uses a large model on the concatenated multi-turn dialogue text T, combining COT and Few-Shot learning to extract core topics and output the core intent of the dialogue.

Citation Information

Cited By

  • Diagnostic rule chain-based motor train unit intelligent operation and maintenance method, system and equipment

    CN121120034A

  • Intelligent question and answer semantic understanding and enhanced rewriting optimization method based on multiple rounds of dialogues

    CN121614598A