A device demand matching method, device and storage medium based on LLM

By using the equipment entity annotation model and RetrievalQA retrieval enhancement processing in LLM, the problem of complex equipment parameters and too much invalid information in the enterprise knowledge base is solved, the accuracy and efficiency of equipment recommendation are improved, and the establishment and management of the knowledge base are optimized. process, achieving more efficient device requirement matching and text understanding.

CN118312583BActive Publication Date: 2024-09-27GUANGZHOU BAOLUN ELECTRONICS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410513054.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2024-09-27
Estimated Expiration
2044-04-26

AI Technical Summary

Technical Problem

When existing technology uses large language models (LLM) to perform document retrieval and matching on enterprise knowledge bases, device parameter information is complex and there is a lot of invalid information, resulting in low accuracy and efficiency of device recommendations, and a lack of knowledge base establishment and management. Automation and standardization lead to low retrieval efficiency.

Method used

By obtaining the equipment knowledge list, using the equipment entity annotation model to output entity feature information, and inputting it into the LLM large model for retrieval, equipment demand matching information is generated. Combined with RetrievalQA retrieval enhancement processing, the accuracy and efficiency of matching are improved, and Text2vec is used to embed the model. Process documents, store them in a vector database, and optimize device recommendations.

Benefits of technology

It improves the accuracy and efficiency of equipment recommendation, speeds up the establishment and management process of the knowledge base, improves the accuracy and timeliness of equipment demand matching, and enhances the text understanding and recommendation capabilities of the enterprise equipment knowledge base.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118312583B
    Figure CN118312583B
Patent Text Reader

Abstract

The invention discloses an equipment demand matching method, device and storage medium based on LLM, belonging to the technical field of data retrieval, and the method comprises: obtaining an equipment knowledge list; inputting the equipment knowledge list into an equipment entity annotation model, and outputting entity feature requirement information; inputting the entity feature requirement information into a RAG model, and generating a prompt word text; inputting the prompt word text into an LLM big model, and the LLM big model performs retrieval in a vector database to obtain corresponding information document slice text, and generates a question input sentence according to the information document slice text; the information document slice text is obtained by processing an enterprise knowledge document; after performing retrieval enhancement processing on the question input sentence, it is input into the LLM big model, and the corresponding equipment demand matching information is generated and output, and the matching of the equipment demand in the equipment knowledge list is completed, so as to improve the accuracy and efficiency of equipment recommendation, accelerate the establishment and management process of the knowledge base, and improve the accuracy and timeliness of equipment demand matching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data retrieval technology, and in particular to a method, a device and a storage medium for equipment requirement matching based on LLM. Background Art

[0002] Large language model (LLM) is a deep learning algorithm that can perform various natural language processing (NLP) tasks to learn the patterns and regularities of natural language. Large language models are usually trained in an unsupervised learning manner, that is, self-training on large-scale text data. During the training process, the model learns the regularities of the language by predicting the next word or character in the text sequence, and updates the model parameters based on the prediction results. This training method enables the model to learn rich language knowledge, so that it can generate fluent and accurate text. Enterprise knowledge base is a special database used for enterprise knowledge management to facilitate the collection, organization and extraction of relevant domain knowledge.

[0003] The problem with the existing technology of using LLM to retrieve and match documents in the enterprise knowledge base is that because the various parameter information of enterprise equipment is too complex and there is a lot of invalid or unmatched information in the equipment knowledge documents, LLM may not be able to accurately identify and extract key and important equipment information in the enterprise knowledge base, resulting in low accuracy and efficiency of equipment recommendation. At the same time, the establishment and management process of the knowledge base may lack automation, efficiency, and standardization, resulting in low efficiency of LLM in knowledge retrieval and search of enterprise knowledge bases. Summary of the invention

[0004] The present invention provides a method, device and storage medium for matching equipment requirements based on LLM, so as to improve the accuracy and efficiency of equipment recommendation, speed up the establishment and management process of knowledge base, and improve the accuracy and timeliness of equipment requirement matching.

[0005] The present invention provides a device requirement matching method based on LLM, comprising:

[0006] Obtaining a device knowledge list; the device knowledge list is compiled by the user based on device demand information;

[0007] Input the equipment knowledge list into the equipment entity annotation model, and output entity feature requirement information;

[0008] Input the prompt word text into the LLM big model, so that the LLM big model searches in the vector database to obtain the corresponding information document slice text, and generate a first question input sentence according to the information document slice text;

