Dual-prevention intelligent interaction system based on large language model

By introducing large language model technology into the dual prevention system and building an intelligent interactive system, the shortcomings of traditional systems in risk identification, hidden danger investigation, employee training and knowledge management have been solved, and more efficient, personalized and professional security management has been achieved.

CN119579365AActive Publication Date: 2025-03-07兰州兰石爱特互联科技有限公司

Patent Information

Application Number
CN202411507084.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-03-07
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

The traditional dual prevention system has problems such as insufficient targeted and personalized, limited professional level, and inadequate implementation of safety production in terms of risk identification and hidden danger detection, employee training, and knowledge management.

Method used

The dual preventive intelligent interaction system based on large language models is adopted, and functions such as natural language processing, knowledge base management, personalized services, risk identification and control, security training and knowledge Q&A through the combination of large language model base, knowledge base management module, intelligent body module, multimodal large model module and evaluation module are realized.

Benefits of technology

Provide personalized security management services, enhance risk identification and control capabilities, improve security management efficiency, ensure data confidentiality and professionalism, integrate massive safety production knowledge, and improve knowledge management level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579365A_ABST
    Figure CN119579365A_ABST
Patent Text Reader

Abstract

The invention discloses a dual-prevention intelligent interaction system based on a large language model, and belongs to the technical field of artificial intelligence. The system comprises a big language base model, a knowledge base management module, an agent module, a multi-modal big model and an evaluation module, and the big language base model understands user intentions and processes natural language tasks and provides token processing capacity for other modules; the knowledge base management module is used for classified storage and management of professional knowledge, establishing indexes according to semantics and finally performing localized storage; the intelligent agent module is used for analyzing input of a user, and different workflows are packaged in different intelligent agents so as to provide personalized services for the user; the multi-modal large model module receives voice input by a user, converts the voice into characters, transmits description of information to the Agent, generates answers by analyzing semantics, converts the characters into the voice and sends the voice to the user; the evaluation module establishes an evaluation index system from the four aspects of accuracy, answer correlation, context correlation and context recall rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of artificial intelligence technology, and in particular relates to a dual-prevention intelligent interaction system based on a large language model. Background Art

[0002] The dual prevention system, namely the dual prevention mechanism of risk classification control and hidden danger investigation and treatment, has achieved certain results in the current promotion and implementation process, but it still faces some problems and challenges:

[0003] First, in terms of safety training, the training is not targeted and personalized enough. The safety education and training system is to respect and recognize the individual differences of employees, enhance the safety quality and specific skills of all employees, and enable all employees to implement the safety concept through training; secondly, in the process of risk identification and hidden danger investigation, the professional level of some enterprise employees is limited, and they fail to fully utilize the power of experts, resulting in insufficient and incomplete identification and evaluation, and the proposed control measures lack specificity and timeliness; finally, safety production is not implemented in place, the safety operating procedures are very complete, the operation instruction manual is also sound, the risk source identification and control measures are formulated in detail, but the gap in implementation to the last mile is significant, and unsafe behaviors still occur frequently.

[0004] With the continuous expansion of artificial intelligence applications, how safety managers can effectively use large language models (LLMs) to assist safety production has become an important topic. In the digital transformation of safety production work, establishing a digital platform that supports artificial intelligence applications is a core task. In terms of risk identification and assessment, using large model technology, the system can automatically extract features from massive data, intelligently identify and evaluate risks. As the amount of data grows, the system can continuously optimize the risk identification model to improve the accuracy and comprehensiveness of identification. In terms of employee training, large models can simulate experts in the safety field and develop personalized training plans based on employees' positions, skill levels and training needs. The training content will cover safety production knowledge, risk identification methods, hidden danger detection techniques, etc., to help employees improve their safety awareness and capabilities. In terms of risk identification and prevention, large models can deeply analyze historical risk data and real-time monitoring data, identify the causes of risks, possible consequences and countermeasures, and make risk reports more forward-looking and instructive. Enterprises can formulate response strategies in advance based on these analysis results to reduce the possibility of risks. Therefore, large model technology has a wide range of application scenarios in the field of safety production. Summary of the invention

