Intelligent question answering method, system and equipment based on large model and medium

By combined with the neighborhood inspection algorithm and text correlation matching algorithm in the Q & A system, combined with the sophisticated model of learning and optimization, the problem of ignoring the query question and the answer text correlation in the existing Q & A system achieved more accurate and effective Q & A match.

CN119377371AInactive Publication Date: 2025-01-28SICHUAN ENRISING INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411974934.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-01-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing question and answer system only focuses on the similarity between the query questions and the known question text, and ignores the correlation between the query questions and the answer text, making it difficult to guarantee the effectiveness and targeting of the answers.

Method used

By constructing the professional database and standard question sentences of supply chain knowledge, the Q & A data matching is used to use the near -neighboring algorithm and the text -related algorithm algorithm, generate a candidate answer set, and use a compared to learn and optimize the essence model to score the candidate answer to the text correlation. Sort, eventually generate the best answer.

Benefits of technology

Consider the similarity and correlation of text, improve the accuracy and effectiveness of Q & A matching, ensure that the answer is more in line with user needs, and improves the response ability and accuracy of the Q & A system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377371A_ABST
    Figure CN119377371A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent questioning and answering method, system and device based on a large model and a medium, and relates to the technical field of intelligent questioning and answering. Standard questions are constructed, and a similar question set and a similar answer set are generated according to the standard questions; performing question and answer data matching based on a neighbor retrieval algorithm and a text relevancy matching algorithm to generate a candidate answer set; constructing a fine arrangement model, and optimizing the fine arrangement model by using question and answer pair data; and performing scoring and sorting of text relevancy on the candidate answer set by adopting a contrastive learning optimized fine ranking model to generate an optimal answer. According to the embodiment of the invention, through the text relevancy matching algorithm considering the vocabulary similarity and similarity, the relevancy between the query question and the database text can be evaluated more accurately, the quality of candidate answer retrieval is improved, a high-quality final answer is generated, and the response capability and accuracy of a question answering system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent question answering technology, and in particular to an intelligent question answering method, system, device and medium based on a large model. Background Art

[0002] In existing question-answering systems, the quality of question-answer matching has a significant impact on the overall performance of the system. Traditional question-answering text matching methods mainly rely on similarity comparisons between query question texts and known question texts in the question-answering database to match appropriate answers. However, this method has a key limitation: it focuses too much on the similarity between query question texts and known question texts, while ignoring the relevance between query question texts and answer texts. This results in the system being unable to guarantee the effectiveness and pertinence of answers during the matching process, making it difficult to provide high-quality question-answering services.

[0003] First, text similarity is not completely equivalent to relevance. Even if two texts are very similar in vocabulary or syntactic structure, their actual meanings may be different, resulting in the retrieved answers not being able to truly answer the user's questions. Second, ignoring the relevance of text may result in the provided answers lacking effective information and failing to meet the user's actual needs. In addition, with the application of large language models (such as GPT-4, etc.), how to effectively match question-answer texts under the framework of large models has become a hot topic and difficulty in current research.

[0004] In existing research, few methods can effectively combine similarity and relevance, especially when using large models. Therefore, there is an urgent need for a new method that can fully utilize the advantages of large models and comprehensively consider the similarity and relevance of texts in question-answer matching, so as to provide more accurate and effective answers. Summary of the invention

[0005] The technical problem to be solved by the present invention is the limitation that the existing question-answering system only focuses on the similarity between the query question and the known question text but ignores the correlation between the query question and the answer text. The purpose is to provide an intelligent question-answering method, system, device and medium based on a large model, which fully considers the similarity between questions and the correlation between questions and answers, fully utilizes the advantages of the large model, and improves the accuracy and effectiveness of question-answering text matching.