[0009] The vector database is used to store information document slice text, and the information document slice text is obtained by processing the enterprise knowledge document;

[0010] After the first question input statement is subjected to retrieval enhancement processing, it is input into the LLM large model, and the corresponding equipment requirement matching information is generated and output to complete the matching of the equipment requirements in the equipment knowledge list.

[0011] Furthermore, the equipment knowledge list is input into the equipment entity annotation model, and entity feature requirement information is output, specifically:

[0012] Loading the device entity annotation model through spacy, so that the device entity annotation model can identify and annotate the device entity in the device knowledge list and output entity feature requirement information;

[0013] Among them, the device entity annotation model is obtained by deep learning training of the initial device entity annotation model through the NLP algorithm; the device entity annotation model is used to identify and annotate the device entities in the input device knowledge list and generate entity feature requirement information; the entity feature requirement information includes the device name, device model and device characteristics in the device knowledge list.

[0014] Furthermore, the prompt word text is input into the LLM large model, so that the LLM large model searches in the vector database to obtain the corresponding information document slice text, and generates a first question input sentence according to the information document slice text, specifically:

[0015] Input the prompt word text into the LLM large model, so that the LLM large model searches the vector database according to the prompt word text to obtain the corresponding information document slice text;

[0016] Sorting the information document slice texts according to the key importance values ​​of the prompt word texts, generating context information, and setting the priority of the context information;

[0017] The context information with priority is filled into the first question template of the LLM large model to generate the first question input statement.

[0018] Furthermore, the vector database is used to store information document slice text, and the information document slice text is obtained by processing the enterprise knowledge document, specifically:

[0019] The enterprise knowledge document is segmented according to the preset separator to obtain several sub-documents;

[0020] Embedding and vectorizing each of the sub-documents to convert them into a number of information document slice texts;

[0021] The text of each information document slice is stored in a vector database.

[0022] Furthermore, each of the sub-documents is embedded and vectorized and converted into a number of information document slice texts, specifically:

[0023] Input each of the sub-documents into a Text2vec embedding model, convert each of the sub-documents into a vector, and obtain a plurality of information document slice texts;

[0024] The Text2vec embedding model is used to convert the input sub-documents into vectors.

[0025] Furthermore, after the first question input statement is subjected to search enhancement processing, it is input into the LLM large model to generate and output corresponding equipment demand matching information, specifically:

[0026] RetrievalQA is used to search for documents in a document database to obtain documents corresponding to the first question input statement; the document database is used to store documents preset by the user;

[0027] Generate a second question input sentence of the LLM big model according to the retrieved document and the second question template of the LLM big model;

[0028] The second question input statement is input into the LLM big model, so that the LLM big model generates and outputs corresponding equipment requirement matching information according to the context information of the document and the second question input statement.

[0029] Furthermore, after generating and outputting the corresponding device requirement matching information, the method further includes:

[0030] Add the second question input sentence to the text training set and save it in the training database;

[0031] The text training set is used to train and fine-tune the LLM large model.

[0032] As a preferred solution, the present invention uses LLM technology and enterprise knowledge base to implement equipment demand information sorted out according to user or enterprise bids, and matches equipment that meets the requirements from the enterprise knowledge base. The present invention uses NLP entity annotation training to train text training set data that has annotated enterprise equipment knowledge entities, and generates a trained entity annotation training model. Through the trained model, the demand entities in the equipment demand text are loaded. Because the entity obtained is loaded with the entity annotation model trained by the enterprise knowledge base, some non-critical information is filtered out, so that the obtained entity information is more matched with the enterprise equipment entity, which can improve the accuracy of equipment recommendation. At the same time, LLM is used to build and recommend equipment demand matching to achieve text understanding and recommendation of the enterprise equipment knowledge base, thereby improving the accuracy and efficiency of equipment recommendations, accelerating the establishment and management process of the knowledge base, and improving the accuracy and timeliness of equipment demand matching.

[0033] Other features and advantages of the present invention will be described in detail in the following detailed description.

[0034] Accordingly, the present invention also provides an equipment requirement matching device based on LLM, comprising: an acquisition module, a marking module, a retrieval module and a matching module;

[0035] The acquisition module is used to acquire a device knowledge list; the device knowledge list is compiled by the user according to device demand information;

[0036] The annotation module is used to input the equipment knowledge list into the equipment entity annotation model and output entity feature requirement information;

