Self-adaptive adjustment knowledge deep retrieval, processing and question-answering method and system thereof

Through the adaptively adjusted knowledge in-depth search, processing and question-answer system, the problems of insufficient search accuracy, low processing efficiency and lack of adaptive ability in the existing technology are solved, and more efficient and accurate knowledge retrieval and question-answer effects are achieved.

CN119884282APending Publication Date: 2025-04-25云鼎科技股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411645978.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When faced with scenarios where the field knowledge is highly specialized, the content is complex and the expression forms are diverse, the existing knowledge retrieval system has problems such as insufficient search accuracy, low processing efficiency, lack of adaptability and lack of context.

Method used

It provides an adaptively adjusted knowledge in-depth search, processing and question-and-answer system. Through steps such as question judgment and memory, intent switching judgment, problem optimization and rewriting, knowledge in-depth search and processing, deep search and text processing, template construction and answer generation, etc., it adaptively configures the deep search process and text processing logic to improve retrieval accuracy and efficiency.

Benefits of technology

It improves the accuracy and efficiency of retrieval, enhances the system's ability to adapt to domain knowledge, and provides more complete information and a more natural question-and-answer experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884282A_ABST
    Figure CN119884282A_ABST
Patent Text Reader

Abstract

The invention relates to a self-adaptive adjustment knowledge deep retrieval, processing and question answering method and system, and belongs to the field of artificial intelligence and computer science, and the method comprises the following steps: (1) question judgment and memory; (2) intention switching judgment; (3) optimizing and rewriting problems; (4) deep retrieval and processing of knowledge; (5) performing deep retrieval and text processing; (6) constructing a template and generating an answer, and splicing the cue word template selected in the self-adaptive deep retrieval configuration in the step (4) with the related document obtained in the step (5) to obtain final input content; and (7) inputting the obtained input content into the natural language processing large model to obtain a result. The method has the advantages that related knowledge in the local knowledge base can be quickly retrieved according to questions of the user, accurate answers can be provided, the retrieval and consulting time of the user on massive files is shortened, and question solving or system learning is accelerated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an adaptively adjusted knowledge depth retrieval, processing and question-answering system, belonging to the field of artificial intelligence and computer science. Background Art

[0002] In existing knowledge retrieval systems, the common retrieval enhancement generation method usually searches for knowledge related to the user's question in the knowledge base based on the user's question. The search method is usually intensive search and BM25 search, and the top n text blocks with the highest relevance are selected, merged into prompt words, and then input into the natural language processing model to obtain the answer to the question. Although this technology can partially solve the needs of knowledge retrieval and question answering, it often shows the following shortcomings when facing scenarios where the domain knowledge is highly specialized, complex in content, and has various forms of expression:

[0003] 1. Insufficient retrieval accuracy: Existing systems have difficulty accurately distinguishing similar but not identical knowledge points, resulting in retrieval results often containing a large amount of redundant or irrelevant information, increasing the user's screening burden.

[0004] 2. Low processing efficiency: Faced with the complex knowledge system in the coal field, the existing system is inefficient in processing large-scale documents, especially when faced with documents containing long texts or multi-level nested information. The response speed is significantly reduced, affecting the user experience.

[0005] 3. Lack of adaptive capabilities: The knowledge structure and expression methods in the coal field vary with time and region. The existing retrieval system lacks adaptability and cannot be dynamically adjusted according to changes in actual application scenarios, resulting in insufficient timeliness and accuracy of retrieval results.

[0006] 4. The question involves multiple locations in a long text. Since the search only retrieves related text blocks, it cannot contain complete information, resulting in missing context and incomplete responses.

[0007] Therefore, in practical applications, there is an urgent need for a knowledge deep retrieval, processing and question-answering system that can be adaptively adjusted to improve the accuracy and efficiency of retrieval and enhance the system's adaptability to domain knowledge, so as to better support industry knowledge management and application needs. Summary of the invention

[0008] In order to overcome the defects of the prior art, the present invention provides an adaptively adjusted knowledge depth retrieval, processing and question-answering system. The technical solution of the present invention is:

[0009] An adaptively adjusted knowledge depth retrieval, processing and question answering method comprises the following steps:

[0010] (1) Question judgment and memory, used to read, save, update and manage conversation history in real time;

[0011] (2) Intent switching judgment: judging whether the user’s latest question is consistent with the most recent conversation topic to decide whether to switch the intent;