[0006] The present invention is achieved through the following technical solutions: The first aspect of the present invention provides an intelligent question answering method based on a large model, comprising the following specific steps: Build a professional database of supply chain knowledge; Construct standard questions and generate similar question sets and similar answer sets based on the standard questions; Match question and answer data based on nearest neighbor retrieval algorithm and text relevance matching algorithm to generate candidate answer sets; Build a refined ranking model and use question-answer pair data to optimize the refined ranking model; A refined ranking model optimized by contrastive learning is used to score and sort the candidate answer sets by text relevance to generate the optimal answer.

[0007] Furthermore, the steps of constructing the supply chain knowledge professional database include: Obtain supply chain knowledge documents, perform semantic segmentation on the supply chain knowledge documents, and obtain document slices; Construct standard prompt sentences and input document slices into the language model to generate question-answer data pairs; Get text vectors based on document slices and question-answer data pairs; A document slice database is built based on document slices, a question-answer pair database is built based on question-answer data pairs, and a question-answer pair vector database and a document slice vector database are built based on text vectors.

[0008] Furthermore, generating a set of similar questions and a set of similar answers based on the standard question sentence includes: Design prompt sentences, input query sentences and historical question-answer pairs into the language model to generate corresponding standard questions; Based on the generated standard questions, a large language model will be used to generate multiple possible similar questions and answers to form a query question set and a query answer set.

[0009] Furthermore, the question-answer data matching based on the nearest neighbor retrieval algorithm and the text relevance matching algorithm includes: Obtaining a database type, where the database type includes a vector database and a text database; Use nearest neighbor search algorithm to match text in vector database; Use text relevance matching algorithm to perform text matching in vector database.

[0010] Furthermore, the question-answer data matching includes: Matching questions with each other: Use the questions in the query question set to search for questions in the question-answer pair database and the question-answer pair vector database to obtain the answers to the corresponding questions; Question and answer matching: Use the questions in the query question set to retrieve answers in the question-answer pair database and the question-answer pair vector database; Answer-to-answer matching: Use the answers in the query answer set to retrieve answers in the question-answer pair database and the question-answer pair vector database; Matching questions with original text: Use the answers in the query question set to retrieve the answers in the text slice database and text slice vector database.

[0011] Furthermore, the text matching in the vector database using the text relevance matching algorithm includes: Obtaining a query word, extracting the number of texts in the database and the number of texts containing the query word, and obtaining the inverse document frequency of the query word; The number of times the query word and similar words appear in the text and the average length of all texts in the database are obtained, and the relevance score between the text and the query is determined in combination with the inverse document frequency of the query word, and text matching is performed based on the relevance score.

[0012] Furthermore, the refined ranking model optimized by contrastive learning is used to score and sort the candidate answer set according to text relevance, including: Get the questions and answers from the historical question-answer data to construct positive sample pairs, and the questions and answers randomly sampled from the database to construct negative sample pairs; The loss function InfoNCE of self-supervised learning is used as the loss function of contrastive learning to maximize the correlation between positive samples and minimize the correlation between negative samples. The text vectorization model BGE based on the Transformer architecture and the reranker model are selected as the models to be optimized; Initialize the parameters, optimize the model to be optimized, and obtain the optimized refined model; Based on the optimized ranking model, the relevance of the candidate answers to the query questions and the effectiveness of the answers are considered, and the candidate answers in the candidate answer set are scored and ranked.

[0013] A second aspect of the present invention provides an intelligent question answering system based on a large model, which is applied to an intelligent question answering method based on a large model, comprising: Data storage module: used to store supply chain knowledge professional data, the professional data includes text data and vector data; Text processing module: responsible for generating standardized sentences, similar question sets and similar answer sets for input query questions; Candidate answer search module: Matches question and answer data based on nearest neighbor retrieval algorithm and text relevance matching algorithm to generate candidate answer sets; Refinement model module: uses a refinement model optimized by contrastive learning to score and rank the text relevance of the candidate answer set; Large model generation module: output the optimal answer; User interaction interface: provides an interaction channel between users and the system and displays the answers.

