Method, system and equipment for realizing industry knowledge questions and answers based on large model and medium
By building a standard answer library and an industry knowledge base, combining the processing capabilities of the general big model, it responds to the target questions entered by users, matches the standard answer library, searches the industry knowledge base, and uses multiple rounds of dialogue information of user history to build prompt words, providing them to the general big model for question-and-answer questions, solving the problems of insufficient accuracy and professionalism in specific industry applications, and achieving accurate, professional and real-time answers to industry questions.
Patent Information
- Application Number
- CN202510227154.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-20
AI Technical Summary
Existing large-model-based question-and-answer systems have problems such as insufficient answer accuracy and professionalism, difficulty in effectively handling context information, and difficulty in integrating the latest industry information in real time in specific industry applications.
By building a standard answer library and an industry knowledge base, combining the processing capabilities of the general big model, it responds to the target questions entered by users, matches the standard answer library, searches the industry knowledge base, and uses multiple rounds of dialogue information of user history to build prompt words, and provides them to the general big model for question-and-answer questions.
It realizes accurate, professional and real-time answers to industry questions, improves the accuracy and professionalism of the question-and-answer system, enhances the system's context processing capabilities and timeliness, and meets users' needs for the latest information.
Smart Images

Figure CN120179772A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of artificial intelligence, and particularly relates to a method, system, device and medium for realizing industry knowledge Q&A based on a large model. Background Art
[0002] With the continuous maturity of artificial intelligence technology, especially the development of natural language processing technology, large models such as BERT and GPT have become the core tools for language understanding and generation tasks. Through pre-training on large-scale datasets, these large models can capture the deep features of language, thus showing excellent performance in various natural language processing tasks such as Q&A, translation, and summarization. However, in the application of specific industries, the existing Q&A systems based on large models have the following problems.
[0003] First of all, although general large models have strong language understanding capabilities, in specific industry fields, due to the lack of in-depth industry knowledge and understanding of professional terms, their answers are often lacking in accuracy and professionalism. For example, for the complex financial product structures in the financial industry and the disease diagnosis criteria and treatment plans in the medical industry, general large models are difficult to accurately answer these highly professional questions, resulting in the accuracy and professionalism of the answers not meeting the industry's needs. Secondly, in multi-round dialogue scenarios, some Q&A systems often have difficulty effectively processing and utilizing context information, resulting in broken answer logic or lost information, affecting the user experience. Finally, since industry knowledge is constantly updated, for example, the new technology iterations in the technology industry and the revisions of laws and regulations in the legal industry, existing Q&A systems often have difficulty integrating the latest industry information and data in real time, often resulting in outdated answer content and lack of timeliness. Summary of the Invention
[0004] In a first aspect, an embodiment of the present application provides a method for realizing industry knowledge Q&A based on a large model, including the following steps: S1. Determine the target industry, collect the standard answers of industry experts for questions with a frequency higher than the threshold in the target industry, and construct a standard answer library; S2. Collect professional knowledge related to the target industry and construct an industry knowledge base; S3. When the front-end interface responds to the target question of the target industry input by the user, match the standard answer library according to the target question. If the match is successful, directly return the matched standard answer; otherwise, proceed to step S4; S4. Retrieve the industry knowledge base according to the target question, and determine whether there is a return result in the industry knowledge base. When there is a return result, construct a prompt word according to the return result of the industry knowledge base, and when there is no return result, construct a prompt word according to the historical multi-round dialogue information of the user on the front-end interface, and then provide the prompt word and the target question to the general large model; S5. Return the results of the knowledge Q&A for the target industry output by the general large model to the user through the front-end interface, receive user feedback, and then update and maintain the standard answer library and industry knowledge library according to the user feedback.
[0005] Further, step S1 is specifically as follows: S11. Determine the target industry, collect questions within the target industry, and count the occurrence frequency of questions in the target industry; S12. Take the questions with an occurrence frequency higher than the set threshold as case questions; S13. Collect the standard answers to the case questions based on the knowledge and experience of industry experts, and use the case questions and the corresponding standard answers as standard answer pairs; S14. Build a standard answer library according to each standard answer pair.
[0006] Further, the specific steps of step S2 are as follows: S21. Collect industry texts related to the target industry, where the industry texts include industry question answers, professional literature abstracts, and industry hot news; S22. Collect the professional knowledge in the industry texts, where the professional knowledge includes industry terms, industry concepts, industry cases, and industry regulations; S23. Build an industry knowledge library based on the industry texts and professional knowledge of the target industry.
[0007] Further, the specific steps of step S3 are as follows: S31. The front-end interface responds to the target question of the target industry input by the user and builds a session; S32. Calculate the similarity between the target question and each case question in the standard answer library; S33. Determine whether there is a case question with a similarity higher than the threshold; If not, go to step S4; If so, go to step S34; S34. Determine whether the number of case questions with a similarity higher than the threshold is greater than 1; If so, go to step S35; If not, take the case question with a similarity higher than the threshold as a similar question and go to step S36; S35. Take out the case question with the highest similarity to the target question as a similar question; S36. Take out the standard answer corresponding to the similar question in the standard answer library and return the standard answer to the user through the front-end interface.
[0008] Further, the specific steps of step S4 are as follows: S41. Retrieve the industry knowledge base according to the target question by combining keyword retrieval and semantic vector retrieval, and determine whether there is a retrieval result for the target question in the industry knowledge base; If so, go to step S42; If not, go to step S45; S42. Sort the retrieved retrieval results according to the relevance to the target question and the authority of the source, and screen out the top K retrieval results with the highest relevance and authority; S43. Slice the top K retrieved results according to a preset slice length to obtain a number of knowledge fragments; S44. Obtain the original document where the knowledge fragment is located, mark the knowledge fragment in the original document, and then fill the marked original document and the target question into a preset first prompt word format as parameters to obtain the target prompt word; S45. Obtain the historical multi-round dialogue information of the user's target industry knowledge Q&A on the front-end interface, and fill the historical multi-round dialogue information and the target question into a preset second prompt word format as parameters to obtain the target prompt word; S46. Provide the target prompt word together with the configured large model parameters to the general large model, and configure the output form of the general large model.
[0009] Furthermore, the specific steps of step S41 are as follows: S411. Extract keywords from the target question and perform a retrieval match with the industry knowledge base according to the extracted keywords; If a retrieval result is matched, go to step S42; If no retrieval result is matched, go to step S412; S412. Convert the entries in the target question into first semantic vectors of a set dimension, and convert the entries in the industry knowledge base into second semantic vectors of the same set dimension; S413. Calculate the similarity between each vector in the first semantic vector and each vector in the second semantic vector; S414. Screen out the entries corresponding to the second semantic vectors with a similarity greater than the threshold; The specific steps of step S42 are as follows: S421. Calculate the relevance of the retrieval result to the target question, and set the authority according to the source of the original document as the retrieval result source according to a preset authority ranking; S422. Calculate the score of the retrieval result according to the relevance of the retrieval result and the preset relevance weight, and the authority of the retrieval result and the preset authority weight; S423. Screen out the top K retrieval results with the highest score; The specific steps of step S43 are as follows: S431. Obtain the length of the retrieval result; If the length of the retrieval result is less than the length threshold, proceed to step S432; If the length of the retrieval result is greater than the length threshold, proceed to step S433; S432. Slice the retrieval result according to the first slice length to obtain a number of knowledge fragments, and proceed to step S44; S433. Split the retrieval result according to the second slice length to obtain a number of knowledge fragments; wherein, the second slice length is greater than the first slice length.
[0010] Further, the specific steps of step S5 are as follows: S51. The general large model performs query operations according to the target prompt word and the configured large model parameters to generate the result of the knowledge question and answer in the target industry; S52. The front-end interface receives the result of the knowledge question and answer in the target industry returned by the general large model and displays it according to the configured output form; S53. The front-end interface responds to the feedback from the user on the result of the knowledge question and answer in the target industry; S54. Update and maintain the standard answer library and the industry knowledge library according to the feedback.
[0011] In a second aspect, an embodiment of the present application further provides a system for realizing industry knowledge question and answer based on a large model, including: A standard answer library that stores the standard answers to questions with a frequency higher than the threshold in the target industry; An industry knowledge library that stores professional knowledge related to the target industry; A user interaction module that interacts with the user to obtain the target question in the target industry input by the user, and returns the question and answer result of the general large model to the user; A dialogue management module that responds to the target question in the target industry input by the user, constructs a session, retrieves according to the target question by matching the standard answer library and the industry knowledge library, and generates a prompt word according to the retrieval result or the user's historical multi-round dialogue information and provides it to the general large model; A general large model that receives the prompt word input by the dialogue management module and returns the question and answer result to the user interaction module.
[0012] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps of the method for realizing industry knowledge question and answer based on a large model as described in the first aspect.
[0013] Fourthly, an embodiment of the present application further provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for implementing industry knowledge Q&A based on a large model as described in the first aspect are realized.
[0014] As can be seen from the above technical solutions, the present invention has the following advantages: In the method, system, device and medium for implementing industry knowledge Q&A based on a large model provided by the present application, by constructing a standard answer library and an industry knowledge library, industry expert knowledge and professional knowledge are obtained, enabling the Q&A system to accurately answer industry professional questions, effectively making up for the deficiency of the general large model in the depth of industry knowledge, and meeting the strict requirements of the industry for the accuracy and professionalism of answers; in the multi-round dialogue scenario, the historical multi-round dialogue information of the user is used to construct prompt words to help the general large model better understand the context, avoid logical breaks or information loss in answers, and significantly improve the user experience; the standard answer library and the industry knowledge library are updated in real time according to user feedback to ensure that the system can timely integrate the latest industry information and data and provide the latest and most accurate answers for users; by combining keyword retrieval with semantic vector retrieval, and sorting, screening and slicing processing of the retrieval results, relevant knowledge can be obtained from the industry knowledge library more efficiently, improving the Q&A efficiency and quality. Description of the Drawings
[0015] In order to more clearly illustrate the technical solutions of the present invention, the drawings required to be used in the description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0016] Figure 1 It is a flowchart of the method for implementing industry knowledge Q&A based on a large model of the present invention.
[0017] Figure 2 It is a schematic diagram of the system for implementing industry knowledge Q&A based on a large model of the present invention. Detailed Embodiments
[0018] In the following, the specific steps of the method for implementing industry knowledge Q&A based on a large model will be described in detail, and various embodiments of the present disclosure will be described more comprehensively. The present disclosure can have various embodiments, and adjustments and changes can be made therein. However, it should be understood that there is no intention to limit the various embodiments of the present disclosure to the specific embodiments disclosed herein, but the present disclosure should be understood to cover all adjustments, equivalents and / or alternative solutions falling within the spirit and scope of the various embodiments of the present disclosure.
[0019] Exemplarily, with the continuous improvement of artificial intelligence, especially natural language processing technology, large language models such as BERT and GPT have become the key support for processing language understanding and generation tasks. These models, through pre-training on massive amounts of data, can deeply capture the essential features of language, thus demonstrating excellent performance in NLP fields such as question answering, translation, and summarization. However, in the actual application scenarios of specific industries, the existing question answering systems based on these large models face a series of challenges.
[0020] First of all, although general large models perform well in language understanding, in the context of specific industries, due to the lack of in-depth professional knowledge and accurate grasp of terminology in this field, the answers they provide are often lacking in accuracy and professionalism. Taking the financial industry as an example, the complex financial product architectures or disease diagnosis and treatment norms in the medical field are beyond the understanding scope of general models and it is difficult to give accurate responses that meet the industry's needs. Secondly, in the interactive scenarios of multi-round conversations, some question answering systems have shortcomings in processing and utilizing context information, which often leads to impaired logical coherence of the answers or omission of key information, thus affecting the overall user experience. Moreover, given the continuous update and iteration of industry knowledge, existing question answering systems often have difficulty in integrating the latest industry trends and data in real time. This directly results in the obsolescence of the answer content and cannot meet the user's need for timeliness.
[0021] To address the above problems, this embodiment provides a method for realizing industry knowledge question answering based on a large model. By constructing a standard answer library and an industry knowledge library, and combining the processing capabilities of general large models, intelligent answering of industry questions is achieved, improving the accuracy and professionalism of the question answering system.
[0022] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0023] Please refer to Figure 1 The following is a flowchart of a method for realizing industry knowledge question answering based on a large model in a specific embodiment. The method includes the following steps: S1. Determine the target industry, collect the standard answers of industry experts for questions that appear more frequently than the threshold within the target industry, and construct a standard answer library; It should be noted that constructing a standard answer library can provide authoritative and accurate standard answers for common industry questions, improve the answering efficiency and accuracy of the question answering system for common questions; utilize industry expert knowledge to ensure the professionalism of the answers and meet the needs of industry users for professional knowledge; S2. Collect professional knowledge related to the target industry and build an industry knowledge base; It should be noted that the industry knowledge base provides rich industry knowledge reserves for the question-answering system, enabling it to answer a wide range of in-depth industry questions, providing knowledge resources for the question-answering system, and enhancing the knowledge coverage and depth of the system; S3. When the front-end interface responds to the target question of the target industry input by the user, match the standard answer library according to the target question. If the match is successful, directly return the matched standard answer; otherwise, go to step S4; It should be noted that by quickly responding to user questions through the front-end interface, standard answers can be directly returned for common questions, saving computing resources and time, improving user satisfaction, and providing a basic judgment for subsequent retrieval of the industry knowledge base or utilization of multi-round dialogue information; S4. Retrieve the industry knowledge base according to the target question, and determine whether there is a return result in the industry knowledge base. When there is a return result, construct a prompt word according to the return result of the industry knowledge base. When there is no return result, construct a prompt word according to the historical multi-round dialogue information of the user on the front-end interface, and then provide the prompt word and the target question to the general large model; It should be noted that by retrieving the industry knowledge base and using professional knowledge to answer questions, the professionalism and accuracy of the answers are improved; at the same time, when there is no result in the knowledge base, the multi-round dialogue information is used to enhance the large model's understanding of the context and improve the coherence and relevance of the answers; S5. Return the result of the knowledge question and answer of the target industry output by the general large model to the user through the front-end interface, receive user feedback, and then update and maintain the standard answer library and the industry knowledge base according to the user feedback; It should be noted that through the front-end interface, the interaction with the user is realized, and the question and answer results are returned in a timely manner; and the knowledge base is updated according to the user feedback, enabling the question-answering system to continuously optimize and continuously provide industry question-answering services.
[0024] In this embodiment, by constructing a standard answer library and an industry knowledge base, combined with the powerful language processing ability of the general large model, accurate, professional and real-time answers to industry questions are realized; not only the accuracy and professionalism of the question-answering system are improved, but also the context processing ability and timeliness of the system are enhanced, effectively solving the problems existing in the application of existing question-answering systems in specific industries.
[0025] Further, as a refinement and extension of the specific implementation manner of the above embodiment, in order to fully illustrate the specific implementation process in this embodiment, another method for realizing industry knowledge question and answer based on a large model is provided, and this method includes the following steps: S1. Determine the target industry, collect the standard answers of industry experts for the problems that occur more frequently than the threshold in the target industry, and construct a standard answer library. The specific steps of step S1 are as follows: S11. Determine the target industry, collect the problems in the target industry, and count the occurrence frequency of the problems in the target industry. S12. Take the problems with occurrence frequency higher than the set threshold as case problems. S13. Collect the standard answers of the case problems based on the knowledge and experience of industry experts, and take the case problems and their corresponding standard answers as standard answer pairs. S14. Construct a standard answer library according to each standard answer pair. The specific steps of step S2 are as follows: S21. Collect industry texts related to the target industry, where the industry texts include industry problem answers, professional literature abstracts, and industry hot news. S22. Collect the professional knowledge in the industry texts, where the professional knowledge includes industry terms, industry concepts, industry cases, and industry regulations. S23. Construct an industry knowledge base based on the industry texts and professional knowledge of the target industry. S2. Collect the professional knowledge related to the target industry and construct an industry knowledge base. S3. When the front-end interface responds to the target problem of the target industry input by the user, match the standard answer library according to the target problem. If the match is successful, directly return the matched standard answer; otherwise, go to step S4. The specific steps of step S3 are as follows: S31. The front-end interface responds to the target problem of the target industry input by the user and constructs a session. S32. Calculate the similarity between the target problem and each case problem in the standard answer library. S33. Determine whether there is a case problem with a similarity higher than the threshold. If not, go to step S4. If so, go to step S34. S34. Determine whether the number of case problems with similarity higher than the threshold is greater than 1. If so, go to step S35. If not, take the case problem with similarity higher than the threshold as a similar problem and go to step S36. S35. Take out the case problem with the highest similarity to the target problem as a similar problem. S36. Take out the standard answer corresponding to the similar problem in the standard answer library and return the standard answer to the user through the front-end interface. S4. Retrieve the industry knowledge base based on the target question, and determine whether there are any return results in the industry knowledge base. When there are return results, construct a prompt based on the return results of the industry knowledge base. When there are no return results, construct a prompt based on the historical multi-round conversation information of the user on the front-end interface. Then, provide the prompt and the target question to the general large model. The specific steps of step S4 are as follows: S41. Retrieve the industry knowledge base by combining keyword retrieval and semantic vector retrieval based on the target question, and determine whether there are any retrieval results for the target question in the industry knowledge base; If so, proceed to step S42; If not, proceed to step S45; S42. Sort the retrieved retrieval results according to the relevance to the target question and the authority of the source, and select the top K retrieval results with the highest relevance and authority; S43. Slice the selected top K retrieval results according to the preset slice length to obtain several knowledge fragments; S44. Obtain the original document where the knowledge fragment is located, mark the knowledge fragment in the original document, and then fill the marked original document and the target question into the preset first prompt format as parameters to obtain the target prompt; S45. Obtain the historical multi-round conversation information of the user's target industry knowledge Q&A on the front-end interface, and fill the historical multi-round conversation information and the target question into the preset second prompt format as parameters to obtain the target prompt; S46. Provide the target prompt together with the configured large model parameters to the general large model, and configure the output form of the general large model; S5. Return the results of the knowledge Q&A of the target industry output by the general large model to the user through the front-end interface, and receive the user's feedback. Then, update and maintain the standard answer library and the industry knowledge base according to the user's feedback. The specific steps of step S5 are as follows: S51. The general large model performs query operations according to the target prompt and the configured large model parameters to generate the results of the knowledge Q&A of the target industry; S52. The front-end interface receives the results of the knowledge Q&A of the target industry returned by the general large model and displays them according to the configured output form; S53. The front-end interface responds to the user's feedback on the results of the knowledge Q&A of the target industry; S54. Update and maintain the standard answer library and the industry knowledge base according to the feedback;
[0026] In an embodiment of the present invention, based on steps S41, S42, and S43, a possible embodiment will be given below to non - restrictively elaborate on its specific implementation scheme.
[0027] The specific steps of step S41 are as follows: S411. Extract keywords from the target problem and perform a retrieval match with the industry knowledge base according to the extracted keywords; If a retrieval result is matched, proceed to step S42; If no retrieval result is matched, proceed to step S412; S412. Convert the entries in the target problem into first semantic vectors of a set dimension, and convert the entries in the industry knowledge base into second semantic vectors of the same set dimension; S413. Calculate the similarity between each vector in the first semantic vector and each vector in the second semantic vector; S414. Screen out the entries corresponding to the second semantic vectors with similarity greater than the threshold; The specific steps of step S42 are as follows: S421. Calculate the relevance between the retrieval result and the target problem, and set the authority of the source of the original document as the retrieval result according to a preset authoritative ranking; S422. Calculate the score of the retrieval result according to the relevance of the retrieval result and the preset relevance weight, and the authority of the retrieval result and the preset authority weight; S423. Screen out the top K retrieval results with the highest scores; The specific steps of step S43 are as follows: S431. Obtain the length of the retrieval result; If the length of the retrieval result is less than the length threshold, proceed to step S432; If the length of the retrieval result is greater than the length threshold, proceed to step S433; S432. Slice the retrieval result according to the first slice length to obtain several knowledge fragments, and proceed to step S44; S433. Split the retrieval result according to the second slice length to obtain several knowledge fragments; where the second slice length is greater than the first slice length.
[0028] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
[0029] Such as Figure 2As shown below, the following is an embodiment of a system for realizing industry knowledge Q&A based on a large model provided by an embodiment of the present disclosure. This system and the method for realizing industry knowledge Q&A based on a large model in the above embodiments belong to the same inventive concept. For the details not described in detail in the embodiment of the system for realizing industry knowledge Q&A based on a large model, reference may be made to the embodiment of the method for realizing industry knowledge Q&A based on a large model above.
[0030] The system includes: A standard answer library that stores the standard answers to questions with a frequency of occurrence higher than a threshold in the target industry; An industry knowledge library that stores professional knowledge related to the target industry; A user interaction module that interacts with the user to obtain the target question of the target industry input by the user and returns the Q&A results of the general large model to the user; A dialogue management module that responds to the target question of the target industry input by the user, constructs a session, retrieves by matching the standard answer library and the industry knowledge library according to the target question, and generates a prompt word based on the retrieval result or the user's historical multi-round dialogue information and provides it to the general large model; A general large model that receives the prompt word input by the dialogue management module and returns the Q&A result to the user interaction module.
[0031] The system of this embodiment realizes intelligent Q&A for industry questions by integrating components such as a standard answer library, an industry knowledge library, a user interaction module, and a dialogue management module, improving the overall performance and usability of the system.
[0032] The method for realizing industry knowledge Q&A based on a large model provided by an embodiment of this application can be applied to an electronic device. Those skilled in the art can understand that the structure of the electronic device involved in the embodiment of the present invention does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. In the embodiment of the present invention, the electronic device includes, but is not limited to, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described herein and / or claimed.
[0033] The electronic device may include a processor, an external memory interface, an internal memory, a Universal Serial Bus (USB) interface, a charging management module, a power management module, a battery, a wireless communication module, an audio module, a speaker, a microphone, a sensor module, keys, a camera, a display screen, and a Subscriber Identity Module (SIM) card interface, etc.
[0034] It can be understood that the structure illustrated in the embodiments of this application does not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0035] The processor may include one or more processing units. For example, the processor may include a Central Processing Unit (CPU), etc., an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and / or a Neural-Network Processing Unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0036] Among them, the processor may be the nerve center and command center of the electronic device. The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.
[0037] A memory may also be provided in the processor for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can save the instructions or data that the processor has just used or recycled. If the processor needs to use the instruction or data again, it can directly call it from this memory. This avoids repeated accesses, reduces the waiting time of the processor, and thus improves the system efficiency.
[0038] The above-mentioned electronic device implements the technical solution of determining the target industry in the method for realizing industry knowledge Q&A based on a large model in the present application, collecting the standard answers of industry experts for questions with a frequency higher than the threshold in the target industry, and constructing a standard answer library; collecting professional knowledge related to the target industry and constructing an industry knowledge library; responding to the target question of the target industry input by the user on the front-end interface, matching the standard answer library according to the target question, if the match is successful, directly returning the matched standard answer, otherwise, retrieving the industry knowledge library according to the target question, and determining whether there is a return result in the industry knowledge library, and when there is a return result, constructing a prompt word according to the return result of the industry knowledge library, and when there is no return result, constructing a prompt word according to the historical multi-round dialogue information of the user on the front-end interface, then providing the prompt word and the target question to the general large model; returning the result of the knowledge Q&A of the target industry output by the general large model to the user through the front-end interface, receiving the user feedback, and then updating and maintaining the standard answer library and the industry knowledge library according to the user feedback, achieving the beneficial effect of realizing intelligent Q&A for industry questions and improving the overall performance and usability of the system by integrating components such as the standard answer library, the industry knowledge library, the user interaction module, and the dialogue management module.
[0039] In the storage medium provided by the present application, there is a program product capable of implementing the method for realizing industry knowledge Q&A based on a large model.
[0040] The method for realizing industry knowledge Q&A based on a large model includes: determining the target industry, collecting the standard answers of industry experts for questions with a frequency higher than the threshold in the target industry, and constructing a standard answer library; collecting professional knowledge related to the target industry and constructing an industry knowledge library; responding to the target question of the target industry input by the user on the front-end interface, matching the standard answer library according to the target question, if the match is successful, directly returning the matched standard answer, otherwise, retrieving the industry knowledge library according to the target question, and determining whether there is a return result in the industry knowledge library, and when there is a return result, constructing a prompt word according to the return result of the industry knowledge library, and when there is no return result, constructing a prompt word according to the historical multi-round dialogue information of the user on the front-end interface, then providing the prompt word and the target question to the general large model; returning the result of the knowledge Q&A of the target industry output by the general large model to the user through the front-end interface, receiving the user feedback, and then updating and maintaining the standard answer library and the industry knowledge library according to the user feedback.
[0041] In some possible implementation manners, the method for realizing industry knowledge Q&A based on a large model in the present disclosure can be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to make the terminal device execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification.
[0042] The storage medium of the present disclosure may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, but not be limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0043] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for implementing industry knowledge question answering based on a large model, characterized in that: The steps include: S1. Determine the target industry, collect standard answers from industry experts for questions that appear more frequently than the threshold in the target industry, and build a standard answer library; S2. Collect professional knowledge related to the target industry and build an industry knowledge base; S3. In the front-end interface, respond to the target question of the target industry input by the user, match the standard answer library according to the target question, and if the match is successful, directly return the matched standard answer, otherwise, proceed to step S4; S4. Search the industry knowledge base according to the target question, and determine whether there is a return result in the industry knowledge base. If there is a return result, construct a prompt word according to the return result of the industry knowledge base. If there is no return result, construct a prompt word according to the historical multi-round dialogue information of the user on the front-end interface, and then provide the prompt word and the target question to the general large model; S5. Return the results of the knowledge questions and answers of the target industry output by the general large model to the user through the front-end interface, receive user feedback, and then update and maintain the standard answer library and industry knowledge base based on user feedback.
2. The method for realizing industry knowledge question and answer based on a large model according to claim 1 is characterized in that: Step S1 is specifically as follows: S11. Identify the target industry, collect problems within the target industry, and count the frequency of problems in the target industry; S12. Questions with a frequency higher than a set threshold are considered case questions; S13. Collect standard answers to case questions based on the knowledge and experience of industry experts, and use the case questions and corresponding standard answers as standard answer pairs; S14. Construct a standard answer library based on each standard answer pair.
3. The method for realizing industry knowledge question and answer based on a large model according to claim 2 is characterized in that: The specific steps of step S2 are as follows: S21. Collect industry texts related to the target industry, including answers to industry questions, summaries of professional literature, and hot industry news; S22. Collect professional knowledge in industry texts, including industry terms, industry concepts, industry cases and industry regulations; S23. Build an industry knowledge base based on industry texts and professional knowledge of the target industry.
4. The method for implementing industry knowledge question and answer based on a large model according to claim 3 is characterized in that: The specific steps of step S3 are as follows: S31. The front-end interface responds to the target questions of the target industry input by the user and builds a session; S32. Calculate the similarity between the target question and each case question in the standard answer library; S33. Determine whether there is a case problem with a similarity higher than a threshold; If not, proceed to step S4; If yes, go to step S34; S34. Determine whether there are more than one case problem whose similarity is higher than the threshold; If yes, go to step S35; If not, the case questions with similarity higher than the threshold are regarded as similar questions and the process proceeds to step S36; S35. Take the case problem with the highest similarity to the target problem as a similar problem; S36. Take out the standard answers corresponding to similar questions from the standard answer library, and return the standard answers to the user through the front-end interface.
5. The method for implementing industry knowledge question and answer based on a large model according to claim 4 is characterized in that: The specific steps of step S4 are as follows: S41. Search the industry knowledge base according to the target question by combining keyword search with semantic vector search, and determine whether there is a search result for the target question in the industry knowledge base; If yes, go to step S42; If not, proceed to step S45; S42. Sort the retrieved search results according to their relevance to the target question and the authority of the source, and select the top K search results with the highest relevance and authority; S43. Slice the first K search results selected according to a preset slice length to obtain several knowledge fragments; S44. Obtain the original document where the knowledge fragment is located, and annotate the knowledge fragment in the original document, and then fill the annotated original document and the target question into the preset first prompt word format in the form of parameters to obtain the target prompt word; S45. Obtain the historical multi-round dialogue information of the user on the front-end interface for the target industry knowledge question and answer, and fill the historical multi-round dialogue information and the target question in the form of parameters into the preset second prompt word format to obtain the target prompt word; S46. Provide the target prompt word together with the configured large model parameters to the general large model, and configure the output form of the general large model.
6. The method for implementing industry knowledge question and answer based on a large model according to claim 5 is characterized in that: The specific steps of step S41 are as follows: S411. Extract keywords for the target question, and search and match the extracted keywords with the industry knowledge base; If the search result is matched, go to step S42; If no search results are matched, go to step S412; S412. Converting the items in the target question into a first semantic vector of a set dimension, and converting the items in the industry knowledge base into a second semantic vector of the same set dimension; S413. Calculate the similarity between each vector in the first semantic vector and each vector in the second semantic vector; S414. Filter out entries corresponding to the second semantic vector whose similarity is greater than a threshold; The specific steps of step S42 are as follows: S421. Calculate the relevance of the search results to the target question, and set the authority of the source of the original document as the source of the search results according to the preset authority ranking; S422. Calculate the score of the search results based on the relevance of the search results and the preset relevance weight, as well as the authority of the search results and the preset authority weight; S423. Filter out the top K search results with the highest scores; The specific steps of step S43 are as follows: S431. Get the length of the search result; If the length of the search result is less than the length threshold, proceed to step S432; If the length of the search result is greater than the length threshold, proceed to step S433; S432. Slice the search results according to the first slice length to obtain a number of knowledge fragments, and proceed to step S44; S433. Divide the search result according to the second slice length to obtain a number of knowledge fragments; wherein the second slice length is greater than the first slice length.
7. The method for implementing industry knowledge question and answer based on a large model according to claim 5 is characterized in that: The specific steps of step S5 are as follows: S51. The general large model performs query operations according to the target prompt words and the configured large model parameters to generate the results of the knowledge question and answer of the target industry; S52. The front-end interface receives the results of the knowledge question and answer of the target industry returned by the general large model and displays them in the configured output format; S53. The front-end interface responds to the user's feedback on the results of the knowledge quiz of the target industry; S54. Update and maintain the standard answer database and industry knowledge database based on feedback.
8. A system for implementing industry knowledge question and answer based on a large model, characterized in that: include: The standard answer library stores standard answers to questions in the target industry whose frequency is higher than the threshold; Industry knowledge base, which stores professional knowledge related to the target industry; A user interaction module, which interacts with the user to obtain the target questions of the target industry input by the user, and returns the question-answering results of the general large model to the user; The dialogue management module responds to the target questions of the target industry input by the user, builds a conversation, searches the standard answer library and industry knowledge base according to the target questions, and generates prompt words based on the search results or the user's historical multi-round dialogue information and provides them to the general large model; The general large model receives prompt words input by the dialogue management module and returns the question and answer results to the user interaction module.
9. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for realizing industry knowledge question and answer based on a large model as described in any one of claims 1 to 7 when executing the program.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for implementing industry knowledge question and answer based on a large model as described in any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Intelligent question and answer method, device and equipment, medium and program product
CN120744051A
Intelligent prompting method and system, computer equipment and storage medium
CN120744105A
Intelligent prompting method and system, computer device and storage medium
CN120744105B
Big model-based file handling process knowledge base construction and multi-round memory question and answer method
CN121303329A
Domain knowledge base establishment and question answering method and system, storage medium and program product
CN121480638A