Question and answer method and system based on large-model intelligent reasoning and caching mechanism
By introducing a caching mechanism and preset prompts into the large-scale question-answering system, the problem of unreliable large-scale question-answering results is solved, the reliability and accuracy of the question-answering results are improved, and the computational cost is reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-26
- Publication Date
- 2026-03-24
AI Technical Summary
Large models are prone to hallucinations during the question-and-answer process, resulting in lower reliability of the answers, especially affecting the user experience in professional knowledge question-and-answer scenarios.
A caching mechanism is introduced. By using preset question-answer pairs in the cache, the cached answer is directly returned based on the similarity threshold. When the similarity is low, preset prompts guide the large model to label the source of the output content. The accuracy of the results is ensured by combining the target reference knowledge and common sense base.
It reduces the number of calls to large models, lowers computational costs, improves the reliability of question-and-answer results and user experience, and avoids the output of unfounded or erroneous content.
Smart Images

Figure CN121722892A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent question answering technology, and in particular to a question answering method and system based on large-model intelligent reasoning and caching mechanisms. Background Technology
[0002] With the development of artificial intelligence technology, large-model-based intelligent question answering methods have been widely applied in information retrieval and content recommendation due to their ability to handle complex semantic queries. However, large models are prone to illusions during reasoning, generating content that is inconsistent with the facts or lacks supporting evidence. This problem affects the reliability of large-model question answering results, especially in scenarios where high accuracy is required (such as professional knowledge question answering), potentially leading users to receive incorrect information and reducing user experience. Improving the reliability of large-model question answering results is an urgent problem to be solved. Summary of the Invention
[0003] The purpose of this invention is to provide a question-answering method and system based on large-model intelligent reasoning and caching mechanisms to improve the reliability of large-model question-answering results.
[0004] According to a first aspect of the present invention, a question-answering method based on large-model intelligent reasoning and caching mechanisms is provided, the method comprising the following steps: S100 receives user query behavior data.
[0005] S200: Based on the user query behavior data, find the most similar question in the cache and determine whether the similarity between the most similar question and the user query behavior data is greater than or equal to a first preset similarity threshold; the cache stores several preset question-answer pairs.
[0006] S300: If the similarity between the most similar question and the user query behavior data is greater than or equal to the first preset similarity threshold, then the answer corresponding to the most similar question in the cache is determined as the question-and-answer result corresponding to the user query behavior data; otherwise, proceed to S400.
[0007] S400: Obtain the top preset number of questions Q in the cache that are most similar to the user's query behavior data, and input the target reference knowledge and preset prompt words into the large model to obtain the first output result of the large model; the target reference knowledge includes the question-answer pairs QA corresponding to Q in the cache; the preset prompt words include the sources of information for different parts of the output; Q={Q1,Q2,…,Q i ,…,Q n}, Q i Let QA be the i-th question in the cache that is most similar to the user's query behavior data, where i ranges from 1 to n, and n is a preset number; QA={(Q1,A1),(Q2,A2),…,(Q i Ai ),…,(Q n A n )}, A i For cached with Q i The corresponding answer.
[0008] S500 performs different types of verification on different parts of the first output result according to the different sources of the corresponding evidence, integrates the verified content, and determines the integrated result as the question and answer result corresponding to the user query behavior data.
[0009] According to a second aspect of the present invention, a question-answering system based on a large model intelligent reasoning and caching mechanism is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described question-answering method based on a large model intelligent reasoning and caching mechanism.
[0010] Compared with the prior art, the present invention has at least the following beneficial effects: This invention introduces a caching mechanism to store pre-set question-answer pairs in the cache. When a new query is highly similar to a question in the cache, the cached answer is returned directly, reducing the number of calls to the large model and avoiding the problem of low reliability of reasoning results due to illusions during large model inference. When the similarity between a new query and a cached question is low, the large model is required to annotate the source of the output content (such as from the question-answer pairs in the cache or from the large model's own reasoning) through preset prompts, and the results are specifically verified according to different sources (for example, verifying the consistency of the part from cached knowledge with the cached content, and verifying the logical rationality of the part generated by the large model itself). This mechanism reduces the output of unfounded or erroneous content by the large model due to illusions, thereby improving the reliability of question-answering results. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 The flowchart shows the question-answering method based on large-model intelligent reasoning and caching mechanism provided in Embodiment 1 of the present invention. Detailed Implementation
[0013] 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 only some embodiments of the present invention, and 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.
[0014] Example 1: According to this embodiment, as Figure 1 As shown, a question-answering method based on large-model intelligent reasoning and caching mechanism is provided. The method includes the following steps: S100 receives user query behavior data.
[0015] In this embodiment, user query behavior data refers to the query content entered by the user in the form of text, voice, etc., which is the input basis for generating question and answer results.
[0016] S200: Based on the user query behavior data, find the most similar question in the cache and determine whether the similarity between the most similar question and the user query behavior data is greater than or equal to a first preset similarity threshold; the cache stores several preset question-answer pairs.
[0017] In this embodiment, the cache refers to a database that stores question-answer pairs, used to quickly and accurately return verified and reliable answers.
[0018] In this embodiment, the first preset similarity threshold is a pre-set critical value for judging whether the user query and the cached question are highly similar (e.g., 0.85, with a value range of 0-1). If the value exceeds this, the corresponding answer in the cache is used directly.
[0019] As a specific implementation method, the process of retrieving question-answer pairs from the cache includes: S201: Input the specified question from the cache into the large model and obtain the initial answer to the specified question output by the large model; the specified question can be any question.
[0020] In this embodiment, the initial answer is the direct output of the large model for the specified question.
[0021] S202, compare the preset answer to the specified question in the cache with the initial answer, and obtain the difference between the preset answer to the specified question in the cache and the initial answer.
[0022] In this embodiment, the preset answer is the answer to a pre-set question.
[0023] As a specific implementation, comparing the preset answer to the specified question in the cache with the initial answer includes textual comparison and semantic comparison. Optionally, a keyword matching algorithm is used to calculate the keyword matching degree between the preset answer and the initial answer, and the keyword matching degree is determined as the textual similarity between the preset answer and the initial answer; alternatively, semantic vector transformation is first performed on the preset answer and the initial answer, and then cosine similarity is calculated, and cosine similarity is determined as semantic similarity.
[0024] S203, if the difference between the preset answer corresponding to the specified question in the cache and the initial answer does not meet the preset difference condition, then output the preset prompt information; otherwise, construct a question-answer pair based on the specified question and the corresponding preset answer in the cache.
[0025] In this embodiment, the preset difference condition is the standard for judging whether the initial answer is consistent with the preset answer.
[0026] In this embodiment, the preset prompt information is used to indicate that the preset answer to the specified question may be incorrect, so that the preset prompt information can be manually verified.
[0027] As a specific implementation, the preset difference conditions include textual difference conditions and semantic difference conditions. For example, the textual difference condition is a textual similarity greater than or equal to 0.8, and the semantic difference condition is a semantic similarity greater than or equal to 0.85.
[0028] Based on S201-S203, using a large model to verify the accuracy of question-answer pairs can reduce the cost of manual verification; and the verification process based on the large model in this embodiment includes both textual and semantic levels, which improves the accuracy of the verification results.
[0029] As a specific implementation method, searching for the most similar questions in the cache based on the semantic information corresponding to user query behavior data includes: S210, perform semantic vector transformation on the user query behavior data to obtain the semantic vector corresponding to the user query behavior data.
[0030] In this embodiment, semantic vector transformation converts text into high-dimensional vectors, making semantically similar texts closer together in the vector space (e.g., through BERT or Sentence-BERT models).
[0031] S220, retrieve the semantic vector corresponding to each question in the cache.
[0032] S230, obtain the similarity between the semantic vector corresponding to the user query behavior data and the semantic vector corresponding to each question in the cache, and determine the question with the highest similarity as the most similar question.
[0033] In this embodiment, semantic vector similarity is an indicator that measures the consistency of the directions of two vectors in space (such as cosine similarity, the closer the value is to 1, the more semantically similar they are).
[0034] Based on S210-S230, the accuracy of finding similar problems can be improved.
[0035] S300: If the similarity between the most similar question and the user query behavior data is greater than or equal to the first preset similarity threshold, then the answer corresponding to the most similar question in the cache is determined as the question-and-answer result corresponding to the user query behavior data; otherwise, proceed to S400.
[0036] In this embodiment, when the similarity between the most similar question and the user's query behavior data is greater than or equal to the first preset similarity threshold, the answer corresponding to the most similar question is extracted from the cache. This reduces the number of large model calls, lowers the computational cost, improves the response speed, avoids the problem of unreliable question-and-answer results caused by the illusion phenomenon of large models, and enhances the user experience.
[0037] S400: Obtain the top preset number of questions Q in the cache that are most similar to the user's query behavior data, and input the target reference knowledge and preset prompt words into the large model to obtain the first output result of the large model; the target reference knowledge includes the question-answer pairs QA corresponding to Q in the cache; the preset prompt words include the sources of information for different parts of the output; Q={Q1,Q2,…,Q i ,…,Q n}, Q i Let QA be the i-th question in the cache that is most similar to the user's query behavior data, where i ranges from 1 to n, and n is a preset number; QA={(Q1,A1),(Q2,A2),…,(Q i A i ),…,(Q n A n )}, A i For cached with Q i The corresponding answer.
[0038] In this embodiment, the preset prompts are instructions to guide the large model to generate output that meets the requirements. These prompts include annotations of the sources of information for different parts of the output. As a specific implementation, the preset prompts include: generating answers based on target reference knowledge, prioritizing the reuse or integration of effective information from the target reference knowledge; if supplementary content outside the target reference knowledge (such as extended reasoning) is needed, it must be clearly marked that this part is a model extension and not directly from the target reference knowledge; the answer structure must include a core conclusion + source of information (i.e., explaining which part of the reference knowledge the conclusion corresponds to). Therefore, this embodiment constrains the reasoning range of the large model based on target reference knowledge and preset prompts, reducing the probability of illusions and minimizing the generation of unsubstantiated content; and the annotated sources of information provide a basis for subsequent verification.
[0039] In this embodiment, the preset quantity is an empirical value, and optionally, the preset quantity is 3 or 5.
[0040] As a specific implementation method, the process of obtaining Q includes: S410, Obtain the analysis text of user query behavior data from the large model.
[0041] In this embodiment, the analyzed text is a deep interpretation of the user query by the large model (such as extracting needs, scenarios, etc.). Optionally, semantic parsing is performed on the user query behavior data based on the large model to generate structured analytical text.
[0042] S420: Find and retrieve keywords in the analyzed text based on a preset domain dictionary; the preset domain dictionary includes several keywords from the domain to which the user query behavior data belongs.
[0043] In this embodiment, the domain dictionary is a set of professional keywords for users to query their respective domains, and it can be constructed manually.
[0044] S430, based on the keyword matching cache in the analyzed text, determines the number of questions that best match the keywords in the analyzed text as Q.
[0045] In this embodiment, the proportion of keywords in the analyzed text appearing in any question in the cache is determined as the matching degree between the analyzed text and that question. The top preset number of questions with the highest matching degree are determined as the top preset number of questions that best match the keywords in the analyzed text. For example, if the analyzed text has u keywords, and any two of these u keywords are different, and if only v of these u keywords appear in a certain question, where v ≤ u, then the proportion of keywords in the analyzed text appearing in that question is v / u.
[0046] Based on S410-S430, ensuring the relevance of the target reference knowledge to the user's query domain can improve the relevance of the large model reference problem and reduce interference from irrelevant information.
[0047] S500 performs different types of verification on different parts of the first output result according to the different sources of the corresponding evidence, integrates the verified content, and determines the integrated result as the question and answer result corresponding to the user query behavior data.
[0048] In this embodiment, the source is the basis for generating the output content. As a specific implementation, the source includes target reference knowledge and reasoning knowledge, and S500 includes: S510, if the basis of a certain part of the first output result is the kth answer in the target reference knowledge, then the consistency of the part is checked according to the kth answer in the target reference knowledge. If the part contradicts the kth answer in the target reference knowledge, then the part is corrected; the value of k is from 1 to n.
[0049] In this embodiment, the output of the large model will specifically indicate which part of the target reference knowledge the source is, that is, which answer in the target reference knowledge the source is. For example, the source is the first answer in the target reference knowledge, namely A1.
[0050] In this embodiment, consistency verification refers to verifying whether the content based on the target reference knowledge contradicts the corresponding answer in the target reference knowledge. As a specific implementation, performing consistency verification on this part of the content based on the corresponding answer in the target reference knowledge includes: S511, by extracting keywords and analyzing the grammatical structure of the k-th answer in the target reference knowledge, the core information corresponding to the k-th answer in the target reference knowledge is obtained.
[0051] In this embodiment, the core information is the most crucial content in the k-th answer of the target reference knowledge. Those skilled in the art will understand that any method for extracting core information in the prior art falls within the protection scope of this invention. As an optional specific implementation, the k-th answer in the target reference knowledge is first preprocessed to remove redundant words (such as modal particles and repetitive expressions); then, keyword extraction techniques (such as the TF-IDF algorithm) are used to extract keywords from the k-th answer in the target reference knowledge; finally, combined with grammatical structure analysis (such as the Stanford Parser and spaCy) of keyword attributes, the keywords are combined into structured core information.
[0052] S512, obtain the text similarity between this part and the core information corresponding to the kth answer in the target reference knowledge.
[0053] Those skilled in the art will understand that any method for obtaining text similarity in the prior art falls within the protection scope of this invention.
[0054] S513, if the text similarity is greater than or equal to the second preset similarity threshold, proceed to S540; otherwise, determine that the content of this part contradicts the k-th answer in the target reference knowledge; max() is to take the maximum value.
[0055] In this embodiment, the second preset similarity threshold is a critical value (such as 0.7) for judging whether the content is related to the core information.
[0056] In this embodiment, if the text similarity is less than the second preset similarity threshold, it is determined that the content contradicts the k-th answer in the target reference knowledge.
[0057] S514, perform semantic vector transformation on the core information corresponding to the k-th answer in the target reference knowledge and that part of the content to obtain the semantic similarity between the core information corresponding to the k-th answer in the target reference knowledge and that part of the content.
[0058] Optionally, Sentence-BERT can be used for semantic vector transformation.
[0059] Optionally, semantic similarity can be cosine similarity.
[0060] S515, if the semantic similarity is less than the third preset similarity threshold, then it is determined that the content in this part contradicts the k-th answer in the target reference knowledge.
[0061] In this embodiment, the third preset similarity threshold is a critical value (such as 0.8) for judging whether the content and core information are semantically consistent.
[0062] In this embodiment, if the semantic similarity is greater than or equal to the third preset similarity threshold, it is determined that there is no contradiction between the content and the k-th answer in the target reference knowledge, or the consistency verification method in the prior art is used to continue the verification.
[0063] Based on S511-S515, this embodiment realizes the determination of whether the content of this part contradicts the k-th answer in the target reference knowledge.
[0064] S520, if the basis of a certain part of the first output result is reasoning knowledge, then the reasonableness of that part of the content is checked according to the preset common sense base and domain rule base. If the part of the content is unreasonable, then the part of the content is corrected.
[0065] In this embodiment, the rationality check refers to whether the content derived from reasoned knowledge conforms to common sense or domain rules. As a specific implementation, the rationality check of this part of the content includes: S521, this part is divided into sentences to obtain several sentences.
[0066] Optionally, sentences can be divided according to preset punctuation marks. The preset punctuation marks are either semicolons or periods.
[0067] S522 performs grammatical structure analysis on each sentence and extracts the core proposition of each sentence based on the grammatical analysis results.
[0068] As a specific implementation method, grammatical structure analysis is performed on each sentence to identify the subject, predicate, and object. Then, the core proposition, i.e., the core judgment expressed in the sentence, is extracted based on the grammatical components. Optionally, syntactic analysis is performed using StanfordParser and spaCy, which are used to identify the relationships between sentence components. The extraction of the core proposition is based on a manually defined template (e.g., subject + predicate + object → core proposition), which belongs to rule-based natural language processing technology.
[0069] S523: Based on the preset common sense base and domain rule base, the core proposition of each sentence is checked for its rationality. If there is an unreasonable core proposition, the content of that part is determined to be unreasonable.
[0070] In this embodiment, for any sentence's core proposition, it is matched one by one with the common sense base and the domain rule base. If the core proposition of the sentence does not conflict with the knowledge in the base, it is determined to be reasonable; if the core proposition of the sentence conflicts with the knowledge in the base, it is determined to be unreasonable.
[0071] Those skilled in the art will recognize that the process of judging the reasonableness of any core proposition based on a pre-set common sense base and domain rule base is existing technology and will not be elaborated here. Optionally, reasonableness can be judged based on a large model.
[0072] Based on S510-S520, this embodiment uses dual verification to specifically filter out erroneous content, which can improve the accuracy and reliability of question and answer results.
[0073] In this embodiment, if there is content that needs to be corrected, the content to be corrected, the reference content, and the specified prompt word are input into the large model so that the large model outputs the corrected content. Specifically, when the source of the content to be corrected is the target reference knowledge, the reference content is one that contradicts the content to be corrected; when the source of the content to be corrected is not [reference knowledge], the specified prompt word is optionally: "Modify the content to be corrected based on the reference content and output the corrected content."
[0074] Those skilled in the art will recognize that the process of integrating different contents is prior art and will not be described in detail here.
[0075] This embodiment introduces a caching mechanism, storing pre-set question-answer pairs in the cache. When a new query is highly similar to a question in the cache, the cached answer is returned directly, reducing the number of calls to the large model and avoiding the problem of low reliability of reasoning results due to illusion during large model reasoning. When the similarity between a new query and a cached question is low, the large model is required to annotate the source of the output content (such as from the question-answer pairs in the cache or from the large model's own reasoning) through preset prompts, and the results are specifically verified according to different sources (for example, verifying the consistency of the part from cached knowledge with the cached content, and verifying the logical rationality of the part generated by the large model itself). This mechanism reduces the output of unfounded or erroneous content by the large model due to illusion, thereby improving the reliability of question-answering results.
[0076] Example 2: This embodiment provides a question-answering system based on large-model intelligent reasoning and caching mechanisms, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it performs the following steps: S100 receives user query behavior data.
[0077] S200: Based on the user query behavior data, find the most similar question in the cache and determine whether the similarity between the most similar question and the user query behavior data is greater than or equal to a first preset similarity threshold; the cache stores several preset question-answer pairs.
[0078] S300: If the similarity between the most similar question and the user query behavior data is greater than or equal to the first preset similarity threshold, then the answer corresponding to the most similar question in the cache is determined as the question-and-answer result corresponding to the user query behavior data; otherwise, proceed to S400.
[0079] S400: Obtain the top preset number of questions Q in the cache that are most similar to the user's query behavior data, and input the target reference knowledge and preset prompt words into the large model to obtain the first output result of the large model; the target reference knowledge includes the question-answer pairs QA corresponding to Q in the cache; the preset prompt words include the sources of information for different parts of the output; Q={Q1,Q2,…,Q i ,…,Q n}, Q i Let QA be the i-th question in the cache that is most similar to the user's query behavior data, where i ranges from 1 to n, and n is a preset number; QA={(Q1,A1),(Q2,A2),…,(Q i A i ),…,(Q n A n )}, A i For cached with Qi The corresponding answer.
[0080] S500 performs different types of verification on different parts of the first output result according to the different sources of the corresponding evidence, integrates the verified content, and determines the integrated result as the question and answer result corresponding to the user query behavior data.
[0081] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0082] While specific embodiments of the invention have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. It should also be understood that various modifications can be made to the embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.
Claims
1. A question-answering method based on large-model intelligent reasoning and caching mechanisms, characterized in that, The method includes the following steps: S100 receives user query behavior data; S200: Based on the user query behavior data, find the most similar question in the cache and determine whether the similarity between the most similar question and the user query behavior data is greater than or equal to a first preset similarity threshold; the cache stores several preset question-answer pairs; S300: If the similarity between the most similar question and the user query behavior data is greater than or equal to the first preset similarity threshold, then the answer corresponding to the most similar question in the cache is determined as the question-and-answer result corresponding to the user query behavior data; otherwise, proceed to S400. S400: Obtain the top preset number of questions Q in the cache that are most similar to the user's query behavior data, and input the target reference knowledge and preset prompt words into the large model to obtain the first output result of the large model; the target reference knowledge includes the question-answer pairs QA corresponding to Q in the cache; the preset prompt words include the sources of information for different parts of the output; Q={Q1,Q2,…,Q i ,…,Q n }, Q i Let QA be the i-th question in the cache that is most similar to the user's query behavior data, where i ranges from 1 to n, and n is a preset number; QA={(Q1,A1),(Q2,A2),…,(Q i A i ),…,(Q n A n )}, A i For cached with Q i The corresponding answer; S500 performs different types of verification on different parts of the first output result according to the different sources of the corresponding evidence, integrates the verified content, and determines the integrated result as the question and answer result corresponding to the user query behavior data.
2. The question-answering method based on large-model intelligent reasoning and caching mechanism according to claim 1, characterized in that, The sources of information include target reference knowledge and reasoning knowledge, and S500 includes: S510, if the basis of a certain part of the first output result is the kth answer in the target reference knowledge, then the consistency of the part is checked according to the kth answer in the target reference knowledge. If the part contradicts the kth answer in the target reference knowledge, then the part is corrected; the value of k is from 1 to n. S520, if the basis of a certain part of the first output result is reasoning knowledge, then the reasonableness of that part of the content is checked according to the preset common sense base and domain rule base. If the part of the content is unreasonable, then the part of the content is corrected.
3. The question-answering method based on large-model intelligent reasoning and caching mechanism according to claim 2, characterized in that, The consistency check of this part based on the k-th answer in the target reference knowledge includes: S511, by extracting keywords and analyzing the grammatical structure of the k-th answer in the target reference knowledge, the core information corresponding to the k-th answer in the target reference knowledge is obtained; S512, obtain the text similarity between this part and the core information corresponding to the kth answer in the target reference knowledge; S513, if the text similarity is greater than or equal to the second preset similarity threshold, proceed to S540; otherwise, determine that the content of this part contradicts the k-th answer in the target reference knowledge; max() is to take the maximum value; S514, perform semantic vector transformation on the core information corresponding to the k-th answer in the target reference knowledge and that part of the content to obtain the semantic similarity between the core information corresponding to the k-th answer in the target reference knowledge and that part of the content; S515, if the semantic similarity is less than the third preset similarity threshold, then it is determined that the content in this part contradicts the k-th answer in the target reference knowledge.
4. The question-answering method based on large-model intelligent reasoning and caching mechanism according to claim 2, characterized in that, The reasonableness verification of this part includes: S521, this part is divided into sentences to obtain several sentences; S522 performs grammatical structure analysis on each sentence and extracts the core proposition of each sentence based on the grammatical analysis results. S523: Based on the preset common sense base and domain rule base, the core proposition of each sentence is checked for its rationality. If there is an unreasonable core proposition, the content of that part is determined to be unreasonable.
5. The question-answering method based on large-model intelligent reasoning and caching mechanism according to claim 1, characterized in that, Based on the semantic information corresponding to user query behavior data, the most similar questions are found in the cache, including: S210, Perform semantic vector transformation on the user query behavior data to obtain the semantic vector corresponding to the user query behavior data; S220, retrieve the semantic vector corresponding to each question in the cache; S230, obtain the similarity between the semantic vector corresponding to the user query behavior data and the semantic vector corresponding to each question in the cache, and determine the question with the highest similarity as the most similar question.
6. The question-answering method based on large-model intelligent reasoning and caching mechanism according to claim 1, characterized in that, The process of obtaining Q includes: S410, Obtain the analysis text of user query behavior data from the large model; S420: Find and retrieve keywords in the analyzed text based on a preset domain dictionary; the preset domain dictionary includes several keywords from the domain to which the user query behavior data belongs. S430, based on the keyword matching cache in the analyzed text, determines the number of questions that best match the keywords in the analyzed text as Q.
7. The question-answering method based on large-model intelligent reasoning and caching mechanism according to claim 1, characterized in that, The process of retrieving question-answer pairs from the cache includes: S201: Input the specified question from the cache into the large model and obtain the initial answer to the specified question output by the large model; the specified question can be any question. S202, compare the answer to the specified question in the cache with the initial answer, and obtain the difference between the answer to the specified question in the cache and the initial answer; S203, if the difference between the answer to the specified question in the cache and the initial answer does not meet the preset difference condition, then output the preset prompt information; otherwise, construct a question-answer pair based on the specified question and the corresponding preset answer in the cache.
8. A question-answering system based on large-model intelligent reasoning and caching mechanisms, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the question-answering method based on large-model intelligent reasoning and caching mechanism as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Problem processing method, device and equipment based on artificial intelligence and storage medium
CN118070072A
Real-time interactive question answering system, method and equipment integrating vectorization retrieval and large model technology
CN118885559A
Intelligent question and answer method and system, electronic equipment and intelligent question and answer big model
CN119988573A
Data question answering method and device based on large model, electronic equipment and storage medium
CN120578738A
Power plant operation and maintenance knowledge intelligent query method based on large language model and RAG technology
CN121029784A