[0005] In order to solve the problems of traditional dual prevention systems in risk identification and hidden danger investigation, employee training, knowledge management and other aspects, the present invention provides a dual prevention intelligent interactive system based on a large language model.

[0006] In order to achieve the above-mentioned purpose of the invention, the technical solution provided by the present invention is as follows.

[0007] A dual-prevention intelligent interaction system based on a large language model, comprising:

[0008] The large language model base is used to understand user intent and process natural language tasks, and provides token processing capabilities for other modules, including the use of large language models of different sizes to process different data;

[0009] The knowledge base management module is used to classify, store and manage professional knowledge, including converting documents in different formats uploaded by users into vectors, indexing them based on semantics, and finally storing them locally.

[0010] The agent module is used to analyze user input. Different workflows are encapsulated in different agents to provide personalized services to users.

[0011] The multimodal large model module receives the user's voice input, converts the voice into text, and then passes the information description to the agent. The agent generates an answer by analyzing the semantics, and finally converts the text into voice and sends it to the user;

[0012] The evaluation module is used to evaluate the results of knowledge base question answering, including establishing an evaluation index system from four perspectives: accuracy, answer relevance, context relevance, and context recall.

[0013] The system includes an interactive process that performs the following:

[0014] S1. Obtain information including user name, department and position through system account;

[0015] S2. The system performs natural language operations including word segmentation, keyword extraction, and named entity recognition based on the sentence input by the user, and uses the base large model to encode the question text, capture its semantic information, and identify the intention or theme of the user's question;

[0016] S3. According to the intention or topic of the user's question, the system routes the request to the corresponding Agent processing module. The workflow encapsulated inside the Agent includes knowledge base retrieval, report writing, knowledge question and answer, and system real-time data acquisition;

[0017] S4. Based on the user's question, use RAG to retrieve documents or information related to the question from the knowledge base. The retrieved information is used as the context of LLM, and LLM generates answers based on this context;

[0018] S5. The system performs post-processing on the generated answers, including syntax checking and semantic verification. If the system obtains answers from multiple knowledge bases, it also performs operations such as merging, deduplication, and sorting the answers.

[0019] S6. The system converts the sorted answers into speech by calling a large multimodal model, and outputs them to the user in the form of natural language and voice broadcast. While outputting the answers, the system also includes explanations of the answers or reference indexes.

[0020] Furthermore, the large language model base includes a combination of a 2B large model, a 7B large model and a 72B large model. The 2B large model is used to extract specific parameters in user questions; the 7B large model is used to analyze and understand user intentions and route questions to different agents; and the 72B large model is used to summarize and organize the retrieved knowledge and generate answers.

[0021] Furthermore, the knowledge base management module includes constructing different knowledge bases according to different knowledge fields, segmenting the documents according to semantics and length, with the maximum segment length being a and the segment overlap length being b. If there are continuous spaces or tabs in the document, they will be deleted; the segmented documents are processed into vectors using the Embedding model, an index is constructed for each vector to improve retrieval efficiency, and finally the vectors and indexes are stored in a local vector database.

[0022] The knowledge base management module divides the text of the uploaded document according to its length to obtain a text segment set K = {k1, k2, k3, ... kn}; then uses the embedding model to vector encode the segmented set to obtain a vector set V, V = Embed (K), and then stores the encoded vector set in the FAISS database to complete the construction of the knowledge base.

[0023] Further, the agent module includes a memory component, a planning component and an execution component;

[0024] The memory component is used to store the historical interaction records between the agent and the environment, and review and use the stored information when needed. When faced with different types of needs, the agent can flexibly call on long and short-term memory to support its complex reasoning process;

[0025] The planning component breaks down complex tasks into a series of simple subtasks, which can then be solved one by one;

