Bidding field question and answer method and system based on retrieval enhancement generation architecture

Through the method of retrieval enhancement generation architecture, a Q&A system in the bidding field is constructed and fine-tuned, which solves the problems of irregular user problem expression, incomplete coverage of Q&A knowledge and low answer generation quality in the existing system, achieving more efficient and professional Q&A ability.

CN119441446AInactive Publication Date: 2025-02-14HUNAN XIANGNENG VENTURE TENDERING AGENCY CO LTD

Patent Information

Application Number
CN202510048609.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-02-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing Q&A system in the bidding field has problems such as irregular user problem expression, incomplete coverage of Q&A knowledge, and low quality of answer generation.

Method used

Using a method based on search enhancement generation architecture, we collect and construct bidding data sets, and use the text embedding model to vectorize and store the sharded text vectors to achieve efficient retrieval. Then, use the question data and related file content to fill the general answering speech template, generate question-and-answer data, and use it to fine-tune the large language model base to improve the model's understanding and answering ability in the bidding field.

Benefits of technology

It improves the accuracy and professionalism of the Q&A system, enhances the ability to answer complex questions, solves the problems of irregular user problem expression and incomplete coverage of Q&A knowledge, and significantly improves the quality of Q&A generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441446A_ABST
    Figure CN119441446A_ABST
Patent Text Reader

Abstract

The invention discloses a tendering and bidding field question-answering method and system based on a retrieval enhancement generation architecture, and relates to the technical field of tendering and bidding. According to the method, a tendering and bidding data set is collected and constructed, and fragment texts are vectorized and stored in a vector database through an embedded model; therefore, efficient retrieval of related information can be realized according to similarity retrieval. When a user asks a question, the system retrieves relative content according to the similarity and fills the content into a standardized verbal skill template to ensure the accuracy and specialty of question and answer, and then a large language model base is finely adjusted through question and answer pair data, so that the model has higher understanding and answering ability in the field. Compared with a question answering system based on deep learning, the accuracy and the breadth are greatly improved, and the professionality of system answering is ensured. According to the method, the problems of non-standard user question expression, incomplete question and answer knowledge coverage and low question and answer generation quality of a question and answer method in the bidding and tendering field are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of bidding technology, and in particular to a bidding field question answering method and system based on a retrieval enhanced generation architecture. Background Art

[0002] With the rapid development of information technology and the continuous advancement of economic globalization, bidding activities have become the main transaction method in the fields of government procurement, engineering construction, etc., and the demand for consulting is growing. At present, in bidding activities, due to the involvement of laws and regulations, professional knowledge and practical experience, all parties involved often need to consult related issues. However, traditional bidding consultation is difficult to effectively meet the needs of enterprises and governments for rapid query and analysis of a large amount of bidding information. It is mainly achieved through the following methods: Method 1: Self-study by consulting relevant laws, regulations, rules and regulations, professional books and other materials on bidding. Although this method is low-cost, since bidding involves highly professional knowledge, ordinary users often find it difficult to accurately understand and apply this professional knowledge, which can easily lead to misunderstandings. In addition, untimely updating of materials will also affect the consulting effect.

[0003] Method 2: Manual consultation through professionals such as bidding agencies and professional consulting agencies. Although this method can obtain relatively accurate professional advice, it has the following defects: first, the number of professionals is limited and the user consultation demand is large, resulting in untimely response; second, the cost of manual consultation is high, which increases the burden on users; third, the quality of manual answers depends on the individual's professional level and may vary.

[0004] In response to the above problems, with the development of artificial intelligence technology, some institutions in other fields have developed question-answering systems based on deep learning. Such systems usually adopt the following technical solutions: first, establish a vertical field knowledge graph and store the relevant document content in a structured manner; then use the deep learning model to understand the semantics of the questions input by the user; finally, retrieve relevant content based on the knowledge graph and return the answer.

[0005] However, the existing deep learning-based question-answering systems still have the following technical problems: 1. The user's question expression is not standardized, resulting in low answer accuracy. Due to the lack of professional knowledge, users often have unclear expressions, missing information, improper use of professional terms, etc. when describing bidding issues, which affects the accuracy of the system's understanding of the problem. 2. The knowledge coverage of question and answer is incomplete. The existing system mainly builds a knowledge base based on public bidding regulations and cases, but special circumstances and new problems in practice are difficult to collect and update in a timely manner, resulting in a limited scope of question and answer. 3. The quality of answer generation is not high. The system often directly calls the retrieved knowledge fragments as answers, lacks comprehensive analysis and professional reasoning of multiple knowledge points, and it is difficult to give accurate and complete answers to complex problems.