[0014] A third aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements an intelligent question-answering method based on a large model when executing the program.

[0015] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an intelligent question-answering method based on a large model.

[0016] Compared with the prior art, the present invention has the following advantages and beneficial effects: 1. Comprehensive consideration of text similarity and relevance: The text relevance matching algorithm proposed in the present invention not only considers the similarity between the query question and the known question text, but also fully considers the relevance between the query question and the answer text, avoiding the matching deviation caused by relying solely on vocabulary or syntactic similarity, and improving the accuracy of question-answer matching; 2. Utilize the semantic understanding advantage of the large model: By introducing the language large model, the present invention can understand natural language more deeply, process complex semantic relationships, and improve the understanding of user query intent and the quality of answer generation; 3. Optimized ranking model: The ranking model optimized by contrastive learning is used to score and rank candidate answers, fully considering the relevance and effectiveness of the answers to ensure that the selected answers are more in line with user needs; 4. Efficient answer generation mechanism: The candidate answers with higher scores after fine sorting are input into the big model for summary, and a comprehensive final answer is generated, providing users with more accurate and detailed information; 5. Strong applicability: The method and system of the present invention can be widely used in knowledge question-and-answer scenarios in multiple fields such as supply chain management and medical care, and has good scalability and practical value. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings: Figure 1 is a flow chart of an intelligent question-answering method in an embodiment of the present invention; Figure 2 Establishing a flow chart for the supply chain database in an embodiment of the present invention; Figure 3 An example format of a prompt sentence used when the language large model in an embodiment of the present invention generates a question-answer pair; Figure 4An example format of a prompt sentence for a historical question-answer pair of a language macro model in an embodiment of the present invention; Figure 5 is a flow chart of a text matching method in an embodiment of the present invention; Figure 6 This is a flow chart of the comparison learning optimization of the refined sorting model in an embodiment of the present invention; Figure 7 This is an intelligent question-answering system in an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0019] As a possible implementation, Figure 1 As shown, this embodiment provides an intelligent question-answering method based on a large model, including the following specific steps: constructing a professional database of supply chain knowledge; constructing a standard question sentence, generating a set of similar questions and a set of similar answers based on the standard question sentence; matching question-answering data based on a nearest neighbor retrieval algorithm and a text relevance matching algorithm to generate a candidate answer set; constructing a refined ranking model, using question-answer pair data to optimize the refined ranking model; using a refined ranking model optimized by contrastive learning to score and sort the candidate answer set by text relevance, and generate the best answer. This embodiment forms a complete and efficient intelligent question-answering solution through the construction of a professional database of supply chain knowledge, a text preprocessing process, a candidate answer retrieval mechanism, the optimization and application of a refined ranking model, and a large model answer generation process. Through a text relevance matching algorithm that takes into account vocabulary identity and similarity, it can more accurately evaluate the relevance between the query question and the database text, improve the quality of candidate answer retrieval, use question-answer pair data to construct positive and negative sample pairs, use the InfoNCE loss function for contrastive learning, and optimize the parameters of the refined ranking model, so that it can more effectively consider the relevance and effectiveness of the answer when sorting the candidate answers. The candidate answers with higher scores after careful sorting are input into the large model for semantic understanding and comprehensive analysis to generate high-quality final answers, thereby improving the responsiveness and accuracy of the question-answering system.

[0020] In some possible implementations, such as Figure 2As shown in the figure, the supply chain knowledge document includes professional terms, laws and regulations, rules and regulations, etc. The document containing the supply chain knowledge is semantically segmented by length to form document slices. The document slice is a certain length of text with similar semantics in the document. A special prompt sentence is designed so that the language model can generate corresponding question-answer text data based on the text slice. A document slice database, a document question-answer pair database, a document slice vector database, and a document question-answer pair vector database are established based on document slices and question-answer text data, respectively, totaling 4 databases, 2 text databases, and 2 vector databases. The steps for constructing the supply chain knowledge professional database include: obtaining supply chain knowledge documents, semantically segmenting the supply chain knowledge documents, and obtaining document slices; constructing standard prompt sentences, and inputting document slices into the language model to generate question-answer data pairs; obtaining text vectors based on document slices and question-answer data pairs; constructing a document slice database based on document slices, a question-answer pair database based on question-answer data pairs, and a question-answer pair vector database and a document slice vector database based on text vectors.