[0037] The retrieval module is used to input the prompt word text into the LLM large model, so that the LLM large model searches in the vector database to obtain the corresponding information document slice text, and generates a first question input sentence according to the information document slice text;

[0038] The vector database is used to store information document slice text, and the information document slice text is obtained by processing the enterprise knowledge document;

[0039] The matching module is used to perform retrieval enhancement processing on the first question input statement, input the LLM large model, generate and output corresponding equipment requirement matching information, and complete the matching of equipment requirements in the equipment knowledge list.

[0040] Furthermore, it also includes: an enterprise knowledge document processing module;

[0041] The enterprise knowledge document processing module is used to segment the enterprise knowledge document according to a preset separator to obtain a plurality of sub-documents;

[0042] Embedding and vectorizing each of the sub-documents to convert them into a number of information document slice texts;

[0043] The text of each information document slice is stored in a vector database.

[0044] Correspondingly, the present invention also provides a computer-readable storage medium, which includes a stored computer program; wherein, when the computer program is running, it controls the device where the computer-readable storage medium is located to execute a device demand matching method based on LLM as described in the content of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a flowchart of an embodiment of the device demand matching method based on LLM provided by the present invention;

[0046] Figure 2 It is a structural diagram of an embodiment of the device requirement matching apparatus based on LLM provided by the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not 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.

[0048] In the present invention, LLM refers to a specific large language model, such as GPT-4, CHATGLM3 and Tongyi Qianwen, which is used to understand and process the device recommendation work of the enterprise device knowledge base text.

[0049] In the present invention, the enterprise knowledge base is the equipment knowledge base that the enterprise has established, such as product name, introduction, specifications, brand, model, technical parameters and characteristics, etc. It will slice the documents after embedding vectorization and then store them in the vector database. This approach helps to improve the efficiency of LLM document retrieval and matching, and can also save storage space and improve search speed.

[0050] Embodiment 1

[0051] Please refer to Figure 1 , a device requirement matching method based on LLM provided in an embodiment of the present invention, comprising steps S101-S103:

[0052] Step S101: Obtain a device knowledge list; the device knowledge list is compiled by the user according to device demand information;

[0053] In this embodiment, the equipment knowledge list includes but is not limited to a corporate tender or equipment demand sheet that records equipment demand information.

[0054] Step S102: input the equipment knowledge list into the equipment entity annotation model, and output entity feature requirement information;

[0055] Furthermore, the equipment knowledge list is input into the equipment entity annotation model, and entity feature requirement information is output, specifically:

[0056] Loading the device entity annotation model through spacy, so that the device entity annotation model can identify and annotate the device entity in the device knowledge list and output entity feature requirement information;

[0057] Among them, the device entity annotation model is obtained by deep learning training of the initial device entity annotation model through the NLP algorithm; the device entity annotation model is used to identify and annotate the device entities in the input device knowledge list and generate entity feature requirement information; the entity feature requirement information includes the device name, device model and device characteristics in the device knowledge list.

[0058] In this embodiment, an entity annotation training set of a device knowledge list is constructed. This training set includes: text, entities in the text, and index positions of entities in the text. Entities include device names, models, features, and functions. For example, the text is: "This is a paperless device." The corresponding entities in the text and the index positions of entities in the text are: [(4,8,'Product')]), where the information with the entity "Product" in the text is "Paperless Device", and its character position index is between 4 and 8.

[0059] In this embodiment, the training set text data is converted into a format acceptable to the model, and then deep learning training is performed on it using an NLP algorithm so that the model can accurately identify and annotate device-related entities in the text. The trained model can quickly and accurately annotate the device name, model, features, and other information in the text based on the input text.

[0060] In this embodiment, spacy is a popular NLP library that provides many functions, including entity recognition. The purpose of using spacy to load the entity model is to utilize the entity recognition function it provides. For equipment demand sheets or bidding requirements, the required accurate entity feature requirement information can be obtained by loading the trained equipment entity annotation model with spacy. The specific steps are as follows:

[0061] Import the device knowledge list into the spacy library; the spacy library loads the model with the training path model_path to perform named entity recognition on the device knowledge list, identify the device name, model, characteristics and other information in the device knowledge list, and print the text, part-of-speech tag and corresponding part-of-speech description of each word.

[0062] Step S103: inputting the prompt word text into the LLM big model, so that the LLM big model searches in the vector database to obtain the corresponding information document slice text, and generating a first question input sentence according to the information document slice text; the vector database is used to store the information document slice text, and the information document slice text is obtained by processing the enterprise knowledge document;