[0006] Therefore, the existing question-and-answer methods in the bidding and tendering field have problems such as non-standard expression of user questions, incomplete coverage of question-and-answer knowledge, and low quality of question-and-answer generation. Summary of the invention

[0007] In view of this, the purpose of the present invention is to provide a question-answering method and system in the bidding field based on a retrieval enhanced generation architecture, aiming to solve the problems in the prior art of question-answering methods in the bidding field, such as non-standard expression of user questions, incomplete coverage of question-answering knowledge, and low quality of question-answering generation.

[0008] On one hand, the present invention proposes a bidding field question answering method based on a retrieval enhancement generation architecture, the method comprising: Collect relevant legal and regulatory documents and clause documents, standard questions, and answer scripts in the bidding field to form document data sets, question data sets, and general question and answer script templates; The bidding document content in the file data set is segmented according to the file type, so as to vectorize the segmented bidding document content, and then store the vectorized bidding document content in the vector database; Obtain user question data from the question data set, and vectorize the user question data to calculate similarity with the content in the vector database, retrieve multiple related file contents that are greater than a preset similarity threshold, use the question data and multiple related file contents to fill in a general answer script template, and obtain corresponding question-answer pair data; The question-answer pair data is used as fine-tuning corpus to fine-tune the preset large language model base to obtain a large model of question-answering in the bidding field, and the context information related to the bidding questions actively uploaded by users is obtained and updated into the vector database to obtain the final target large model of question-answering in the bidding field; Obtain users' relevant questions in the bidding field, use the target bidding field question and answer model to generate the corresponding question and answer data and push it to users.

[0009] Furthermore, in the above-mentioned bidding field question answering method based on retrieval enhancement generation architecture, the step of segmenting the bidding document content in the file data set according to the file type includes: When the bidding documents are legal documents, they should be divided into sections or clauses to ensure the integrity of the legal provisions; When the bidding documents are bidding notices and qualification requirements, they are divided into sections by item number to ensure the independence of the contents; When the bidding document is a tender document, it is divided into sections according to the content of the chapters to ensure the logic and semantics of the content are clear.

[0010] Furthermore, in the above-mentioned bidding field question answering method based on the retrieval enhancement generation architecture, the step of vectorizing the content of the bidding document after segmentation and then storing the vectorized content of the bidding document in the vector database comprises: The text embedding model is used to vectorize the content of the bidding documents after segmentation. The expression of vectorization is: ; in, T For text snippets, f is a text embedding model, V d is the generated vector representation, d Represents the dimension of the vector; The vectorized content of the bidding documents is stored in the vector database in the form of triples, where the triples include text vectors, file identifiers, and location indexes.

[0011] Furthermore, in the above-mentioned bidding and tendering field question answering method based on retrieval enhancement generation architecture, the similarity calculation formula is: ; in, is the text fragment vector in the vector database, A vector of user question data.

[0012] Furthermore, in the above-mentioned bidding and tendering field question-answering method based on retrieval enhancement generation architecture, the step of using question data and multiple related file contents to fill in a general answer script template to obtain corresponding question-answer pair data includes: Directly display the user's question content, and quote the key information of multiple related file contents according to the similarity, format the key information, and get the answer content; The filled answer content and the user's question data are recorded in a preset format to form a complete question-answer pair, where the preset recording format is ,in Ask data for users, The filled answer content.

[0013] Furthermore, in the above-mentioned bidding and tendering field question answering method based on retrieval enhancement generation architecture, the step of using the question and answer pair data as fine-tuning corpus to fine-tune the preset large language model base to obtain the bidding and tendering field question answering large model includes: Add a bypass structure consisting of two weight matrices multiplied together in the network of the large language model base; The preset large language model base is trained using question-answer pair data to update the parameters of the weight matrix of the bypass structure to obtain a large question-answer model in the bidding field.

[0014] Furthermore, the above-mentioned bidding and tendering field question answering method based on the retrieval enhancement generation architecture, wherein the method also includes: Obtain user feedback content and adjust the preset similarity threshold based on the user feedback content.

