Method and device for constructing warehouse management intelligent customer service based on local LLM

By fine-tuning training of large language models and generating local vector knowledge bases, the problems of insufficient accuracy of large language models and difficulty in positioning answers in warehouse management scenarios are solved, and efficient and accurate warehousing information query and intelligent customer service functions are achieved.

CN119884326AActive Publication Date: 2025-04-25RIAMB (BEIJING) TECH DEV CO LTD

Patent Information

Application Number
CN202510360679.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-04-25
Estimated Expiration
2045-03-26

AI Technical Summary

Technical Problem

When applying large language models in warehousing management scenarios, we face the problems of insufficient accuracy and difficulty in answer positioning, especially when the cloud-side large language models cannot be directly used in the LAN environment.

Method used

By obtaining text information of the warehousing management system in the logistics field, sorting it into a question-and-answer data set, fine-tuning training of the large language model; calling the local knowledge document of the warehousing management system generates a local vector knowledge base; according to user's questions, it is divided into conceptual or business-oriented problems, and using semantic parsers and large language models to generate reply content.

Benefits of technology

It enhances the directionality of large-scale model answers, avoids the problem of illusion that directly generates SQL statements in natural language, improves the accuracy and controllability of the database retrieval process, reduces the threshold for non-professional personnel to use WMS, and improves the efficiency and convenience of warehousing information query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884326A_ABST
    Figure CN119884326A_ABST
Patent Text Reader

Abstract

The invention relates to a method and equipment for constructing a warehouse management intelligent customer service based on a local LLM, and the method and equipment can obtain text information of a warehouse management system in the logistics field, arrange the text information into a question and answer data set, and carry out the fine tuning training of a large language model. Calling a local knowledge document of the warehouse management system to generate a local vector knowledge base; a user question proposed by a user in a natural language is obtained, if the question is a conceptual question, text block vectors with high similarity are retrieved in the local vector knowledge base, and a large language model generates reply content; if the questions are business questions, escaping the questions of the user into query cues; positioning to a corresponding data table; generating a natural language representation text corresponding to each piece of information in the data table; and generating reply content according to the natural language representation text. According to the technical scheme disclosed by the invention, the final answer is given by querying the text knowledge base or the WMS database according to the question intention, so that the directivity of the large model answer is enhanced; and the accuracy of the database retrieval process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of large language models, and in particular to a method and device for building intelligent customer service for warehouse management based on local LLM. Background Art

[0002] Warehouse management systems (WMS) play a key role in enterprise logistics and cost management. They manage warehouse operations in all aspects through functions such as warehousing, outbound delivery, transfer, and inventory, and achieve efficient management of warehouse information. They have been widely used in warehouses of manufacturing enterprises. At the same time, large language models (LLMs) in the field of artificial intelligence have made significant progress in natural language processing, and have performed well in tasks such as language translation, semantic understanding, and information retrieval and generation. Large model question-and-answer customer service has emerged. It can effectively integrate domain information to answer customer questions. Compared with traditional search engine retrieval, it greatly reduces the difficulty of user use, and users do not need to retrieve information by themselves.

[0003] However, the application of large language models in warehouse management scenarios faces many challenges. Most factory warehouses only use local area network communications and have no Internet connection due to security and confidentiality requirements, making it impossible to directly use cloud-side large language models. In the existing warehousing and logistics industry, the customer service system is still imperfect, and companies rely on professional technicians to operate warehousing systems such as WMS and WCS. These personnel need to be proficient in warehouse processes and regulations, and have high technical barriers and industry experience requirements.

[0004] Although intelligent customer service systems in the financial and medical industries are relatively mature, and can use domain question-and-answer data to train dedicated large models and correct answers to easily-errored questions, such question-and-answer knowledge-based models have defects when applied to warehouse management. Warehouse management system data is stored in a tabular database, and the ambiguity of natural language can easily cause LLM to have hallucinations when converting it into SQL statements, and then query the wrong column data. In addition, LLM with a small number of parameters is not capable of locating answers when processing large amounts of data. Warehouse logistics information is strictly fixed and unique, requiring the model's answers to be accurate and correct, and cannot be divergent and expanded at will. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a method and device for building intelligent customer service for warehouse management based on local LLM, so as to solve the problems of insufficient accuracy and difficulty in locating answers when building intelligent customer service using local LLM in the prior art.