[0012] (3) Question optimization and rewriting: rewriting the user's conversation history and latest questions based on the natural language processing big model to complete the user's questions;

[0013] (4) Deep knowledge retrieval and processing: Based on the intention switching situation, user questions, the quality and relevance of the text block, the deep retrieval process is adaptively configured;

[0014] (5) Deep search and text processing: Based on the adaptive deep search configuration obtained in step (4), the corresponding links are combined to perform deep search and text processing. The relevant documents obtained through the adaptive deep search enter the text processing module for context enhancement and aggregation.

[0015] (6) constructing a template and generating an answer, splicing the prompt word template selected in the adaptive deep search configuration in step (4) with the relevant documents obtained in step (5) to obtain the final input content;

[0016] (7) Input the obtained input content into the natural language processing model to obtain the result.

[0017] The step (1) is specifically as follows:

[0018] Develop a memory module based on Redis to read, save, update and manage conversation history in real time;

[0019] When a user invokes a system conversation, the system loads past conversation history based on the user ID and performs persistent updates during the conversation;

[0020] If the user has no conversation history, create a new memory and keep it updated.

[0021] The step (2) is specifically as follows:

[0022] 2.1 If the user has a previous conversation record, load the user's conversation record through step (1), compare the user's latest question with the most recent conversation record or similar conversations to determine whether the user's question is consistent with the most recent conversation topic;

[0023] 2.2 If they are consistent, proceed to the next step;

[0024] 2.3 If the intent has changed and there is no question similar to the latest question in the conversation memory, the intent is considered to have switched: F(H(user)+query)=True or False;

[0025] Among them, F is the intention switching module, which uses machine learning, edit distance, keyword matching, and natural language processing large model technology. H represents the memory module, which uses Redis to obtain the conversation history of the corresponding user, which is the question of the current user.

[0026] The step (3) is specifically as follows:

[0027] 3.1 Based on the judgment of the user's latest question obtained in step (2), if the user's intention has not changed and there is a contextual relationship with the most recent conversation, the user's conversation history and the latest question are rewritten based on the natural language processing large model to complete the user's question;

[0028] 3.2 If the user's intention changes, that is, the latest question has no relationship with the previous conversation history, the question will not be rewritten or completed, that is:

[0029]

[0030] Among them, query is the user's current question, history is the current user's conversation history, and LLM is a large natural language processing model, which is used to rewrite, optimize and improve user questions.

[0031] The step (4) is specifically as follows:

[0032] 4.1 Use a hybrid search method that combines BM25 and vector to retrieve n text blocks that are similar to the input question;

[0033] 4.2 After inputting n text blocks into the re-ranking model, m text blocks related to the question are obtained.

[0034] The step (5) is specifically as follows:

[0035] If the confidence score exceeds the threshold (e.g. 0.8), the relevant knowledge text is considered to have met the relevance requirement;

[0036] If the confidence is lower than the threshold, deep search is started and different search engines and their combinations are configured; if the relevant document sources obtained by adaptive deep search exceed the set threshold, the text is processed into titles and topics for splicing without context enhancement and aggregation;

[0037] If there is an intention switch, the prompt word selection type is standard RAG;

[0038] The relevant documents obtained through adaptive deep retrieval enter the text processing module for context enhancement and aggregation.

[0039] In the step (5), the text processing includes aggregating documents from the same source, supplementing document contexts, and expanding document windows.

[0040] A system for implementing an adaptively adjusted knowledge depth retrieval, processing and question-answering method, comprising:

[0041] Question judgment and memory module, used to read, save, update and manage conversation history in real time;

[0042] The intention switching judgment module is used to judge whether the user's latest question is consistent with the most recent conversation topic to decide whether to switch the intention;

[0043] The question optimization and rewriting module is used to rewrite the user's conversation history and latest questions based on the natural language processing model to complete the user's questions;

[0044] The deep knowledge retrieval and processing module is used to judge based on the intention switching situation, user questions, the quality and relevance of the text block, and adaptively configure the deep retrieval process;

[0045] The deep search and text processing module is used to combine the corresponding links to perform deep text search and processing according to the obtained adaptive deep search configuration. The relevant documents obtained through the adaptive deep search enter the text processing module for context enhancement and aggregation.

[0046] Build a template and generate an answer module, and splice the prompt word template selected in the adaptive deep search configuration with the obtained relevant documents to obtain the final input content;

[0047] The result output module is used to input the obtained input content into the natural language processing large model to obtain the result.

[0048] The advantages of the present invention are:

[0049] By adaptively adjusting the retrieval method and subsequent processes according to user questions, including the configuration of the search engine and the selection of prompt word templates, document processing logic, etc., the invention has the following advantages:

[0050] 1) Efficiency: Based on user questions, relevant knowledge in the local knowledge base can be quickly retrieved and accurate answers can be provided, reducing the time users spend searching and reviewing massive files, and speeding up problem solving or system learning.

[0051] 2) High accuracy: The proposed adaptive deep retrieval method can adaptively adjust subsequent strategies according to user questions and knowledge status, and can better hit the expected source knowledge and expand the context, thereby improving the accuracy of question answering.

[0052] 3) Flexibility: The deep search method used automatically determines the subsequent search process and search engine configuration based on local knowledge. By combining multiple search engine results with a reverse sort fusion method, the search for related texts is more robust. At the same time, the search engine configuration is also very flexible and can be replaced and updated at any time. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 It is a schematic diagram of the process of the present invention.

[0054] Figure 2 It is the main structure block diagram of the present invention.

[0055] Figure 3 It is the conversation history access logic diagram of the present invention.

[0056] Figure 4 It is the user intention judgment and question rewriting business logic diagram of the present invention.

[0057] Figure 5 It is the adaptive deep search configuration business logic diagram of the present invention. DETAILED DESCRIPTION

[0058] The present invention will be further described below in conjunction with specific embodiments, and the advantages and features of the present invention will become clearer as the description proceeds. However, these embodiments are exemplary only and do not constitute any limitation to the scope of the present invention. It should be understood by those skilled in the art that the details and forms of the technical solution of the present invention may be modified or replaced without departing from the spirit and scope of the present invention, but these modifications and replacements all fall within the scope of protection of the present invention.

[0059] See also Figures 1 to 5 The present invention relates to an adaptively adjusted knowledge depth retrieval, processing and question answering method, comprising the following steps:

[0060] (1) Question judgment and memory, used to read, save, update and manage conversation history in real time;

[0061] (2) Intent switching judgment: judging whether the user’s latest question is consistent with the most recent conversation topic to decide whether to switch the intent;

[0062] (3) Question optimization and rewriting: rewriting the user's conversation history and latest questions based on the natural language processing big model to complete the user's questions;

[0063] (4) Deep knowledge retrieval and processing: Based on the intention switching situation, user questions, the quality and relevance of the text block, the deep retrieval process is adaptively configured;

[0064] (5) Deep search and text processing: Based on the adaptive deep search configuration obtained in step (4), the corresponding links are combined to perform deep search and text processing. The relevant documents obtained through the adaptive deep search enter the text processing module for context enhancement and aggregation.

[0065] (6) constructing a template and generating an answer, splicing the prompt word template selected in the adaptive deep search configuration in step (4) with the relevant documents obtained in step (5) to obtain the final input content;

[0066] (7) Input the obtained input content into the natural language processing model to obtain the result.

[0067] The step (1) is specifically as follows:

[0068] Develop a memory module based on Redis to read, save, update and manage conversation history in real time;

[0069] When a user invokes a system conversation, the system loads past conversation history based on the user ID and performs persistent updates during the conversation;

[0070] If the user has no conversation history, create a new memory and keep it updated.

[0071] The step (2) is specifically as follows:

[0072] 2.1 If the user has a previous conversation record, load the user's conversation record through step (1), compare the user's latest question with the most recent conversation record or similar conversations to determine whether the user's question is consistent with the most recent conversation topic;

[0073] 2.2 If they are consistent, proceed to the next step;

[0074] 2.3 If the intent has changed and there is no question similar to the latest question in the conversation memory, the intent is considered to have switched: F(H(user)+query)=True or False;

[0075] Among them, F is the intention switching module, which uses machine learning, edit distance, keyword matching, and natural language processing large model technology. H represents the memory module, which uses Redis to obtain the conversation history of the corresponding user, which is the question of the current user.

[0076] The step (3) is specifically as follows:

[0077] 3.1 Based on the judgment of the user's latest question obtained in step (2), if the user's intention has not changed and there is a contextual relationship with the most recent conversation, the user's conversation history and the latest question are rewritten based on the natural language processing large model to complete the user's question;

[0078] 3.2 If the user's intention changes, that is, the latest question has no relationship with the previous conversation history, the question will not be rewritten or completed, that is:

[0079]

[0080] Among them, query is the user's current question, history is the current user's conversation history, and LLM is a large natural language processing model, which is used to rewrite, optimize and improve user questions.