[0015] Another object of the present invention is to provide a bidding and tendering field question answering system based on a retrieval enhancement generation architecture, the system comprising: The acquisition module is used to collect relevant legal and regulatory documents and clause documents, standard questions, and answer scripts in the bidding field, and form a document data set, a question data set, and a general question and answer script template respectively; The vector module is used to segment the bidding document content in the file data set according to the file type, so as to vectorize the segmented bidding document content, and then store the vectorized bidding document content in the vector database; A calculation module is used to obtain user question data in the question data set, and vectorize the user question data to calculate the similarity with the content in the vector database, retrieve multiple related file contents that are greater than a preset similarity threshold, and use the question data and multiple related file contents to fill in the general answer script template to obtain corresponding question-answer pair data; A fine-tuning module is used to use the question-answer pair data as fine-tuning corpus to fine-tune the preset large language model base to obtain a large model of question-answering in the bidding field, obtain the context information related to the bidding questions actively uploaded by the user, and update it into the vector database to obtain the final target large model of question-answering in the bidding field; The push module is used to obtain users' relevant questions in the bidding field, generate corresponding question and answer data using the target bidding field question and answer big model, and push it to users.

[0016] Another object of the present invention is to provide a readable storage medium having a computer program stored thereon, wherein the program implements the steps of the above method when executed by a processor.

[0017] Another object of the present invention is to provide an electronic device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above method when executing the program.

[0018] The present invention collects and constructs a bidding data set, and uses an embedded model to vectorize and store the segmented text into a vector database, so that efficient retrieval of relevant information can be achieved based on similarity retrieval. When a user asks a question, the system retrieves the more relevant content based on similarity, and fills it into a standardized speech template to ensure the accuracy and professionalism of the question and answer. Subsequently, the large language model base is fine-tuned through the question and answer data, so that the model has a stronger understanding and answering ability in this field. Compared with the question and answer system based on deep learning, the accuracy and breadth have been greatly improved, ensuring the professionalism of the system's answers. It solves the problems of the non-standard expression of user questions and the incomplete coverage of question and answer knowledge in the bidding field in the prior art, which leads to low quality of question and answer generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is an overall architecture diagram of a bidding and tendering field question answering method based on a retrieval enhancement generation architecture in one embodiment of the present invention; Figure 2 It is a flowchart of the bidding and tendering field question answering method based on the retrieval enhancement generation architecture in the first embodiment of the present invention; Figure 3 This is an example diagram of a question and answer in a bidding and tendering field question and answer method based on a retrieval enhancement generation architecture in one embodiment of the present invention; Figure 4 This is a structural block diagram of a bidding and tendering field question and answer system based on a retrieval enhanced generation architecture in the third embodiment of the present invention.

[0020] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0021] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.

[0022] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.

[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0024] See also Figure 1 The figure shows the overall architecture of the bidding and tendering field question answering method based on the retrieval enhancement generation architecture proposed in one embodiment of the present invention. The following embodiments can be applied to Figure 1 The overall architecture shown in FIG. 1 includes a data collection module, a text vector module, a retrieval question-answer pair generation module, a domain large model fine-tuning module, and an iterative optimization module, wherein: The data collection module is used to collect file data, question data and speech templates in the bidding field to obtain relevant bidding field data sets. The text vector module is used to first perform text segmentation on the data that needs to be vectorized in the bidding field data set and then use the text embedding model to vectorize it to establish a vector database. The retrieval question and answer pair generation module is used to retrieve retrieval content related to the question from the vector database to fill in the general answer speech template to obtain multiple question and answer pair data. The question and answer pair data is used to input into the domain big model fine-tuning module to fine-tune the current bidding field big model to obtain the final bidding field big model. The iterative optimization module can update the vector database according to the user's relevant contextual information in the bidding field, and regularly readjust the bidding field big model, so that the model has professionalism in the bidding field.

[0025] It should be pointed out that Figure 1 The structure shown does not constitute a limitation on the overall architecture of the question-answering method in the bidding field based on the retrieval-enhanced generation architecture. In other embodiments, the overall architecture of the question-answering method in the bidding field based on the retrieval-enhanced generation architecture may include fewer or more components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0026] The following will explain in detail how to improve the quality of question and answer generation in the bidding field in combination with specific embodiments and drawings.

[0027] Embodiment 1 See also Figure 2 , shown is a question-answering method in the bidding and tendering field based on a retrieval enhanced generation architecture in the first embodiment of the present invention, and the method includes steps S10 to S12.

[0028] Step S10, collect relevant legal and regulatory documents and clause documents, standard questions, and answer scripts in the bidding field to form a document data set, a question data set, and a general question and answer script template.

[0029] Among them, the scenario targeted by the example of the present invention is the question-and-answer scenario in the bidding field. Since the accuracy of questions and answers in bidding is largely affected by the quality of the corpus, comprehensive industry data is collected and organized from multiple dimensions to improve the accuracy, completeness and standardization of the model's answers.