[0006] According to a first aspect of an embodiment of the present invention, a method for building a warehouse management intelligent customer service based on a local LLM is provided, comprising: Obtain text information of a warehouse management system in the field of logistics, organize the text information into a question-answering dataset, and use the question-answering dataset to fine-tune a large language model; Calling a local knowledge document of a warehouse management system, and generating a local vector knowledge base according to the local knowledge document; Obtaining a user question raised by a user in natural language, and using a semantic parser to determine whether the user question is a conceptual question or a business question; If the user question is a conceptual question, the user question is converted into a question vector, a text block vector with a similarity greater than a preset threshold is retrieved from the local vector knowledge base, a prompt word template is generated according to the text block vector, and the large language model generates a reply content according to the prompt word template; If the user question is a business question, the user question is processed and converted using a large language model to generate query prompt words; the data table that needs to be queried to answer the question is located based on the query prompt words; the natural language representation text corresponding to each piece of information in the data table is generated using the large language model; the reply text corresponding to the user question is retrieved from all the natural language representation texts; the large language model generates reply content based on the reply text.

[0007] Preferably, when fine-tuning the large language model using the question-answering dataset, the method further includes: A general dataset is constructed based on general knowledge and language information in a wide range of fields. According to the ratio of the preset question-answering dataset and the general dataset, a certain amount of general dataset is introduced to fine-tune the large language model.

[0008] Preferably, calling the local knowledge document of the warehouse management system and generating a local vector knowledge base according to the local knowledge document includes: dividing the text content in the local knowledge document into text blocks; Using an Embedding layer to convert the text block into a text block vector; The text block vectors are stored to obtain a local vector knowledge base.

[0009] Preferably, the method further comprises: When answering conceptual questions, the creativity parameter of the large language model is set to 0; The preset threshold is set to 0.8.

[0010] Preferably, using a large language model to generate a natural language representation text corresponding to each piece of information in a data table includes: Convert the data table into a file in json format so that each row of information in the data table is stored in a dictionary; Use a large language model to process each dictionary and generate a natural language representation text corresponding to each piece of information.

[0011] Preferably, the answer text corresponding to the user's question is retrieved from all the natural language representation texts, including: Storing all the natural language representation texts in a local file in order to form a business knowledge base; The answer text corresponding to the user's question is retrieved from the business knowledge base.

[0012] Preferably, the method further comprises: When answering business questions, if the data table required to answer the question cannot be located according to the query prompt, a supplementary questioning mechanism is triggered to allow the user to enter supplementary information for the question; The supplementary information of the question and the original user question are integrated into a new user question, and the business question answering is re-executed.

[0013] Preferably, when each dictionary is processed by using a large language model to generate a natural language representation text corresponding to each piece of information, it also includes: Obtain a preset table column name information comparison table, and use a large language model to process each dictionary according to the table column name information comparison table; The table column name information comparison table is a semantic mapping relationship between each table name or column name in the database and the natural language.

[0014] According to a second aspect of an embodiment of the present invention, a device for building intelligent customer service for warehouse management based on local LLM is provided, including: A main controller, and a memory connected to the main controller; The memory stores program instructions; The main controller is used to execute program instructions stored in the memory to perform any of the above methods.