[0063] Furthermore, the prompt word text is input into the LLM large model, so that the LLM large model searches in the vector database to obtain the corresponding information document slice text, and generates a first question input sentence according to the information document slice text, specifically:

[0064] Input the prompt word text into the LLM large model, so that the LLM large model searches the vector database according to the prompt word text to obtain the corresponding information document slice text;

[0065] Sorting the information document slice texts according to the key importance values ​​of the prompt word texts, generating context information, and setting the priority of the context information;

[0066] The context information with priority is filled into the first question template of the LLM large model to generate the first question input statement.

[0067] In this embodiment, the occurrence frequency and similarity ranking scores of entities in different information document slice texts are comprehensively considered to obtain a key important value:

[0068] The key importance values ​​of the prompt word text are normalized. Assuming that the frequency of entities in the same information document slice text ranges from [0, 100] and the similarity ranking score ranges from [0, 1], we can use Min-Max normalization to scale them all to the range of [0, 1].

[0069] Assume that the entity has a frequency of 50 in the first information document slice text and a similarity ranking score of 0.8, and a frequency of 30 in the second information document slice text and a similarity ranking score of 0.6. We can calculate the normalized scores and the comprehensive key importance value by following the steps below:

[0070] Normalized occurrence frequency: f1 = (50-0) / (100-0) = 0.5, f2 = (30-0) / (100-0) = 0.3;

[0071] Normalized similarity ranking scores: s1 = 0.8, s2 = 0.6;

[0072] Assuming that the occurrence frequency weight w1 = 0.6 and the similarity ranking weight w2 = 0.4, the key importance value of the entity in the first information document slice text = 0.6×0.5+0.4×0.8=0.62, and the key importance value of the entity in the second information document slice text = 0.6×0.3+0.4×0.6=0.42.

[0073] Similarly, we can also set different frequency weights for each entity in a complex way, and finally calculate the formula for the key importance value:

[0074] The key to integration

[0075] n is the number of entities, w fi is the frequency weight of entity i, f i is the frequency of entity i, w s is the similarity ranking weight, and s is the similarity ranking score.

[0076] Furthermore, the vector database is used to store information document slice text, and the information document slice text is obtained by processing the enterprise knowledge document, specifically:

[0077] The enterprise knowledge document is segmented according to the preset separator to obtain several sub-documents;

[0078] Embedding and vectorizing each of the sub-documents to convert them into a number of information document slice texts;

[0079] The text of each information document slice is stored in a vector database.

[0080] In this embodiment, the enterprise knowledge document is segmented according to specified specific separators, such as two line breaks, "##", etc., to segment the document into appropriate segments or smaller documents.

[0081] The segmented document fragments are embedded and vectorized, and represented as vectors, which are used to represent the meaning of the text.

[0082] Embedding compresses the semantic information of a text (long string) into a vector, but it has restrictions on the tokens contained in the text.

[0083] Furthermore, each of the sub-documents is embedded and vectorized and converted into a number of information document slice texts, specifically:

[0084] Input each of the sub-documents into a Text2vec embedding model, convert each of the sub-documents into a vector, and obtain a plurality of information document slice texts;

[0085] The Text2vec embedding model is used to convert the input sub-documents into vectors.

[0086] Step S104: After performing search enhancement processing on the first question input statement, the LLM large model is input to generate and output corresponding equipment requirement matching information to complete the matching of equipment requirements in the equipment knowledge list.

[0087] Furthermore, after the first question input statement is subjected to search enhancement processing, it is input into the LLM large model to generate and output corresponding equipment demand matching information, specifically:

[0088] RetrievalQA is used to search for documents in a document database to obtain documents corresponding to the first question input statement; the document database is used to store documents preset by the user;

[0089] Generate a second question input sentence of the LLM big model according to the retrieved document and the second question template of the LLM big model;

[0090] The second question input statement is input into the LLM big model, so that the LLM big model generates and outputs corresponding equipment requirement matching information according to the context information of the document and the second question input statement.

[0091] Furthermore, after generating and outputting the corresponding device requirement matching information, the method further includes:

[0092] Add the second question input sentence to the text training set and save it in the training database;

[0093] The text training set is used to train and fine-tune the LLM large model.

