Question answering method, device, and program product
Patent Information
- Application Number
- PCT/CN2026/079865
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-03-27
- Filing Date
- 2026-02-25
- Publication Date
- 2026-10-01
Smart Images

Figure CN2026079865_01102026_PF_FP_ABST
Abstract
Description
Question answering methods, equipment and program products
[0001] This disclosure claims priority to Chinese Patent Application No. 202510384451.8, filed on March 27, 2025 with the China National Intellectual Property Administration, entitled "Question and Answer Method, Apparatus, Device and Procedure Product", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of artificial intelligence technology, and in particular to a question-answering method, device, and program product. Background Technology
[0003] With the development of computer technology, the application of large language models is becoming increasingly widespread. Currently, in the field of large language models, a retrieval mechanism can be introduced through the Retrieval-Augmented Generation (RGA) link. This combines a knowledge base with the large language model's generation process, allowing the large language model to first retrieve relevant information from the knowledge base when answering questions, and then generate the answer based on this information, effectively improving the accuracy and richness of the large language model's responses. However, the current RGA link's retrieval mechanism mainly relies on a pre-prepared knowledge base, making it difficult to effectively integrate and utilize information from reference retrieval sources uploaded by users in real time. This results in relatively poor accuracy for large language models when answering questions.
[0004] Therefore, improving the accuracy of responses from large language models is an urgent problem to be solved. Summary of the Invention
[0005] This application provides a question-answering method, device, and program product that can improve the accuracy of responses from large language models.
[0006] Firstly, this application provides a question-and-answer method, the method comprising:
[0007] When it is determined that a secondary retrieval of a user's query request is required based on information from multiple information sources, a target retrieval source is determined; the multiple information sources include at least the query request, and initial retrieval information obtained by performing an initial retrieval of the query request using at least two retrieval sources;
[0008] A secondary search is performed using the target search source to obtain the query response information for the query request;
[0009] Output the query response information.
[0010] Optionally, determining the target retrieval source includes:
[0011] Based on the information from the multiple information sources, the correlation between the query request and each of the search sources is determined, as well as the accuracy of the initial search information corresponding to each of the search sources, and the target search source is determined from the at least two search sources.
[0012] Optionally, the method further includes:
[0013] Based on the information from the multiple information sources, the query request is rewritten to obtain the rewritten query request. The rewritten query request has auxiliary information added to it, and the auxiliary information is used to indicate the user's query intent.
[0014] The step of performing a secondary search using the target retrieval source to obtain the query response information for the query request includes:
[0015] Based on the rewritten query request, a secondary search is performed using the target retrieval source to obtain the query response information of the query request.
[0016] Optionally, the search source includes a first search source and a second search source, and the target search source is the first search source; the step of performing a secondary search using the target search source based on the rewritten query request to obtain the query response information of the query request includes:
[0017] If, based on the information from the multiple information sources, it is determined that generating the query response information requires combining the initial search results from the second search source, then according to the rewritten query request, a second search is performed on the initial search results from the first search source and the second search source to obtain the query response information;
[0018] If, based on the information from the multiple information sources, it is determined that generating the query response information does not require combining the initial search results from the second search source, then according to the rewritten query request, a second search is performed in the first search source to obtain the query response information.
[0019] Optionally, the retrieval source includes a first retrieval source and a second retrieval source, and the target retrieval source is the second retrieval source; the step of performing a secondary retrieval using the target retrieval source based on the rewritten query request to obtain the query response information of the query request includes:
[0020] If, based on the information from the multiple information sources, it is determined that generating the query response information requires combining the initial search result of the first search source and the content of the first search source, then according to the rewritten query request, a second search is performed in the second search source, the initial search result of the first search source, and the content of the first search source to obtain the query response information;
[0021] If, based on the information from the multiple information sources, it is determined that generating the query response information does not require combining the initial search results of the first search source or the content of the first search source, then according to the rewritten query request, a second search is performed in the second search source to obtain the query response information.
[0022] Optional, also includes:
[0023] If, based on the query request, it is determined that the retrieval intent of the query request does not include summarizing the user's uploaded information, then a secondary retrieval is required.
[0024] Optional, also includes:
[0025] If, based on the query request, it is determined that the retrieval intent of the query request includes summarizing the user's uploaded information, then it is determined that no secondary retrieval is required.
[0026] Optional, also includes:
[0027] If, based on the information from the multiple information sources, it is determined that summarizing the uploaded information requires combining the initial search results from the reference search source, then the query response information for the query request is generated based on the content of the uploaded information and the initial search results from the reference search source.
[0028] If, based on the information from the multiple information sources, it is determined that summarizing the uploaded information does not require combining the initial search results from the reference search source, then the query response information is generated based on the content of the uploaded information.
[0029] Optionally, the method further includes:
[0030] When it is determined that a secondary retrieval of the user's query request is not required based on information from multiple information sources, at least one target information source is determined from the multiple information sources. The target information source includes at least one of the initial retrieval results of the at least two retrieval sources and the content of the retrieval source.
[0031] The query response information for the query request is obtained based on the target information source information.
[0032] Optionally, the multi-source information includes the query request, the initial retrieval result of the knowledge base, the initial retrieval result of the user-uploaded file, the system preset instruction, and the content of the user-uploaded file. The content of the user-uploaded file includes at least one of the parsing result of the user-uploaded file and the summary of the user-uploaded file.
[0033] Secondly, this application provides a question-and-answer method for document quality inspection scenarios, including:
[0034] In response to operations performed on the user interface, obtain the file to be inspected and the inspection request related to the user-uploaded file;
[0035] Based on the document to be inspected and the inspection request, obtain multi-source information, which includes the inspection request, the initial retrieval results of the knowledge base based on the inspection request, the parsing results of the document to be inspected, and the initial retrieval results of the document to be inspected based on the inspection request.
[0036] When it is determined that a secondary retrieval of the quality inspection request is required based on the information from the multiple information sources, the target retrieval source is determined based on the information from the multiple information sources.
[0037] A secondary search is performed using the target search source to obtain the quality inspection result of the quality inspection request;
[0038] Output the quality inspection results.
[0039] Thirdly, this application provides a question-and-answer device, the device comprising:
[0040] The first processing module is used to determine the target retrieval source when it is determined that a secondary retrieval of the user's query request is required based on information from multiple information sources; the information from multiple information sources includes at least the query request, and initial retrieval information obtained by performing an initial retrieval of the query request using at least two retrieval sources;
[0041] The second processing module is used to perform a secondary search using the target retrieval source to obtain the query response information of the query request;
[0042] The output module is used to output the query response information.
[0043] Fourthly, this application provides an electronic device, including: a processor and a memory; the processor and the memory are communicatively connected.
[0044] The memory stores computer-executed instructions;
[0045] The processor executes computer execution instructions stored in the memory to implement the method as described in either the first or second aspect.
[0046] Fifthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in either the first or second aspect.
[0047] In a sixth aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in either the first or second aspect.
[0048] The question-answering method, device, and program products provided in this application determine whether a secondary retrieval of the user's query request is necessary based on information from multiple information sources. If a secondary retrieval is required, a target retrieval source is identified, and the secondary retrieval is performed using the target retrieval source to obtain and output the query response information. This further selection of information from multiple sources reduces redundant information interference during the secondary retrieval, improves the effectiveness of identifying key information corresponding to the query request, and ultimately enhances the accuracy of the query response information output by the large language model corresponding to the query request. Attached Figure Description
[0049] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 is a flowchart illustrating a question-and-answer method provided in an embodiment of this application;
[0051] Figure 2 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application;
[0052] Figure 3 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application;
[0053] Figure 4 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application;
[0054] Figure 5 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application;
[0055] Figure 6 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application;
[0056] Figure 7 is a flowchart illustrating a question-and-answer method in a document quality inspection scenario provided in an embodiment of this application;
[0057] Figure 8 is a schematic diagram of the structure of a question-and-answer device provided in an embodiment of this application;
[0058] Figure 9 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0059] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0061] The following is a brief explanation of some of the terms and concepts used in this application:
[0062] Large language models: Large models refer to deep learning models with a massive number of parameters, typically containing hundreds of millions, tens of billions, or even trillions of parameters. Large models are also known as foundation models (FM). They are pre-trained on large-scale unlabeled corpora, producing pre-trained models with hundreds of millions of parameters. These models can adapt to a wide range of downstream tasks and have good generalization ability. Examples include Large Language Models (LLMs) and Multi-modal Pre-training Models.
[0063] Retrieval-Augmented Generation (RGA) combines information retrieval techniques (such as vector similarity search) to retrieve relevant information from external databases. The original input query is then combined with the retrieved relevant text fragments as input to the generative model. This allows the generative model to acquire more reference knowledge or real-time information, thereby overcoming the limitations of the model itself in terms of information during training time. As a result, the model can provide more accurate and evidence-based responses during the generation phase.
[0064] Currently, the traditional RAG link retrieval mechanism mainly relies on a pre-prepared knowledge base. That is, when the large language model answers a question, it first retrieves information related to the user's query request from the knowledge base based on the RAG link, and then generates the answer to the query request based on this information.
[0065] However, in scenarios such as video / call analysis, data annotation, and paper plagiarism checking, there are a large number of multi-source information interaction needs. That is, when using a large language model, users will upload information for reference in real time (such as text files, audio and video files, or directly input text content), and expect the large language model to analyze the uploaded information and knowledge base content, and generate query response information corresponding to the user's input query request based on the analysis results (i.e., generate the answer to the user's input question).
[0066] In the aforementioned multi-source information interaction scenario, based on the current RAG link, all information sources are used as input for a single retrieval, and the retrieval results are used as input for the large language model to assist the large language model in obtaining the query response information corresponding to the user's input query request. However, the current method of inputting all information sources into the retrieval is characterized by information complexity and interference, making it easy for key information to be overlooked, thus leading to poor accuracy in the responses output by the large language model.
[0067] In view of this, this application provides a question-answering method. In scenarios involving multi-source information interaction, by analyzing information from multiple sources, it determines whether a secondary retrieval of the user's query request is necessary. If a secondary retrieval is required, a target retrieval source with high relevance to the query request is selectively identified from the multi-source information for secondary retrieval, and the query response information corresponding to the query request is obtained based on the results of the secondary retrieval. This method, by further selecting information from multiple sources, reduces redundant information interference during secondary retrieval, improves the effectiveness of identifying key information corresponding to the query request, and thus enhances the accuracy of the query response information corresponding to the query request output by the large language model.
[0068] The entity executing this question-answering method can be an electronic device with processing capabilities, such as a smartphone, in-vehicle navigation terminal, computer, or server. This electronic device can be equipped with software or program code that runs the question-answering method, processing query requests and information from multiple information sources to obtain query response information. Optionally, the entity executing this question-answering method can also be a cloud platform, cloud server, or intelligent agent.
[0069] The technical solutions of this application will now be described in detail with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0070] Figure 1 is a flowchart illustrating a question-and-answer method provided in an embodiment of this application. As shown in Figure 1, the method may include the following steps:
[0071] S101. Based on information from multiple information sources, determine whether a secondary retrieval of the user's query request is necessary.
[0072] Among them, the multi-source information includes at least the query request, and the initial retrieval information obtained by performing an initial retrieval of the query request using at least two retrieval sources.
[0073] The query request is input by the user into the large language model; for example, it could be a question or a command. For instance, a query request could be, "Please compare the product prices mentioned in the uploaded audio file with the product prices in the live stream price list to see if they match?"
[0074] The retrieval source is the information source corresponding to the RGA link when performing retrieval based on multiple information sources. For example, the retrieval source can be at least one of the following: a pre-configured knowledge base of the large language model, user-uploaded files, user-uploaded information, etc. Among them, user-uploaded files can include, for example, text files, audio and video files, web links (used to link to a file, a webpage, etc.), etc.
[0075] Optionally, the multi-source information may also include system preset instructions. These preset instructions are a series of pre-defined rules, requirements, or operational instructions used to regulate and guide the large language model in processing user queries and other information sources, ensuring that the generated answers meet specific standards and expectations. For example, system preset instructions can specify that the answers output by the large language model must be presented in a structured form (e.g., "the answer must include three parts: problem analysis, main points, and specific cases"), that the answer should maintain an objective and neutral stance (e.g., "avoid adding subjective emotional evaluations to the answer, and only state facts"), and that priority should be given to obtaining knowledge from specific types of information sources to answer questions (e.g., "prioritize extracting information from authoritative academic literature published within the last five years to answer the question"), etc. Through system preset instructions, the large language model can be regulated and guided in processing information, ensuring that the answers meet specific standards and expectations.
[0076] For example, the multi-source information may include a query request, initial search results from the knowledge base, initial search results from user-uploaded files, system preset instructions, and the content of user-uploaded files. The content of user-uploaded files may include at least one of the following: the parsing result of the user-uploaded file (e.g., the full text of the parsed uploaded file) and a summary of the user-uploaded file.
[0077] In this step, multi-source information can be input into the large language model, guiding it to determine whether a secondary retrieval of the user's query request is necessary based on this information. For example, the following instruction can guide the large language model to determine whether a secondary retrieval of the user's query request is necessary based on multi-source information:
[0078] "Based on the following information, determine whether further retrieval is required to answer this query (single choice): A. No further retrieval is needed; the following information already answers the question. B. A second retrieval is required; the following information is insufficient to answer the question. Note: Only option number "A" or "B" should be returned; do not return any other content."
[0079] Specifically, when the large language model combines information from multiple information sources and determines that the existing information is sufficient to completely and accurately answer the query request, it determines that no secondary retrieval is needed, and thus option A in the above example can be selected; when the large language model combines information from multiple information sources and determines that the existing information from multiple information sources cannot meet the needs of answering the query request, it determines that a secondary retrieval is needed, and thus option B in the above example can be selected.
[0080] S102. When a secondary retrieval of the query request is required, determine the target retrieval source.
[0081] Based on the judgment in step S101 above, if it is determined that a secondary search is needed for the query request, then the target search source required for the secondary search needs to be further determined. This target search source can be at least one of the search sources mentioned in step S101, such as the knowledge base, user-uploaded files, or user-uploaded information.
[0082] In this step, multi-source information can be input into the large language model, guiding it to determine the target retrieval source needed for a secondary search of the user's query request based on this information. For example, the following instruction can guide the large language model to determine the target retrieval source needed for a secondary search of the user's query request:
[0083] "Based on the following information, determine whether further retrieval is required to answer this query (single choice): A. No further retrieval is needed; the following information already answers the question. B. Perform a secondary search on the user-uploaded file. C. Perform a secondary search on the knowledge base. Note: Only option number "A", "B", or "C" should be returned; do not return any other content."
[0084] Specifically, when a secondary search is required, if the large language model determines that the query request is closely related to the user-uploaded file, and the initial search reveals some relevant clues in the file but the information is incomplete, requiring further exploration of the file's content, then a secondary search can be performed on the user-uploaded file. Similarly, if the query request involves general knowledge or specialized domain knowledge covered by the knowledge base, and the initial search reveals some relevance in the knowledge base but insufficient information, requiring a broader search to obtain more information, then a secondary search can be performed on the knowledge base. Furthermore, by guiding the large language model to generate only option numbers, decoding time can be saved, improving the efficiency of the search process.
[0085] S103. Use the target retrieval source to perform a secondary retrieval and obtain the query response information of the query request.
[0086] In this step, a secondary search is performed using the target search source to obtain the search results, and these results are then input into the large language model. The large language model generates the query response information for the query request based on the secondary search results.
[0087] S104. Output the query response information.
[0088] The method provided in this application, based on information from multiple information sources, determines whether a secondary retrieval of a user's query request is necessary. If a secondary retrieval is required, a target retrieval source is identified, and the target retrieval source is used to perform the secondary retrieval. The query response information is then obtained and output. By further selecting information from multiple information sources, redundant information interference during the secondary retrieval is reduced, improving the effectiveness of identifying key information corresponding to the query request. This, in turn, enhances the accuracy of the query response information output by the large language model corresponding to the query request.
[0089] Optionally, in step S101 above, when determining whether a secondary retrieval of the user's query request is needed based on multi-source information, the target retrieval source for the secondary retrieval can also be determined simultaneously. That is, multi-source information can be input into the large language model, guiding it to make judgments based on the multi-source information. For example, the large language model can be guided to make judgments based on multi-source information using the following instructions:
[0090] "Based on the following information, determine whether further retrieval is required to answer this query (single choice): A. No further retrieval is needed; the following information already answers the question. B. A secondary retrieval based on the knowledge base is required; the following information is insufficient to answer the question. C. A secondary retrieval based on user-uploaded information is required; the following information is insufficient to answer the question. Note: Only option number "A" or "B" should be returned; do not return any other content."
[0091] This is equivalent to directly determining whether a secondary search is needed, and the target search source for the secondary search. This application does not specifically limit whether the aforementioned steps S101-S102 are implemented or not.
[0092] In one possible implementation, the determination of the target retrieval source in step S102 can be achieved through the following:
[0093] Specifically, the relevance between the query request and each retrieval source can be determined based on information from multiple information sources, as well as the accuracy of the initial retrieval information corresponding to each retrieval source, and the target retrieval source can be determined from at least two retrieval sources.
[0094] In this implementation, the information from multiple sources can be analyzed first. Using natural language processing (NLP) technology, the query request and the text from each retrieval source are converted into vector forms that computers can understand. The relevance between the query request and each retrieval source is measured by methods such as calculating the cosine similarity between vectors. For example, if the query request revolves around terminology in a specific professional field, and the knowledge base extensively mentions that term and related knowledge, then its relevance is high. Simultaneously, standards such as information completeness and consistency with known facts can be pre-defined for the initial retrieval information corresponding to each retrieval source, evaluating its accuracy from multiple dimensions. For example, if the initial retrieval information in a user-uploaded file contains missing data or logical contradictions, its accuracy is low.
[0095] Then, by assigning appropriate weights to relevance and accuracy, the scores of each search source are calculated comprehensively. Based on the scores, the most suitable target search source is selected from multiple search sources, thereby more accurately determining the target search source for secondary searches and improving search efficiency and answer quality.
[0096] Figure 2 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application. As shown in Figure 2, the method may further include the following steps:
[0097] S201. Based on information from multiple information sources, rewrite the query request to obtain the rewritten query request.
[0098] The rewritten query request includes supplementary information to indicate the user's query intent. For example, this supplementary information can be used to determine the user's behavioral intent (e.g., comparison intent, explanation intent). For instance, if the query request is "compare product A and product B," adding "comparison intent" supplementary information clarifies that this is a need for comparative analysis of two products. Alternatively, this supplementary information can be used to define the query domain (e.g., medical, financial). For example, if the query request is "what disease might a certain symptom be," adding "medical domain" supplementary information guides subsequent processing to retrieve information from relevant resources such as medical knowledge bases, improving the professionalism and accuracy of the answer. Furthermore, this supplementary information can be used to define the search scope. For example, if the query request is "analyze sales data in uploaded files," adding "only sales data in statistical charts" clarifies that information will be obtained from statistical charts within the file, making the search more focused and improving processing efficiency and result accuracy.
[0099] It should be understood that the examples of the above auxiliary information are for ease of understanding only, and this application does not limit the specific types of auxiliary information to the examples above.
[0100] One possible implementation is to rewrite the query request based on the target retrieval source determined in step S102 above, using information from multiple information sources, to obtain a rewritten query request.
[0101] In this implementation, multi-source information can be input into the large language model, guiding it to rewrite the query request based on this information, thus obtaining a rewritten query request. For example, taking the determination that a secondary search of a user-uploaded file and a secondary search of the knowledge base are needed respectively, the large language model can be guided to rewrite the query request using the following instructions to obtain the rewritten query request:
[0102] It was determined that a secondary search of the user-uploaded files was required.
[0103] "Please rewrite the query request by combining the query request, the initial search results of the user-uploaded file, the content of the user-uploaded file, the system's preset instructions, and specific information from the initial search results in the knowledge base (remember not to be general). Do not make meaningless changes such as synonym replacement or simple expansion. Your goal is to make the rewritten query request better able to retrieve relevant content that answers the query request from the **user-uploaded file**. Only return the optimized query request (i.e., the rewritten query request), and do not return any other unnecessary content."
[0104] It was determined that a secondary search of the knowledge base was required.
[0105] "Please rewrite the query request by combining the query request, system preset instructions, initial search results from the knowledge base, initial search results from the user-uploaded file, and specific information from the user-uploaded file content (remember not to be vague). Do not make meaningless changes such as synonym replacement or simple expansion. Your goal is to make the rewritten query request more effective at retrieving relevant content from the **knowledge base** that answers the query request. Only return the optimized query request (i.e., the rewritten query request), and do not return any other unnecessary content."
[0106] Another possible implementation is to directly rewrite the query request based on multi-information source information without referring to the target retrieval source determined in step S102 above, and obtain the rewritten query request.
[0107] S202. Based on the rewritten query request, a secondary search is performed using the target retrieval source to obtain the query response information of the query request.
[0108] In this step, query suggestions can be generated based on the rewritten query information and the target retrieval source. Then, based on the query suggestions, a large language model is used to obtain the query response.
[0109] For example, suppose the original query request is "How competitive is product X in the market?" After rewriting by combining information from multiple sources, the rewritten query request becomes "Analyze the performance indicators, prices, and other information of product X in the market research report file uploaded by the user, and compare it with similar products in the knowledge base to determine the competitiveness of product X in the market (user-uploaded file, knowledge base, comparison intent, product X competitiveness analysis)".
[0110] Based on this, the query request and target retrieval sources (user-uploaded files and knowledge base) are rewritten, and the generated query suggestions will clarify the retrieval direction for secondary searches. For user-uploaded market research report files, the query suggestions will guide you to find detailed performance parameters, pricing, user reviews, and other specific content related to product X within the file; for the knowledge base, the suggestions will guide you to search for corresponding information on similar products, clearly indicating that the search should focus on comparative analysis of product X.
[0111] Subsequently, based on the generated query suggestions, the large language model accurately extracts relevant data for product X from the user-uploaded file and finds comparable information for similar products in the knowledge base. Next, this information is analyzed and compared, such as comparing the performance advantages and price competitiveness of product X with similar products. Finally, the analysis results are integrated into a structured query response, providing the user with a detailed explanation of product X's competitive position in the market, including its strengths, weaknesses, and overall competitiveness assessment.
[0112] The method provided in this application, when a secondary retrieval of a query request is required, determines the target retrieval source, rewrites the query request based on information from multiple information sources, uses the rewritten query request and the target retrieval source to perform a secondary retrieval, obtains the query response information, and outputs the query response information. This method, while improving the effectiveness of identifying key information corresponding to the query request, further clarifies the user's query intent by rewriting the query request, improving the accuracy of the query request, and thus further enhancing the accuracy of the query response information output by the large language model corresponding to the query request.
[0113] The following section provides a detailed explanation of how, in step S202, a secondary search is performed using the target search source, based on a rewritten query request, to obtain the query response information, taking the example of a search source including a first search source and a second search source, with the target search source as the target search source. The first search source can be a user-uploaded file, user-uploaded information, or other real-time user-uploaded search source, while the second search source can be a pre-configured search source for a large language model, such as a knowledge base or database.
[0114] Figure 3 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application. As shown in Figure 3, the aforementioned step S202 may specifically include the following steps:
[0115] S301. Based on information from multiple information sources, determine whether the generated query response information needs to be combined with the initial search results from the second search source.
[0116] In this step, information from multiple information sources can be input into the large language model, guiding it to determine whether the generated query response needs to incorporate the initial search results from the second search source. For example, taking a user-uploaded file as the first search source and a knowledge base as the second search source, the large language model can be guided to determine whether the generated query response needs to incorporate the initial search results from the second search source using the following instructions:
[0117] "Based on the query request, the initial search results of the user-uploaded file, the content of the user-uploaded file, the system preset instructions, and the initial search results of the knowledge base, determine whether, in addition to needing a secondary search of the **user-uploaded file**, the existing **initial search results of the knowledge base** are also required to answer the query request (single choice): A. Initial search results of the knowledge base are required. B. Initial search results of the knowledge base are not required. Note that you can only return option number "A" or "B", do not return any other content."
[0118] Specifically, when the large language model combines information from multiple information sources and determines that the information retrieved from the user-uploaded file is insufficient to fully and accurately answer the query request, and that relevant content from the initial retrieval results in the knowledge base is needed to supplement and improve the answer, it will determine that the initial retrieval results in the knowledge base are required, i.e., select option A in the example above and execute step S302.
[0119] When the large language model combines information from multiple information sources and determines that the information obtained by performing a secondary search on the user-uploaded file is sufficient to answer the query request, and there is no need to refer to the initial search results of the knowledge base, it will determine that the initial search results of the knowledge base are not needed, that is, select option B in the above example and execute step S303.
[0120] S302. Based on the rewritten query request, a secondary search is performed on the initial search results of the first and second search sources to obtain the query response information.
[0121] In this step, the large language model needs to use the initial search results from the knowledge base to supplement and improve the answer. Therefore, a secondary search can be performed on the initial search results from the knowledge base and the user-uploaded file based on the user intent, key information, and other content contained in the rewritten query request.
[0122] Based on the initial search results of the knowledge base, information fragments closely related to the rewrite query can be selected. For example, if the rewrite query revolves around a specific issue in a particular professional field, the initial search results of the knowledge base can be used to precisely find content related to knowledge, principles, and cases in that field, and extract key points.
[0123] For user-uploaded files, the information can be further extracted by rewriting the query request. For example, if the file is a market research report, based on the query request's need for information about the product's market performance, the report's product-related market data, user feedback, and other information can be analyzed in more detail beyond the initial search results.
[0124] Then, the information obtained from the initial search results in the knowledge base and the secondary search results from user-uploaded files will be integrated. Duplicate and invalid parts will be removed, and the information will be sorted and arranged according to a certain logical order (such as chronological order, order of importance, etc.) to finally form a complete, accurate query response that matches the user's query intent.
[0125] S303. Based on the rewritten query request, a secondary search is performed in the first search source to obtain the query response information.
[0126] In this step, only the user-uploaded file needs to be searched a second time based on the user intent and key information contained in the rewritten query request. Then, the large language model generates query response information corresponding to the rewritten query request based on the search results of the second search of the user-uploaded file, which serves as the query response information corresponding to the query request.
[0127] The following section provides a detailed explanation of how, in step S202, the target retrieval source is the second retrieval source, and the retrieval source includes both a first and a second retrieval source. The first retrieval source can be a user-uploaded file or information, or a retrieval source pre-configured by a large language model, such as a knowledge base or database.
[0128] Figure 4 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application. As shown in Figure 4, the aforementioned step S202 may specifically include the following steps:
[0129] S401. Based on information from multiple information sources, determine whether generating query response information requires combining the initial search results of the first search source and the content of the first search source.
[0130] In this step, information from multiple information sources can be input into the large language model, guiding it to determine whether the generated query response needs to incorporate the initial search results and content of the first search source. For example, taking a user-uploaded file as the first search source and a knowledge base as the second search source, the large language model can be guided to determine whether the generated query response needs to incorporate the initial search results and content of the first search source using the following instructions:
[0131] "Based on the query request, the initial search results of the user-uploaded file, the content of the user-uploaded file, the system preset instructions, and the initial search results of the knowledge base, determine whether, in addition to requiring a secondary search of the **knowledge base**, the currently available **initial search results of the user-uploaded file** and **content of the user-uploaded file** are also needed to answer the query request (single choice): A. Initial search results of the user-uploaded file are needed. B. Content of the user-uploaded file is needed. C. Initial search results of the user-uploaded file and content of the user-uploaded file are needed. D. Initial search results of the user-uploaded file and content of the user-uploaded file are not needed. Note that you can only return option number "A", "B", "C", or "D", and do not return any other content."
[0132] Specifically, when the large language model combines information from multiple information sources and determines that the information retrieved from the knowledge base alone is insufficient to fully and accurately answer the query request, and that specific data and clues from the initial search results of the user-uploaded file are needed to complete the answer, then it is determined that the user-uploaded file's initial search results are required, i.e., option A in the above example is selected, and step S402 is executed.
[0133] When the large language model determines that secondary retrieval information based solely on the knowledge base is insufficient and that supplementary information needs to be extracted from the overall content of the user-uploaded file in order to answer the query request, it will determine that the user needs to upload the file content, i.e., select option B and execute step S402.
[0134] If the large language model determines that it needs both the key points provided by the initial search results of the user-uploaded file and the detailed information in the content of the user-uploaded file to fully answer the query request, then it determines that both the initial search results of the user-uploaded file and the content of the user-uploaded file are required, i.e., option C is selected, and step S402 is executed.
[0135] When the large language model combines information from multiple information sources and determines that the information obtained through a secondary retrieval of the knowledge base is sufficient to answer the query request, and there is no need to refer to the initial retrieval results and content of the user-uploaded file, then it is determined that the initial retrieval results and content of the user-uploaded file are not required, i.e., option D is selected, and step S403 is executed.
[0136] Optionally, when the first search source includes multiple files or multiple pieces of information, the content of the first search source may include, for example, the identifier of the target file or target information in the first search source, and / or, the location of relevant information related to the query request in the target file or target information, and / or, the content of relevant information related to the query request in the target file or target information. For example, the content of the first search source may be returned in a specific format (e.g., JSON format).
[0137] S402. Based on the rewritten query request, a secondary search is performed in the second search source, the initial search results of the first search source, and the content of the first search source to obtain the query response information.
[0138] This step can refer to the aforementioned step S302, the only difference being the search source for the secondary search and the combination of multiple information sources. Other implementation methods are the same, and will not be repeated here.
[0139] S403. Based on the rewritten query request, a secondary search is performed in the second search source to obtain the query response information.
[0140] This step can be referred to as step S303 above. The only difference is that the search source for the secondary search is different. The other implementation methods are the same, so they will not be repeated here.
[0141] Figure 5 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application. As shown in Figure 5, the method may further include the following steps:
[0142] S501. Without needing to perform a secondary retrieval of the query request, determine at least one target information source from multiple information source information.
[0143] The target information source information includes initial search results from at least two search sources and at least one item from the search source content. For example, the target information source information may include initial search results from a knowledge base, initial search results from user-uploaded information, and user-uploaded information content (e.g., full text of user-uploaded information, summary of user-uploaded information, content of specific lines / paragraphs in user-uploaded information, etc.).
[0144] One possible implementation is to input multi-source information into a large language model, guiding the large language model to determine at least one target information source corresponding to the query intent of the query request based on the multi-source information.
[0145] Another possible approach is to identify at least one target information source from multiple information sources through association analysis and importance assessment. For example, the similarity between the query request and each information source can be calculated (e.g., using cosine similarity, Euclidean distance, etc.). Alternatively, the semantic and domain relevance between the query request and each information source can be explored. For instance, when a query focuses on a technical problem in a specific professional field, the initial search results from that professional knowledge base and the professional content in closely related user-uploaded information can be prioritized. Furthermore, the importance of each information source relative to the query request can be determined based on its completeness and accuracy. Finally, corresponding decision rules can be formulated based on the results of association analysis and importance assessment. For example, a threshold can be set for the product of similarity score and importance weight; information sources exceeding this threshold will be identified as target information sources. Alternatively, information sources can be sorted from high to low importance weight, and those with higher weights can be selected as targets. Optionally, combinations of different types of information sources can also be supported to ensure comprehensive and accurate information is obtained to answer the query request.
[0146] S502. Obtain the query response information of the query request based on the target information source information.
[0147] In this step, information corresponding to the query request can be obtained based on the target information source information, and this information can be combined and spliced to generate the query response information of the query request.
[0148] The method provided in this application, without requiring secondary retrieval, can filter out target information sources with high relevance to the query request from multiple information sources and obtain the query response information based on the target information source information. Compared to the prior art method of directly generating query response information from all information sources, this solution can further extract the retrieved effective information, thereby improving the accuracy and effectiveness of the query response information generated by the large language model.
[0149] In one possible implementation, Figure 6 is a flowchart illustrating another question-and-answer method provided in an embodiment of this application. As shown in Figure 6, the aforementioned step S101 may specifically include the following steps:
[0150] S601. Based on the query request, determine whether the retrieval intent of the query request includes summarizing the user's uploaded information.
[0151] The search intent can be determined using a large language model. For example, the query request can be input into the large language model, which will then identify the search intent. Summarizing the user's uploaded information refers to summarizing the content or part of the user's uploaded information. For example, if the query request is "Please summarize the core content and core ideas of the uploaded document," it can be determined whether the search intent includes summarizing the user's uploaded information.
[0152] One possible implementation involves performing intent recognition on the query request and determining, based on the result of the intent recognition, whether the retrieval intent of the query request includes summarizing the user's uploaded information. This intent recognition can refer to existing technologies, which will not be described in detail here.
[0153] Another possible approach is to identify whether the query request includes summary-related keywords to determine if the search intent includes summarizing the user's uploaded information. For example, if the query request includes keywords such as "summary," "general overview," or "core content," it can be determined whether the search intent includes summarizing the user's uploaded information.
[0154] If the search intent of the query request does not include summarizing the user's uploaded information, it indicates that the search intent is to obtain broader knowledge or information. Relying solely on the multi-source information obtained from the initial search may not fully and accurately meet the needs. Therefore, it is determined that a secondary search is required, and step S602 is executed. If the search intent of the query request includes summarizing the user's uploaded information, it indicates that the user's needs focus on refining and summarizing the existing uploaded information. In this case, the focus is on processing the uploaded information itself, rather than obtaining additional information from other information sources. Therefore, it is determined that a secondary search is not required, and step S603 is executed.
[0155] S602. It is determined that a secondary search is required.
[0156] Once it is determined that a secondary search is required, any of the solutions mentioned in the embodiments shown in Figures 1-5 above can be used for the secondary search, which will not be elaborated here.
[0157] S603. It is determined that no secondary search is required.
[0158] In this case, the solution may also include a sub-solution on how to summarize the user's uploaded information. The detailed steps of this sub-solution can be found in the following sub-steps:
[0159] S6031. Based on information from multiple information sources, determine whether summarizing the uploaded information requires combining the initial search results from the reference search source.
[0160] In this step, information from multiple sources can be input into the large language model. This information includes query requests, uploaded content, initial search results from reference retrieval sources (such as knowledge bases), and system preset commands. For example, this information can be organized according to a specific format to form a complete text input:
[0161] Query request: [Details of the query]
[0162] Uploaded information content: [Detailed upload information text]
[0163] Initial search results from the reference search source (knowledge base): [Relevant information retrieved from the knowledge base initially]
[0164] System default commands: "[Relevant default rules or requirements]"
[0165] Then, specific prompts are designed to guide the large language model in making judgments. The content of the prompts needs to be clear and explicit so that the large language model understands the task requirements. For example, it could be:
[0166] "Please carefully analyze the query request, uploaded information, initial search results from the reference search source, and system preset instructions provided above. Determine whether it is necessary to incorporate the initial search results from the reference search source to refine the summary when summarizing the uploaded information. Please answer according to the following rules (single choice): A. It is necessary to incorporate the initial search results from the reference search source. B. It is not necessary to incorporate the initial search results from the reference search source. Note that you can only return option number "A" or "B", do not return any other content."
[0167] After receiving the above input information and prompt words, the large language model analyzes and judges various factors, such as the completeness of the uploaded information, its relevance to the query request, and whether the initial search results of the reference search source can supplement the summary of the uploaded information. It then outputs option number "A" or "B" to determine whether it is necessary to combine the initial search results of the reference search source to summarize the uploaded information.
[0168] If necessary, it indicates that the uploaded information itself has limitations, and relying solely on the uploaded information cannot comprehensively and accurately summarize the content that meets the requirements of the query request. It is necessary to use the initial search results of the reference search source to supplement key information, improve logical relationships, or provide additional perspectives, thereby achieving a better summary of the uploaded information. Step S6032 is executed. If not necessary, it indicates that the uploaded information is complete and rich enough, and it already contains all the key elements required for the summary. It can independently meet the requirements of the query request for summarizing the uploaded information, and there is no need for the assistance of the initial search results of the reference search source. Step S6033 is executed.
[0169] S6032. Based on the content of the uploaded information and the initial search results from the retrieval source, generate query response information for the query request.
[0170] This step delves into the semantic relationships between the uploaded information and the initial search results from the reference sources. Through semantic analysis, we understand the deeper meaning of each information unit, identifying commonalities and differences. Based on these connections, we integrate the information, strengthen mutually corroborating elements, and piece together complementary content to form a complete information chain.
[0171] Then, natural language processing algorithms can be used to organize and integrate the information, accurately extracting key points, such as identifying core viewpoints, arguments, and conclusions in complex text. The query response information can then be evaluated based on accuracy, completeness, and readability to ensure reliability, integrity, and readability. Optionally, a pre-trained model can be used to optimize and adjust the initial query response information to generate the query response information for the final query request.
[0172] S6033. Generate query response information based on the content of the uploaded information.
[0173] In this step, because the uploaded information is complete and comprehensive enough, containing all the key elements required for the summary, it can independently meet the query request's requirements for summarizing the uploaded information without the need for assistance from the initial search results of the retrieval source. Therefore, the content of the uploaded information can be directly integrated to generate the query response.
[0174] It should be understood that this application does not limit the application scenarios of this question-answering method. For example, this question-answering method can be used in fields such as document quality inspection and content retrieval. The following example, document quality inspection, illustrates the application of this question-answering method:
[0175] Figure 7 is a flowchart illustrating a question-and-answer method for document quality inspection provided in this application. As shown in Figure 7, the method may include the following steps:
[0176] S701, responding to operations performed on the user interface to obtain the file to be inspected, and quality inspection requests related to user-uploaded files.
[0177] The files to be inspected can be, for example, recorded audio or video files (such as audio and video recordings from a live stream), or text files (such as papers or manuscripts). The inspection request is used to inspect the content of the files to be inspected, for example, to check for any violations or errors.
[0178] In this step, users can upload files to be inspected via the upload function on the user interface. Furthermore, users can input quality inspection requests related to the uploaded files using input boxes or preset input commands on the user interface. Based on the user's actions on the user interface, the uploaded files to be inspected and the corresponding quality inspection requests can be obtained.
[0179] Optionally, the system can first retrieve the user-uploaded file to be inspected, and then retrieve the corresponding inspection request in response to the user's input. Alternatively, after the user selects the file to be inspected and inputs the inspection request on the interface, the system can retrieve the file to be inspected and the inspection request in response to the user's completed operation.
[0180] S702. Based on the document to be inspected and the inspection request, obtain information from multiple information sources.
[0181] The multi-source information includes the quality inspection request, the initial search results of the knowledge base based on the quality inspection request, the parsing results of the document to be inspected, and the initial search results of the document to be inspected based on the quality inspection request.
[0182] In this step, an initial search can be performed in the knowledge base and in the file to be inspected based on the quality inspection request, yielding initial search results for both the knowledge base and the file to be inspected. Additionally, the content of the file to be inspected can be parsed using any existing file parsing function to obtain the parsing results.
[0183] S703. When it is determined that a secondary retrieval of the quality inspection request is required based on information from multiple information sources, the target retrieval source is determined based on information from multiple information sources.
[0184] The target retrieval source could be, for example, the document to be inspected or a knowledge base.
[0185] For details on how to determine the target retrieval source based on information from multiple sources, please refer to the question-and-answer method provided in any of the foregoing embodiments, which will not be repeated here.
[0186] S704. Use the target retrieval source to perform a secondary retrieval to obtain the quality inspection results of the quality inspection request.
[0187] The quality inspection result may include, for example, whether there are any violations in the document to be inspected, whether there are any errors in the content of the document to be inspected, or whether the information in the document to be inspected is consistent with the information in the knowledge base. This application does not impose any restrictions on this.
[0188] S705, Output quality inspection results.
[0189] The quality inspection results can be output to the user's electronic device, or displayed directly on the operating interface of the electronic device that implements the question-and-answer method.
[0190] In this embodiment, the system obtains the file to be inspected and the inspection request related to the user-uploaded file in response to an operation on the user interface. Based on the file to be inspected and the inspection request, it acquires multi-source information. When it is determined that a secondary retrieval of the inspection request is needed based on the multi-source information, a target retrieval source is determined based on the multi-source information. A secondary retrieval is performed using the target retrieval source to obtain and output the inspection result of the inspection request. Through the above method, by further selecting multi-source information, redundant information interference during the secondary retrieval is reduced, the effectiveness of identifying key information corresponding to the inspection request is improved, and thus the accuracy of file quality inspection is enhanced.
[0191] Figure 8 is a schematic diagram of a question-and-answer device provided in an embodiment of this application. As shown in Figure 8, the device may include: a first processing module 11, a second processing module 12, and an output module 13.
[0192] The first processing module 11 is used to determine the target retrieval source when it is determined, based on information from multiple information sources, that a secondary retrieval of the user's query request is required. The information from multiple information sources includes at least the query request and initial retrieval information obtained by performing an initial retrieval of the query request using at least two retrieval sources.
[0193] The second processing module 12 is used to perform a secondary search using the target retrieval source to obtain the query response information of the query request.
[0194] Output module 13 is used to output query response information.
[0195] Optionally, the first processing module 11 is specifically used to determine the relevance between the query request and each retrieval source based on information from multiple information sources, as well as the accuracy of the initial retrieval information corresponding to each retrieval source, and to determine the target retrieval source from at least two retrieval sources.
[0196] Optionally, the first processing module 11 is further configured to rewrite the query request based on information from multiple information sources to obtain a rewritten query request. The rewritten query request includes auxiliary information used to indicate the user's query intent. The second processing module 12 is specifically configured to perform a secondary search using the target retrieval source based on the rewritten query request to obtain the query response information of the query request.
[0197] Optionally, when the search sources include a first search source and a second search source, and the target search source is the first search source, the second processing module 12 is specifically used to perform a secondary search on the initial search results of the first and second search sources according to the rewritten query request if it is determined, based on information from multiple information sources, that generating the query response information requires combining the initial search results of the second search source, to obtain the query response information. If it is determined, based on information from multiple information sources, that generating the query response information does not require combining the initial search results of the second search source, then it performs a secondary search on the first search source according to the rewritten query request to obtain the query response information.
[0198] Optionally, when the search sources include a first search source and a second search source, and the target search source is the second search source, the second processing module 12 is specifically used to: if, based on information from multiple information sources, it is determined that generating query response information requires combining the initial search results and content of the first search source, then, according to the rewritten query request, perform a secondary search in the second search source, the initial search results of the first search source, and the content of the first search source to obtain query response information. If, based on information from multiple information sources, it is determined that generating query response information does not require combining the initial search results and content of the first search source, then, according to the rewritten query request, perform a secondary search in the second search source to obtain query response information.
[0199] Optionally, the first processing module 11 is also used to determine that a secondary search is needed when it is determined, based on the query request, that the retrieval intent of the query request does not include summarizing the user's uploaded information.
[0200] Optionally, the first processing module 11 is also used to determine that a secondary search is not required when the retrieval intent of the query request includes summarizing the user's uploaded information.
[0201] Optionally, the second processing module 12 is further configured to generate query response information for the query request based on the content of the uploaded information and the initial search results of the reference search source if, based on the information from multiple information sources, it is determined that summarizing the uploaded information requires combining the initial search results of the reference search source. If, based on the information from multiple information sources, it is determined that summarizing the uploaded information does not require combining the initial search results of the reference search source, then query response information is generated based on the content of the uploaded information.
[0202] Optionally, the second processing module 12 is further configured to determine at least one target information source from the multiple information source information when it is determined, based on the multiple information source information, that a secondary retrieval of the user's query request is not required. The query response information for the query request is obtained based on the target information source information, which includes at least one of the initial retrieval results from at least two retrieval sources and the content of the retrieval sources.
[0203] Optionally, the multi-source information includes query requests, initial search results from the knowledge base, initial search results from user-uploaded files, system preset instructions, and user-uploaded file content. The user-uploaded file content includes at least one of the following: the parsing results of the user-uploaded file and the summary of the user-uploaded file.
[0204] The question-and-answer device provided in this application embodiment can execute the question-and-answer method in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described again here.
[0205] Figure 9 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. This electronic device can, for example, be used to execute the aforementioned question-and-answer method. As shown in Figure 9, the electronic device 900 may include at least one processor 901 and a memory 902. In one possible implementation, it may also include a communication interface 903.
[0206] The memory 902 is used to store programs. Specifically, the program may include program code, which includes computer operation instructions.
[0207] The memory 902 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0208] The processor 901 is used to execute computer execution instructions stored in the memory 902 to implement the method described in the foregoing method embodiments. The processor 901 may be a CPU, an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0209] The processor 901 can communicate and interact with external devices through the communication interface 903. These external devices can be, for example, the user's terminal device mentioned earlier. In specific implementations, if the communication interface 903, memory 902, and processor 901 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.
[0210] Optionally, in a specific implementation, if the communication interface 903, memory 902, and processor 901 are integrated on a single chip, then the communication interface 903, memory 902, and processor 901 can communicate through an internal interface.
[0211] This application also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores program instructions, which are used in the methods described in the above embodiments.
[0212] This application also provides a program product including executable instructions stored in a readable storage medium. At least one processor of an electronic device can read the executable instructions from the readable storage medium, and the at least one processor executes the executable instructions to cause the electronic device to implement the question-and-answer methods provided in the various embodiments described above.
[0213] The term "multiple" in this document refers to two or more. The term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Furthermore, the character " / " in this document generally indicates an "or" relationship between the preceding and following related objects; in formulas, " / " indicates a "division" relationship. Additionally, it should be understood that in the description of this application, words such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.
[0214] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.
[0215] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A question-and-answer method, characterized in that, The method includes: When it is determined that a secondary retrieval of a user's query request is required based on information from multiple information sources, a target retrieval source is determined; the multiple information sources include at least the query request, and initial retrieval information obtained by performing an initial retrieval of the query request using at least two retrieval sources; A secondary search is performed using the target search source to obtain the query response information for the query request; Output the query response information.
2. The method according to claim 1, characterized in that, The determination of the target retrieval source includes: Based on the information from the multiple information sources, the correlation between the query request and each of the search sources is determined, as well as the accuracy of the initial search information corresponding to each of the search sources, and the target search source is determined from the at least two search sources.
3. The method according to claim 2, characterized in that, The method further includes: Based on the information from the multiple information sources, the query request is rewritten to obtain a rewritten query request. The rewritten query request has auxiliary information added to it, and the auxiliary information is used to indicate the user's query intent. The step of performing a secondary search using the target retrieval source to obtain the query response information for the query request includes: Based on the rewritten query request, a secondary search is performed using the target retrieval source to obtain the query response information of the query request.
4. The method according to claim 3, characterized in that, The search sources include a first search source and a second search source, and the target search source is the first search source; the step of performing a secondary search based on the rewritten query request using the target search source to obtain the query response information of the query request includes: If, based on the information from the multiple information sources, it is determined that generating the query response information requires combining the initial search results from the second search source, then according to the rewritten query request, a second search is performed on the initial search results from the first search source and the second search source to obtain the query response information; If, based on the information from the multiple information sources, it is determined that generating the query response information does not require combining the initial search results from the second search source, then according to the rewritten query request, a second search is performed in the first search source to obtain the query response information.
5. The method according to claim 3, characterized in that, The search sources include a first search source and a second search source, and the target search source is the second search source; the step of performing a secondary search based on the rewritten query request using the target search source to obtain the query response information of the query request includes: If, based on the information from the multiple information sources, it is determined that generating the query response information requires combining the initial search result of the first search source and the content of the first search source, then according to the rewritten query request, a second search is performed in the second search source, the initial search result of the first search source, and the content of the first search source to obtain the query response information; If, based on the information from the multiple information sources, it is determined that generating the query response information does not require combining the initial search results of the first search source or the content of the first search source, then according to the rewritten query request, a second search is performed in the second search source to obtain the query response information.
6. The method according to any one of claims 1-5, characterized in that, Also includes: If, based on the query request, it is determined that the retrieval intent of the query request does not include summarizing the user's uploaded information, then a secondary retrieval is required.
7. The method according to any one of claims 1-5, characterized in that, Also includes: If, based on the query request, it is determined that the retrieval intent of the query request includes summarizing the user's uploaded information, then it is determined that no secondary retrieval is required.
8. The method according to claim 7, characterized in that, Also includes: If, based on the information from the multiple information sources, it is determined that summarizing the uploaded information requires combining the initial search results from the reference search source, then the query response information for the query request is generated based on the content of the uploaded information and the initial search results from the reference search source. If, based on the information from the multiple information sources, it is determined that summarizing the uploaded information does not require combining the initial search results from the reference search source, then the query response information is generated based on the content of the uploaded information.
9. The method according to any one of claims 1-5, characterized in that, The method further includes: When it is determined that a secondary retrieval of the user's query request is not required based on information from multiple information sources, at least one target information source is determined from the multiple information sources. The target information source includes at least one of the initial retrieval results of the at least two retrieval sources and the content of the retrieval source. The query response information for the query request is obtained based on the target information source information.
10. The method according to any one of claims 1-5, characterized in that, The multi-source information includes the query request, the initial retrieval result of the knowledge base, the initial retrieval result of the user-uploaded file, the system preset instruction, and the content of the user-uploaded file. The content of the user-uploaded file includes at least one of the parsing result of the user-uploaded file and the summary of the user-uploaded file.
11. The method according to claim 1, characterized in that, The multi-source information includes the query request, the initial retrieval information, and the system preset instruction. The system preset instruction is used to indicate at least one of the output format of the query response information and the preferred information source.
12. The method according to claim 3, characterized in that, The step of rewriting the query request based on the multi-information source information to obtain the rewritten query request includes: Based on the target retrieval source and the multi-information source information, the query request is rewritten to obtain the rewritten query request.
13. The method according to claim 3 or 12, characterized in that, The auxiliary information is also used to indicate at least one of the following: query domain restrictions, search scope.
14. The method according to any one of claims 1-5, characterized in that, Also includes: Identify whether the query request includes keywords that summarize the user's uploaded information, and determine whether the retrieval intent of the query request includes summarizing the user's uploaded information.
15. The method according to claim 9, characterized in that, Determining at least one target information source from the multiple information source information includes: Based on the similarity between the query request and the information from each of the multiple information sources, at least one target information source is determined.
16. The method according to claim 9, characterized in that, Determining at least one target information source from the multiple information source information includes: Based on the completeness and accuracy of each information source in the multi-source information, the importance of each information source relative to the query request is determined; Based on the importance, at least one target information source is determined from the multiple information source information.
17. A question-and-answer method for document quality inspection scenarios, characterized in that, include: Responding to operations performed on the user interface to obtain the files to be inspected, as well as inspection requests related to user-uploaded files; Based on the document to be inspected and the inspection request, obtain multi-source information, which includes the inspection request, the initial retrieval results of the knowledge base based on the inspection request, the parsing results of the document to be inspected, and the initial retrieval results of the document to be inspected based on the inspection request. When it is determined that a secondary retrieval of the quality inspection request is required based on the information from the multiple information sources, the target retrieval source is determined based on the information from the multiple information sources. A secondary search is performed using the target search source to obtain the quality inspection result of the quality inspection request; Output the quality inspection results.
18. An electronic device, characterized in that, include: Processor and memory; The processor is communicatively connected to the memory; The memory stores computer instructions; The processor executes computer instructions stored in the memory to implement the method as described in any one of claims 1-17.
19. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the methods described in claims 1-17.
20. A computer program product, characterized in that, It includes a computer program or instructions that, when executed by a processor, implement the method of any one of claims 1-17.