[0026] The execution component is used to generate specific actions, interact with users, and obtain actual execution effect feedback;

[0027] The operation of the execution component requires the cooperation of the memory component and the planning component.

[0028] The execution component enhances its execution capability based on the knowledge base, including the following steps:

[0029] Use the embedding model to vectorize the user’s question Q, Vq = Embed(Q);

[0030] Use RAG to compare question Q with the vectors in the knowledge base and get the m answers that best match the question:

[0031]

[0032] The ranking model Re-Rank is used to further filter the candidate set, re-rank the retrieved documents according to their matching degree with the question, and finally obtain a refined document set.

[0033] Furthermore, the multimodal large model includes a speech recognition large model and a text-to-speech large model. The reasoning process of the multimodal large model is described as follows:

[0034] A=MLLM(I,M)

[0035] Among them, I, M, represent instructions and multi-modal input respectively, and A represents the output of the large module.

[0036] Furthermore, the evaluation index system established by the evaluation module includes:

[0037] The accuracy P is defined as the total number of retrieved documents TD divided by the total number of retrieved relevant documents RD:

[0038]

[0039] Answer relevance is defined as the correlation between the answer and the user's question and the system prompt word. For incomplete answers or redundant answers, the score is low. The score is calculated by converting the word embedding model into a vector and then calculating the cosine similarity sim(), which ranges from 0 to 1:

[0040]

[0041] Where n represents the first n answers returned by the large model, q represents the user question, and qi represents the answer returned by the system;

[0042] Contextual recall R is defined as the total number of relevant documents in the knowledge base TRD divided by the total number of relevant documents retrieved RD:

[0043]

[0044] Context relevance CR is defined as the relevance between the answer and the context. Irrelevant answers are scored lower. The score is calculated by the large model and ranges from 0 to 1:

[0045]

[0046] Among them, ES represents the sentences related to the question extracted by the large model from the context, and TS represents all the sentences in the context.

[0047] Furthermore, the implementation steps of RAG in step S4 include:

[0048] First, we build a knowledge base, split the documents by length, use the embedding model to vectorize the text and build a set K to form a knowledge base: K = {k1, k2, k3, ... kn}, where ki represents the i-th knowledge text; RAG includes two modules: the retrieval module and the generation module. The retrieval module calculates and returns the m most similar document sequences for a given input q. To calculate the similarity, the user input is vectorized into q using the same method. The similarity between ki and q is expressed as:

[0049]

[0050] The first m pieces of knowledge vectors closest to the user's question are queried through approximation calculation; the generation module generates the answer y based on the original input q and the retrieved m pieces of knowledge k.

[0051] Furthermore, the system deeply integrates the dual prevention business system and big model technology, including functions for risk hazard identification, safety training and education, safety knowledge Q&A, active perception of security situation and intelligent report generation.

[0052] Beneficial effects: Compared with the prior art, the present invention has the following significant effects:

[0053] (1) The present invention provides personalized services for users. According to user account information, the big model can provide personalized security management services for different roles based on actual needs and usage habits to meet the differentiated needs of different users;

[0054] (2) The present invention can enhance the ability to identify and control risks. The large model is based on the knowledge base in the security field and uses natural language processing technology to understand and analyze risk information to provide more comprehensive and accurate risk assessment results, thus avoiding the problems of uneven human assessment levels and inconsistent standards.

[0055] (3) The present invention can improve the efficiency of safety management. The big model automatically analyzes the safety situation based on the monthly risk, frequency and level of hidden danger events, and promptly issues documents such as safety production assessment reports and training plans, thereby improving the timeliness of safety management;

[0056] (4) The present invention is constructed based on a local large model and a private domain knowledge base of an enterprise, and has strong pertinence and confidentiality. It can provide private customized services for enterprises with high requirements for data confidentiality and strong professionalism.

[0057] (5) The present invention can integrate a large amount of diversified information such as production safety knowledge, accident cases, expert experience and real-time data, improve the level of knowledge management in the field of production safety, and promote the accumulation and inheritance of knowledge. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 It is a functional architecture diagram of the system described in the present invention;