[0094] In this embodiment, accurate question and answer sentences are added to the text training set through recommendation accuracy feedback, that is, the question and answer sentences in the form of Prompt+Completion can be recorded in a table or saved in a database, and the formats support CSV, TSV, XLSX, JSON, etc. The text training set is used to train and fine-tune the LLM large model, thereby further improving the accuracy and efficiency of the LLM large model's recommendations when encountering similar device requirements in the future, forming a virtuous circle.

[0095] In this embodiment, the question-answering statement is in the form of Prompt+Completion, such as:

[0096] {"prompt":"Please recommend a 4K ultra-high-definition display","completion":"Interactive smart flat-panel TV-86820, product features 1. True 4K ultra-high-definition display, zero-fitting design, AG tempered glass, high color gamut. 2. Built-in Android operating system, supports optional ultra-thin plug-in PC modules. 3. The touch algorithm is highly optimized, the response speed is fast, and the writing and presentation fluency is high. 4. Supports touch operation of signal source, volume and other menus under the display state of each signal source."}.

[0097] Implementing the embodiments of the present invention has the following effects:

[0098] The present invention utilizes LLM technology and enterprise knowledge base to implement equipment demand information sorted out according to user or enterprise bid documents, and matches equipment that meets the demand from the enterprise knowledge base. The present invention trains text training set data that has been annotated with enterprise equipment knowledge entities through NLP entity annotation training, and generates a trained entity annotation training model. Through the trained model, the demand entity in the equipment demand text is loaded. Because the entity obtained is loaded with the entity annotation model trained by the enterprise knowledge base, some non-critical information is filtered out, so that the obtained entity information is more matched with the enterprise equipment entity, which can improve the accuracy of equipment recommendation. At the same time, LLM is used to build and recommend equipment demand matching to achieve text understanding and recommendation of the enterprise equipment knowledge base, thereby improving the accuracy and efficiency of equipment recommendation, accelerating the establishment and management process of the knowledge base, and improving the accuracy and timeliness of equipment demand matching.

[0099] Embodiment 2

[0100] Please refer to Figure 2 , a device requirement matching device based on LLM provided by an embodiment of the present invention, comprising: an acquisition module 201, a marking module 202, a retrieval module 203 and a matching module 204;

[0101] The acquisition module is used to acquire a device knowledge list; the device knowledge list is compiled by the user according to device demand information;

[0102] The annotation module is used to input the equipment knowledge list into the equipment entity annotation model and output entity feature requirement information;

[0103] The retrieval module is used to input the prompt word text into the LLM large model, so that the LLM large model searches in the vector database to obtain the corresponding information document slice text, and generates a first question input sentence according to the information document slice text;

[0104] The vector database is used to store information document slice text, and the information document slice text is obtained by processing the enterprise knowledge document;

[0105] The matching module is used to perform retrieval enhancement processing on the first question input statement, input the LLM large model, generate and output corresponding equipment requirement matching information, and complete the matching of equipment requirements in the equipment knowledge list.

[0106] Furthermore, it also includes: an enterprise knowledge document processing module;

[0107] The enterprise knowledge document processing module is used to segment the enterprise knowledge document according to a preset separator to obtain a plurality of sub-documents;

[0108] Embedding and vectorizing each of the sub-documents to convert them into a number of information document slice texts;

[0109] The text of each information document slice is stored in a vector database.

[0110] The above-mentioned device requirement matching apparatus based on LLM can implement the device requirement matching method based on LLM of the above-mentioned method embodiment. The optional items in the above-mentioned method embodiment are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiment of this application can refer to the contents of the above-mentioned method embodiment and will not be described in detail in this embodiment.

[0111] Embodiment 3

[0112] Correspondingly, the present invention also provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the LLM-based device demand matching method as described in any one of the above embodiments.

[0113] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the terminal device.

[0114] The terminal device may be a computing device such as a desktop computer, a notebook, a palmtop computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0115] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.

