A method and device for constructing an intelligent customer service for warehouse management based on a local LLM
By building a local question and answer data set and vector knowledge base, combining semantic analysis and data table query, the accuracy and efficiency of large language models in the warehousing management system are solved, and efficient and accurate replies of intelligent customer service are achieved, reducing the difficulty of using.
Patent Information
- Application Number
- CN202510360679.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-03-26
AI Technical Summary
In the prior art, when applying large language models in warehousing management systems, there are problems such as insufficient accuracy and difficulty in answer positioning, especially in the local area network environment, which leads to inaccuracy and inefficiency of the intelligent customer service system.
By obtaining text information of the warehousing management system in the logistics field, building a question-and-answer data set to fine-tune the large language model, generating a local vector knowledge base, using a semantic parser to distinguish problem types, and generating query prompt words or searching text block vectors based on the problem types, and positioning the data table to generate accurate reply content.
It improves the accuracy and efficiency of the answers of large language models in the warehousing management system, reduces the threshold for non-professional personnel to use the WMS system, and enhances the controllability and accuracy of database retrieval.
Smart Images

Figure CN119884326B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of large language models, and particularly to a method and device for constructing an intelligent customer service for warehouse management based on a local LLM. Background Art
[0002] The Warehouse Management System (WMS) plays a crucial role in enterprise logistics and cost management. It comprehensively controls warehouse operations through functions such as inbound, outbound, transfer, and inventory counting, achieving efficient management of warehouse information and has been widely applied in the warehouses of manufacturing enterprises. At the same time, large language models (LLMs) in the field of artificial intelligence have made remarkable progress in natural language processing, performing excellently in tasks such as language translation, semantic understanding, information retrieval and generation. As a result, large model question-and-answer customer services have emerged. They can effectively integrate domain information to answer customers' questions, greatly reducing the difficulty of use for users compared to traditional search engine-based retrieval. Users do not need to retrieve information by themselves.
[0003] However, applying large language models in the warehouse management scenario faces many challenges. Most factory warehouses, due to security and confidentiality requirements, only use local area network communication and have no Internet connection, resulting in the inability to directly use cloud-side large language models. In the existing warehousing and logistics industry, the customer service system is not yet perfect. Enterprises rely on professional technical personnel to operate warehousing systems such as WMS and WCS. These personnel need to be proficient in warehouse processes and regulations, with high technical thresholds and industry experience requirements.
[0004] Although intelligent customer service systems are relatively mature in industries such as finance and healthcare, dedicated large models can be trained using domain question-and-answer data and incorrect answer questions can be corrected. However, such models based on question-and-answer knowledge have defects when applied to warehouse management. The data of the warehouse management system is stored in a tabular database. The ambiguity of natural language easily causes hallucinations when the LLM converts it into an SQL statement, resulting in querying incorrect column data. Moreover, small-parameter LLM has insufficient ability to locate answers when processing a large amount of data. And warehousing and logistics information has strict fixity and uniqueness, requiring the model answers to be accurate and error-free and not to diverge and expand randomly. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a method and device for constructing an intelligent customer service for warehouse management based on a local LLM, so as to solve the problems of insufficient accuracy and difficult answer location when using a local LLM to construct an intelligent customer service in the prior art.
[0006] According to the first aspect of the embodiments of the present invention, a method for constructing an intelligent customer service for warehouse management based on a local LLM is provided, including:
[0007] Obtain the text information of the warehouse management system in the logistics field, organize the text information into a Q&A dataset, and use the Q&A dataset to fine-tune and train the large language model;
[0008] Call the local knowledge document of the warehouse management system, and generate a local vector knowledge base according to the local knowledge document;
[0009] Obtain the user question proposed by the user in natural language, and use a semantic parser to determine whether the user question is a conceptual question or a business question;
[0010] If the user question is a conceptual question, convert the user question into a question vector, retrieve text block vectors in the local vector knowledge base with a similarity greater than a preset threshold, generate a prompt template according to the text block vectors, and the large language model generates a response content according to the prompt template;
[0011] If the user question is a business question, use the large language model to process and convert the user question to generate a query prompt; locate the data table that needs to be queried to answer this question according to the query prompt; use the large language model to generate the natural language representation text corresponding to each piece of information in the data table; retrieve the response text corresponding to the user question from all the natural language representation texts; the large language model generates a response content according to the response text.
[0012] Preferably, when using the Q&A dataset to fine-tune and train the large language model, it further includes:
[0013] Construct a general dataset according to the general knowledge and language information in a wide range of fields, and introduce a certain amount of general dataset to fine-tune and train the large language model according to the ratio of the preset Q&A dataset and the general dataset.
[0014] 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:
[0015] Segment the text content in the local knowledge document into text blocks;
[0016] Use the Embedding layer to convert the text blocks into text block vectors;
[0017] Store the text block vectors to obtain a local vector knowledge base.
[0018] Preferably, the method further includes:
[0019] When answering conceptual questions, set the creativity parameter of the large language model to 0;
[0020] Set the preset threshold to 0.8.
[0021] Preferably, a natural language representation text corresponding to each piece of information in the data table is generated by using a large language model, including:
[0022] 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 respectively;
[0023] Use a large language model to process each dictionary to generate a natural language representation text corresponding to each piece of information.
[0024] Preferably, a reply text corresponding to the user's question is retrieved from all the natural language representation texts, including:
[0025] Store all the natural language representation texts in order in a local file to form a business knowledge base;
[0026] Retrieve a reply text corresponding to the user's question from the business knowledge base.
[0027] Preferably, the method further includes:
[0028] When replying to business-type questions, if the data table required to answer the question cannot be located according to the query prompt words, trigger a supplementary question mechanism to enable the user to input question supplementary information;
[0029] Integrate the question supplementary information and the original user question into a new user question, and re-execute the business-type question reply.
[0030] Preferably, when using a large language model to process each dictionary to generate a natural language representation text corresponding to each piece of information, it further includes:
[0031] 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;
[0032] The table column name information comparison table is the semantic mapping relationship between each table name or column name in the database and natural language.
[0033] According to the second aspect of the embodiments of the present invention, a device for constructing an intelligent warehouse management customer service based on a local LLM is provided, including:
[0034] A main controller, and a memory connected to the main controller;
[0035] The memory, in which program instructions are stored;
[0036] The main controller is used to execute the program instructions stored in the memory to execute the method described in any one of the above.
[0037] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0038] It can be understood that the technical solutions shown in the present invention can obtain the text information of the warehousing management system in the logistics field, organize it into a question-and-answer data set, and fine-tune and train the large language model; call the local knowledge documents of the warehousing management system to generate a local vector knowledge base; obtain the user questions proposed in natural language. If it is a conceptual question, retrieve the text block vectors 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 transpose 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 solutions shown in the present invention can distinguish the questioning intention according to the semantics of the questions proposed by the user, and give the final answer by querying the text knowledge base or the WMS database, enhancing the directivity of the large model's answer; avoiding the problem that hallucinations are likely to occur when directly generating SQL statements in natural language, improving the accuracy and controllability of the database retrieval process; applying the question-and-answer ability of the large language model to the warehousing logistics industry, building an intelligent customer service, reducing the usage threshold of the WMS for non-professionals, and improving the efficiency and convenience of warehousing information query.
[0039] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present invention, and are used together with the specification to explain the principles of the present invention.
[0041] Figure 1 is a schematic diagram of the steps of a method for building an intelligent warehousing management customer service based on a local LLM shown according to an exemplary embodiment;
[0042] Figure 2 is a flow chart of a conceptual question reply shown according to an exemplary embodiment;
[0043] Figure 3 is a flow chart of a business question reply shown according to an exemplary embodiment;
[0044] Figure 4 is a schematic diagram of data table location shown according to an exemplary embodiment;
[0045] Figure 5 is a flow chart of converting a data table into a natural language file shown according to an exemplary embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] Exemplary embodiments will be described in detail herein, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying 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. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.
[0047] In one embodiment, Figure 1 is a schematic diagram of the steps of a method for constructing a warehouse management intelligent customer service based on a local LLM shown according to an exemplary embodiment. Refer to Figure 1 to provide a method for constructing a warehouse management intelligent customer service based on a local LLM, including:
[0048] Step S11: Obtain the text information of the warehouse management system in the logistics field, organize the text information into a question-and-answer data set, and use the question-and-answer data set to fine-tune and train the large language model;
[0049] Step S12: Invoke the local knowledge document of the warehouse management system and generate a local vector knowledge base according to the local knowledge document;
[0050] Step S13: Obtain the user question proposed by the user in natural language, and use a semantic parser to determine whether the user question is a conceptual question or a business question;
[0051] Step S14: If the user question is a conceptual question, convert the user question into a question vector, retrieve the text block vector with a similarity greater than a preset threshold in the local vector knowledge base, generate a prompt word template according to the text block vector, and the large language model generates a reply content according to the prompt word template;
[0052] Step S15: If the user question is a business question, use the large language model to process and convert the user question to generate a query prompt word; locate the data table that needs to be queried to answer the question according to the query prompt word; use the large language model to generate the natural language representation text corresponding to each piece of information in the data table; retrieve the reply text corresponding to the user question from all the natural language representation texts; the large language model generates a reply content according to the reply text.
[0053] It can be understood that the technical solution shown in the present invention can distinguish the questioning intention 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, enhancing the directivity of the large model's answer; avoiding the problem of hallucinations that easily occur when directly generating SQL statements in natural language, improving the accuracy and controllability of the database retrieval process; applying the question-and-answer ability of the large language model to the warehousing and logistics industry to build an intelligent customer service, reducing the usage threshold of WMS for non-professionals, and improving the efficiency and convenience of warehousing information query.
[0054] In specific practice, in step S11, obtain the text information of the warehousing management system in the logistics field, organize the text information into a question-and-answer data set, and use the question-and-answer data set to fine-tune and train the large language model.
[0055] First, the present invention formulates a fine-tuning data set for the warehousing management system WMS in the logistics field, making the large model an "expert" in the warehousing management field. Limited by the local offline deployment environment, the number of parameters of the LLM used in the present invention is much smaller than that of the general large model on the cloud side, which makes the model less capable of processing long texts and complex problems. Therefore, the ability of the large model to process WMS-related problems is strengthened through fine-tuning training, and the general large model is changed into a dedicated large model for a single field. Collect a large amount of text information about its functions, concepts, structural components, advantages and disadvantages, etc. from the WMS product description and the Internet as training data, and after manual screening, sorting and annotation, it is made into a question-and-answer data set. A fine-tuning data set is formulated according to the question-and-answer data set to fine-tune and train the large language model.
[0056] It should be noted that it also includes:
[0057] Construct a general data set according to the general knowledge and language information in a wide range of fields, and introduce a certain amount of general data set to fine-tune and train the large language model according to the ratio of the preset question-and-answer data set and the general data set.
[0058] The general data set is a data resource added when fine-tuning and training the large model of the warehousing management system. It contains general knowledge and language information in a wide range of fields, corresponding to the specific data in the warehousing management field. In the present invention, due to the smaller number of model parameters than the general large model on the cloud side and being restricted by the local offline deployment environment, the ability to process long texts and complex problems is poor. Therefore, an appropriate amount of general data set content is added when constructing the fine-tuning data set, aiming to avoid overfitting of the model during the training process, and then maintain good semantic understanding ability, ensuring that the model can run more accurately and stably when processing warehousing management-related problems.
[0059] When executing step S13, obtain the user question raised by the user in natural language, and use a semantic parser to determine whether the user question is a conceptual question or a business question.
[0060] When the user asks a question in natural language, the user's question can be classified. Preferably, before classification, the input question is subjected to natural language cleaning to remove noise and irrelevant information. Then, through a semantic parser, the question is divided into two categories: a conceptual question that needs to search the WMS system knowledge base and a business question that needs to retrieve the SQL database.
[0061] For conceptual questions: The execution process is shown in Figure 2 . Before execution, a local vector knowledge base needs to be constructed. Conceptual questions obtain answers by querying the local knowledge base, where the WMS system knowledge base is constructed based on text files such as business composition introductions, specification documents, and operation manuals of enterprise warehousing and logistics management.
[0062] It should be noted that constructing the local vector knowledge base includes: splitting the text content in the local knowledge document into text blocks; using an Embedding layer to convert the text blocks into text block vectors; storing the text block vectors to obtain the local vector knowledge base.
[0063] In specific practice, first, load the document about WMS system knowledge, split the text content in the document into text blocks, and these text blocks are converted into vectors through the Embedding layer and stored in the vector knowledge base.
[0064] Then process the user's question. The question text is also converted into a vector through the Embedding layer, and 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 a Prompt prompt word template, and the large language model generates the final answer according to the prompt word template.
[0065] It should be noted that the method further includes: when answering conceptual questions, setting the creativity parameter of the large language model to 0; setting the preset threshold to 0.8.
[0066] It can be understood that for knowledge base Q&A, the output needs to fully conform to the content of the knowledge document. To avoid the large model returning content outside the document, the present invention sets the creativity parameter temperature to 0, that is, the large model does not need to have the ability of divergent association, making the answer repetitive. Set the knowledge matching score threshold (preset threshold) to 0.8 to improve the knowledge matching accuracy.
[0067] For business questions: The execution process is shown in Figure 3 .
[0068] Business - type questions need to query and parse business tables in the WMS database to obtain answers. The method of directly using a large - language model to construct a Text2SQL process to convert natural language into SQL statements is not applicable to the deployment of local small - parameter models. The ambiguity of the questions and a large number of similar column names will cause the LLM to have hallucinations and output incorrect answers.
[0069] Therefore, considering that the advantage of the large - language model is to process natural language, in this technical solution, first, use the LLM to escape the question to form a query prompt, and locate the data table that needs to be queried to answer this question according to the prompt.
[0070] After that, convert the data table into a json - formatted file so that each row of information in the data table is stored in a dictionary respectively; use the large - language model to process each dictionary and generate the natural - language representation text corresponding to each piece of information.
[0071] Store all the natural - language representation texts in order in a local file to form a business knowledge base for the large model to retrieve; retrieve the response text corresponding to the user's question from the business knowledge base.
[0072] Finally, the response text block is integrated and polished by the large model to form coherent and logical natural language as the final response content for output.
[0073] In another preferred embodiment, it should be noted that the method further includes:
[0074] When answering business - type questions, if the data table that needs to be queried to answer the question cannot be located according to the query prompt, trigger a supplementary question mechanism to enable the user to input question supplementary information;
[0075] Integrate the question supplementary information and the original user question into a new user question, and re - execute the business - type question answering.
[0076] In specific 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, trigger the supplementary question mechanism "Please enter the name of the table to be queried." Completing the table name is an operation that must be carried out because a large amount of calculation is not conducive to the allocation of system resources, so it is impossible to query the information of all tables for each question.
[0077] It can be understood that through the supplementary question mechanism, it is possible to facilitate the allocation of system resources, speed up the calculation time, and improve the response accuracy.
[0078] In another preferred embodiment, it should be noted 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 further includes:
[0079] 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.
[0080] 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.
[0081] 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:
[0082] 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?”.
[0083] Provide an example based on the dataset format: [
[0085] {
[0086] "instruction": "Warehouse Management System WMS",
[0087] "input": "What are the functions of WMS?",
[0088] "output": "The functions that WMS can achieve are as follows:
[0089] Function 1: The system can provide various warehouse operation functions such as receiving, warehousing, picking, outbound, inventory counting, displacement, etc.
[0090] Function 2: The system can provide diversified strategy rules to realize intelligent warehouse distribution, intelligent shelving, and intelligent picking.
[0091] Function three:
[0092] Function 4:
[0093] ... ",
[0094] "system": " ",
[0095] "history": [
[0096] ["Who are you?", "I am the intelligent Q&A customer service of the warehouse management system WMS."],
[0097] ["Can you answer questions about the WMS system?", "Yes, I can."]
[0099] }
[0101] While fine-tuning the dataset focuses on datasets with Q&A formats, it is also necessary to appropriately incorporate an appropriate amount of content from general datasets to avoid severe overfitting during training.
[0102] Obtain the user's question, perform data cleaning on the question text, removing noise such as punctuation marks, redundant modal particles, and irrelevant information. Analyze the text semantics, classify the questions according to semantics, such as semantic classifications like "What is the outbound strategy?" and "What is the inventory count sequence?" into conceptual questions and introduce them into the knowledge base Q&A branch; semantic classifications like "Query the shipment quantity of product A" and "Query the material number of goods B" into business questions and introduce them into the SQL database query branch.
[0103] For conceptual questions, the process is as follows Figure 2 , the local knowledge document contains WMS process rule information for specific engineering projects, such as "inbound and outbound strategies", "inventory zoning", "goods coding rules", etc. The WMS systems of different engineering projects correspond to different knowledge documents. When the WMS rules change, modify the content of the corresponding knowledge document. To make the text segmentation more accurate, it is necessary to write the knowledge document strictly in accordance with the typesetting specifications, without text interruptions caused by headers, footers, tables, pictures, and page breaks. The segmented text blocks are converted into vectors of a fixed dimension through the Embedding layer and stored in the local vector knowledge base.
[0104] The question text proposed by the user is converted into a question vector through the same Embedding layer. The question vector is compared with the vectors in the local knowledge base, and the text block vectors with high similarity are extracted to generate a Prompt prompt template and passed into the large model for decoding to generate an answer.
[0105] For knowledge base Q&A, the output needs to fully conform to the content of the knowledge document. To prevent the large model from returning content outside the document, the present invention sets the creativity parameter temperature to 0, that is, the large model does not need to have the ability of divergent association, making the answer repetitive. Set the knowledge matching score threshold to 0.8 to improve the accuracy of knowledge matching.
[0106] For business questions, perform SQL database queries. The process is as follows 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.
[0107] 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.
[0108] 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.
[0109] 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.
[0110] The process of converting SQL data tables into natural language files is as follows Figure 5As shown below. First, convert the SQL data table into JSON data through the built-in algorithm of the database. Different database systems use different methods. For example, in MySQL and Oracle, the JSON_OBJECT function can be used, and in SQL_Server, the FOR JSON clause can be used. Figure 5 In the example, each row of tasks in the outbound details table is transcribed into a dictionary, and the column names correspond to the key values of the dictionary. Use the LLM and the column name information comparison table to perform natural language transcription on each dictionary. The column name information comparison table is prior information, which artificially stipulates the mapping between the column names composed of letters and the Chinese column names, so that a corresponding relationship is generated after the two types of column names are vectorized. When using the LLM to parse the json file, only the corresponding relationship between the key values and the content is transcribed, and the relationship between the key values is not considered to avoid generating incorrect logical relationships.
[0111] Each generated natural language information is written into a text file in sequence and divided by identifiers such as serial numbers and carriage returns to avoid incorrect text segmentation. All the content of an SQL data table is stored in a text file and named after the table name. This text file is different from the local knowledge base and is a temporary file, which is only used for querying current business-type problems and is immediately deleted after the question-and-answer process is completed.
[0112] Perform text segmentation and vectorization processing on the text file storing the SQL table information to build an independent temporary knowledge base. This knowledge base is isolated from the local knowledge base and is only used to retrieve the answers to the current questions.
[0113] Compare the question vector with the text block vectors in the business-type knowledge base, extract the text block vectors with high similarity to generate a Prompt prompt template, and pass it to the large model for decoding to generate an answer.
[0114] In another embodiment, a device for building an intelligent customer service for warehouse management based on a local LLM is provided, including:
[0115] A main controller, and a memory connected to the main controller;
[0116] The memory stores program instructions;
[0117] The main controller is used to execute the program instructions stored in the memory and execute the method described in any one of the above.
[0118] It can be understood that the same or similar parts in the above embodiments can be referred to each other, and the content not detailed in some embodiments can be seen in the same or similar content of other embodiments.
[0119] 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 construed as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "a plurality of" refers to at least two.
[0120] Any process or method description shown in a flowchart or described otherwise herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. The scope of the preferred embodiments of the present invention includes additional implementations where functions may be executed in a substantially simultaneous manner or in a reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.
[0121] 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 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, any one or a combination of the following well-known techniques in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0122] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the method of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.
[0123] In addition, each functional unit in various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into a module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0124] The above-mentioned storage medium can be a read-only memory, a magnetic disk, an optical disk, etc.
[0125] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples", etc., mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in a suitable manner in any one or more embodiments or examples.
[0126] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for building an intelligent customer service for warehouse management based on a local LLM, characterized in that, Including: Obtain the text information of the warehousing management system in the logistics field, organize the text information into a question-and-answer data set, and use the question-and-answer data set to fine-tune and train the large language model; Call the local knowledge document of the warehousing management system, and generate a local vector knowledge base according to the local knowledge document; Obtain the user question proposed by the user in natural language, and use 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, convert the user question into a question vector, retrieve the text block vector with a similarity greater than a preset threshold in the local vector knowledge base, generate a prompt word template 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, use the large language model to process and convert the user question to generate a query prompt word; Locate the data table that needs to be queried to answer the question according to the query prompt word; use the large language model to generate the natural language representation text corresponding to each piece of information in the data table; retrieve the reply text corresponding to the user question from all the natural language representation texts; the large language model generates a reply content according to the reply text.
2. The method according to claim 1, wherein When using the question-and-answer data set to fine-tune and train the large language model, it also includes: Construct a general data set according to the general knowledge and language information in a wide range of fields, and introduce a certain amount of general data set to fine-tune and train the large language model according to the ratio of the preset question-and-answer data set and the general data set.
3. The method according to claim 1, wherein Call the local knowledge document of the warehousing management system, and generate a local vector knowledge base according to the local knowledge document, including: Segment the text content in the local knowledge document into text blocks; Use the Embedding layer to convert the text blocks into text block vectors; Store the text block vectors to obtain a local vector knowledge base.
4. The method according to claim 3, characterized in that, It also includes: When answering conceptual questions, set the creativity parameter of the large language model to 0; Set the preset threshold to 0.
8.
5. The method according to claim 1, wherein Using 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 json format file so that each row of information in the data table is stored in a dictionary respectively; Use the large language model to process each dictionary to generate the natural language representation text corresponding to each piece of information.
6. The method according to claim 1, wherein Retrieve the reply text corresponding to the user question from all the natural language representation texts, including: Store all the natural language representation texts in order to a local file to form a business knowledge base; Retrieve the reply text corresponding to the user question from the business knowledge base.
7. The method according to claim 1, characterized in that, It also includes: When answering business questions, if the data table that needs to be queried to answer the question cannot be located according to the query prompt word, trigger a supplementary question mechanism to enable the user to input question supplementary information; Integrate the question supplementary information and the original user question into a new user question, and re-execute the business question answer.
8. The method according to claim 5, wherein When using the large language model to process each dictionary to generate the natural language representation text corresponding to each piece of information, it also includes: Obtain a preset comparison table of table column name information, and use a large language model to process each dictionary according to the comparison table of table column name information; The comparison table of table column name information is the semantic mapping relationship between each table name or column name in the database and natural language.
9. A device for constructing an intelligent customer service for warehouse management based on a local LLM, characterized in that, It includes: A main controller, and a memory connected to the main controller; The memory stores program instructions; The main controller is configured to execute the program instructions stored in the memory and execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
User intention response method, device and equipment of intelligent robot and storage medium
CN118171658A
Logistics intelligent customer service online question and answer method, device and equipment and storage medium
CN119202134A