[0030] Specifically, the first step is to collect the document knowledge referenced by the model, mainly including relevant legal and regulatory documents and clause documents. Among them, relevant legal and regulatory documents can be obtained from authoritative sources, including relevant legal and regulatory documents, policy documents and various bidding and tendering documents in the bidding field. These documents include but are not limited to the "Bidding Law", "Regulations for the Implementation of the Bidding Law" and related guiding documents. The content of the document must cover the bidding process, qualification review, legal liability, contract terms, etc., to ensure the authority and comprehensiveness of the data source to meet the consulting needs of users in different situations. Then, by collecting key terms in bidding, such as contract terms, legal terms and bidding terms, a set of clause documents is obtained. These clause documents provide basic corpus for common questions, enabling the model to quote standard terms when answering, thereby improving the accuracy and standardization of the answers.

[0031] Next is the collection of standard questions. Common questions from users in the bidding field need to be sorted and classified to form a standard question data set. Common questions can be screened and sorted out through historical consultation records, frequently asked questions resources and other sources, including project qualifications, bidding processes, contract requirements, etc.

[0032] The last step is to collect and create answer scripts. Specifically, the answer script templates are designed based on the answer logic of specific questions in the bidding industry. The general answer template must include a general opening and closing statement, and ensure the structure and professionalism of the answer. For example, the template for qualification requirement questions can include references to the terms of the qualification requirements and policy explanations, etc., to ensure that the answer is accurate and rigorous.

[0033] Exemplarily, the following are general question and answer script templates collected by the embodiments of the present invention and applicable to the bidding field.

[0034] Template 1: Question and answer template for bidding qualifications and qualification requirements: Question: What are the qualification requirements for bidding on [project name]? Answer template: Beginning: Thank you for your question! Regarding the bidding qualifications and qualification requirements for [project name], please refer to the following.

[0035] Subject: According to the Bidding Law and relevant regulations, bidders should meet the following qualifications: Condition 1: Specific qualification requirements (e.g. "business license and relevant industry qualification certificates"); Condition 2: Technical ability or experience requirements (e.g. "Completed at least X similar projects in the past three years"); Condition 3: Financial requirements (e.g. "having good financial status and providing the financial report for the most recent year"); Condition 4: Other supplementary requirements (e.g. “project managers must have relevant professional qualifications”); Conclusion: If further confirmation is required, it is recommended to check the corresponding chapter in the bidding documents or contact the tenderer for detailed information.

[0036] Step S11, segmenting the bidding document content in the file data set according to the file type, so as to vectorize the segmented bidding document content, and then store the vectorized bidding document content in the vector database.

[0037] Among them, in order to achieve efficient retrieval and semantic understanding of text content in the bidding field, the collected bidding data needs to be vectorized through a text embedding model, and the vectorized content needs to be stored in a vector database.

[0038] Specifically, in the sharding rule setting part, the content of the bidding documents is sharded by file type. The general sharding rules can be split according to the natural paragraphs, chapters or clauses of the file content, and the length of each piece is controlled between 100 and 300 words to ensure the accuracy and efficiency of the retrieval. Different sharding rules are set for different types of files. The sharding rules ensure that the text fragments are relatively independent in semantics, so that the subsequent embedding model can accurately capture the main information of each fragment. For example: when facing legal and regulatory documents, shard by natural paragraphs or clauses to ensure the integrity of the law; when facing tender notices and qualification requirements, shard by item number to ensure content independence; when facing bidding documents, shard according to chapter content to ensure the logic and semantics of the content are clear.

[0039] In the vectorization processing part, the text fragments are converted into high-dimensional vectors through the text embedding model, so that the content represents semantic information in the vector space to support similarity retrieval at the semantic level. Specifically, an embedding model suitable for processing Chinese semantics (such as text2vec or BERT-based embedding model) is selected, and the output of the embedding model is a multi-dimensional vector.

[0040] Given a text snippet T , through the embedding model f , generating a vector representation V ,Right now: ; in, d The dimension of the representation vector is usually determined by the model selection and can be set to 128, 256 or higher.

[0041] Then for each segmented text segment , through the embedding model , generating the vector ,For all text fragments, the generated vector representations are stored for subsequent similarity calculation and retrieval.

[0042] In the vector database storage part, the embodiment of the present invention uses the vector database to efficiently store and retrieve text vectors, and realizes fast retrieval based on vector similarity. Exemplarily, a database supporting efficient vector retrieval, such as Milvus, is used to store the generated vector data in the database.

[0043] A single vector data record is defined as a triple, which contains the following information: Text Vector : High-dimensional vector representation of text fragments; File Identification : The corresponding source file identifier, such as file name or ID; Position Index : The position of the fragment in the source document (such as chapter number, clause number, etc.).