[0116] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile terminal, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0117] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0118] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A device demand matching method based on LLM, characterized in that: include: Obtaining a device knowledge list; the device knowledge list is compiled by the user according to device demand information; Inputting the equipment knowledge list into the equipment entity annotation model, and outputting entity feature requirement information; Inputting the entity feature requirement information into the RAG model to generate prompt word text; The prompt word text is input into the LLM large model, so that the LLM large model searches in the vector database to obtain the corresponding information document slice text, and generates a first question input sentence according to the information document slice text, specifically: Input the prompt word text into the LLM large model, so that the LLM large model searches the vector database according to the prompt word text to obtain the corresponding information document slice text; Sorting the information document slice texts according to the key importance values ​​of the prompt word texts, generating context information, and setting the priority of the context information; Fill the context information with priority into the first question template of the LLM large model to generate a question input statement; The vector database is used to store information document slice texts, and the information document slice texts are obtained by processing enterprise knowledge documents, specifically: The enterprise knowledge document is segmented according to the preset separator to obtain several sub-documents; Embedding and vectorizing each of the sub-documents to convert them into a number of information document slice texts; Storing each of the information document slice texts in a vector database; After the first question input statement is subjected to search enhancement processing, it is input into the LLM large model to generate and output the corresponding equipment demand matching information, specifically: RetrievalQA is used to search for documents in a document database to obtain documents corresponding to the first question input statement; the document database is used to store documents preset by the user; Generate a second question input statement of the LLM big model according to the retrieved document and the second question template of the LLM big model; Inputting the second question input statement into the LLM big model, so that the LLM big model generates and outputs corresponding device requirement matching information according to the context information of the document and the second question input statement; Complete the matching of equipment requirements in the equipment knowledge list.

2. The device demand matching method based on LLM as claimed in claim 1, characterized in that: The equipment knowledge list is input into the equipment entity annotation model, and the entity feature requirement information is output, specifically: Loading the device entity annotation model through spacy, so that the device entity annotation model can identify and annotate the device entity in the device knowledge list and output entity feature requirement information; Among them, the device entity annotation model is obtained by deep learning training of the initial device entity annotation model through the NLP algorithm; the device entity annotation model is used to identify and annotate the device entities in the input device knowledge list and generate entity feature requirement information; the entity feature requirement information includes the device name, device model and device characteristics in the device knowledge list.

3. The device demand matching method based on LLM as claimed in claim 1, characterized in that: The embedding and vectorization of each sub-document is performed to convert it into a plurality of information document slice texts, specifically: Input each of the sub-documents into a Text2vec embedding model, convert each of the sub-documents into a vector, and obtain a plurality of information document slice texts; The Text2vec embedding model is used to convert the input sub-documents into vectors.

4. The device demand matching method based on LLM as claimed in claim 1, characterized in that: After the corresponding device requirement matching information is generated and outputted, the method further includes: Add the second question input sentence to the text training set and save it in the training database; The text training set is used to train and fine-tune the LLM large model.

5. A device demand matching device based on LLM, characterized in that: include: Acquisition module, annotation module, retrieval module and matching module; The acquisition module is used to acquire a device knowledge list; the device knowledge list is compiled by the user according to device demand information; The annotation module is used to input the equipment knowledge list into the equipment entity annotation model and output entity feature requirement information; The retrieval module is used to input the entity feature requirement information into the RAG model to generate a prompt word text; The prompt word text is input into the LLM large model, so that the LLM large model searches in the vector database to obtain the corresponding information document slice text, and generates a first question input sentence according to the information document slice text, specifically: Input the prompt word text into the LLM large model, so that the LLM large model searches the vector database according to the prompt word text to obtain the corresponding information document slice text; Sorting the information document slice texts according to the key importance values ​​of the prompt word texts, generating context information, and setting the priority of the context information; Fill the context information with priority into the first question template of the LLM large model to generate a question input statement; The vector database is used to store information document slice texts, and the information document slice texts are obtained by processing enterprise knowledge documents, specifically: The enterprise knowledge document is segmented according to the preset separator to obtain several sub-documents; Embedding and vectorizing each of the sub-documents to convert them into a number of information document slice texts; Storing each of the information document slice texts in a vector database; The matching module is used to perform search enhancement processing on the first question input statement, input the LLM large model, generate and output corresponding equipment demand matching information, specifically: RetrievalQA is used to search for documents in a document database to obtain documents corresponding to the first question input statement; the document database is used to store documents preset by the user; Generate a second question input sentence of the LLM big model according to the retrieved document and the second question template of the LLM big model; Inputting the second question input statement into the LLM big model, so that the LLM big model generates and outputs corresponding device requirement matching information according to the context information of the document and the second question input statement; Complete the matching of equipment requirements in the equipment knowledge list.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program; wherein, when the computer program is run, it controls the device where the computer-readable storage medium is located to execute a device requirement matching method based on LLM as described in any one of claims 1 to 4.

Citation Information

Cited By

  • Method and device for generating quotation sheet based on large language model

    CN119311698A