[0081] The step (4) is specifically as follows:

[0082] 4.1 Use a hybrid search method that combines BM25 and vector to retrieve n text blocks that are similar to the input question;

[0083] 4.2 After inputting n text blocks into the re-ranking model, m text blocks related to the question are obtained.

[0084] This step is based on the intention switching situation, questions, quality and relevance of the returned m text blocks, and adaptive configuration: confidence, whether to perform deep search, prompt word selection, and deep searcher configuration.

[0085] Among them, in the present invention, the deep searcher includes the edit distance / BM25 searcher, HYDE, TREE2DOC and other search methods, which are selected according to the relevance score and distribution of the relevant text blocks. The prompt words include standard RAG, RAG with historical dialogue, RAG template with multiple rounds of questioning, and questioning template.

[0086] The step (5) is specifically as follows:

[0087] If the confidence score exceeds the threshold (e.g. 0.8), the relevant knowledge text is considered to have met the relevance requirement;

[0088] If the confidence is lower than the threshold, deep retrieval is started and different retrievers and their combinations are configured; if the number of relevant document sources obtained by adaptive deep retrieval exceeds the set threshold (usually set to 10), the text is processed into titles and topics for splicing without context enhancement and aggregation;

[0089] If there is an intention switch, the prompt word selection type is standard RAG;

[0090] The relevant documents obtained through adaptive deep retrieval enter the text processing module for context enhancement and aggregation.

[0091] In the step (5), the text processing includes aggregating documents from the same source, supplementing document contexts, and expanding document windows.

[0092] The present invention also relates to a system for implementing an adaptively adjusted knowledge depth retrieval, processing and question-answering method, comprising:

[0093] Question judgment and memory module 1, used to read, save, update and manage the conversation history in real time;

[0094] Intention switching judgment module 2 is used to judge whether the user's latest question is consistent with the most recent conversation topic to decide whether to switch the intention;

[0095] Question optimization and rewriting module 3 is used to rewrite the user's conversation history and latest questions based on the natural language processing large model to complete the user's questions;

[0096] The knowledge deep retrieval and processing module 4 is used to make judgments based on the intention switching situation, user questions, the quality and relevance of the text block, and adaptively configure the deep retrieval process; the deep retrieval and text processing module 5 is used to combine the corresponding links to perform deep text retrieval and processing according to the obtained adaptive deep retrieval configuration, and the relevant documents obtained through the adaptive deep retrieval enter the text processing module for context enhancement and aggregation;

[0097] The template building and answer generation module 6 is configured to splice the prompt word template selected in the adaptive deep search configuration with the obtained related documents to obtain the final input content;

[0098] The result output module 7 is used to input the obtained input content into the natural language processing large model to obtain the result.

[0099] The advantages of the present invention are:

[0100] Improve retrieval accuracy: By adaptively adjusting the retrieval strategy, the system can more accurately capture the user's true intention and reduce the interference of redundant or irrelevant information.

[0101] Enhanced user experience: The system can understand and track conversation history, allowing users to experience a more natural and coherent conversation experience when interacting with the system.

[0102] Improve processing efficiency: Adaptive deep retrieval and text processing modules can quickly process large amounts of data, improve response speed, and reduce user waiting time.

[0103] Flexibility and adaptability: The system can adapt to different query intentions and knowledge structures and is not limited to a specific model or knowledge base, which improves the applicability and flexibility of the system.

[0104] Context enhancement: Through context enhancement and aggregation, the system can provide more complete information, making the generated answers richer and more accurate.

[0105] Modular design: The modular design of the system allows each part to be optimized and upgraded independently, making it easier to maintain and expand.

[0106] Natural language processing capabilities: Using a large natural language processing model, the system can understand and generate natural language, improving the naturalness and accuracy of question and answer.

[0107] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. An adaptively adjusted knowledge depth retrieval, processing and question answering method, characterized in that: The following steps are involved: (1) Question judgment and memory, used to read, save, update and manage conversation history in real time; (2) Intent switching judgment: judging whether the user’s latest question is consistent with the most recent conversation topic to decide whether to switch the intent; (3) Question optimization and rewriting: rewriting the user's conversation history and latest questions based on the natural language processing big model to complete the user's questions; (4) Deep knowledge retrieval and processing: Based on the intention switching situation, user questions, the quality and relevance of the text block, the deep retrieval process is adaptively configured; (5) Deep search and text processing: Based on the adaptive deep search configuration obtained in step (4), the corresponding links are combined to perform deep search and text processing. The relevant documents obtained through the adaptive deep search enter the text processing module for context enhancement and aggregation. (6) constructing a template and generating an answer, splicing the prompt word template selected in the adaptive deep search configuration in step (4) with the relevant documents obtained in step (5) to obtain the final input content; (7) Input the obtained input content into the natural language processing model to obtain the result.