[0044] in, As the vector primary key for similarity retrieval, and Used for traceability and reference when generating subsequent answers.

[0045] Step S12, obtain the user question data in the question data set, and vectorize the user question data to calculate the similarity with the content in the vector database, retrieve multiple related file contents greater than a preset similarity threshold, use the question data and multiple related file contents to fill in the general answer script template, and obtain the corresponding question and answer pair data.

[0046] First, the user's question data is vectorized, and the user's question content is converted into a vector representation so that semantically similar text fragments can be retrieved in the vector database. , using text embedding models Vectorize it to get the question vector .

[0047] Then, based on the similarity-based content retrieval, the content with the most semantic similarity to the user's question is retrieved from the vector database to form the candidate text for the answer. In the embodiment of the present invention, cosine similarity is used to measure the similarity between the text segment and the user's question. Given the vector representation of the user input , retrieve the top-K vector segments in the database that are most similar to the cosine. The following is the specific similarity calculation formula: ; By calculating the vector of each text segment Vector with user questions The similarity result is compared with the preset similarity threshold Compare and select the top-K segments larger than the threshold to get the list of text segments with the highest relevance, for example, get the list of text segments .

[0048] In the general answer template filling section, select the appropriate general answer template according to the type of user's question (such as bidding scope, qualification requirements, bidding time, etc.). Each type corresponds to a different answer structure and content presentation.

[0049] Ask user questions and Top-K text snippet lists Fill in the template. The template filling methods include: Question guidance part: directly display the user's question content. Content reference: cite the key information in the Top-K fragments according to the similarity, usually using the first few search results, and display them by clause or item number to improve the standardization and accuracy of the reference. Formatted output: format the key information in the answer content (such as the terms of the bidding documents), such as bold, numbering or dividing into paragraphs.

[0050] The generated answers and user questions are combined into a complete question-answer pair and recorded in the system for subsequent fine-tuning of the large model. The format of each set of data is ,in Ask questions for users, The filled answer content.

[0051] Step S13, using the question-answer pair data as fine-tuning corpus to fine-tune the preset large language model base to obtain a large model of question-answering in the bidding field, obtaining contextual information related to the bidding questions actively uploaded by users and updating it into the vector database to obtain the final target large model of question-answering in the bidding field.

[0052] In the fine-tuning data preparation part, the generated question-answer pair data is used ,in, Indicates that the user asked a question. Represents the answer content generated based on vector retrieval. This question-answer dataset covers the main questions and standard answers in the field of bidding and tendering, and has strong field-specificity. In the embodiment of the present invention, the Qwen series model Qwen-7B-Chat is used as the base. Qwen-7B-Chat is a model version specially optimized for chat scenarios in the Alibaba Cloud Tongyi Qianwen large model series, and its parameter scale reaches 7 billion. The model is built based on the Transformer architecture and trained on a super-large-scale pre-training dataset with diverse data types, including online text, professional books, codes, etc., with strong versatility and specificity. The LoRA (Low-Rank Adaptation) fine-tuning method is used to fine-tune the model. The goal of fine-tuning is to enable the model to understand the semantics and generate appropriate answers when facing questions in the field of bidding and tendering.

[0053] Specifically, LoRA (Low-Rank Adaptation) fine-tuning is an efficient fine-tuning technique for large-scale pre-trained language models. Its main goal is to reduce the number of training parameters by introducing low-rank matrices, thereby reducing computational and storage costs.

[0054] The specific approach is to add a bypass structure in the network. This bypass is the multiplication of two matrices A and B. When fine-tuning the large model, the model's weight matrix will be divided into two parts: ; in, is the weight matrix of the pre-trained model, It is the gradient update accumulated during the adaptation process, that is, the additional low-rank weight matrix.

[0055] The dimensions of the A matrix are , the dimension of the B matrix is , in , then the parameter quantity of this bypass structure is The weight matrix parameters of the original pre-trained model will be much smaller than .

[0056] The cross entropy loss is used to minimize the difference between the model-generated answer and the standard answer. The formula is as follows: ; in, is the word in the standard answer, For the model to ask a question and parameters Next Generation probability.

[0057] By setting an appropriate learning rate Generally, a small learning rate (such as 1e-5 or 5e-5) is used to avoid overfitting while ensuring stable convergence. A batch training strategy is used to improve the training speed and generalization ability of the model. The typical batch size is 16 or 32. According to the size of the data set and the performance of the model, the number of training rounds is set, such as 20 to 50 rounds, until the loss function converges or achieves the set effect, so as to determine the parameters of the newly added weight matrix and fine-tune the model.