[0021] In some possible implementations, the vector database uses the Fasis database that can support multiple vector searches.

[0022] In some possible implementations, the BGE-V2 model is used to vectorize text data during the process of establishing a vector database, and the input text is converted into a fixed-length dense vector.

[0023] In some possible implementations, the segmentation length of the document is set to 600 words, and the repeated length of adjacent document segments is set to 200 words. The set word count is adjustable. The example format of the prompt sentence used when the language model generates a question-answer pair is as follows: Figure 3 As shown in the figure, the prompt sentence used by the language model to generate question-answer pairs is: You are a robot that can generate QA pairs based on the text content provided. Here are your task requirements: Generate as many QA pairs as possible, where a QA pair is a question and answer pair. Each QA pair contains a question and a detailed and valuable answer; In the question, write the subject directly and do not use pronouns; Answers must be in simplified Chinese; The generated QA pairs cannot be repeated; Use json format to wrap the QA pair, with the question represented by "question" and the answer by "answer".

[0024] For example, generate the following question-answer data pairs: {"question":"What business scope does the procurement management business process involve?","answer":"The business scope involved in the procurement management business process includes the procurement of materials, services and projects that require written contracts, as well as related supplier and quality management. Specifically, it includes centralized procurement of engineering materials, procurement of single engineering materials, procurement of projects and services, procurement of sporadic fixed assets, procurement of cost-based expenditure materials, etc."}; {"question":"What are the main steps in the procurement business process?","answer":"The procurement business process mainly includes compiling centralized procurement catalogs and plans, clarifying centralized procurement needs, submitting procurement applications, determining procurement plans, organizing procurement bidding, comparison, negotiation or inquiry, determining procurement results, approving and signing framework agreements or procurement contracts, and supervising the implementation of framework agreements or procurement contracts."}; Among them, question means asking a question and answer means answering.

[0025] In some possible implementations, generating a set of similar questions and a set of similar answers based on a standard question includes: first designing a prompt sentence, and then inputting the query question and the historical question-answer pair text into a language macro model to generate a corresponding standard question. The standard question can more accurately represent the core semantics of the query question, which helps to unify the subsequent retrieval and matching. Based on the generated standard question, a large language model is used to generate multiple possible similar questions and answers to form a query question set and a query answer set. This process is intended to expand the search scope and cover as many semantic expressions and potential answers related to the query question as possible. Figure 4 As shown, the prompt sentence used at this time is: You are an artificial intelligence assistant. Please rewrite the input query question in a standardized way based on the historical question and answer data. The requirements are as follows: Keep the subject in the input query question and do not use pronouns. Rewrite the colloquial expression in a standardized way.

[0026] In some possible implementations, such as Figure 5 As shown, matching text in the database involves matching questions with questions, questions with answers, answers with answers, and questions with original text in document slices. Specific text matching methods include using a nearest neighbor retrieval algorithm in a vector database and a text relevance matching algorithm in a text database.

[0027] a) Question-to-question matching: Use the questions in the query question set to search for questions in the question-answer pair database and the question-answer pair vector database to obtain the answers to the corresponding questions; b) Question and answer matching: Use the questions in the query question set to retrieve answers in the question-answer pair database and the question-answer pair vector database; c) Answer-to-answer matching: Use the answers in the query answer set to retrieve the answers in the question-answer pair database and the question-answer pair vector database; d) Matching questions with original text: Use the answers in the query question set to retrieve the answers in the text slice database and text slice vector database.