2. The adaptively adjusted knowledge depth retrieval, processing and question answering system according to claim 1, characterized in that: The step (1) is specifically as follows: Develop a memory module based on Redis to read, save, update and manage conversation history in real time; When a user invokes a system conversation, the system loads past conversation history based on the user ID and performs persistent updates during the conversation; If the user has no conversation history, create a new memory and keep it updated.

3. The adaptively adjusted knowledge depth retrieval, processing and question answering system according to claim 1 or 2, characterized in that: The step (2) is specifically as follows: 2.1 If the user has a previous conversation record, load the user's conversation record through step (1), compare the user's latest question with the most recent conversation record or similar conversations to determine whether the user's question is consistent with the most recent conversation topic; 2.2 If they are consistent, proceed to the next step; 2.3 If the intent has changed and there is no question similar to the latest question in the conversation memory, the intent is considered to have switched: F(H(user)+query)=True or False; Among them, F is the intention switching module, which uses machine learning, edit distance, keyword matching, and natural language processing large model technology. H represents the memory module, which uses Redis to obtain the conversation history of the corresponding user, and query is the current user's question.

4. The adaptively adjusted knowledge depth retrieval, processing and question answering system according to claim 1 or 2, characterized in that: The step (3) is specifically as follows: 3.1 Based on the judgment of the user's latest question obtained in step (2), if the user's intention has not changed and there is a contextual relationship with the most recent conversation, the user's conversation history and the latest question are rewritten based on the natural language processing large model to complete the user's question; 3.2 If the user's intention changes, that is, the latest question has no relationship with the previous conversation history, the question will not be rewritten or completed, that is: Among them, query is the user's current question, history is the current user's conversation history, and LLM is a large natural language processing model, which is used to rewrite, optimize and improve user questions.

5. The adaptively adjusted knowledge depth retrieval, processing and question answering system according to claim 1 or 2, characterized in that: The step (4) is specifically as follows: 4.1 Use a hybrid search method that combines BM25 and vector to retrieve n text blocks that are similar to the input question; 4.2 After inputting n text blocks into the re-ranking model, m text blocks related to the question are obtained.

6. The adaptively adjusted knowledge depth retrieval, processing and question answering system according to claim 5, characterized in that: The step (5) is specifically as follows: If the confidence score exceeds the threshold, it is considered that the relevant knowledge text has met the relevance requirement; If the confidence is lower than the threshold, deep retrieval is started and different retrievers and their combinations are configured; If the relevant document sources obtained by adaptive deep retrieval exceed the set threshold, the text is processed into titles and topics for splicing without context enhancement and aggregation; If there is an intention switch, the prompt word selection type is standard RAG; The relevant documents obtained through adaptive deep retrieval enter the text processing module for context enhancement and aggregation.

7. The adaptively adjusted knowledge depth retrieval, processing and question answering system according to claim 5, characterized in that: In the step (5), the text processing includes aggregating documents from the same source, supplementing document contexts, and expanding document windows.

8. A system for implementing the adaptively adjusted knowledge depth retrieval, processing and question-answering method of any one of claims 1 to 7, characterized in that: include: Question judgment and memory module, used to read, save, update and manage conversation history in real time; The intention switching judgment module is used to judge whether the user's latest question is consistent with the most recent conversation topic to decide whether to switch the intention; The question optimization and rewriting module is used to rewrite the user's conversation history and latest questions based on the natural language processing model to complete the user's questions; The deep knowledge retrieval and processing module is used to judge based on the intention switching situation, user questions, the quality and relevance of the text block, and adaptively configure the deep retrieval process; The deep search and text processing module is used to combine the corresponding links to perform deep text search and processing according to the obtained adaptive deep search configuration. The relevant documents obtained through the adaptive deep search enter the text processing module for context enhancement and aggregation. Build a template and generate an answer module, and splice the prompt word template selected in the adaptive deep search configuration with the obtained relevant documents to obtain the final input content; The result output module is used to input the obtained input content into the natural language processing large model to obtain the result.