[0058] In the part of model verification after fine-tuning, the model's question-answering ability is tested through a verification data set to ensure its high accuracy and professionalism in the bidding field. The specific verification method is to use a part of the question-answering data that is not involved in fine-tuning as a verification set to evaluate the quality of the model's answers. The evaluation indicators use a variety of methods such as accuracy, BLEU score, and manual scoring by domain experts to evaluate the quality of generated answers. Among them, the accuracy rate is used to statistically measure the vocabulary consistency between the answers generated by the model and the standard answers, and the BLEU score measures the degree of fit between the answer content and the standard answer through syntactic and semantic similarity.

[0059] Step S14, obtaining relevant questions from users in the bidding field, using the target bidding field question and answer big model to generate corresponding question and answer data and push it to the user.

[0060] Among them, the target bidding and tendering field question and answer big model obtained after fine-tuning the bidding and tendering field question and answer big model has effectively improved the response ability in specific bidding and tendering question and answer scenarios, so that relevant questions about the bidding and tendering field can be obtained, the corresponding question and answer data can be accurately generated, and pushed to users.

[0061] For example, Figure 3 As shown, when faced with professional questions in the bidding and tendering field raised by users, the target bidding and tendering field question-answering model can accurately answer and output the corresponding answer content.

[0062] In summary, the bidding field question-and-answer method based on the retrieval enhancement generation architecture in the above embodiment of the present invention collects and constructs a bidding data set, and uses an embedded model to vectorize the segmented text and store it in a vector database, so that efficient retrieval of relevant information can be achieved based on similarity retrieval. When a user asks a question, the system retrieves the more relevant content according to the similarity, and fills it into the standardized speech template to ensure the accuracy and professionalism of the question and answer. Subsequently, the large language model base is fine-tuned through the question and answer to the data, so that the model has a stronger understanding and answering ability in this field. Compared with the question and answer system based on deep learning, the accuracy and breadth have been greatly improved, ensuring the professionalism of the system's answers. It solves the problems of the non-standard expression of user questions and the incomplete coverage of question and answer knowledge in the bidding field question and answer method in the prior art, which leads to low quality of question and answer generation.

[0063] Embodiment 2 This embodiment also proposes a bidding field question answering method based on a retrieval enhancement generation architecture. The difference between the bidding field question answering method based on a retrieval enhancement generation architecture in this embodiment and the bidding field question answering method based on a retrieval enhancement generation architecture in the first embodiment is that: The method further comprises: Obtain user feedback content and adjust the preset similarity threshold based on the user feedback content.

[0064] Among them, the optimization search strategy is achieved by dynamically adjusting the similarity threshold. The similarity threshold of the searched content is continuously optimized according to user feedback to balance the relevance and coverage of the searched content. If users frequently give feedback that "the content is irrelevant", the similarity threshold is appropriately increased to ensure that the retrieved content is closer to the user's question; if users give feedback that "the content coverage is insufficient", the similarity threshold is appropriately lowered to make the searched content contain more information.

[0065] In summary, the bidding field question-and-answer method based on the retrieval enhancement generation architecture in the above embodiment of the present invention collects and constructs a bidding data set, and uses an embedded model to vectorize the segmented text and store it in a vector database, so that efficient retrieval of relevant information can be achieved based on similarity retrieval. When a user asks a question, the system retrieves the more relevant content according to the similarity, and fills it into the standardized speech template to ensure the accuracy and professionalism of the question and answer. Subsequently, the large language model base is fine-tuned through the question and answer to the data, so that the model has a stronger understanding and answering ability in this field. Compared with the question and answer system based on deep learning, the accuracy and breadth have been greatly improved, ensuring the professionalism of the system's answers. It solves the problems of the non-standard expression of user questions and the incomplete coverage of question and answer knowledge in the bidding field question and answer method in the prior art, which leads to low quality of question and answer generation.

[0066] Embodiment 3 See also Figure 4 , shown is a bidding and tendering field question answering system based on a retrieval enhancement generation architecture proposed in the third embodiment of the present invention, the system includes: The acquisition module 100 is used to collect relevant legal and regulatory documents and clause documents, standard questions, and answer scripts in the bidding field to form a document data set, a question data set, and a general question and answer script template respectively; The vector module 200 is used to segment the bidding document content in the file data set according to the file type, so as to vectorize the segmented bidding document content, and then store the vectorized bidding document content in the vector database; The calculation module 300 is used to obtain user question data in the question data set, and vectorize the user question data to calculate the similarity with the content in the vector database, retrieve multiple related file contents that are greater than a preset similarity threshold, and use the question data and the multiple related file contents to fill in the general answer script template to obtain corresponding question-answer pair data; A fine-tuning module 400 is used to use the question-answer pair data as fine-tuning corpus to fine-tune the preset large language model base to obtain a large model of question-answering in the bidding field, obtain context information related to the bidding questions actively uploaded by the user, and update it into the vector database to obtain the final target large model of question-answering in the bidding field; The push module 500 is used to obtain users' relevant questions about the bidding field, generate corresponding question and answer data using the target bidding field question and answer big model, and push it to the users.