[0015] The technical solution provided by the embodiments of the present invention may have the following beneficial effects: It can be understood that the technical solution shown in the present invention can obtain text information of the warehouse management system in the field of logistics, organize it into a question-answering data set, and fine-tune the large language model; call the local knowledge document of the warehouse management system to generate a local vector knowledge base; obtain the user's question raised by the user in natural language, if it is a conceptual question, retrieve the text block vector with high similarity in the local vector knowledge base, and the large language model generates the reply content; if it is a business question, first translate the user question into a query prompt word; locate the corresponding data table; generate the natural language representation text corresponding to each piece of information in the data table; generate the reply content according to the natural language representation text. The technical solution shown in the present invention can distinguish the intention of the question according to the semantics of the question raised by the user, and give the final answer by querying the text knowledge base or the WMS database, which enhances the directionality of the large model answer; avoids the problem of hallucinations that are easy to occur when the natural language directly generates SQL statements, and improves the accuracy and controllability of the database retrieval process; applies the question-answering ability of the large language model to the warehousing and logistics industry, builds intelligent customer service, reduces the threshold for non-professionals to use WMS, and improves the efficiency and convenience of warehousing information query.

[0016] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0018] Figure 1 It is a schematic diagram of steps of a method for building intelligent customer service for warehouse management based on local LLM according to an exemplary embodiment; Figure 2 is a conceptual question answering flow chart according to an exemplary embodiment; Figure 3 is a flowchart of answering business questions according to an exemplary embodiment; Figure 4 is a schematic diagram of data table positioning according to an exemplary embodiment; Figure 5 The invention is a flowchart of converting a data table into a natural language file according to an exemplary embodiment. DETAILED DESCRIPTION

[0019] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0020] In one embodiment, Figure 1 is a schematic diagram of a method for building a warehouse management intelligent customer service based on a local LLM according to an exemplary embodiment. Figure 1 , provides a method for building intelligent customer service for warehouse management based on local LLM, including: Step S11, obtaining text information of a warehouse management system in the field of logistics, organizing the text information into a question-answering dataset, and using the question-answering dataset to fine-tune the large language model; Step S12: calling the local knowledge document of the warehouse management system, and generating a local vector knowledge base according to the local knowledge document; Step S13: obtaining a user question raised by a user in natural language, and using a semantic parser to determine whether the user question is a conceptual question or a business question; Step S14: if the user question is a conceptual question, the user question is converted into a question vector, a text block vector with a similarity greater than a preset threshold is retrieved from the local vector knowledge base, a prompt word template is generated according to the text block vector, and the large language model generates a reply content according to the prompt word template; Step S15: If the user question is a business question, the user question is processed and converted using a large language model to generate query prompt words; the data table required to answer the question is located according to the query prompt words; the natural language representation text corresponding to each piece of information in the data table is generated using the large language model; the reply text corresponding to the user question is retrieved from all the natural language representation texts; the large language model generates reply content based on the reply text.

[0021] It can be understood that the technical solution shown in the present invention can distinguish the intention of the question according to the semantics of the question raised by the user, and give the final answer by querying the text knowledge base or the WMS database, thereby enhancing the directionality of the large model answer; avoiding the problem of hallucinations that are prone to occur when directly generating SQL statements from natural language, and improving the accuracy and controllability of the database retrieval process; applying the question-answering capability of the large language model to the warehousing and logistics industry, building intelligent customer service, lowering the threshold for non-professionals to use WMS, and improving the efficiency and convenience of warehousing information query.

[0022] In specific practice, step S11, obtain text information of a warehouse management system in the logistics field, organize the text information into a question-and-answer dataset, and use the question-and-answer dataset to fine-tune the large language model.

[0023] First, the present invention develops a fine-tuning dataset for the warehouse management system WMS in the logistics field, so that the big model becomes an "expert" in the field of warehouse management. Limited by the local offline deployment environment, the parameter amount of LLM used in the present invention is much smaller than that of the general big model on the cloud side, which makes the model less capable of processing long texts and complex problems. Therefore, fine-tuning training is used to enhance the ability of the big model to handle WMS-related issues, turning the general big model into a special big model for a single field. A large amount of text information about its functions, concepts, structural composition, advantages and disadvantages, etc. is collected from the WMS product description and the Internet as training data, which is manually screened, sorted and labeled as a question-and-answer dataset. A fine-tuning dataset is developed based on the question-and-answer dataset to perform fine-tuning training on the big language model.

