Large model medical insurance knowledge question and answer method and device
By employing RAG's large-scale medical insurance knowledge question-and-answer method, combined with information retrieval and generation technologies, and optimizing the Prompt and processing hyperlinks, the problems of misunderstanding and inefficiency in medical insurance question-and-answer systems have been solved, achieving efficient and accurate medical insurance knowledge services.
Patent Information
- Application Number
- CN202411002563.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-11-22
AI Technical Summary
Existing question-and-answer systems in the medical insurance field suffer from numerous misunderstandings and errors, low efficiency, and insufficient user understanding and compliance with medical insurance policies, thus affecting service quality.
This paper adopts the RAG large-model medical insurance knowledge question-answering method. It collects and organizes medical insurance knowledge and stores it using Faiss. It combines Speech-to-Text technology to generate Prompts, uses a large model for information retrieval and answer generation, optimizes the Prompt to improve the accuracy of the answers, and handles hyperlinks and WeChat public account jumps to provide intelligent question-answering services.
It improves the accuracy and efficiency of the medical insurance Q&A system, reduces user waiting time, automates the processing of medical insurance questions, enhances user experience, and continuously improves the system's knowledge base with data updates, providing fast and accurate medical insurance knowledge services.
Smart Images

Figure CN119003715A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of RAG technology, and specifically provides a large-model medical insurance knowledge question-and-answer method and device. Background Art
[0002] The background technologies of the RAG-based large-model medical insurance knowledge question-answering method and system include Transformer models and language representation models. RAG (Retrieval-Augmented Generation) is a method that combines retrieval and generation. In the question-answering system, it can improve the performance and accuracy of the question-answering system by first retrieving relevant information and then generating answers. Using large-scale pre-trained Transformer models, such as BERT, GPT, etc., it is possible to understand and generate medical insurance knowledge. In addition, data sets and knowledge graphs in the field of medical insurance are also needed to support knowledge extraction and retrieval. Integrating these technologies and resources can build a more accurate and efficient medical insurance knowledge question-answering system.
[0003] How to improve work efficiency in the medical insurance field, reduce misunderstandings and errors, increase understanding of and compliance with medical insurance policies, and ultimately improve the quality and effectiveness of medical insurance services is an urgent problem that needs to be solved by technical personnel in this field. Summary of the invention
[0004] The present invention aims at the deficiencies of the above-mentioned prior art and provides a large-model medical insurance knowledge question-and-answer method with strong practicality.
[0005] A further technical task of the present invention is to provide a large-model medical insurance knowledge question-and-answer device that is reasonably designed, safe and applicable.
[0006] The technical solution adopted by the present invention to solve its technical problem is:
[0007] A large-scale model medical insurance knowledge question-answering method comprises the following steps:
[0008] S1. Collect medical insurance related knowledge, organize it, and store it in Faiss;
[0009] S2, the user generates an initial prompt through Speech-to-Text technology or directly typing the question;
[0010] S3 and Faiss's PQx product quantization recall retrieval method use the initial prompt to recall the top 5 related knowledge;
[0011] S4. Use Prompt Engineering to transform the second-generation Prompt into the third-generation Prompt, so that Prompt can maximize the emergence of medical insurance knowledge in the big model;
[0012] S5, sending the three-generation prompt to the big model, and the big model answers the user's question based on the knowledge background recalled from the three-generation prompt;
[0013] S6. Process the hyperlinks and WeChat public accounts.
[0014] Furthermore, in step S1, medical insurance related knowledge is collected and organized into semantically concise text, spaces and line breaks are deleted to form a document, the content of which is in the form of QA pairs, which are embedded and stored in the vector library;
[0015] After the document is formed, LangChain is used to cut the long text. The principle of cutting is to put semantically related text fragments together. The cut text is vectorized using Word2Vec, and the vectors are stored in the vector database Faiss for recall.
[0016] Furthermore, in step S2, the Speech-to-Text technology shortens the time cost of users asking questions through audio collection, preprocessing, feature extraction, speech recognition, and post-processing, and generates an initial prompt.
[0017] Furthermore, in step S3, the generated Top 5 messages are fused, understood, and filtered with the first-generation Prompt using the big model to form the second-generation Prompt, and the recalled 5 pieces of data are sent to the big model for fusion, understanding, and filtering.
[0018] Further, in step S4, Prompt is optimized according to the Chain of Thought method and the Prompt online optimization platform, and the accuracy of the optimization effect depends on the addition of the Prompt corpus.
[0019] Furthermore, in step S5, when the three generations of prompts are sent to the big model, the big model will use the rich knowledge background recalled therein to more effectively answer the user's questions. Through the information of the first three generations of prompts, the big model understands the background and context of the question and generates more accurate and logical answers based on this information.
[0020] Furthermore, in step S6, for the hyperlink, click on the prompt, and the public can directly jump to the business system by clicking it. Regular expressions are used to match the hyperlinks in the text returned by the large model, and the hyperlinks are given jump attributes and selection effects.
[0021] Furthermore, for WeChat official accounts, click on the prompt, and the public will directly pop up the WeChat official account QR code, and scan the code to jump to the official account platform to operate related businesses;
[0022] Store the QR code image of the public account in the cloud server, and click the link to display the corresponding image. When the system matches a hyperlink of the WeChat public account type, the user clicks the hyperlink, and a floating window of the public account QR code image pops up on the system page. The public can scan the code to jump to the public account to handle the corresponding business.
[0023] A large-model medical insurance knowledge question-answering device, comprising: at least one memory and at least one processor;
[0024] The at least one memory is used to store a machine-readable program;
[0025] The at least one processor is used to call the machine-readable program to execute a medical insurance knowledge question and answer method.
[0026] Compared with the prior art, the large-scale model medical insurance knowledge question-answering method and device of the present invention has the following outstanding beneficial effects:
[0027] The present invention can combine information retrieval and generative models to improve the accuracy of the question-answering system by means of text retrieval and answer generation. The system can accurately answer the medical insurance questions raised by users and help users solve their doubts and confusions.
[0028] The RAG-based large model can learn rich knowledge in the field of medical insurance and perform intelligent reasoning. It can provide detailed answers based on questions raised by users and help users better understand medical insurance policies and regulations.
[0029] The medical insurance knowledge question-and-answer system can quickly respond to user questions, reduce user waiting time, and improve work efficiency. The system uses the RAG model and knowledge graph to retrieve and generate information, and can return answers quickly and accurately.
[0030] The question-and-answer system can automatically handle a large number of medical insurance questions, reducing the burden of manual processing. Users do not need to wait for manual answers, and can obtain the medical insurance knowledge they need through the system independently, improving user experience.
[0031] The RAG model can continuously learn new medical insurance knowledge. As data increases and model training deepens, the system's knowledge base and answering capabilities will continue to improve, maintaining continuous updating and improvement of the system.
[0032] In general, the present invention can improve the quality of information transmission and services in the field of medical insurance, provide users with accurate, intelligent and efficient question-and-answer services, and promote better operation and utilization of the medical insurance system. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Attached Figure 1 It is a flowchart of a large-scale model medical insurance knowledge question-answering method;
[0035] Attached Figure 2 It is a schematic diagram of a model in a large-scale medical insurance knowledge question-and-answer method. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with specific implementation methods. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] A best embodiment is given below:
[0038] like Figure 1 As shown, a large-model medical insurance knowledge question-answering method in this embodiment has the following steps:
[0039] S1. Collect medical insurance related knowledge, organize it, and store it in Faiss.
[0040] Collect medical insurance related knowledge, eliminate useless information, organize it into semantically concise text with regular format, delete useless spaces, line breaks, etc., to form a document. The content of the document should be in the form of QA pairs as much as possible. In actual applications, it is found that using QA instead of plain text blocks has significantly better effects in vector retrieval.
[0041] Therefore, some QA pairs can be automatically generated based on the existing unstructured text, and then embedded and stored in the vector library. The reason for the above operation is to make the document content more convenient for text segmentation and easy vector matching; after the document is formed, in order to facilitate word frequency statistics and text classification, it is necessary to use LangChain to segment the long text. The principle of segmentation is to put semantically related text fragments together, which can better extract and organize the information contained in the sentence; the segmented text is vectorized using Word2Vec, and the vector is stored in the vector database Faiss for recall.
[0042] S2. The user generates an initial prompt through Speech-to-Text technology or by directly typing a question. Speech-to-Text technology can shorten the time cost of users asking questions and generate an initial prompt through audio collection, preprocessing, feature extraction, speech recognition, and post-processing.
[0043] In the process of user interaction with the system, this technology not only improves the efficiency and convenience of users asking questions, but also reduces the cognitive and operational burden required for users to use the system, thereby improving the quality of user experience.
[0044] S3 and Faiss's PQx product quantization recall retrieval method uses the initial prompt to recall the top 5 related knowledge, and uses a large model to fuse, understand, and filter the generated top 5 messages with the first-generation prompt to form a second-generation prompt.
[0045] Send the 5 recalled data to the big model to integrate, understand and filter the data. The constraints are: You are a senior Prompt engineer. Please integrate, understand and filter the following content. The requirements are: strictly follow the existing information, do not add non-existent events and details, and the semantics are smooth. The content is: {{Top5 knowledge}}.
[0046] S4, such as Figure 2 As shown, the second-generation Prompt was modified using Prompt Engineering and upgraded to the third-generation Prompt, so that Prompt can maximize the emergence of medical insurance knowledge in the big model;
[0047] Prompt is optimized according to the Chain of Thought method and the Prompt online optimization platform. The accuracy of the optimization effect varies depending on the added Prompt corpus.
[0048] S5. Send the three-generation prompt to the big model, and the big model answers the user's question based on the knowledge background recalled from the three-generation prompt.
[0049] When the three generations of prompts are sent to the big model, the big model will use the rich knowledge background recalled in them to answer the user's questions more effectively. Through the information of the first three generations of prompts, the big model can understand the background and context of the question and generate more accurate and logical answers based on this information. This method can help the big model better understand the questions raised by users, so as to provide more detailed and in-depth answers, making the communication more smooth and meaningful.
[0050] S6. Processing hyperlinks and WeChat public accounts;
[0051] Hyperlink: A clickable prompt appears, and the public can directly jump to the business system by clicking it. Operation method: Use regular expressions to match the hyperlinks in the text returned by the large model, and give them the jump attribute and selection effect of the hyperlink.
[0052] WeChat public account: A clickable prompt will appear. The public can directly pop up the WeChat public account QR code by clicking it. Scan the code to jump to the public account platform to operate related business. The public account QR code image is stored in the cloud server. Click the link to display the corresponding image. When the system matches a hyperlink of the WeChat public account type, the user clicks the hyperlink, and the system page pops up the public account QR code image floating window. The public can scan the code to jump to the public account to handle the corresponding business, reducing time costs.
[0053] Based on the above method, a large-model medical insurance knowledge question-answering device in this embodiment includes: at least one memory and at least one processor;
[0054] The at least one memory is used to store a machine-readable program;
[0055] The at least one processor is used to call the machine-readable program to execute a large-model medical insurance knowledge question and answer method.
[0056] The above-mentioned specific implementations are only specific cases of the present invention. The patent protection scope of the present invention includes but is not limited to the above-mentioned specific implementations. Any technical solutions that comply with the claims of the present invention and any appropriate changes or substitutions made by ordinary technicians in the relevant technical field shall fall within the patent protection scope of the present invention.
[0057] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A large-scale medical insurance knowledge question-answering method, characterized in that: The steps are as follows: S1. Collect medical insurance related knowledge, organize it, and store it in Faiss; S2, the user generates an initial prompt through speech-to-text technology or by directly typing the question; S3 and Faiss's PQx product quantization recall retrieval method use the initial prompt to recall the top 5 related knowledge; S4. Use Prompt Engineering to transform the second-generation Prompt into the third-generation Prompt, so that Prompt can maximize the emergence of medical insurance knowledge in the big model; S5, sending the three-generation prompt to the big model, and the big model answers the user's question based on the knowledge background recalled from the three-generation prompt; S6. Process the hyperlinks and WeChat public accounts.
2. A large-scale medical insurance knowledge question-answering method according to claim 1, characterized in that: In step S1, medical insurance related knowledge is collected and organized into semantically concise texts, spaces and line breaks are deleted to form a document. The content of the document is in the form of QA pairs, which are embedded and stored in the vector library; After the document is formed, LangChain is used to cut the long text. The principle of cutting is to put semantically related text fragments together. The cut text is vectorized using Word2Vec, and the vectors are stored in the vector database Faiss for recall.
3. A large-scale medical insurance knowledge question-answering method according to claim 2, characterized in that: In step S2, the Speech-to-Text technology shortens the time cost of users asking questions through audio collection, preprocessing, feature extraction, speech recognition, and post-processing, and generates an initial prompt.
4. A large-scale medical insurance knowledge question-answering method according to claim 3, characterized in that: In step S3, the generated Top 5 messages are fused, understood, and filtered with the first-generation Prompt using the big model to form the second-generation Prompt, and the recalled 5 pieces of data are sent to the big model for fusion, understanding, and filtering.
5. A large-scale medical insurance knowledge question-answering method according to claim 4, characterized in that: In step S4, Prompt is optimized according to the Chain of Thought method and the Prompt online optimization platform, and the accuracy of the optimization effect depends on the addition of the Prompt corpus.
6. A large-scale medical insurance knowledge question-answering method according to claim 5, characterized in that: In step S5, when the three generations of prompts are sent to the big model, the big model will use the rich knowledge background recalled therein to answer the user's questions more effectively. Through the information of the first three generations of prompts, the big model understands the background and context of the question and generates more accurate and logical answers based on this information.
7. A large-scale medical insurance knowledge question-answering method according to claim 6, characterized in that: In step S6, for the hyperlink, click the prompt, and the public can directly jump to the business system by clicking it. Use regular expressions to match the hyperlinks in the text returned by the large model, and give the hyperlinks jump attributes and selection effects.
8. A large-scale medical insurance knowledge question-answering method according to claim 7, characterized in that: For WeChat official accounts, click on the prompt, and the public will directly pop up the WeChat official account QR code. Scan the code to jump to the official account platform to operate related business; Store the QR code image of the public account in the cloud server, and click the link to display the corresponding image. When the system matches a hyperlink of the WeChat public account type, the user clicks the hyperlink, and a floating window of the public account QR code image pops up on the system page. The public can scan the code to jump to the public account to handle the corresponding business.
9. A large-scale medical insurance knowledge question-answering device, characterized in that: include: at least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Knowledge question and answer method, device and equipment and storage medium
CN116680384A
Knowledge base question and answer method and device based on large language model under mass information
CN117312509A
Construction method of intelligent question answering system based on lightweight large model
CN117370513A
Search question and answer method based on large model
CN117609444A
Medical knowledge base construction method and device, electronic equipment and storage medium
CN117995427A