[0059] Figure 2 It is a flow chart of the implementation of the intention analysis module of the system of the present invention;

[0060] Figure 3 It is a schematic diagram of the execution flow of the intelligent agent in the system of the present invention;

[0061] Figure 4 It is a knowledge base retrieval flow chart in the system of the present invention. DETAILED DESCRIPTION

[0062] In order to express the features, uses and effects of the present invention more clearly, the embodiments of the present invention are further described with reference to the accompanying drawings.

[0063] Combined with the relevant applications introduced in the background technology, the current double prevention system has a wide range of applications in the field of safe production, which can improve the safety management mechanism and achieve risk prevention.

[0064] Large Language Model (LLM) refers to a deep learning model trained with a large amount of text data, which can generate natural language text or understand the meaning of language text. Large language models can handle a variety of natural language tasks, such as text classification, question answering, and dialogue, and are an important path to artificial intelligence. Currently, large language models use a Transformer architecture and pre-training objectives (such as Language Modeling) similar to small models. The difference from small models is the increase in model size, training data, and computing resources.

[0065] The present invention provides a dual prevention intelligent interactive system based on a large language model, which belongs to the field of artificial intelligence technology. The present invention deeply integrates the dual prevention business system and the large model technology to realize the functions of risk hidden danger identification, safety training education, safety knowledge Q&A, active perception of safety situation and intelligent report generation, and has high practical value.

[0066] In general, the system of the present invention includes a large language base model, which serves as the foundation of the entire system, has the ability to understand user intentions, can handle complex natural language tasks, and provide powerful token processing capabilities for other modules; the knowledge base management module is used to store and manage rich professional knowledge, and vectorize the documents uploaded by users. This module ensures that the system can provide accurate and professional answers to questions in specific fields; the intelligent agent module is the intelligent interaction core of the system, has multiple capabilities, can understand and analyze user input, provide users with personalized services, and meet users' different needs; the multimodal large model module can recognize user voice input and broadcast the system output in voice form. This module provides the system with a more comprehensive and richer interaction method; the evaluation module can evaluate the results of knowledge base questions and answers, improve the knowledge base content according to the evaluation results, and improve the accuracy of questions and answers.

[0067] like Figure 1-4 As shown, the present invention provides a dual prevention intelligent interaction system based on a large language model, including a large language base model module, a knowledge base management module, an intelligent agent module, a multimodal large model module and an evaluation module. When a user asks a question to the system, the system first obtains the user role according to the user account information, including three types: the main person in charge, the security administrator and the operator. The system understands and analyzes the user's question and routes the question to a specific resource. After receiving the question, the Agent searches and organizes the answer to the question in combination with the knowledge base and finally sends it to the user.

[0068] Further integration Figure 2-Figure 4 As shown, the large language base model is the foundation of the entire system. It is trained based on massive corpus and dialogue data, has the ability to understand user intent, can handle complex natural language tasks, and provide powerful token processing capabilities for other modules. The present invention uses large models of different sizes such as 2B, 7B and 72B, which play different roles in the data processing flow. The 2B model is used to extract specific parameters in user questions; the 7B model is used to analyze and understand user intent and route questions to different agents; the 72B model is used to summarize and organize the retrieved knowledge and generate high-quality answers.

[0069] The knowledge base management module is built based on data related to safety management, such as the Work Safety Law, safety standards, safety regulations, operating procedures, accident cases, rules and regulations, risk and hidden danger lists, etc. It uses the FAISS database for vectorized storage, supports GPU computing, and has extremely high query efficiency.

[0070] Furthermore, the construction of the knowledge base management module includes the following steps:

[0071] Collect and organize security management documents in different formats and types, including TXT, MARKDOWN, PDF, HTML, XLSX, XLS, DOCX, CSV, etc.;