[0024] It should be noted that it also includes: A general dataset is constructed based on general knowledge and language information in a wide range of fields. According to the ratio of the preset question-answering dataset and the general dataset, a certain amount of general dataset is introduced to fine-tune the large language model.

[0025] The general data set is a data resource added when fine-tuning the large model of the warehouse management system. It contains general knowledge and language information in a wide range of fields, corresponding to specific data in the field of warehouse management. In the present invention, since the number of model parameters is smaller than that of the general large model on the cloud side and is limited by the local offline deployment environment, the ability to handle long texts and complex problems is poor, so an appropriate amount of general data set content is added when constructing the fine-tuning data set. The purpose is to avoid overfitting of the model during the training process, thereby maintaining good semantic understanding capabilities and ensuring that the model can operate more accurately and stably when dealing with warehouse management related issues.

[0026] When executing step S13, a user question raised by a user in natural language is obtained, and a semantic parser is used to determine whether the user question is a conceptual question or a business question.

[0027] When users ask questions in natural language, the user questions can be classified. Preferably, before classification, the input questions are cleaned in natural language to remove noise and irrelevant information. Then, the questions are divided into two categories through the semantic parser: conceptual questions that need to search the WMS system knowledge base and business questions that need to search the SQL database.

[0028] For conceptual questions: See the implementation flow Figure 2Before execution, a local vector knowledge base needs to be built. Conceptual questions are answered by querying the local knowledge base. The WMS system knowledge base is built based on text files such as the business composition introduction, description documents, and operation manuals of the enterprise's warehousing and logistics management.

[0029] It should be noted that building a local vector knowledge base includes: dividing the text content in the local knowledge document into text blocks; converting the text blocks into text block vectors using an Embedding layer; and storing the text block vectors to obtain a local vector knowledge base.

[0030] In specific practice, we first load the document about WMS system knowledge, segment the text content in the document into text blocks, and convert these text blocks into vectors through the Embedding layer and store them in the vector knowledge base.

[0031] Then, the user's question is processed. The question text is also converted into a vector through the Embedding layer, and the text block vectors similar to the question vector are retrieved in the knowledge base. The text block vectors with high similarity are extracted to generate the Prompt word template, and the large language model generates the final answer based on the prompt word template.

[0032] It should be noted that the method further includes: when answering conceptual questions, setting the creativity parameter of the large language model to 0; and setting the preset threshold to 0.8.

[0033] It is understandable that for knowledge base questions and answers, the output needs to be completely consistent with the content of the knowledge document. In order to avoid the large model returning content outside the document, the present invention sets the creative parameter temperature to 0, that is, the large model is not required to have divergent associative ability, making the answer repetitive. The knowledge matching score threshold (preset threshold) is set to 0.8 to improve the accuracy of knowledge matching.

[0034] For business issues: see the execution process Figure 3 .

[0035] Business questions require querying and parsing the business table of the WMS database to obtain answers. The method of directly using a large language model to build a Text2SQL process to convert natural language into SQL statements is not suitable for the deployment of local models with small parameter quantities. The ambiguity of the questions and a large number of similar column names will cause LLM to hallucinate and output incorrect answers.

[0036] Therefore, considering that the advantage of the large language model is to process natural language, this technical solution first uses LLM to escape the question to form a query prompt, and locates the data table that needs to be queried to answer the question based on the prompt.

[0037] Afterwards, the data table is converted into a file in json format so that each row of information in the data table is stored in a dictionary respectively; each dictionary is processed using a large language model to generate a natural language representation text corresponding to each piece of information.

[0038] All the natural language representation texts are stored in a local file in order to form a business knowledge base for retrieval by the large model; and the answer text corresponding to the user's question is retrieved from the business knowledge base.

[0039] Finally, the reply text blocks are integrated and polished by the large model to form coherent and logical natural language as the final reply content output.