[0028] The simultaneous application of the semantic vector nearest neighbor retrieval algorithm and the text relevance matching algorithm can ensure the semantic relevance and lexical relevance of the results, so as to ensure that the most relevant and informative answers can be found and added to the candidate answer set.

[0029] The Faiss database contains various semantic vector nearest neighbor retrieval algorithms and can support semantic vector nearest neighbor retrieval.

[0030] The text relevance matching algorithm designed in this embodiment not only considers the same vocabulary factor but also fully considers the vocabulary similarity factor, so that it can better evaluate the relevance between input texts. The text relevance matching algorithm is as follows: ; Corr(A,Q) is text A With query Q The relevance score of ω i Yes Query Q The i words, s ( ω i ,A) Yes word ω i and similar words in the text A The number of times it appears in IDF(ω i ) Yes word ω i The inverse document frequency of is text A length, avgdl is the average length of all texts in the database, k 1 and b is an adjustable parameter, usually k 1 Between 1.2 and 2, b Usually set to 0.75, where , N is the number of texts in the database, n(ω i ) Contains words ω i The number of texts, n It is a documentA The total number of words in ω i In i ∈(1, n ).

[0031] Finally, the answers that match the data in different databases are summarized to generate a candidate answer set.

[0032] In some possible implementations, such as Figure 6 As shown in the figure, the candidate answers in the candidate answer set are scored and ranked using a refined ranking model optimized by contrastive learning. The refined ranking model fully considers the relevance of the candidate answers to the query question and the effectiveness of the answers to ensure that the best answers are selected. Through contrastive learning optimization, the refined ranking model can better distinguish the pros and cons of answers.

[0033] The method of using question-answer pair data to optimize the refined ranking model is as follows: First, we use the questions and answers in the existing question-answer data to construct positive sample pairs, and the questions and answers randomly sampled from the database to construct negative sample pairs; Secondly, InfoNCE is used as the loss function of contrastive learning to maximize the correlation between positive samples and minimize the correlation between negative samples. InfoNCE (Information Noise Contrastive Estimation) is a loss function used for contrastive learning and is widely used in self-supervised learning tasks. Again, the reranker model of the text vectorization model BGE (Bilingual General Embedding) based on the Transformer architecture is selected as the model to be optimized. The Reranker model is a model used to rerank retrieval results in a large-scale retrieval system. It is usually used to fine-tune the results after the preliminary retrieval. The Reranker model can be based on different architectures, one of the popular ones is the Transformer, especially the BERT (Bidirectional Encoder Representations from Transformers) model and its variants; Finally, after setting the training rounds, batch size, learning rate and temperature parameters, we start optimizing the model. We use the model optimized by contrastive learning to re-evaluate the text relevance of the candidate answers retrieved; The top answers with the highest scores after careful sorting are input into the language model to generate the answer summary. The model will strictly conduct a comprehensive analysis based on these candidate answers and generate the final summary answer, thus providing users with the best answer.

[0034] As a possible implementation, Figure 7 As shown, this embodiment provides an intelligent question answering system based on a large model, including: Data storage module: used to store supply chain knowledge professional data, the professional data includes text data and vector data; Text processing module: responsible for generating standardized sentences, similar question sets and similar answer sets for input query questions; Candidate answer search module: Matches question and answer data based on nearest neighbor retrieval algorithm and text relevance matching algorithm to generate candidate answer sets; Refinement model module: uses a refinement model optimized by contrastive learning to score and rank the text relevance of the candidate answer set; Large model generation module: output the optimal answer; User interaction interface: provides an interaction channel between users and the system and displays the answers.

[0035] As a possible implementation, this embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, an intelligent question-answering method based on a large model is implemented.

[0036] As a possible implementation, this embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, an intelligent question-answering method based on a large model is implemented.