[0072] According to the knowledge type, it is divided into five categories: training course, rules and regulations, laws and regulations, accident cases and risk hidden danger list. The advantage of classification database construction is that it reduces the size of the database and improves the search speed. The knowledge types in the database are relatively unified, which improves the search accuracy.

[0073] For the uploaded document, the text is segmented according to the length to obtain the text segment set K = {k1, k2, k3, ... kn};

[0074] Use the embedding model to vector encode the segmented set to obtain a vector set V, V = Embed (K). Then store the encoded vector set in the FAISS database to complete the construction of the knowledge base.

[0075] The agent module is the intelligent interaction core of the system, which can understand and analyze user input. Different agents encapsulate different workflows to provide users with personalized services. It contains three components: memory component, planning component and execution component.

[0076] The memory component can store new knowledge and is mainly used to store historical interaction records between the agent and the environment, and review and use the stored information when needed. When faced with different types of needs, the agent can flexibly call on long and short-term memory to support its complex reasoning process.

[0077] The planning component introduces a way of thinking similar to how humans solve tasks for the agent, breaking down complex tasks into a series of simple subtasks and then solving them one by one. This approach reduces the difficulty of solving tasks in one go, helps improve the efficiency and effectiveness of problem solving, and improves the adaptability of the agent to complex environments and the reliability of operations.

[0078] The execution component plays a key role in the intelligent system. The workflow is encapsulated in the execution component. The workflow defines the solution of specific tasks, including: knowledge base retrieval, real-time data acquisition, document writing, personalized training, etc. By setting the execution component, the intelligent agent can generate specific actions, interact with the user, and obtain actual execution effect feedback. The operation of the execution component requires the coordination of the memory component and the planning component.

[0079] The execution component can enhance its execution capability with the help of the knowledge base, including the following steps:

[0080] First, the embedding model is used to vectorize the user's question Q, Vq = Embed (Q), and then the RAG (retrieval-augmented generation) technology is used to compare the question Q with the vectors in the knowledge base to obtain the m most matching answers to the question. The output expression of the answer is:

[0081]

[0082] The system will further use the ranking model (Re-Rank) to further filter the candidate set, re-rank the retrieved documents according to their matching degree with the question, and finally obtain a refined document set;

[0083] The multimodal large model (Multimodal LLM) includes two large models, namely the speech recognition large model and the text-to-speech large model. The reasoning process of the multimodal large model can be described as follows:

[0084] A=MLLM(I,M)

[0085] Where I, M, respectively represent the instruction and multi-modal input, and A represents the output of the large module;

[0086] The multimodal large model module can recognize the user's voice input, convert the voice into text information, and then pass the description of the question information to the Agent. After analyzing the user's question, the Agent converts the answer to the question, knowledge base index and other information into voice broadcast and sends it to the user.

[0087] The evaluation module is used to evaluate the quality of generated answers. The present invention constructs an indicator system with four dimensions, including accuracy, answer relevance, context relevance, and context recall. The evaluation module can find missing content in the knowledge base and notify users to update and supplement relevant knowledge in a timely manner; at the same time, the evaluation module can filter out answers with higher scores. When the system receives similar questions in the future, it can directly quote high-scoring answers to avoid repeated calculations of large models, reduce computing resource consumption, and improve service quality.

[0088] Example 1: Risk Identification

[0089] Taking the process of safety managers identifying hidden dangers as an example, the user asks the system:

[0090] Question: What are the hidden dangers of having multiple connections to one switch in a distribution cabinet, and what is the basis for this?

[0091] System execution process: First, obtain the user's account information, and analyze the user's position information to determine that the user is a security manager;

[0092] Then, the user information is integrated into the question to form a new question. The big model classifies the question type according to semantics, identifies this question as a hidden danger identification question, and then directs the question request to the most appropriate agent.