[0040] In another preferred embodiment, it should be noted that the method further includes: When answering business questions, if the data table required to answer the question cannot be located according to the query prompt, a supplementary questioning mechanism is triggered to allow the user to enter supplementary information for the question; The supplementary information of the question and the original user question are integrated into a new user question, and the business question answering is re-executed.

[0041] In practice, when there is no table name information in the question, that is, the similarity between all prompts and table name vectors does not exceed the matching threshold, the supplementary question mechanism is triggered: "Please enter the name of the table to be queried." Completing the table name is a necessary operation. Because a large amount of calculation is not conducive to the allocation of system resources, it is impossible to query the information of all tables for each question.

[0042] It is understandable that by supplementing the questioning mechanism, it is possible to facilitate the allocation of system resources, while speeding up the calculation time and improving the accuracy of the response.

[0043] In another preferred embodiment, it should be noted that when each dictionary is processed using a large language model to generate a natural language representation text corresponding to each piece of information, it also includes: A preset table column name information comparison table is obtained, and each dictionary is processed according to the table column name information comparison table using a large language model; the table column name information comparison table is a semantic mapping relationship between each table name or column name in the database and a natural language.

[0044] Since the table names and column names in the database are not literal Chinese characters, but are usually naming conventions defined by various WMS software companies, the present invention constructs a corresponding semantic mapping relationship for each table name and column name in the database, and forms a column name information comparison table file that is stored locally.

[0045] A specific example is shown below to explain in detail a method for building a warehouse management intelligent customer service based on a local LLM provided by the present invention: First, we collected data on the warehouse management system WMS and constructed a data set in question-and-answer format. Based on the data content, we provided the following examples as references: “What is the role of the WMS system?”, “What are the components of the WMS system?”, “What is intelligent warehouse distribution?”.