[0037] As a possible implementation method, this embodiment provides a specific question-and-answer method: User query: "What are the main contents of the centralized procurement plan?".

[0038] Step 1: The query question input by the user is "What are the main contents of the centralized procurement plan?". After the query question is standardized using the language big model, the standard query question "What are the main contents of the centralized procurement plan?" is obtained.

[0039] Step 2: Generate similar questions and answers for the standardized sentences to obtain a query question set and a query answer set.

[0040] Query question set: 1. “What are the main steps of a centralized purchasing strategy?”; 2. “What does a centralized procurement plan usually include?”; 3. “How to formulate the content of the centralized procurement plan?”.

[0041] Query answer: 1. "Typically, centralized procurement planning includes major steps such as aggregating procurement needs, conducting market research, negotiating with suppliers, signing contracts, and monitoring execution."

[0042] Step 3: Use the query question set to query the answer to find relevant text in the two categories and four databases to obtain a set of candidate answers.

[0043] A set of candidate answers, including: 1. "Centralized procurement plans usually involve key links such as procurement demand aggregation, market research, supplier negotiation, contract signing and execution monitoring."; 2. "The centralized procurement plan includes demand analysis, supplier evaluation, bidding and quotation inquiry, contract management and the design of procurement execution process."; 3. "The main contents of the centralized procurement plan include supplier selection, procurement category determination, procurement price negotiation and contract management."

[0044] Step 4: Use the contrastive learning optimized ranking model to score and rank the candidate answers.

[0045] Answer 1: "The main contents of the centralized procurement plan include supplier selection, procurement category determination, procurement price negotiation and contract management." (Score: 0.94); Answer 2: "Centralized procurement plans usually involve key links such as procurement demand aggregation, market research, supplier negotiation, contract signing and execution monitoring." (Score: 0.90); Answer 3: "The centralized procurement plan includes demand analysis, supplier evaluation, bidding and inquiry, contract management and the design of procurement execution process." (Score: 0.85).

[0046] Step 5: Summarize the candidate answers with high relevance and input the two candidate answers with the highest scores into the big model. The final answer is generated through the semantic analysis and generation mechanism of the big model.

[0047] Final answer: "The main contents of the centralized procurement plan include the following aspects: 1) Supplier selection: Identifying suitable suppliers is a key step in centralized procurement; 2) Determination of procurement categories: Classifying procurement materials and formulating corresponding procurement strategies; 3) Procurement price negotiation: Negotiating prices with suppliers to ensure effective control of procurement costs; 4) Contract management: Formulating procurement contracts and conducting subsequent management to ensure the smooth execution of the procurement process."

[0048] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. An intelligent question answering method based on a large model, characterized in that: The specific steps include: Build a professional database of supply chain knowledge; Construct standard questions and generate similar question sets and similar answer sets based on the standard questions; Match question and answer data based on nearest neighbor retrieval algorithm and text relevance matching algorithm to generate candidate answer sets; Build a refined ranking model and use question-answering data to optimize the refined ranking model; A refined ranking model optimized by contrastive learning is used to score and sort the candidate answer sets by text relevance to generate the optimal answer.

2. The intelligent question-answering method based on a large model according to claim 1, characterized in that: The steps of constructing the supply chain knowledge professional database include: Obtain supply chain knowledge documents, perform semantic segmentation on the supply chain knowledge documents, and obtain document slices; Construct standard prompt sentences and input document slices into the language model to generate question-answer data pairs; Get text vectors based on document slices and question-answer data pairs; A document slice database is built based on document slices, a question-answer pair database is built based on question-answer data pairs, and a question-answer pair vector database and a document slice vector database are built based on text vectors.

3. The intelligent question-answering method based on a large model according to claim 1, characterized in that: The generating of a similar question set and a similar answer set according to the standard question sentence includes: Design prompt sentences, input query sentences and historical question-answer pairs into the language model to generate corresponding standard questions; Based on the generated standard questions, a large language model will be used to generate multiple possible similar questions and answers to form a query question set and a query answer set.