[0093] Furthermore, the agent calls the hidden danger identification workflow and first understands and analyzes the current problem. In this process, it first retrieves the relevant context from the memory component in order to more comprehensively understand and analyze the current state. The historical dialogue data and context information retrieved by the agent do not contain any content related to the problem. Next, the planning component generates an action plan by comprehensively considering the information stored in the long-term and short-term memory components and referring to the answer strategies for such problems in history. Subsequently, the execution component is responsible for executing the workflow according to the task solution generated by the planning component, and retrieves the corresponding content in the hidden danger identification knowledge base with the help of the retrieval module.

[0094] Furthermore, the knowledge base retrieval process is as follows Figure 4 As shown, after the search module obtains the question, it first extracts the keywords in the question: distribution cabinet, one switch with multiple connections, hidden dangers, and basis.

[0095] To increase the probability of retrieval, the system optimizes and expands the questions. The large language model expands the questions into 5 different questions based on keywords:

[0096] (1) What are the hidden dangers of having multiple connections to one switch in a distribution cabinet, and what is the basis for this?

[0097] (2) In the power system, what potential risks are there when using a switch with multiple connections in a distribution cabinet? Please explain the theoretical or regulatory basis for these risks.

[0098] (3) Why is the one-switch-multiple-connector configuration in a power distribution cabinet considered unsafe? What are the safety regulations or theoretical basis behind it?

[0099] (4) Explain in detail the specific problems that may result from the use of a one-switch, multiple-connection method in distribution cabinets, and indicate on which industry standards or regulations these problems are defined?

[0100] (5) In terms of power safety management, why is the use of multiple connections in a switch cabinet not recommended? Please list the specific hidden dangers and the criteria and basis for determining these hidden dangers.

[0101] Furthermore, the system uses the embedding model to encode the above five questions and obtain the question vector set Q, Q = {q1, q2, q3, q4, q5};

[0102] The system compares the above five question vectors with the information in the knowledge base and returns the n most similar search results. The similarity calculation method is as follows:

[0103]

[0104] The returned n search results are sorted and optimized again. By re-evaluating the relevance between the initially retrieved documents and the query, more relevant documents are placed in the front, documents that are irrelevant or less relevant to the query are excluded, noise is reduced, and the optimal top k results are obtained;

[0105] Topk=ReRank(A1,A2,A3……An)

[0106] The large language model summarizes and organizes the question and k results, and outputs the final answer: "One switch and multiple connections in a distribution cabinet means that a main switch or branch switch controls multiple electrical equipment at the same time, which may cause unstable operation of electrical equipment and increase the risk of failure. According to Article 8.1.16 of the "Technical Specifications for Temporary Electricity Safety at Construction Sites" (JGJ 46-2015), the inlet and outlet ports of distribution boxes and switch boxes should be equipped with fixed line cards, and the inlet and outlet lines should be covered with insulating sheaths."

[0107] Furthermore, the multimodal large model converts the above output into voice broadcast and sends it to the user.

[0108] The evaluation model evaluates the output answer and obtains the following results:

[0109] Accuracy: 1.0

[0110] Answer correlation: 0.94

[0111] Contextual relevance: 0.75

[0112] Contextual call: 1.0

[0113] Example 2: Personalized training

[0114] Take the workflow of user personalized training Agent as an example. The memory component contains storage nodes, which store nearly 50 conversation messages of users; the planning component contains input nodes, intention analysis nodes, interface call nodes and output nodes; the execution component contains input nodes, knowledge retrieval nodes, long text writing nodes and output nodes.

[0115] The memory component records the history of the user's conversation with the system. First, the planning component analyzes the user's historical conversations and finds that the user has recently asked questions related to fire emergency handling. Second, the planning component analyzes the user's role and finds that the user is the director of the XX workshop. Finally, the planning component calls the dual prevention system interface and analyzes the data to find that the workshop has flammable materials and there is a fire risk. The planning component summarizes the above information and outputs:

[0116] (1) The user is a workshop manager and needs to answer user questions from the perspective of production management;

[0117] (2) Analyze the risk level of the risk;

[0118] (3) Provide users with corresponding training content based on risk level and risk content;