[0067] Furthermore, in the above-mentioned bidding and tendering field question-answering system based on retrieval enhancement generation architecture, the step of slicing the bidding and tendering document content in the file data set by file type includes: When the bidding documents are legal documents, they should be divided into sections or clauses to ensure the integrity of the legal provisions; When the bidding documents are bidding notices and qualification requirements, they are divided into sections by item number to ensure the independence of the contents; When the bidding document is a tender document, it is divided into sections according to the content of the chapters to ensure the logic and semantics of the content are clear.

[0068] Furthermore, in the bidding field question answering system based on the retrieval enhancement generation architecture, the step of vectorizing the content of the bidding document after segmentation and then storing the vectorized content of the bidding document in the vector database comprises: The text embedding model is used to vectorize the content of the bidding documents after segmentation. The expression of vectorization is: ; in, T For text snippets, f is a text embedding model, V d is the generated vector representation, d Represents the dimension of the vector; The vectorized content of the bidding documents is stored in the vector database in the form of triples, where the triples include text vectors, file identifiers, and location indexes.

[0069] Furthermore, in the above-mentioned bidding and tendering field question answering system based on the retrieval enhancement generation architecture, the calculation formula of the similarity is: ; in, is the text fragment vector in the vector database, A vector of user question data.

[0070] Furthermore, in the above-mentioned bidding and tendering field question-answering system based on retrieval enhancement generation architecture, the step of using question data and multiple related file contents to fill in a general answer script template to obtain corresponding question-answer pair data includes: Directly display the user's question content, and quote the key information of multiple related file contents according to the similarity, format the key information, and get the answer content; The filled answer content and the user's question data are recorded in a preset format to form a complete question-answer pair, where the preset recording format is ,in Ask data for users, The filled answer content.

[0071] Furthermore, in the bidding and tendering field question-answering system based on the retrieval enhancement generation architecture, the step of using the question-answer pair data as fine-tuning corpus to fine-tune the preset large language model base to obtain the bidding and tendering field question-answering large model includes: Add a bypass structure consisting of two weight matrices multiplied together in the network of the large language model base; The preset large language model base is trained using question-answer pair data to update the parameters of the weight matrix of the bypass structure to obtain a large question-answer model in the bidding field.

[0072] Furthermore, the above-mentioned bidding and tendering field question answering system based on the retrieval enhancement generation architecture, wherein the system also includes: Obtain user feedback content and adjust the preset similarity threshold based on the user feedback content.

[0073] The functions or operation steps implemented when the above modules are executed are substantially the same as those in the above method embodiments, and will not be repeated here.

[0074] Embodiment 4 Another aspect of the present invention further provides a readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the steps of the method described in any one of the above-mentioned embodiments 1 to 2 are implemented.

[0075] Embodiment 5 Another aspect of the present invention provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the program, the steps of the method described in any one of the above-mentioned embodiments 1 to 2 are implemented.

[0076] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0077] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable storage medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, a "computer-readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0078] More specific examples (a non-exhaustive list) of computer-readable storage media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable storage medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0079] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0080] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0081] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A question-answering method in the bidding field based on a retrieval-enhanced generation architecture, characterized in that: The method comprises: Collect relevant legal and regulatory documents and clause documents, standard questions, and answer scripts in the bidding field to form document data sets, question data sets, and general question and answer script templates; The bidding document content in the file data set is segmented according to the file type, so as to vectorize the segmented bidding document content, and then store the vectorized bidding document content in the vector database; Obtain user question data from the question data set, and vectorize the user question data to calculate similarity with the content in the vector database, retrieve multiple related file contents that are greater than a preset similarity threshold, use the question data and multiple related file contents to fill in a general answer script template, and obtain corresponding question-answer pair data; The question-answer pair data is used as fine-tuning corpus to fine-tune the preset large language model base to obtain a large model of question-answering in the bidding field, and the context information related to the bidding questions actively uploaded by users is obtained and updated into the vector database to obtain the final target large model of question-answering in the bidding field; Obtain users' relevant questions in the bidding field, use the target bidding field question and answer model to generate the corresponding question and answer data and push it to users.