4. The intelligent question-answering method based on a large model according to claim 2, characterized in that: The question-answer data matching based on the nearest neighbor retrieval algorithm and the text relevance matching algorithm includes: Obtaining a database type, where the database type includes a vector database and a text database; Use nearest neighbor search algorithm to match text in vector database; Use text relevance matching algorithm to perform text matching in vector database.

5. The intelligent question-answering method based on a large model according to claim 4, characterized in that: The question-answer data matching includes: Matching questions with each other: Use the questions in the query question set to search for questions in the question-answer pair database and the question-answer pair vector database to obtain the answers to the corresponding questions; Question and answer matching: Use the questions in the query question set to retrieve answers in the question-answer pair database and the question-answer pair vector database; Answer-to-answer matching: Use the answers in the query answer set to retrieve answers in the question-answer pair database and the question-answer pair vector database; Matching questions with original text: Use the answers in the query question set to retrieve the answers in the text slice database and text slice vector database.

6. The intelligent question-answering method based on a large model according to claim 4, characterized in that: The method of using a text relevance matching algorithm to perform text matching in a vector database includes: Obtaining a query word, extracting the number of texts in the database and the number of texts containing the query word, and obtaining the inverse document frequency of the query word; The number of times the query word and similar words appear in the text and the average length of all texts in the database are obtained, and the relevance score between the text and the query is determined in combination with the inverse document frequency of the query word, and text matching is performed based on the relevance score.

7. The intelligent question answering method based on a large model according to claim 1, characterized in that: The refined ranking model optimized by contrastive learning is used to score and sort the candidate answer sets by text relevance, including: Get the questions and answers from the historical question-answer data to construct positive sample pairs, and the questions and answers randomly sampled from the database to construct negative sample pairs; The loss function InfoNCE of self-supervised learning is used as the loss function of contrastive learning to maximize the correlation between positive samples and minimize the correlation between negative samples. The text vectorization model BGE based on the Transformer architecture and the reranker model are selected as the models to be optimized; Initialize the parameters, optimize the model to be optimized, and obtain the optimized refined model; Based on the optimized ranking model, the relevance of the candidate answers to the query questions and the effectiveness of the answers are considered, and the candidate answers in the candidate answer set are scored and ranked.

8. An intelligent question answering system based on a large model, applied to the intelligent question answering method based on a large model according to any one of claims 1 to 7, characterized in that: include: Data storage module: used to store supply chain knowledge professional data, the professional data includes text data and vector data; Text processing module: responsible for generating standardized sentences, similar question sets and similar answer sets for input query questions; Candidate answer search module: Matches question and answer data based on nearest neighbor retrieval algorithm and text relevance matching algorithm to generate candidate answer sets; Refinement model module: uses a refinement model optimized by contrastive learning to score and rank the text relevance of the candidate answer set; Large model generation module: output the optimal answer; User interaction interface: provides an interaction channel between users and the system and displays the answers.

9. An electronic device 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 program, the large model-based intelligent question-answering method as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the large model-based intelligent question-answering method as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Water affair industry knowledge question-answering system implementation method and system based on large language model

    CN118193711A

  • Natural semantic database comprehensive construction method capable of ensuring credibility and security

    CN118296125A

  • Dam emergency response rule question and answer recommendation system construction method based on large language model

    CN118332076A

  • Information technology consultation system and device

    CN118364051A

  • Generation method for improving emergency knowledge question answering accuracy of large model

    CN119025643A

Cited By

  • Intelligent question and answer processing method and device for old people, storage medium and computer equipment

    CN119739836A

  • Activity assessment method for factual knowledge question, product, equipment and medium

    CN120180060A

  • E-commerce vertical domain database construction method and related device

    CN120216655A

  • Automatic news classification method and system based on large model, terminal and medium

    CN120492626A