[0046] Provide an example based on the dataset format: [ { "instruction": "Warehouse Management System WMS", "input": "What are the functions of WMS?", "output": "The functions that WMS can achieve are as follows: Function 1: The system can provide various warehouse operation functions such as receiving, warehousing, picking, outbound, inventory counting, displacement, etc.

[0047] Function 2: The system can provide diversified strategy rules to realize intelligent warehouse distribution, intelligent shelving, and intelligent picking.

[0048] Function three: Function 4: ... ", "system": " ", "history": [ ["Who are you?", "I am the intelligent Q&A customer service of the warehouse management system WMS."], ["Can you answer questions about the WMS system?", "Yes, I can."] ] } ] While fine-tuning the data set to focus on the dataset in question-answer format, it is also necessary to add an appropriate amount of general dataset content to avoid serious overfitting during training.

[0049] Get the user questions raised by the users, clean the question texts, and remove punctuation marks, redundant modal particles, irrelevant information and other noise. Analyze the text semantics and classify the questions by semantics. Semantics such as "What is the outbound strategy?" and "What is the inventory order?" are classified as conceptual questions and introduced into the knowledge base question-answering branch; semantics such as "Query the shipment quantity of product A" and "Query the material number of cargo B" are classified as business questions and introduced into the SQL database query branch.

[0050] For conceptual questions, see the process Figure 2, the local knowledge document contains the WMS process rule information of the specific project, such as "warehouse entry and exit strategy", "inventory partition", "goods coding rules", etc. The WMS systems of different projects correspond to different knowledge documents. When the WMS rules change, modify the content of the corresponding knowledge document. In order to make the text segmentation more accurate, the knowledge document needs to be written strictly in accordance with the typesetting specifications, and there should be no text interruptions caused by headers, footers, tables, pictures, and page breaks. The segmented text blocks are converted into fixed-dimensional vectors through the Embedding layer and stored in the local vector knowledge base.

[0051] The question text raised by the user is converted into a question vector through the same Embedding layer. The question vector is compared with the vector in the local knowledge base for similarity. The text block vector with high similarity is extracted to generate a Prompt template, which is then passed into the large model for decoding to generate the answer.

[0052] For knowledge base questions and answers, the output needs to be completely consistent with the content of the knowledge document. In order to avoid the large model returning content outside the document, the invention sets the creative parameter temperature to 0, that is, the large model is not required to have divergent associative ability, making the answer repetitive. The knowledge matching score threshold is set to 0.8 to improve the accuracy of knowledge matching.

[0053] For business-related problems, perform SQL database queries. For the process, see Figure 3 The warehouse management system stores all the warehouse business management information such as incoming details, outgoing details, inventory information, etc. in the SQL database. The variables in the database are updated in real time based on the operations issued by the warehouse and the feedback from the system.

[0054] This embodiment constructs an information interaction process between the big model and the SQL database. Users can ask questions in natural language, and the big model parses the questions and locates the SQL data table where the answers are located. The system parses the data table into json format data, and the big model generates corresponding natural language representations for the json data information one by one. The content of the entire data table is parsed into a temporary natural language text file, and the temporary text is queried according to the question, thereby realizing the query of the SQL table on the relational database from the natural language question.

[0055] The WMS system database has many and complex tables. The following is an example of locating the SQL data table: Figure 4, use LLM to split the question into prompt words Query prompt, and match each prompt word with the table name contained in the WMS system for similarity to find the table name with the highest similarity. In this example, the natural language question is "What is the total shipment volume of product A in the third quarter of 2024?" After cleaning the data, it is split and parsed into prompts, where "the third quarter of 2024" is parsed into the specific time range "2024-7-1~2024-9-30"; "product A" is parsed into "product A"; "total shipment volume" is parsed into "out of warehouse" and "quantity sum". In order to achieve a higher accuracy, it is necessary to build a special data set to fine-tune the large model. After comparing the prompt vector and the table name vector, it is determined that the "out of warehouse details table (WMS_OUT_DET)" needs to be queried. When the table name information does not exist in the question, that is, the similarity between all prompts and table name vectors does not exceed the matching threshold, the supplementary question mechanism is triggered: "Please enter the name of the table to be queried." Completing the table name is a necessary operation. It is impossible to query the information of all tables for each question, and a large amount of calculation is not conducive to the allocation of system resources.

[0056] Since the table names and column names in the database are not literal Chinese characters, but are usually naming conventions defined by various WMS software companies, the present invention constructs a corresponding semantic mapping relationship for each table name and column name in the database, and forms a column name information comparison table file that is stored locally.

[0057] The process of converting SQL data tables into natural language files is as follows Figure 5 First, convert the SQL data table into JSON data through the database built-in algorithm. Different database systems use different methods. For example, you can use the JSON_OBJECT function in MySQL and Oracle, and the FOR JSON clause in SQL_Server. Figure 5 In the example, each row of the outbound details table is transcribed into a dictionary, and the column name corresponds to the key value of the dictionary. Use LLM and the column name information comparison table to transcribe each dictionary into natural language. The column name information comparison table is a priori information, which manually specifies the mapping between the column names composed of letters and the Chinese column names, so that the two column names have a corresponding relationship after vectorization. When using LLM to parse the json file, only the corresponding relationship between the key value and the content is transcribed, without considering the relationship between the key values, to avoid incorrect logical relationships.

[0058] Each piece of generated natural language information is written into a text file in order and divided using identifiers such as sequence numbers and carriage returns to prevent incorrect text segmentation. The entire content of a SQL data table is stored in a text file and named after the table. This text file is different from the local knowledge base and is a temporary file that is only used for querying current business questions. It is deleted immediately after the question-answering process is completed.

[0059] The text file storing SQL table information is segmented and vectorized to build an independent temporary knowledge base. This knowledge base is isolated from the local knowledge base and is only used to retrieve the answer to the current question.

[0060] The question vector is compared with the text block vector in the business knowledge base for similarity, and the text block vector with high similarity is extracted to generate a Prompt template, which is then passed into the large model for decoding to generate the answer.

[0061] In another embodiment, a device for building intelligent customer service for warehouse management based on local LLM is provided, including: A main controller, and a memory connected to the main controller; The memory stores program instructions; The main controller is used to execute program instructions stored in the memory to perform any of the above methods.

[0062] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0063] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0064] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

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