2. The bidding and tendering field question answering method based on retrieval enhancement generation architecture according to claim 1 is characterized in that: The step of segmenting the content of the bidding documents in the file data set according to the file type comprises: When the bidding documents are legal documents, they should be divided into sections or clauses to ensure the integrity of the legal provisions; When the bidding documents are bidding notices and qualification requirements, they are divided into sections by item number to ensure the independence of the contents; When the bidding document is a tender document, it is divided into sections according to the content of the chapters to ensure the logic and semantics of the content are clear.

3. The bidding and tendering field question answering method based on retrieval enhancement generation architecture according to claim 1 is characterized in that: The steps of vectorizing the content of the bidding document after segmentation and then storing the vectorized content of the bidding document in the vector database include: The text embedding model is used to vectorize the content of the bidding documents after segmentation. The expression of vectorization is: ; in, T For text snippets, f is a text embedding model, V d is the generated vector representation, d Represents the dimension of the vector; The vectorized content of the bidding documents is stored in the vector database in the form of triples, where the triples include text vectors, file identifiers, and location indexes.

4. The bidding and tendering field question answering method based on retrieval enhancement generation architecture according to claim 3 is characterized in that: The calculation formula of the similarity is: ; in, is the text fragment vector in the vector database, A vector of user question data.

5. The bidding and tendering field question answering method based on retrieval enhancement generation architecture according to claim 1 is characterized in that: The step of filling the general answer script template with the question data and the contents of multiple related files to obtain the corresponding question-answer pair data comprises: Directly display the user's question content, and quote the key information of multiple related file contents according to the similarity, format the key information, and get the answer content; The filled answer content and the user's question data are recorded in a preset format to form a complete question-answer pair, where the preset recording format is ,in Ask data for users, The filled answer content.

6. The bidding and tendering field question answering method based on retrieval enhancement generation architecture according to claim 1 is characterized in that: The step of using the question-answer pair data as fine-tuning corpus to fine-tune the preset large language model base to obtain the large model of question-answering in the bidding field includes: Add a bypass structure consisting of two weight matrices multiplied together in the network of the large language model base; The preset large language model base is trained using question-answer pair data to update the parameters of the weight matrix of the bypass structure to obtain a large question-answer model in the bidding field.

7. The bidding and tendering field question answering method based on retrieval enhancement generation architecture according to claim 1 is characterized in that: The method further comprises: Obtain user feedback content and adjust the preset similarity threshold based on the user feedback content.

8. A bidding and tendering field question answering system based on retrieval enhancement generation architecture, characterized in that: The system comprises: The acquisition module is used to collect relevant legal and regulatory documents and clause documents, standard questions, and answer scripts in the bidding field, and form a document data set, a question data set, and a general question and answer script template respectively; The vector module is used to segment the bidding document content in the file data set according to the file type, so as to vectorize the segmented bidding document content, and then store the vectorized bidding document content in the vector database; A calculation module is used to obtain user question data in the question data set, and vectorize the user question data to calculate the similarity with the content in the vector database, retrieve multiple related file contents that are greater than a preset similarity threshold, and use the question data and multiple related file contents to fill in the general answer script template to obtain corresponding question-answer pair data; A fine-tuning module is used to use the question-answer pair data as fine-tuning corpus to fine-tune the preset large language model base to obtain a large model of question-answering in the bidding field, obtain the context information related to the bidding questions actively uploaded by the user, and update it into the vector database to obtain the final target large model of question-answering in the bidding field; The push module is used to obtain users' relevant questions in the bidding field, generate corresponding question and answer data using the target bidding field question and answer big model, and push it to users.

9. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the program.

Citation Information

Patent Citations

  • Retrieval type intelligent question and answer method oriented to bidding and tendering service

    CN116521849A

  • Online intelligent question answering method and device based on instruction fine tuning and retrieval enhancement generation

    CN117688163A

  • Dialogue response method, device and equipment of insurance intelligent question-answering system and medium

    CN117709358A

  • Intelligent compilation method, system and equipment for bid inviting file and storage medium

    CN117893295A

  • Document knowledge question-answering method and system based on LLM

    CN118069811A

Cited By

  • JSON process library-driven intelligent retrieval enhanced generation verbal skill method and system

    CN120086346A

  • RAG enhanced small-scale language model question and answer accuracy improving method and system

    CN120162415A

  • Enterprise knowledge question-answering system, method, equipment and medium

    CN121071108A

  • Model evaluation device, model evaluation method, and model evaluation program

    JP7763987B1