[0119] After receiving the output of the planning component and the relevant context, the execution component performs the following steps:

[0120] 1) Use the LEC method to analyze the level of risk;

[0121] L 3.0, E 6.0, C 30.0, D 540 Risk level: Major risk

[0122] 2) Develop training content outline based on risks:

[0123] a. Storage location and characteristics of flammable items;

[0124] b. Layout and use of fire-fighting facilities;

[0125] c. Safety inspection of electrical circuits and equipment;

[0126] d. Development and rehearsal of emergency plans.

[0127] (4) Retrieve relevant content from the knowledge base according to the outline, write detailed training content, and output a complete solution for users.

[0128] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A dual-prevention intelligent interaction system based on a large language model, characterized in that: include: The large language model base is used to understand user intent and process natural language tasks, and provides token processing capabilities for other modules, including the use of large language models of different sizes to process different data; The knowledge base management module is used to classify, store and manage professional knowledge, including converting documents in different formats uploaded by users into vectors, and then creating indexes based on semantics, including implementing localized storage; The agent module is used to analyze user input. Different workflows are encapsulated in different agents to provide personalized services to users. The multimodal large model module receives the user's voice input, converts the voice into text, and then passes the information description to the agent. The agent generates an answer by analyzing the semantics, and finally converts the text into voice and sends it to the user; The evaluation module is used to evaluate the results of knowledge base question answering, including establishing an evaluation index system from four perspectives: accuracy, answer relevance, context relevance, and context recall; The system includes an interactive process that performs the following: S1. Obtain information including user name, department and position through system account, thereby determining the user's identity and field of expertise; S2. The system performs natural language operations including word segmentation, keyword extraction, and named entity recognition based on the sentence input by the user, and uses the base large model to encode the question text, capture its semantic information, and identify the intention or theme of the user's question; S3. According to the intention or topic of the user's question, the system routes the request to the corresponding Agent processing module. The workflow encapsulated inside the Agent includes knowledge base retrieval, report writing, knowledge question and answer, and system real-time data acquisition; S4. Based on the user's question, use RAG to retrieve documents or information related to the question from the knowledge base. The retrieved information is used as the context of LLM, and LLM generates answers based on this context; S5. The system performs post-processing on the generated answers, including syntax checking and semantic verification. If the system obtains answers from multiple knowledge bases, it also performs operations such as merging, deduplication, and sorting the answers. S6. The system converts the sorted answers into speech by calling a large multimodal model, and outputs them to the user in the form of natural language and voice broadcast. While outputting the answers, the system also includes explanations of the answers or reference indexes.

2. The dual prevention intelligent interaction system based on a large language model according to claim 1 is characterized in that: The large language model base includes a combination of a 2B large model, a 7B large model and a 72B large model. The 2B large model is used to extract specific parameters in user questions; the 7B large model is used to analyze and understand user intentions and route questions to different agents; and the 72B large model is used to summarize and organize the retrieved knowledge and generate answers.

3. The dual prevention intelligent interaction system based on a large language model according to claim 1 is characterized in that: The knowledge base management module includes building different knowledge bases according to different knowledge fields, segmenting documents according to semantics and length, with the maximum segment length being a and the segment overlap length being b. If there are continuous spaces or tabs in the document, they will be deleted; the segmented documents are processed into vectors using the Embedding model, an index is constructed for each vector to improve retrieval efficiency, and finally the vectors and indexes are stored in a local vector database.

4. The dual prevention intelligent interaction system based on a large language model according to claim 3 is characterized in that: The knowledge base management module divides the text of the uploaded document according to its length to obtain a text segment set K = {k1, k2, k3, ... kn}; then uses the embedding model to vector encode the segmented set to obtain a vector set V, V = Embed (K), and then stores the encoded vector set in the FAISS database to complete the construction of the knowledge base.