[0066] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0067] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0068] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

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

[0070] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for building intelligent customer service for warehouse management based on local LLM, characterized in that: include: Obtain text information of a warehouse management system in the field of logistics, organize the text information into a question-answering dataset, and use the question-answering dataset to fine-tune a large language model; Calling a local knowledge document of a warehouse management system, and generating a local vector knowledge base according to the local knowledge document; Obtaining a user question raised by a user in natural language, and using a semantic parser to determine whether the user question is a conceptual question or a business question; If the user question is a conceptual question, the user question is converted into a question vector, a text block vector with a similarity greater than a preset threshold is retrieved from the local vector knowledge base, a prompt word template is generated according to the text block vector, and the large language model generates a reply content according to the prompt word template; If the user question is a business question, the user question is processed and converted using a large language model to generate query prompt words; The data table required for answering the question is located according to the query prompt word; the natural language representation text corresponding to each piece of information in the data table is generated using a large language model; the answer text corresponding to the user's question is retrieved from all the natural language representation texts; the large language model generates the answer content according to the answer text.

2. The method according to claim 1, characterized in that When fine-tuning the large language model using the question-answering dataset, the following steps are also included: A general dataset is constructed based on general knowledge and language information in a wide range of fields. According to the ratio of the preset question-answering dataset and the general dataset, a certain amount of general dataset is introduced to fine-tune the large language model.

3. The method according to claim 1, characterized in that Calling the local knowledge document of the warehouse management system and generating a local vector knowledge base according to the local knowledge document includes: dividing the text content in the local knowledge document into text blocks; Using an Embedding layer to convert the text block into a text block vector; The text block vectors are stored to obtain a local vector knowledge base.

4. The method according to claim 3, characterized in that Also includes: When answering conceptual questions, the creativity parameter of the large language model is set to 0; The preset threshold is set to 0.

8.

5. The method according to claim 1, characterized in that Use the large language model to generate the natural language representation text corresponding to each piece of information in the data table, including: Convert the data table into a file in json format so that each row of information in the data table is stored in a dictionary; Use a large language model to process each dictionary and generate a natural language representation text corresponding to each piece of information.

6. The method according to claim 1, characterized in that Retrieve the answer text corresponding to the user's question from all natural language representation texts, including: Storing all the natural language representation texts in a local file in order to form a business knowledge base; The answer text corresponding to the user's question is retrieved from the business knowledge base.

7. The method according to claim 1, characterized in that Also includes: When answering business questions, if the data table required to answer the question cannot be located according to the query prompt, a supplementary questioning mechanism is triggered to allow the user to enter supplementary information for the question; The supplementary information of the question and the original user question are integrated into a new user question, and the business question answering is re-executed.

8. The method according to claim 5, characterized in that When using the large language model to process each dictionary and generate the natural language representation text corresponding to each piece of information, it also includes: Obtain a preset table column name information comparison table, and use a large language model to process each dictionary according to the table column name information comparison table; The table column name information comparison table is a semantic mapping relationship between each table name or column name in the database and the natural language.

9. A device for building intelligent customer service for warehouse management based on local LLM, characterized in that: include: A main controller, and a memory connected to the main controller; The memory stores program instructions; The main controller is used to execute program instructions stored in the memory and execute the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Customer service question and answer interaction method, device and equipment and storage medium

    CN117235228A

  • User intention response method, device and equipment of intelligent robot and storage medium

    CN118171658A

  • Knowledge management question-answering system construction method and device

    CN118446296A

  • Intelligent question answering method, system and equipment based on large language model and database

    CN118606348A

  • Nuclear power knowledge question-answering method and system based on large language model

    CN119003712A

Cited By

  • Enterprise group chat message reply method and system

    CN120104764A

  • Power business question answering method and device, terminal equipment and storage medium

    CN120705283A

  • Desktop device interaction method and system based on local vector knowledge base

    CN121413636A

  • A desktop device interaction method and system based on a local vector knowledge base

    CN121413636B