5. The dual prevention intelligent interaction system based on a large language model according to claim 1 is characterized in that: The agent module includes a memory component, a planning component and an execution component; The memory component is used to store the historical interaction records between the agent and the environment, and review and use the stored information when needed. When faced with different types of needs, the agent can flexibly call on long and short-term memory to support its complex reasoning process; The planning component breaks down complex tasks into a series of simple subtasks, which can then be solved one by one; The execution component is used to generate specific actions, interact with users, and obtain actual execution effect feedback; The operation of the execution component requires the cooperation of the memory component and the planning component.

6. The dual prevention intelligent interaction system based on a large language model according to claim 5 is characterized in that: The execution component enhances its execution capability based on the knowledge base, including the following steps: Use the embedding model to vectorize the user’s question Q, Vq = Embed(Q); Use RAG to compare question Q with the vectors in the knowledge base and get the m answers that best match the question: The ranking model Re-Rank is used to further filter the candidate set, re-rank the retrieved documents according to their matching degree with the question, and finally obtain a refined document set.

7. The dual prevention intelligent interaction system based on a large language model according to claim 1 is characterized in that: The multimodal large model includes a speech recognition large model and a text-to-speech large model. The reasoning process of the multimodal large model is described as follows: A=MLLM(I,M) Among them, I, M, represent instructions and multi-modal input respectively, and A represents the output of the large module.

8. The dual prevention intelligent interaction system based on a large language model according to claim 1 is characterized in that: The evaluation index system established by the evaluation module includes: The accuracy P is defined as the total number of retrieved documents TD divided by the total number of retrieved relevant documents RD: Answer relevance is defined as the correlation between the answer and the user's question and the system prompt word. For incomplete answers or redundant answers, the score is low. The score is calculated by converting the word embedding model into a vector and then calculating the cosine similarity sim(), which ranges from 0 to 1: Where n represents the first n answers returned by the large model, q represents the user question, and qi represents the answer returned by the system; Contextual recall R is defined as the total number of relevant documents in the knowledge base TRD divided by the total number of relevant documents retrieved RD: Context relevance CR is defined as the relevance between the answer and the context. Irrelevant answers are scored lower. The score is calculated by the large model and ranges from 0 to 1: Among them, ES represents the sentences related to the question extracted by the large model from the context, and TS represents all the sentences in the context.

9. The dual prevention intelligent interaction system based on a large language model according to claim 1 is characterized in that: The implementation steps of RAG in step S4 include: First, we build a knowledge base, split the documents by length, use the embedding model to vectorize the text and build a set K to form a knowledge base: K = {k1, k2, k3, ... kn}, where ki represents the i-th knowledge text; RAG includes two modules: the retrieval module and the generation module. The retrieval module calculates and returns the m most similar document sequences for a given input q. To calculate the similarity, the user input is vectorized into q using the same method. The similarity between ki and q is expressed as: The first m pieces of knowledge vectors closest to the user's question are queried through approximation calculation; the generation module generates the answer y based on the original input q and the retrieved m pieces of knowledge k.

10. The application of the dual prevention intelligent interaction system based on a large language model according to claim 1, characterized in that: The system deeply integrates the dual prevention business system and big model technology, including functions for risk hazard identification, safety training and education, safety knowledge Q&A, active perception of security situation and intelligent report generation.

Citation Information

Patent Citations

  • Bridge field intelligent question-answering method, bridge field generation type large model training method and training device

    CN118228822A

  • Method for improving answer accuracy for generative ai-based multiple questions

    KR102711560B1

  • Method and system for data conversations

    US20210390096A1

  • Data pushing method and system based on behavior trajectory, and computer device

    WO2021259007A1

Cited By

  • Large language model method and device

    CN119849645A

  • Long document semantic coherence processing method and device, storage medium and computer equipment

    CN119886072A

  • Long document semantic coherence processing method, device, storage medium and computer equipment

    CN119886072B

  • ME-RAG-based data center large model intelligent operation and maintenance method and system

    CN120011523A

  • A method and system for intelligent operation and maintenance of a large data center model based on ME-RAG

    CN120011523B