Shopping guide method and system based on large language model
Through the shopping guide method and system based on the large language model, the problems of long user decision-making time and inaccurate recommendation results in the existing shopping guide system are solved, and efficient and appropriate shopping guide information output in the user's natural language is achieved, improving the user experience.
Patent Information
- Application Number
- PCT/CN2024/117894
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-05
- Filing Date
- 2024-09-10
- Publication Date
- 2025-06-12
AI Technical Summary
In the existing shopping guide system, users need to spend a lot of time browsing in search and recommendation lists, the decision-making time is long and the cost is high, and the user's active input is limited, the recommendation results are inaccurate, and it is difficult to fit the user's natural language expression.
The shopping guide method and system based on the large language model are adopted, and the training prompt words are generated by obtaining the user's shopping guide needs and content enhancement configuration, the training prompt words are generated, the application program interface is determined, and the preset database screening and summary processing is used to generate predicted shopping guide information, adjust the model parameters, and obtain the trained large language model, which is used to generate target shopping guide information that fits the user's natural language.
It improves the efficiency of the shopping guide process, reduces the user's decision-making time and cost, provides shopping guide information that is more in line with the user's natural language, and enhances the user experience.
Smart Images

Figure CN2024117894_12062025_PF_FP_ABST
Abstract
Description
Shopping guide method and system based on large language model
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on December 5, 2023, with application number 202311654583.5, and invention name “Shopping guide method and system based on large language model”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence technology, and more specifically, to a shopping guide method and system based on a large language model in the field of artificial intelligence technology. Background Art
[0003] In related technologies, the shopping guide ordering process typically involves multiple entry points, as well as portals for platform functions like customer service and orders. Users spend considerable time browsing search and recommendation lists, considering numerous factors in their decision-making process. In the case of shopping guide engagement, the decision-making process, from entry to order placement, is time-consuming and costly.
[0004] In most shopping guide scenarios, even when users actively enter search boxes, they typically only use short words. This results in inaccurate recommendations, and the user's active expression is limited and doesn't align with their daily natural language.
[0005] Application Contents
[0006] The present application provides a shopping guide method and system based on a large language model, which can provide the user with targeted shopping guide information that is more in line with the user's natural language.
[0007] In a first aspect, a shopping guide method based on a large language model is provided, the method comprising: obtaining training shopping guide requirements and content enhancement configurations carried by the training shopping guide requirements; generating training prompt words describing the training shopping guide requirements based on the content enhancement configuration; performing semantic analysis on the training prompt words using the large language model to be trained to determine a plurality of application program interfaces required to respond to the training shopping guide requirements; screening and summarizing the return results of the plurality of application program interfaces based on a preset database to obtain predicted shopping guide information; adjusting parameters of the large language model to be trained based on the predicted shopping guide information and the training shopping guide requirements to obtain a trained large language model; when conducting shopping guide, based on the prompt words corresponding to the shopping guide requirements input by the user end, guiding the trained large language model to generate and output target shopping guide information matching the prompt words to the user end.
[0008] In the above technical solution, the content enhancement configuration of the system containing the training shopping guide request is obtained, thereby obtaining the content enhancement configuration of the training shopping guide request, including the time of entry, user ID, and location of the training shopping guide request in the system. Subsequently, the training shopping guide request and the content enhancement configuration are combined to more reasonably and accurately generate training prompts describing the training shopping guide request. The training prompts and the training shopping guide request are then input into the large language model to be trained, enabling the large language model to accurately predict the multiple application programming interfaces (APIs) required to execute the training shopping guide request. The returned results of these multiple APIs are then filtered and summarized using a preset database to obtain predicted shopping guide information. In this way, the preset database allows the large language model to reference the user's historical association information to provide predicted shopping guide information that better matches the user's intent for the current shopping guide request entered by the user. Finally, based on the predicted shopping guide information and the training shopping guide request, the parameters of the large language model to be trained are adjusted to obtain a trained large language model, resulting in improved performance in shopping guide delivery. Based on the prompt word corresponding to the shopping guide request input by the user, the trained large language model is guided to generate and output target shopping guide information matching the prompt word to the user. In this way, by using the predicted shopping guide information and the training shopping guide request as training data, the parameters of the trained large language model are adjusted to produce a trained large language model. This allows the trained large language model to respond to the training shopping guide request in natural language input by the user during the shopping guide process without requiring multiple interactions from the user. The trained large language model can then output target shopping guide information that better matches the user's natural language input based on the shopping guide request.
[0009] In a second aspect, a shopping guide method based on a large language model is provided, the method comprising: obtaining a shopping guide demand input by a user terminal and a content enhancement configuration carried by the shopping guide demand; generating a prompt word describing the shopping guide demand based on the content enhancement configuration; performing semantic analysis on the prompt word using a trained large language model to determine a plurality of application program interfaces required to respond to the shopping guide demand; wherein the trained large language model is obtained by adjusting parameters of a large language model to be trained based on predicted shopping guide information, the predicted shopping guide information is obtained by screening and summarizing the return results of a plurality of application program interfaces required for training the shopping guide demand based on a preset database, and the plurality of application program interfaces are determined after the large language model to be trained performs semantic analysis on the training prompt word of the training shopping guide demand; screening and summarizing the return results of the plurality of application program interfaces based on a preset database, and generating and outputting target shopping guide information to the user terminal.
[0010] In the above scheme, for the shopping guide demand input by the user end, the content enhancement configuration of the system where the shopping guide demand is located is obtained, so that the content enhancement configuration such as the time when the shopping guide demand is input into the system, the user identification and the address can be obtained. Afterwards, through the content enhancement configuration, prompt words describing the shopping guide demand are generated more reasonably and accurately. Therefore, the prompt words and the shopping guide demand are input into the trained large language model together, which enables the trained large language model to accurately predict the target shopping guide information that meets the shopping guide demand and output it to the user end. In this way, during the entire shopping guide process, after the user end inputs the shopping guide demand, the background will output the target shopping guide information to the user end through the large language model. The shopping guide demand in the natural language form input by the user end can be responded to without multiple interactions by the user end, which can not only save the user's decision-making time, but also provide the user end with a target shopping guide demand that is more in line with the user end's natural language.
[0011] In a third aspect, a shopping guide system based on a large language model is provided, the system comprising:
[0012] A training data acquisition module, used to acquire shopping guide training requirements and content enhancement configurations carried by the shopping guide training requirements;
[0013] A training prompt word generation module, configured to generate training prompt words describing the shopping guide training needs based on the content enhancement configuration;
[0014] An application program interface determination module, configured to perform semantic analysis on the training prompt words using a large language model to be trained, so as to determine a plurality of application program interfaces required to respond to the shopping guide training requirements;
[0015] A predicted shopping guide information determination module, configured to filter and summarize the return results of the plurality of application program interfaces based on a preset database to obtain predicted shopping guide information;
[0016] A model training module, configured to adjust parameters of the large language model to be trained based on the predicted shopping guide information and the shopping guide training requirements to obtain a trained large language model;
[0017] The target shopping guide information output module is used to guide the trained large language model to generate and output target shopping guide information matching the prompt word to the user terminal when conducting shopping guide based on the prompt word corresponding to the shopping guide demand input by the user terminal.
[0018] In a fourth aspect, a shopping guide system based on a large language model is provided, the system comprising: a user terminal and a server; the server comprising: a prompt word generation module, a semantic analysis module, and a shopping guide information output module; wherein:
[0019] The user terminal is used to obtain the shopping guide requirements input by the user terminal and the content enhancement configuration carried by the shopping guide requirements;
[0020] The prompt word generation module is used to generate prompt words describing the shopping guide needs based on the content enhancement configuration;
[0021] The semantic analysis module is configured to perform semantic analysis on the prompt word using a trained large language model to determine a plurality of application programming interfaces (APIs) required to respond to the shopping guide requirement; wherein the trained large language model is obtained by adjusting parameters of the large language model to be trained based on predicted shopping guide information, the predicted shopping guide information is obtained by screening and summarizing the return results of the plurality of application programming interfaces (APIs) required for the shopping guide training requirement based on a preset database, and the plurality of application programming interfaces are determined after the large language model to be trained performs semantic analysis on the training prompt word for the shopping guide training requirement;
[0022] The shopping guide information output module is used to filter and summarize the return results of the multiple application program interfaces based on a preset database, and generate and output target shopping guide information to the user terminal.
[0023] In a fifth aspect, a server is provided, comprising a memory and a processor. The memory is configured to store executable program code, and the processor is configured to retrieve and execute the executable program code from the memory, so that the device performs the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
[0024] In a sixth aspect, a computer program product is provided, which includes: a computer program code, which, when the computer program code runs on a computer, enables the computer to execute the method in any possible implementation of the first aspect, the first aspect, the second aspect, or any possible implementation of the second aspect.
[0025] In the seventh aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] FIG1 is a schematic diagram of an application scenario of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0027] FIG2 is a schematic flow chart of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0028] FIG3 is another schematic flow chart of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0029] FIG4 is another schematic flow chart of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0030] FIG5 is another schematic flow chart of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0031] FIG6 is a schematic diagram of an implementation flow of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0032] FIG7 is a schematic diagram of another application scenario of the shopping guide method based on a large language model provided in an embodiment of the present application;
[0033] FIG8 is another schematic flow chart of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0034] FIG9 is a schematic structural diagram of a shopping guide system based on a large language model provided in an embodiment of the present application;
[0035] FIG10 is another structural diagram of a shopping guide system based on a large language model provided in an embodiment of the present application;
[0036] FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, such as A and / or B, which can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two. In the following, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0038] To facilitate understanding of the embodiments of the present application, the following explains the professional terms involved in the embodiments of the present application:
[0039] Large Language Model (LLM): A deep learning model trained on large amounts of text. It can generate natural language text or understand the meaning of language text, thereby handling a variety of natural language tasks, including conversational question-answering, information extraction, and text classification. Examples of such models include the Chat Generative Pre-trained Transformer 3.5 (ChatGPT3.5), the Chinese-English Bilingual Hundred Billion Dialogue Model (ChatGLM), and the Large Language Model Meta AI (LLaMA).
[0040] Prompt model: This refers to the input text paragraph or phrase, which is added before the task text to be solved and passed to the LLM to achieve the expected task. It has the meaning of instructions and prompts, usually in the form of questions, dialogues, descriptions, etc. The prompt input enables the LLM to adapt to various downstream applications.
[0041] For ease of understanding, the following will take the preset application installed on the mobile phone (for example, application A) as an example, and combine with the accompanying drawings to specifically explain the scenario in which the running interface of application A is displayed to the user in the preset application installed on the mobile phone (for example, application A).
[0042] Figure 1 shows a graphical user interface (GUI) launched by a user running application A. For example, (a) in Figure 1 shows an interface 101 displayed by a mobile phone in unlocked mode, and the interface 101 displays a weather clock component and a plurality of application A programs (Application, App), etc. Among them, application A programs may include phone, information, settings and application A, etc. It should be understood that the interface 101 may also include more other applications, and the embodiments of the present application do not impose any restrictions on this. For example, as shown in (a) in Figure 1, the mobile phone detects a user's click operation on the icon of application A. In response to the user's click operation, the mobile phone displays the main interface 102 of application A as shown in (b) in Figure 1; the main interface 102 can display multiple classification menus, operable controls or buttons, pictures and other interface content to meet the user's usage needs. The main interface 102 can also be called the "homepage of application A". For example, as shown in FIG1(b), on the main interface 102 of application A, there are displayed a search box 11, a recommended food stream 12, scene cards 13, a trend engine, a channel page 14, a multi-purpose supermarket, and other shopping guide portals on the homepage, as well as different categorized menus such as food delivery, supermarkets, fruits, medicine, desserts, hamburgers, lobsters, and barbecue. The recommended food stream 12 displays the store names of various merchants and food descriptions. As shown in FIG1(b), the phone detects that the user has clicked on the main interface 102, such as clicking on "My" on the main interface 102, and in response to the user's click, enters the "My" interface. On this interface, the user can click "My Orders". In response to the click operation, the mobile phone displays interface 103 as shown in (c) of Figure 1, which is the display interface of historical orders; the user's historical orders are displayed in chronological order on interface 103; for example, the historical orders displayed in interface 103 include the store, food, and the quantity purchased (for example, ×× donkey meat fried cakes, price and quantity; ×× crayfish, price and quantity; ×× braised noodles - spicy soup, price and quantity). On the "My" interface, if the user clicks "My Customer Service", in response to the click operation, the mobile phone displays interface 104 as shown in (d) of Figure 1, which displays the platform customer service. The user can ask questions on this interface. Among them, the input method of the question can be manual voice input or text input by the user in the dialog box, or it can be input by selecting a shortcut menu; for example, clicking "Order Questions", "Foodie Card", "Red Envelope Questions", "Cooperation Questions" or "Account Questions". Alternatively, users can directly click on a question template to enter a question, such as "How do I urge an order?", "What if my order is timed out?", "What if I clicked delivery prematurely?", "What if the wrong or missed order is delivered?", "What if there's no rider to accept the order?", "What if there's a food quality issue?", or "Why can't I use my red envelope?" App A might have hundreds of shopping guide portals like the one shown in Figure 1.When searching and recommending lists, users spend over 40% of their time browsing the list itself. However, these linear, one-dimensional lists are inefficient in expressing content, resulting in lengthy and costly decision-making processes. Furthermore, in most shopping guide scenarios, the platform provides user input in a one-way manner, directly presenting the user with a list of items or displaying labels for the user to select. Even in search, active user input typically consists of short words. This results in inaccurate and unreliable recommendations, while also limiting user-initiated expression and obscuring its natural language.
[0043] Based on this, the embodiment of the present application provides a shopping guide method based on a large language model, an end-to-end one-stop, user-side shopping guide process in the local life takeaway scenario, and uses the LLM large model as the intelligent center to implement the process.
[0044] The following is an introduction to the technical solution provided by the embodiment of the present application. The embodiment of the present application provides a shopping guide method based on a large language model. Referring to FIG2 , FIG2 is a schematic flow chart of a shopping guide method based on a large language model provided by the embodiment of the present application, including:
[0045] S201, obtaining shopping guide training requirements and content enhancement configurations carried by the shopping guide training requirements.
[0046] Among them, the training shopping guide demand can be a natural language text or voice, for example, the user terminal inputs the training shopping guide demand in the form of voice, or the user terminal inputs the training shopping guide demand in the form of text. Exemplarily, the training shopping guide demand can be a question input in the form of a whole sentence, such as, "Which store has milk tea that is three-point sweet without pearls"; the training shopping guide demand can be a declarative sentence input in the form of a whole sentence, such as "I want to eat lamb without spicy and cumin." The content enhancement configuration corresponding to the training shopping guide demand is the time information, location information of the system where the training shopping guide demand is located, and the page type for inputting the training shopping guide demand. Among them, the time information of the system where the training shopping guide demand is located is the time when the training shopping guide demand is input, the location information is the location of the user terminal corresponding to the training shopping guide demand, and the page type for inputting the training shopping guide demand is used to indicate the functions that the page can complete.
[0047] S202: Generate training prompt words describing the shopping guide training needs based on the content enhancement configuration.
[0048] Among them, by first performing natural language understanding on the training shopping guide demand, a demand understanding result is obtained; then, based on the demand understanding result and the content enhancement configuration, a training prompt word describing the training shopping guide demand is generated. In some possible implementations, the training shopping guide demand is subjected to natural language understanding by a natural language understanding model (NLU) to obtain a demand understanding result. The demand understanding result includes: the intent type and intent content of the training shopping guide demand. The NLU model is placed in front of the large language model to be trained to perform intent recognition and intent understanding on the input training shopping guide demand, thereby obtaining a demand understanding result. In this way, the intent type and intent content of the training shopping guide demand in the input natural language format can be accurately identified by NLU, thereby facilitating the generation of accurate training prompt words to input the large language model to be trained.
[0049] In some possible implementations, the above step 202 may be implemented by the steps shown in FIG3 :
[0050] S301: Perform intent recognition on the shopping guide training demand to obtain the intent type of the shopping guide training demand.
[0051] Here, the input training guide demand is first converted into an embedding vector through NLU, and then the vector is subjected to intent recognition, that is, the intent type of the training guide demand is classified, thereby determining the intent type of the training guide demand. Exemplarily, the intent types include: personal interest recommendation, finding a specific store, finding a category of goods, asking about life knowledge, historical order operation, and asking about platform functions. Exemplarily, if the training guide demand is "What should I do if the rider doesn't deliver?" or "How can I check the benefits red envelope?", then the intent type of the training guide demand is determined to be the inquiry platform function type. If the training guide demand is "I want another cup of yesterday's milk tea", then the intent type of the training guide demand is determined to be the historical order operation type. If the training guide demand is "I don't know what to eat for lunch today?", then the intent type of the training guide demand is determined to be the personal interest recommendation type, etc.
[0052] S302: Understand the intention of the shopping guide training demand to obtain the intention content of the shopping guide training demand.
[0053] The demand understanding result includes the intent type and intent content. The intent content of the training shopping guide request is obtained by semantically understanding the natural language in the training shopping guide request. This intent content is the specific intent of the training shopping guide request. For example, if the training shopping guide request is "I don't know what to eat for lunch today?", it indicates that the user needs a lunch recommendation. Therefore, the intent content of the training shopping guide request is that the user does not know what to eat for lunch and needs a lunch recommendation. In some possible implementations, entity recognition and relationship extraction are performed on the training shopping guide request to extract coarse-grained and fine-grained information to obtain the intent content. For example, if the training shopping guide request is "I want milk tea with 70% sweetness", entity recognition is performed on the training shopping guide request to obtain "milk tea", and relationship extraction is performed to obtain the modifier "70% sweet" of "milk tea", that is, "70% sweet" comes before "milk tea". The coarse-grained extraction obtains "milk tea", and the fine-grained extraction obtains "70% sweet milk tea", resulting in the intent content of "70% sweet milk tea". In this way, by performing natural language intent recognition on the training shopping guide needs through NLU, the intent type of the training shopping guide needs can be accurately analyzed to facilitate the subsequent matching of prompt word templates that meet the intent type; and by performing natural language intent understanding on the training shopping guide needs, the specific intent content of the training shopping guide needs input by the user end can be accurately obtained, which is convenient for combining the intent type to jointly generate prompt words for input into the large language model.
[0054] S303: Searching for a prompt word template that matches the intention type in a preset prompt word template library.
[0055] Among them, the preset prompt word template library is used to store prompt word templates that match multiple preset intent types. Here, the preset prompt word template library is used to store prompt word templates that match multiple preset intent types. The prompt word template can be understood as a text frame. Since the preset prompt word template library stores prompt word templates bound to the preset intent type, after the NLU outputs the intent type of the training shopping guide demand, the preset intent type that is the same as the intent type is first searched in the preset prompt word template library, so that the prompt word template bound to the preset intent type is used as the prompt word template for the training shopping guide demand. Different prompt word frames are set for different intent types. For example, if the intent type is a personal interest recommendation class, then the prompt word template can be: The user's historical interest is ××, please recommend ×× to the user based on the training shopping guide demand ××. In this way, suitable prompt word templates can be provided for different intent types, thereby facilitating the rapid generation of accurate training prompt words.
[0056] S304: Modify and enhance the intended content based on the content enhancement configuration to generate prompt content.
[0057] Here, after the NLU outputs the intent content of the shopping guide training request, content enhancement configuration is also taken into account to more accurately generate prompt content. In some possible implementations, the intent content is modified and enhanced through the content enhancement configuration to generate the prompt content. For example, if the shopping guide training request is "I want a delicious and fragrant chicken noodle soup," the intent type is to search for a product category, and the intent content is "The user wants a delicious and fragrant chicken noodle soup." If the content enhancement configuration is based on the user ID, the user's historical interests can be obtained based on the user ID and combined with the intent content as the prompt content. If the content enhancement configuration is based on the input time of the shopping guide training request, the input time can be used to determine whether it is breakfast, lunch, or dinner, and the meal corresponding to the input time can be combined with the intent content as the prompt content. If the content enhancement configuration is based on the location information corresponding to the shopping guide training request, the location information can be used to determine the local specialty food in the location. In this case, the specialty food can be combined with the intent content as the prompt content. For content enhancements configured to input the same training guide request with a time interval, this time interval is combined with the intent content and used as the prompt. For content enhancements configured to input the training guide request page type, if the page type is an order completion page, indicating that the user has already ordered a meal, to provide a better user experience, the prompt content is, "The user has just placed an order and is now adding to their order. Please continue to recommend more items related to rice noodles." In this case, the large language model may not only recommend rice noodles to the user, but also recommend complementary foods, such as a fruit platter. Since the user is adding to their order, the large language model can ask questions such as, "Is the rice noodles you just ordered insufficient? Can I recommend a rice noodle set for two or three people?" Training prompts are used to construct these different types of training guide request questions. If the page type for training shopping guide needs in the content enhancement configuration is a search page, it means that the user may be ordering rice noodles for the first time. In this case, prompt content can be generated based on the intent content, such as "Please recommend delicious chicken soup rice noodles to the user."
[0058] S305: Embed the prompt content into the prompt word template to obtain the training prompt word.
[0059] Here, the prompt content is used as the filling content and filled into the prompt word template, so as to obtain the training prompt word that can be input into the large language model to be trained. For example, if the input training shopping guide demand is "I want a bowl of fresh, fragrant and low-salt chicken soup rice noodles", then the intention type is determined to be a search for a category of goods, and the prompt word template that matches the search for a category of goods is: Please recommend ×× to the user based on the training shopping guide demand ××. The intention content is that the user needs a bowl of fresh, fragrant and low-salt chicken soup rice noodles. If the content enhancement is configured as the input time of the training shopping guide demand and the location information corresponding to the training shopping guide demand, and the input time is the breakfast period, then the special breakfast food in the area can be analyzed according to the location information first (for example, the special food is soup dumplings); then the intention content is enhanced according to the special food to obtain the prompt content. In this way, the intention content is: Please recommend a bowl of fresh, fragrant and low-salt chicken soup rice noodles to the user with soup dumplings. By embedding the intent content into the prompt word template, the resulting training prompt word could be: "Please recommend a delicious, low-salt chicken noodle soup with soup dumplings based on the user's shopping guide need: I want a delicious, low-salt chicken noodle soup with soup dumplings." Alternatively, if the training shopping guide need is "I don't know what to eat?", the intent type for this training shopping guide need is determined to be a personal interest recommendation, and the intent content is: "The user needs a food recommendation." A prompt word template matching the personal interest recommendation category could be: "The user's historical interest is X. Based on the training shopping guide need X, please recommend X." If the content enhancement configuration is configured with the input time and user ID for the training shopping guide need, and the input time is dinner time, the user's eating habits during dinner time are analyzed based on the user ID. The intent content is then enhanced based on these eating habits to produce the prompt content. For example, if the user tends to eat light meals at dinner, the prompt content could be: "Please recommend light meals for dinner time." In this way, the prompt content is filled into the prompt word template, resulting in the following training prompt word: Please recommend light meals to the user based on their shopping guide needs: "I don't know what to eat. Since the user has a history of liking light meals for dinner, please recommend light meals to the user." By first determining the prompt word template based on the intent type and then generating the prompt content based on the content enhancement configuration and intent content, the prompt content can be made more precise, making the resulting training prompt word more consistent with the shopping needs.
[0060] In some possible implementations, the demand understanding results and content enhancement configuration are input into the prompt center to generate training prompts describing the shopping guide training requirements. Prompt templates are first matched based on the intent type from a preset prompt template library. These templates are then populated with the content enhancement configuration and intent content to generate the prompts. This way, the training prompts fully consider the specific intent of the shopping guide training requirements input by the user and the content enhancement configuration of the system where the training guide requirements are located, resulting in more accurate training prompts.
[0061] In some possible implementations, during the process of generating training prompt words, by taking into account the content enhancement configuration, different training prompt words can be generated using different content enhancement configurations, thereby making the training prompt words input into the large language model to be trained more accurate and rich. Obtaining the content enhancement configuration includes at least one of the following:
[0062] Obtain the page type for inputting the training shopping guide requirement. Here, the page type includes: order page, order completed page, search page, etc. Different page types for inputting training shopping guide requirements indicate different scenarios for inputting the training shopping guide requirements. For example, if a user inputs a training shopping guide requirement on an order page, it means that the user has already placed an order but has not yet paid, but is hesitant, so he inputs a training shopping guide requirement again; if a user inputs a training shopping guide requirement on an order completed page, it means that the user's previous order did not meet the user's needs, etc. In this way, the page type for inputting training shopping guide requirements indicates that the user's needs are also different, so the training prompt words generated for different page types will also be different.
[0063] The input time of the shopping guide training requirement is obtained. Here, the input time of the shopping guide training requirement is different, indicating that the time when the user needs shopping guide is different. Obviously, the shopping guide items required will also be different, so the generated training prompt words will also be different.
[0064] The user ID corresponding to the shopping guide training requirement is obtained. Here, the user's historical interests can be obtained through the user ID, and the training prompt words are generated in combination with the historical interests.
[0065] Obtain the location information corresponding to the shopping guide training requirement. Here, if the location information corresponding to the shopping guide training requirement is different, the stores that can be selected will also be different, and the specialty foods at that location will also be different. Therefore, a training prompt word can be generated based on the location information so that the training prompt word can represent the specialty foods at that location.
[0066] Obtain the time interval between inputs of the same training shopping guide request. This time interval can be used to determine the frequency of the user submitting the same training shopping guide request, thereby generating targeted training prompts. For example, for a training shopping guide request that appears for the first time or has a long time interval, training prompts can be generated based on the specific content of the training shopping guide request. If the time interval is short, this information can be reflected in the training prompts, so that the shopping guide information output by the large language model is more in line with the user's intent.
[0067] S203: Perform semantic analysis on the training prompt words using the large language model to be trained to determine a plurality of application programming interfaces required to respond to the shopping guide training requirements.
[0068] Here, the large language model to be trained performs language understanding on the training prompt words and, based on the understanding, arranges the steps to implement the training shopping guide requirements and the corresponding functions of each step. In this way, the application program interface that implements the function can be determined based on the corresponding function of each step, thereby obtaining multiple application program interfaces. For example, the user's original question is: "I want to buy a ×× rice noodle set for two people." The steps arranged by the LLM to implement the training shopping guide requirements are:
[0069] The first step is to call the [Store Search] API with the parameter "×× Rice Noodles" and select the one closest to you.
[0070] The second step is to call the [Store Search] API with the parameter [Step 1.Store ID], select the product "Rice Noodle Combo for Two", and keep the one with the highest order quantity.
[0071] Step 3: Call the [Red Envelope Benefits] API with the [Step 2. Product ID] as the parameter to calculate the final price (Price);
[0072] Step 4: Call the [Pay Order] API with the parameter [Step 3.Price].
[0073] S204: Filter and summarize the return results of the multiple application program interfaces based on a preset database to obtain predicted shopping guide information.
[0074] Here, historical association information matching the training shopping guide requirement is determined in a preset database. The preset database can be a vector database or a SQL (Structured Query Language) database. The preset database is used to store historical association information of historical shopping guide requirements, including historical shopping guide information for the historical shopping guide requirements and interaction information corresponding to the historical shopping guide information. During each round of interaction, the predicted shopping guide information output by the large language model to be trained is bound to the training shopping guide requirement and stored in the preset database. Interaction information is obtained for the predicted shopping guide information by obtaining interaction operations performed by the user. For example, if the predicted shopping guide information shows two stores, which of the two stores the user clicked on; or if the predicted shopping guide information shows an order confirmation page, whether the user confirmed the order. Storing the historical shopping guide information of the historical shopping guide requirement and the interaction information corresponding to the historical shopping guide information in the preset database facilitates the large language model to be trained to reference the historical association information to provide predicted shopping guide information that better matches the user's intent for the training shopping guide requirement currently input by the user. In this way, by searching for historical correlation information that matches the training shopping guide needs in the preset database, and using the training prompt words and the historical correlation information together as the input of the large language model to be trained, the predicted shopping guide information output by the large language model to be trained can be more in line with the user's intention.
[0075] In some possible implementations, the training prompt words and historical association information related to the training shopping guide needs are input into the large language model to be trained. After the large language model to be trained performs semantic understanding on the input prompt words and historical association information, it can obtain the implementation steps that respond to the training shopping guide needs, and then call the corresponding application programming interface for each implementation step. By optimizing the return results of the application programming interface (API), the predicted shopping guide information can be output.
[0076] S205 : Based on the predicted shopping guide information and the shopping guide training demand, adjust the parameters of the large language model to be trained to obtain a trained large language model.
[0077] After obtaining the predicted shopping guide information output by the large language model to be trained, the cross-entropy loss between the predicted shopping guide information and the sample demand information is determined according to their true values. The parameters of the large language model to be trained are adjusted according to the cross-entropy loss to obtain a trained large language model. The network parameters of the large language model to be trained include weights, learning rates, etc. By using the predicted shopping guide information and the training shopping guide demands as training data, the parameters of the large language model to be trained are adjusted to obtain a trained large language model. This allows the trained large language model to provide more accurate target shopping guide information based on the shopping guide demands input by the user when providing shopping guides.
[0078] S206 , when performing shopping guide, based on the prompt word corresponding to the shopping guide demand input by the user terminal, guide the trained large language model to generate and output target shopping guide information matching the prompt word to the user terminal.
[0079] Here, when providing shopping guidance, in response to the shopping guide requirements input by the user end, the trained large language model is used to perform language processing on the prompt words corresponding to the shopping guide requirements, and target shopping guide information corresponding to the shopping guide requirements is generated and output to the user end. Among them, the target shopping guide information can be the output store or product that meets the shopping guide requirements, the payment interface of the product that meets the shopping guide requirements, or the inquiry information for the shopping guide requirements. For example, if the shopping guide requirement is "I want a bowl of delicious chicken soup rice noodles", and the page type for inputting the shopping guide requirement is a retail page, such as a supermarket convenience store of Application A, then the trained large language model can obtain the products that the user end is browsing in the supermarket through the retail page. In this scenario, the trained large language model can wake up the AI shopping guide. At this time, the large language model will not call the restaurant takeout API, but the retail API, that is, the supermarket API. The target shopping guide information fed back to the user end is the self-service hot pot-style rice noodles sold in the supermarket, rather than the takeout rice noodles.
[0080] In an embodiment of the present application, for the training shopping guide demand input by the user end, the content enhancement configuration of the system where the training shopping guide demand is located is obtained, so that the content enhancement configuration such as the input time, user identification and address of the training shopping guide demand in the system can be obtained. Afterwards, the training shopping guide demand is understood in natural language, so that the training shopping guide demand in natural language form can be understood, so as to obtain the demand understanding result of the training shopping guide demand more accurately. Combining the demand understanding result with the content enhancement configuration, it is possible to generate training prompt words that describe the training shopping guide demand more reasonably and accurately. Thus, the training prompt words and the training shopping guide demand are input into the large language model to be trained, so that the large language model to be trained can accurately predict the predicted shopping guide information that meets the training shopping guide demand. The large language model to be trained is trained by using the predicted shopping guide information and the training shopping guide demand as training data to obtain the trained large language model, so that the trained large language model can be used to accurately guide the shopping guide demand input by the user end, so as to improve the target shopping guide information to the user end. In this way, during the entire shopping guide process, after the user inputs the shopping guide requirements, the background will output the target shopping guide information for the user through the trained large language model. The user does not need to interact multiple times to respond to the shopping guide requirements in the natural language input by the user, which can not only save the user's decision-making time, but also provide the user with target shopping guide information that is more in line with the user's natural language.
[0081] In some embodiments, the large language model to be trained analyzes multiple application programming interfaces (APIs) required to respond to shopping guide training requirements and processes the return results of the APIs to generate and output predicted shopping guide information. That is, the above-mentioned step S302 can be implemented by the steps shown in FIG4 :
[0082] S401: Determine the calling order among the multiple application programming interfaces.
[0083] Here, the order in which multiple APIs are called is determined based on the implementation process for shopping guide training. The implementation process for shopping guide training is the steps orchestrated by the large language model to be trained to achieve the training requirement. The order in which these steps are executed is the order in which the multiple APIs are called.
[0084] S402: Send the calling instruction to the multiple application programming interfaces according to the calling order.
[0085] Here, the large language model to be trained calls the application program interface layer by layer in the order of calling multiple application program interfaces; that is, the large language model to be trained first calls the first application program interface in this calling order, and continues to call the second application program interface according to the return result of the first application program interface, and repeats this cycle until all the multiple application program interfaces are called to respond to the needs of training shopping guides.
[0086] S403: Based on the historical association information in the preset database that matches the shopping guide training requirements, the returned results of the application program interface are screened and summarized to generate and output the predicted shopping guide information.
[0087] The preset database is used to store historical correlation information of historical shopping guide demands, and the historical correlation information includes: historical shopping guide information of the historical shopping guide demands and interaction information corresponding to the historical shopping guide information.
[0088] In some possible implementations, candidate historical training shopping guide needs with a high similarity to the training shopping guide needs are searched in a preset database; and the historical shopping guide information and corresponding interaction information of the candidate historical training shopping guide needs are determined as historical association information that matches the training shopping guide needs. Here, the training prompt words and the historical association information are input together into the large language model to be trained, so that after the large language model to be trained calls different interfaces through the training prompt words, the return results are filtered through the historical association information, thereby making the predicted shopping guide information more accurate. After the large language model to be trained obtains the return results of multiple application interfaces, in order to make the predicted shopping guide information more in line with the user's intention, the return results are optimized through the historical association information; for example, the return results with a high degree of overlap with the historical shopping guide information in the historical association information are filtered out, or the return results with a high similarity with the shopping guide objects in the interaction information are filtered out.
[0089] In some possible implementations, for any application program interface, the function of the application program interface is combined with the return result of the previous application program interface to accurately generate the calling parameters of the application program interface, thereby facilitating the large language model to accurately call the corresponding application program interface. That is, the above step S402 can be implemented by the following steps S421 to S423 (not shown):
[0090] S421, obtaining the function of any application program interface among the multiple application program interfaces and the return result of the previous application program interface.
[0091] The previous API is the API that precedes and is adjacent to any of the APIs in the order described. The function of any API is the function implemented by that API, such as store search, in-store search, red envelope benefits, or payment ordering. The return result of the previous API is the output result after the previous API executes its own function. For example, if the function of the previous API is store search, the return result is the nearest store.
[0092] S422: Generate calling parameters of any application program interface according to the function of any application program interface and the return result of the previous application program interface.
[0093] The calling parameters of any application program interface are parameters for calling the application program interface, and can uniquely indicate the application program interface that needs to be called.
[0094] For example, if the function of any application interface is in-store search, the return result of the previous application interface is the nearest store. Since any application interface needs to search within the nearest store, the calling parameter of any application interface is [the identity document (ID) of the nearest store].
[0095] S423: Send the calling instruction carrying the calling parameters to any one of the application programming interfaces.
[0096] Here, the large language model to be trained sends a call instruction carrying the call parameters to the corresponding API, which can then call the API to execute the corresponding function and obtain a return result. Similarly, the large language model to be trained can call multiple APIs and obtain the return results of these multiple APIs, thereby responding to the needs of shopping guide training.
[0097] In an embodiment of the present application, multiple application programming interfaces are called separately in the order of calling the multiple application programming interfaces to receive the return results of these application programming interfaces. Afterwards, the return results are optimized through historical association information so that the target shopping guide information will not have too high an overlap rate with the historical shopping guide information and can also meet the user's historical interests.
[0098] In some possible implementations, the large language model to be trained processes different types of returned results in different ways. That is, step 403 can be implemented in the following two ways:
[0099] Method 1: If the type of the returned result is business type, the multiple initial shopping guide objects are screened according to preset screening rules and the historical association information, and the predicted shopping guide information is generated and output.
[0100] Here, the business category can be food delivery or product business; for example, store search, product search, in-store search, personalized recommendations, payment ordering, red envelope inquiry, etc. By filtering the returned results for the target business category using pre-set screening rules and historical association information, the redundancy of the predictive shopping guide information presented to users can be reduced while also making the predictive shopping guide information more targeted.
[0101] In some possible implementations, for the returned results of the business class, a plurality of initial shopping guide objects are first preliminarily screened using preset screening rules to select a smaller set of candidate shopping guide objects; then, shopping guide objects with a high degree of overlap are filtered out using historical association information, and the filtered shopping guide objects are sorted to output sorted shopping guide objects. This makes the predicted shopping guide objects more concise and accurate, saving users time in browsing target shopping guide information, thereby improving user decision-making efficiency. That is, the above-mentioned method 1 can be implemented through the following process:
[0102] First, if the type of the returned result is the business class, a set of candidate shopping guide objects is filtered out from the multiple initial shopping guide objects according to the preset filtering rules. Here, the preset filtering rules include at least one of the following: the praise degree is ranked in the top n praise degrees of each initial shopping guide object in the initial shopping guide object set; the sales volume is ranked in the top n sales volume of each initial shopping guide object; the distance between the location and the location corresponding to the training shopping guide demand is ranked in the last n among the initial shopping guide objects; the selling price is ranked in the last n prices of the initial shopping guide object. Among them, n is a positive integer less than the number of candidate shopping guide objects; illustratively, n can be taken as less than or equal to 2. These filtering rules can be independent of each other or progressive; for example, the preset filtering rule is that the praise degree is ranked in the top n praise degrees of each initial shopping guide object, and the distance between the location and the location corresponding to the training shopping guide demand is ranked in the top n among multiple initial shopping guide objects, etc. For example, taking n as 1, the initial shopping guide objects are screened to select the shopping guide objects with the highest positive reviews, the shopping guide objects with the highest sales volume, the shopping guide objects closest to the location corresponding to the training shopping guide requirement, and the shopping guide objects with the lowest prices. If the training shopping guide requirement is "I want to buy a XX rice noodle combo for two," then the initial shopping guide objects are multiple stores. From these multiple stores, the store closest to the user terminal, the store with the cheaper rice noodle combo, the store with the higher sales volume of the rice noodle combo despite being more expensive, or the store with the rice noodle combo that contains ingredients that are beneficial to health. In other embodiments, for training shopping guide requirements for takeout or food, the preset screening rules may further include: the food is considered to be relatively healthy. That is, the initial shopping guide objects with the highest healthiness are screened from the initial shopping guide objects. In this way, by setting the preset screening rules, the initial shopping guide objects can be quickly screened, thereby reducing the redundancy of the initial shopping guide objects in the returned results.
[0103] Secondly, the candidate shopping guide object set is filtered and sorted based on the historical association information and a preset number to obtain a number of sorted shopping guide objects less than the preset number. Here, the preset number can be custom set, for example, the preset number is set to a value less than or equal to 3. Exemplarily, the preset number is set to 3. In this way, if the initial shopping guide object is a store, the candidate shopping guide object set is filtered based on the historical association information to obtain 3 stores, and these 3 stores are sorted according to the historical association information to obtain sorted shopping guide objects. Since the historical association information includes historical shopping guide information and interaction information for historical training shopping guide needs, it is possible to determine the target stores that were previously provided to the user terminal, as well as which stores the user ultimately selected and which stores were ignored through this historical shopping guide information and interaction information. Therefore, by referring to the stores ignored by the user, similar stores in the candidate shopping guide object set that are highly similar to the store can be filtered; alternatively, stores with high similarity to the stores selected by the user can be filtered from the candidate shopping guide object set. Afterwards, since the historical shopping guide information and interaction information in the historical association information both carry timestamps, it can be seen that the user terminal proposed a historical training shopping guide demand time that is similar to the training shopping guide demand. If the time is close to the current moment, then the store that is the same as the historical shopping guide information can be arranged at the end, and the remaining two stores can be randomly sorted to obtain sorted shopping guide objects.
[0104] Finally, based on the sorted shopping guide objects, the predicted shopping guide information is determined and outputted. Here, by briefly explaining the sorted shopping guide objects, the explanation content and the sorted shopping guide objects are outputted together as the predicted shopping guide objects.
[0105] In some possible implementations, the description information of the sorted shopping guide objects is first determined; and then the description information is integrated with the sorted shopping guide objects to obtain and output predicted shopping guide information.
[0106] Among them, the descriptive information of the sorted shopping guide object is the concise content of the sorted shopping guide object. For example, if the sorted shopping guide object is a store, the descriptive information can be an introduction to the goods sold in the store, so as to output an explainable description of the store to the client, so that the user can quickly understand the store. By assigning the descriptive information to the sorted shopping guide object, for example, binding the descriptive information and the sorted shopping guide object, and outputting them as predicted shopping guide information in the same area of the display interface at the same time. In this way, by outputting the descriptive information and the sorted shopping guide object at the same time, the client can quickly understand the output shopping guide information, thereby saving decision-making time.
[0107] Method 2: If the type of the returned result is content type, the content in the returned result is summarized and modified to generate and output the predicted shopping guide information.
[0108] Here, the content category is the question-answering category. If the input training shopping guide demand is a question-consulting type demand, for example, asking about the platform function, or asking for the relevant introduction of a certain store, then the returned result is the answer to the question, and the type it belongs to is the content category.
[0109] In some possible implementations, if the content in the returned results is extensive and overly detailed, then the content in the returned results is summarized and modified, i.e., the returned results are summarized and summarized. For example, if the shopping guide training requirement is "What to do if the rider delivers the wrong item?", the results returned by the customer service API are likely to be detailed and lengthy, requiring the user to read for a long time; therefore, the returned results are summarized and summarized, and the key points are listed. If the content in the returned results is poorly readable or difficult to understand, then the content in the returned results is polished and modified to make the resulting target shopping guide information more readable and easier for users to understand. In this way, by summarizing and modifying the returned results of content-related categories, the output predicted shopping guide information can be made more understandable and concise, thereby saving users time in comprehension. Because the original returned results may be relatively rough and unsuitable for display to users, the returned results are polished and modified before output. For example, the Graph Attention Network (GAT) model returns text, but an image is added based on the text, thus achieving text encapsulation. In the process of summarizing and modifying, the rights and interests information of the returned result will also be encapsulated in the returned result to input the result carrying the rights and interests information. For example, if the returned result is a gourmet food store, which has a discount of 3 yuan off for purchases over 15 yuan, then the rights and interests information and the gourmet food store will be encapsulated and output. It is also possible to encapsulate the information within the large language model, and the online service will encapsulate the information. Some outputs within the large language model are not directly displayed to the user. For example, if the training prompt word is "Please tell me which store is more suitable for the user", such text is not suitable for output to the user end. When output to the user end, the text expression needs to be changed, such as "The following 2 stores are found for you". Such text conversion is also a kind of encapsulation of the information within the large language model.
[0110] The present application embodiment provides a shopping guide method based on a large language model, as shown in FIG5 , which can be implemented by the following steps:
[0111] S501, obtaining a shopping guide requirement input by a user and a content enhancement configuration carried by the shopping guide requirement.
[0112] The user end may be a client of an application program installed on an electronic device, for example, application A installed on a mobile phone.
[0113] S502: Generate prompt words describing the shopping guide needs based on the content enhancement configuration.
[0114] S503: Perform semantic analysis on the prompt word using a trained large language model to determine a plurality of application programming interfaces required to respond to the shopping guide demand.
[0115] Among them, the trained large language model is obtained by adjusting the parameters of the large language model to be trained based on the predicted shopping guide information, the predicted shopping guide information is obtained by screening and summarizing the return results of multiple application interfaces required for training shopping guide needs based on a preset database, and the multiple application interfaces are determined after the large language model to be trained performs semantic analysis on the training prompt words of the training shopping guide needs.
[0116] S504: Filter and summarize the return results of the multiple application program interfaces based on a preset database, generate and output target shopping guide information to the user terminal.
[0117] In an embodiment of the present application, for the shopping guide demand input by the user terminal, the content enhancement configuration of the system where the shopping guide demand is located is obtained, so that the content enhancement configuration such as the time when the shopping guide demand is input into the system, the user identification and the address where the shopping guide demand is located can be obtained. Afterwards, through the content enhancement configuration, prompt words that describe the shopping guide demand are generated more reasonably and accurately. Therefore, the prompt words and the shopping guide demand are input into the trained large language model together, which enables the trained large language model to accurately predict the target shopping guide information that meets the shopping guide demand and output it to the user terminal. In this way, during the entire shopping guide process, after the user terminal inputs the shopping guide demand, the background will output the target shopping guide information to the user terminal through the large language model, and the shopping guide demand in the natural language form input by the user terminal can be responded to without multiple interactions by the user terminal, which can not only save the user's decision-making time, but also provide the user terminal with a target shopping guide demand that is more in line with the natural language of the user terminal.
[0118] In some embodiments, since the content generated by the large language model is uncontrollable, the target shopping guide information output by the trained large language model is quality-checked to improve the accuracy of the shopping guide information output to the client. That is, after the above step S504, the following steps S511 to S515 (not shown) can be performed:
[0119] S511: Perform quality inspection on the target shopping guide information to obtain a quality inspection result.
[0120] Here, a quality inspection model is used to perform a binary classification quality inspection on the target shopping guide information to determine its readability, etc. The quality inspection results include the confidence level that the target shopping guide information is readable and the confidence level that the target shopping guide information is unreadable. For example, the quality inspection model is used to detect whether the text in the target shopping guide information contains extra or missing words that result in incoherent sentences, and whether the image is unclear.
[0121] S512: If the quality inspection result satisfies the preset quality inspection condition, determine whether the target shopping guide information contains any shielded information in a preset shielded information database.
[0122] Here, the preset quality inspection condition is the confidence threshold of the detection result. For example, the confidence threshold is set to 0.9. If the detection result shows that the confidence level of the readability of the target shopping guide information is greater than 0.9, then it is determined that the quality inspection result meets the preset quality inspection condition, indicating that the confidence level of the target shopping guide is good readability. For example, the target shopping guide information is "I found the following stores for you". The sentence is fluent and clear. In this way, the confidence level of the readability of the target shopping guide information in the quality inspection result is high, indicating that the quality inspection result of the target shopping guide information meets the preset quality inspection condition. If the target shopping guide information is "I found the following stores for you", the text contains multiple words, resulting in an incoherent text. The confidence level of the readability of the target shopping guide information in the quality inspection result is low, indicating that the quality inspection result of the target shopping guide information does not meet the preset quality inspection condition. If the quality inspection result meets the preset quality inspection condition, it is further determined whether there are sensitive words or sensitive images that need to be masked in the target shopping guide information. The preset shielding information library is used to store words and images that need to be masked. The preset masking information library is searched for masking information that is identical to the text and image in the target shopping guide information.
[0123] S513: If the shielding information does not exist in the target shopping guide information, output the target shopping guide information on the page for inputting the shopping guide training requirement.
[0124] Here, if the quality inspection result of the target shopping guide information meets the preset quality inspection conditions and there are no sensitive words and images in the target shopping guide information, then the target shopping guide information is directly output on the display page for inputting the training shopping guide requirements.
[0125] S514: If the quality inspection result does not meet the preset quality inspection condition or there is shielded information in the target shopping guide information, obtain preset shopping guide information.
[0126] Here, if the quality inspection result does not meet the preset quality inspection conditions or there is blocked information in the target shopping guide information, the target shopping guide information is blocked and the preset shopping guide information is obtained. The preset shopping guide information can be text or images with fixed content. For example, the preset shopping guide information is "Your needs cannot be met at this time."
[0127] S515: Output preset shopping guide information on the page for inputting the shopping guide requirement.
[0128] Here, the preset shopping guide information is output on the page for inputting shopping guide requirements, and the user can view the output preset shopping guide information without switching pages.
[0129] In an embodiment of the present application, after layer-by-layer control of the target shopping guide information, reasonable and accurate target shopping guide information is output on the input page of the shopping guide requirements. In this way, the page for outputting the target shopping guide information is the same page as the page for inputting the shopping guide requirements. The user does not need to switch pages back and forth, providing the user with a sense of unity and eliminating the need for the user to operate page jumps. The user only needs to enter the shopping guide requirements on the input page to provide the user with target shopping guide information that fits the user's intention. The platform's hundreds of online API interfaces are shielded. These APIs are transparent to the user. The user only needs to communicate with the trained large language model, providing the user with a one-stop shopping guide.
[0130] In other embodiments, if there is shielded information in the target shopping guide information, the shielded information can be hidden in the target shopping guide information to obtain processed shopping guide information; if the readability of the processed shopping guide information is greater than or equal to the preset readability threshold, the processed shopping guide information is output on the page for inputting shopping guide requirements; if the readability of the processed shopping guide information is less than the preset readability threshold or the quality inspection result does not meet the preset quality inspection conditions, the preset shopping guide information that matches the shopping guide requirements is queried in the preset shopping guide information database.
[0131] In some embodiments, the output target shopping guide information, target interaction information, and shopping guide requirements are bound to update the preset database, which can be achieved through the following process:
[0132] First, the user's target interaction information for the target shopping guide information is obtained. Here, the target interaction information refers to the user's selection operation for the target shopping guide information, such as selecting an item of interest by clicking on it, or selecting an item of interest through language. For example, taking the target shopping guide information as three rice noodle restaurants, the user's interaction operations with these two restaurants are obtained, such as which restaurant the user selected, which dishes the user browsed within that restaurant, and which dish the user ultimately selected.
[0133] Next, the target interaction information and the target shopping guide information are respectively bound to the shopping guide requirements to obtain a binding result. Here, the target interaction information and the target shopping guide information are each converted to vectors, and the converted vectors are bound to the vector corresponding to the shopping guide requirements to obtain the binding result. Thus, the binding result is also in vectorized form.
[0134] Finally, the preset database is updated based on the binding result to obtain an updated preset database. Here, the binding result is stored in the preset database to obtain an updated preset database. Exemplarily, the preset database can be a vector database, which is stored in the vectorized target interaction information, target shopping guide information and shopping guide requirements after being bound to the vectorized target interaction information, target shopping guide information and shopping guide requirements, so that the vector data in the vector database is input into the trained large language model, so that the trained large language model can perform language understanding and language generation on the input vector data. In this way, binding the target interaction information, target shopping guide information and shopping guide requirements and storing them in the preset database can enrich the updated preset database and facilitate the subsequent provision of reference historical related information for the latest shopping guide requirements input.
[0135] In some embodiments, for shopping guide needs of the knowledge question and answer type, the trained large language model can directly output the knowledge that matches the shopping guide need, which can be achieved through the following process: if the shopping guide need is a knowledge question and answer type need, the trained large language model is used to determine and output the target shopping guide information that matches the knowledge question and answer type need to the user terminal in the knowledge base of the trained large language model. Here, the knowledge question and answer type need means that the shopping guide need does not require object recommendation, but requires answers or popular science. For example, the shopping guide need is "What are the special dishes in ×× city?" The trained large language model does not need to call the application program interface to implement it. Since the trained large language model itself has a learning function, the trained large language model already has some world knowledge and is stored in the knowledge base. In this way, after the trained large language model understands the prompt word of the shopping guide need, it searches in the knowledge base according to the understanding result to find the answer to the question represented by the prompt word, that is, to obtain the target shopping guide information.
[0136] For example, the shopping guide demand is "What special dishes are available in ×× city?", and the target shopping guide information is:
[0137] 1. Xiaolongbao: One of the traditional dim sum of ×× City, it is famous for its thin skin, fresh juice and fragrance. The xiaolongbao contains fresh meat filling and broth, which is very delicious.
[0138] 2. Crab Roe Wontons: Wontons are a traditional pastry of ×× City, and crab roe wontons are a specialty. These wontons are filled with fresh crab meat and seasoned with soy sauce and vinegar for a delicious taste.
[0139] 3. Shengjianbao: Shengjianbao is another traditional snack in XX City. It is crispy on the outside and juicy on the inside. It is usually filled with pork and mushrooms, with special seasonings and fried until golden brown.
[0140] 4. Braised Lion's Head: Lion's Head is a traditional ×× city dish, consisting of pork filling and large meat balls. Braised Lion's Head is made by stewing the lion's head in broth. The meat is tender and the soup is rich.
[0141] 5. Old Duck Vermicelli Soup: This is a traditional ×× city soup. It uses old mother duck to make a delicious soup base, and is paired with vermicelli, mushrooms and other ingredients. It tastes delicious and is rich in nutrition.
[0142] 6. ×× City Preserved Radish: This is a traditional snack made from fresh pork pickled in a pot. It has a tender and smooth texture and a delicious taste.
[0143] 7. Stir-fried rice cakes (rice cakes): A common breakfast or late-night snack, stir-fried rice cake slices are cooked with vegetables, meat, and other ingredients for a rich, flavorful dish. This is just a small sampling of the city's specialties; there are many other delights worth trying. Whether it's traditional dim sum or a full meal, the city offers a wealth of unique dishes to enjoy.
[0144] In an embodiment of the present application, in response to knowledge question-and-answer requirements, a trained large language model directly outputs content that can answer the shopping guide needs through its own knowledge reserves, which can not only save the computing power consumed by calling the application program interface, but also quickly provide accurate answers to the user end.
[0145] In the related art, searching for shopping guides includes: searching and recommending such links. In this way, the shopping guide for consumers on the user side is a recall relevance sort and finally displayed. It is a multi-link chain, and finally displayed in a list format, and then the user needs to slide and browse. The product display list is provided to the user in the form of a shelf-style shopping guide. It takes a lot of time for the user to slide and browse, and the decision-making time is relatively long. The embodiment of the present application is centered on a large language model, and shows you multiple stores that are not shelf-style. The user does not need to slide and browse, and directly outputs the target shopping guide information that meets the user's shopping guide needs to the user side.
[0146] In the shopping guide method provided in the embodiment of the present application, fine-grained decision-making can also be valuable. For example, the shopping guide demand is "I want a milk tea that is seven points sweet." In the search-based shopping guide in the related art, it is not possible to enter a fine-grained word such as "seven points sweet", and only a large-grained word such as coffee can be entered. Therefore, you can only search for coffee first, and then return a lot of milk teas that are not seven points sweet to the user end. The user end needs to select them one by one, open their details page, and then read the relevant introduction to know whether they are seven points sweet milk teas. In the embodiment of the present application, the user end can enter the fine-grained "I want a milk tea that is seven points sweet", and the large language model can quickly and accurately output to the user end the store of "seven points sweet milk tea" or the payment order of "seven points sweet milk tea". Moreover, in the embodiment of the present application, a large language model is used as the center, and then the large language model can determine the steps required to implement the prompt word by analyzing the input prompt word, and call the API to implement these steps, so that the page where the user inputs the shopping guide requirements outputs the target shopping guide information to the user end. The user is unaware of the entire process and does not need to switch pages back and forth, thereby providing the user with a one-stop shopping guide.
[0147] For example, a user orders food in App A, and asks, for example, "I want yesterday's order." The large language model can use the order query interface to display yesterday's order history to the user. The user can also enter, "Please re-order the same order I ordered previously." The large language model can then not only find the order but also re-place it. It then displays the payment page to the user, who can simply click to confirm payment.
[0148] In an embodiment of the present application, a shopping guide method based on a large language model is provided, as shown in FIG6 , which is a system implementation diagram of the shopping guide method provided in an embodiment of the present application. The following description is made in conjunction with FIG6 :
[0149] The user terminal 61 outputs the current question to the auxiliary natural language understanding (NLU) system 62. The prompt center 63 determines the prompt template that matches the intent type of the current question. The prompt template and the user-side intent understanding of the current question (e.g., the shopping guide requirement in the above embodiment) output by the auxiliary NLU 62 are input into the LLM 64. Simultaneously, the current question is stored in a vector database (DB), and a vector search 65 is performed on the vector DB to retrieve historical data related to the current question, which is then input into the LLM 64. The LLM 64 then calls the business application programming interface (API) 66 and the function API 67, receiving the return results from the business API 66 and the function API 67. The LLM 64 summarizes, modifies, and performs inference and selection on the returned results to obtain target shopping guide data. This target shopping guide data is then fed back to the user terminal and vectorized 69 and stored in the vector DB 68. If the current question input by the user is a general question, LLM can directly generate content without calling the API and feedback shopping guide data to the user.
[0150] In Figure 6, the returned results and the target information output by the LLM are stored in the vector DB. In addition, during multiple rounds of interaction, the longer context needs to be stored. The context here refers not only to the user's shopping guide needs, but also includes the return results of the API.
[0151] From the perspective of multiple user interactions, consider this scenario: if a user enters a shopping guide request for the first time, for example, "rice noodles with chicken soup and three fresh ingredients," they may also enter another shopping guide request for the second or third time. Since the user has just entered "rice noodles with chicken soup and three fresh ingredients" but has not yet placed an order, and is currently searching for hot pot, fresh food, or other similar items, the LLM needs to know the user's past context, namely, the user's relevant historical data, during this round of conversation. This relevant historical data is stored in the vector database.
[0152] The vector DB also stores user-side interaction information. For example, if the LLM outputs three stores to the user, and the user chooses a store that sells soup dumplings (xiaolongbao), the store's logo and the store selected by the user are stored in the vector DB to facilitate analysis of user preferences.
[0153] The vector DB also stores the target shopping guide information output by the LLM to the user end, so that in the subsequent shopping guide process, duplicates can be removed based on the stored target shopping guide information, and the same store will not be recommended to the user end repeatedly.
[0154] Interaction information and related historical data are converted into embedded vectors and stored in a vector database. The targeted shopping guide information output by the LLM can then be converted into embeddings and further compressed into the vector database. For example, if a user has previously ordered from a shop selling xiaolongbao (xiaolongbao), and the LLM output lists three shops, one of which is ranked third, this shop can be ranked higher based on the user's preference.
[0155] The vector database also stores the current question entered by the user, which is returned to the LLM through vector search. This means that the LLM prompts for input during the thinking process, not before the user receives the result. It can also retrieve relevant data from the vector database and send it to the LLM. For example, if the current question is "Chicken Soup Three Fresh Rice Noodles," the vector database can be searched for rice noodle shops and their extensions, such as "Guoqiao Rice Noodles" and "Yunnan Rice Noodles." These inputs can be combined to enrich the LLM's prompts, resulting in more accurate targeted shopping guide information.
[0156] In Figure 6, the auxiliary NLU 62 performs intent recognition and intent understanding on the user's input.
[0157] Intent recognition is used to identify the user's intention type, including: personal interest recommendations (such as not knowing what to eat today?); finding specific stores (such as Brand A fast food restaurant, etc.); finding category products (such as what milk teas are available near Kintetsu); asking about life knowledge (such as what special dishes are there in City B); past orders, next order (such as another serving of yesterday's fried pancakes); platform functions (such as what to do if the rider doesn't deliver? How to check the rights and benefits red envelope?), etc.
[0158] Identifying the type of user intent is necessary for targeted follow-up of subsequent links. After determining the intent type, you can search for the corresponding prompt template in the prompt center.
[0159] Intent understanding is used to understand user input in multiple dimensions and slots. This includes entity recognition and relationship extraction, extracting both coarse-grained and fine-grained signals. These understanding results are used to populate prompts, directly feed into larger models as supplementary input, or serve as input to business APIs.
[0160] The prompt center 63 is used to determine the prompt template that matches the intent type.
[0161] The prompt template is the input to the large model (LLM). Different prompt templates are used for different intent types. The prompt template is combined with the user's intent understanding and fed into LLM 64.
[0162] The prompt is stored in a key-value pair format, where the key is the intent type and the value is the prompt content.
[0163] LLM 64 is capable of intelligent thinking (AI Thinking). First, LLM 64 performs calculation arrangement.
[0164] Here, the food delivery platform is a complex business system. A single user-side shopping guide transaction actually involves completing many stages. The one-stop shopping guide provided by this embodiment of the application uses the LLM as the "decision-making brain," compressing and merging many links together, making it seamless for the user. Therefore, the LLM needs to perform "planning," that is, it provides a multi-stage process for each input prompt.
[0165] In a specific example, the user's original question is: "I want to buy a Brand A hamburger meal for 2 people." The plan arrangement given by LLM is:
[0166] Step 1: Call the [Store Search] API with the parameter "Brand A" and select the nearest store;
[0167] Step 2: Call the [Store Search] API with the [Step 1.Store ID] as the parameter, select the "Hamburger Meal for 2" item, and keep the one with the highest order quantity;
[0168] Step 3: Call the [Red Envelope Benefit] API with the parameter [Step 2. Product ID] to calculate the final price (Price);
[0169] Step 4: Call the [Pay Order] API with the parameter [Step3.Price].
[0170] The entire process is finally completed. During the process, the page prompts and interacts with the user, such as asking the user before placing an order and prompting the user to confirm.
[0171] The LLM 64 can generate call parameters to select an appropriate API.
[0172] Whether it is a business API or a functional tool, parameters need to be input, such as:
[0173] Search API, requires keywords;
[0174] Recommended API, requires user ID and other location-based service signals (LBS).
[0175] Payment order API requires the Price parameter.
[0176] The input parameters here come from several sources:
[0177] 1. System signals already exist and are directly given to the API, such as the current time, user ID, etc.
[0178] 2. After pre-processing NLU, the result of intent understanding.
[0179] 3. LLM is needed to understand long and difficult sentences, multi-round dialogues, complex and multi-dimensional parameters, etc.
[0180] In Figure 6, the LLM calls business API 66 and function API 67. Business APIs include interfaces for food delivery services, such as store search, product search, in-store search, personalized recommendations, payment and order placement, and red envelope inquiry. Function APIs include platform-independent interfaces for modifying delivery addresses, leaving user comments, and checking the weather. These APIs are online interfaces within the food delivery system and do not require modification or new development.
[0181] Different APIs return different results, so LLM processes the output results of different APIs differently, including:
[0182] For the content-oriented results returned by the API, LLM needs to summarize and modify them before returning them to the user.
[0183] For business-oriented results returned by the API, such as storefronts, products, and other platform materials, the LLM performs inference and selection. As shown in Figure 7, the user enters the shopping guide request "hamburger" on page 71. The trained large language model provides the user with two hamburger restaurants and text and images describing each hamburger restaurant on page 71.
[0184] Among them, LLM summarizes and modifies the API return results in the following two categories:
[0185] 1) Summarize. For example, when a user asks, "What should I do if the driver delivers the wrong item?", the customer service API will likely return a lengthy and detailed response, which will be difficult for the user to read. Therefore, LLM needs to summarize and outline the key points for the user. For example, if a driver delivers the wrong item, consider the following steps:
[0186] First, contact the rider in time: If the rider delivers the wrong takeaway, contact the rider immediately, state the order number and takeaway content, and ask if he is willing to refund or re-deliver.
[0187] Second, request a refund: If the rider is willing to refund, you can request a refund and cancel the order. If the rider is unwilling to refund or re-deliver, you can request a refund and place a new order.
[0188] Third, keep evidence: Before contacting the driver, you can keep the evidence of the takeaway order, including the driver's contact information, takeaway content, order time, etc. This evidence will help you protect your rights and interests when similar problems occur.
[0189] Fourth, negotiate with the driver: If the driver delivers the wrong food, you can negotiate with the driver to resolve the issue. You can ask the driver to apologize and re-deliver the food, or you can choose to accept the order and ask the driver to refund the food.
[0190] If a driver delivers the wrong food, contacting them promptly and preserving evidence is key to protecting your rights. Negotiating with the driver is also one way to resolve the issue.
[0191] 2) Polishing and modification. For example, when the user asks "How is Brand A?", the store brand API returns an introduction to the store as follows: "Brand A is a world-renowned fast food chain, famous for its delicious burgers, fried chicken, and French fries. How good this store is depends on personal taste and preference. KFC has strict standards in hygiene, food quality, and service, and is committed to improving employee welfare and environmental protection. If you are interested in food hygiene and safety, then KFC may be a good choice."
[0192] The process of LLM reasoning and selecting the results returned by the API is as follows:
[0193] The platform materials output to the user end are usually stores and products, and there are multiple of them. If it is directly thrown to the user end, what the user end sees is another list of multiple results, which is no different from the search and recommendation list decision in the related technology, requiring users to waste decision costs. However, in the embodiment of the present application, LLM directly outputs less than three stores or products, and continues to provide some explainable understanding, such as a concise introduction to ×× store; in this way, users can quickly obtain the required products or stores, saving decision costs.
[0194] In some possible implementations, providing users with a one-stop shopping guide through LLM can be achieved through the steps shown in Figure 8:
[0195] S801, read the configuration information of the system where the shopping guide requirements are located.
[0196] S802: Acquire a constructed prompt word based on the configuration information.
[0197] S803: Initialize the cache of the vector database.
[0198] S804, start the loop process of calling API.
[0199] S805: Plan arrangement is performed based on the input prompt words and historical association information through LLM.
[0200] Here, LLM determines the steps to achieve the input shopping guide needs based on the input prompt words and historical association information.
[0201] S806: Generate a call command and call parameters through LLM.
[0202] S807: Call the corresponding API using the call command and call parameters.
[0203] S808: Cache the API return result.
[0204] Here, after executing step S808, the process returns to step S805 and repeats in sequence until all the steps planned in step S805 are completed, that is, the target shopping guide information is obtained and output.
[0205] Since LLM-generated content is uncontrollable, a separate risk control and filtering module is required to ensure compliance and user experience. This is broken down into the following steps:
[0206] First, it is based on the quality inspection model: a separate model is trained to check the quality of the returned results. This requires pre-labeling of samples and supervised training. The model can be a binary classification model. When used online, the quality of the results is judged based on the output score.
[0207] Secondly, sensitive word blocking: usually a blacklist, sensitive words, maintain a word list; if any sensitive words appear in the returned results, the results will be blocked.
[0208] Finally, call the risk control filtering service: this service is provided by the risk control department and is relatively professional, comprehensive, authoritative, and real-time; it judges the legitimacy of the LLM results.
[0209] If the return result is aborted, the preset shopping guide information will be returned to the user to avoid empty results.
[0210] Here, the preset shopping guide information can be a preset copy, or it can be generated by semantically understanding the shopping guide requirement and searching for multiple objects matching the requirement from the backend database and outputting them. For example, if the shopping guide requirement is "I need high-end black tea," then after semantically understanding the requirement, stores selling black tea can be output to the user.
[0211] In this application embodiment, the advantages of a large language model, including rich knowledge, decision-making reasoning, and task planning, are fully utilized. With the large language model at the core of the architecture, a one-stop shopping guide is provided to the user, resolving the pain points of food delivery shopping. Furthermore, this solves the shopping pain points of food delivery platforms, providing users with a one-stop shopping guide. This not only improves the user experience, but also reduces the multi-stage decision-making costs of users, forming a closed-loop shopping process.
[0212] In the embodiment of the present application, not all shopping guide needs require calling the business API; the large model has acquired some world knowledge through pre-training and can directly return this content to the user, as shown in Figure 2 "Direct Content Generation".
[0213] The present application provides a shopping guide device based on a large language model. FIG9 is a structural diagram of a shopping guide system based on a large language model provided by the present application. For example, as shown in FIG9 , the shopping guide system 900 based on a large language model includes:
[0214] A training data acquisition module 901 is used to acquire shopping guide training requirements and content enhancement configurations carried by the shopping guide training requirements;
[0215] A training prompt word generation module 902 is used to generate training prompt words describing the shopping guide training needs based on the content enhancement configuration;
[0216] An application program interface determination module 903 is configured to perform semantic analysis on the training prompt words using the large language model to be trained, so as to determine a plurality of application program interfaces required to meet the shopping guide training requirements;
[0217] The predicted shopping guide information determination module 904 is configured to filter and summarize the return results of the plurality of application program interfaces based on a preset database to obtain predicted shopping guide information;
[0218] A model training module 905 is configured to adjust parameters of the large language model to be trained based on the predicted shopping guide information and the shopping guide training requirements to obtain a trained large language model;
[0219] The target shopping guide information output module 906 is used to guide the trained large language model to generate and output target shopping guide information matching the prompt word to the user terminal when conducting shopping guide based on the prompt word corresponding to the shopping guide demand input by the user terminal.
[0220] In some possible implementations, the predicted shopping guide information determination module 904 is also used to: determine the calling order between the multiple application interfaces; send the calling instructions to the multiple application interfaces according to the calling order; based on the historical correlation information in the preset database that matches the training shopping guide needs, filter and summarize the return results of the application interface to generate and output the predicted shopping guide information; wherein, the preset database is used to store historical correlation information of historical training shopping guide needs, and the historical correlation information includes: historical shopping guide information of the historical training shopping guide needs and interactive information corresponding to the historical shopping guide information.
[0221] In some possible implementations, the predicted shopping guide information determination module 904 is also used to obtain the function of any application interface among the multiple application interfaces and the return result of the previous application interface; wherein the previous application interface is an application interface that is arranged before any application interface in the calling order and is adjacent to any application interface; according to the function of any application interface and the return result of the previous application interface, the calling parameters of any application interface are generated; and the calling instruction carrying the calling parameters is sent to any application interface.
[0222] In some possible implementations, the returned result includes: multiple initial shopping guide objects that respond to the shopping guide training needs. The predicted shopping guide information determination module 904 is also used to, if the type of the returned result is business type, screen the multiple initial shopping guide objects according to preset screening rules and the historical association information, and generate and output the predicted shopping guide information.
[0223] In some possible implementations, the predicted shopping guide information determination module 904 is further used to, if the type of the returned result is the business class, filter out a set of candidate shopping guide objects from the multiple initial shopping guide objects according to the preset screening rules; filter and sort the set of candidate shopping guide objects based on the historical association information and a preset number to obtain sorted shopping guide objects that are less than the preset number; and determine and output the predicted shopping guide information based on the sorted shopping guide objects.
[0224] In some possible implementations, the preset screening rule includes at least one of the following:
[0225] The favorable comments are ranked in the top n favorable comments of each of the multiple initial shopping guide objects; wherein n is a positive integer less than the number of the initial shopping guide objects;
[0226] The sales volume is ranked in the top n of the sales volume of the initial shopping guide objects;
[0227] The distance between the location and the location corresponding to the shopping guide training requirement is arranged in the last n of the initial shopping guide objects;
[0228] The selling prices are arranged after the n prices of the initial shopping guide objects.
[0229] In some possible implementations, the predicted shopping guide information determination module 904 is further configured to determine description information of the sorted shopping guide objects; and fuse the description information with the sorted shopping guide objects to obtain and output the predicted shopping guide information.
[0230] In some possible implementations, the predicted shopping guide information determination module 904 is further configured to summarize and modify the content of the returned result if the type of the returned result is content type, and generate and output the predicted shopping guide information.
[0231] In some possible implementations, the training prompt word generation module 902 is also used to identify the intent of the training shopping guide demand to obtain the intent type of the training shopping guide demand; understand the intent of the training shopping guide demand to obtain the intent content of the training shopping guide demand; search for a prompt word template that matches the intent type in a preset prompt word template library; wherein the preset prompt word template library is used to store prompt word templates that match multiple preset intent types; modify and enhance the intent content based on the content enhancement configuration to generate prompt content; embed the prompt content into the prompt word template to obtain the training prompt word.
[0232] In some possible implementations, the content enhancement configuration includes at least one of the following:
[0233] The time of inputting the shopping guide training requirement;
[0234] The user identifier corresponding to the shopping guide training requirement;
[0235] The location information corresponding to the shopping guide training requirement;
[0236] Enter the page type required for the shopping guide training;
[0237] Enter the same time interval for the shopping guide training requirement.
[0238] The present application provides a shopping guide system based on a large language model. FIG10 is a schematic diagram of the structure of a shopping guide system based on a large language model provided by the present application. As shown in FIG10 , the shopping guide system based on a large language model includes: a user terminal 1001 and a server 1005; wherein the server 1005 includes: a prompt word generation module 1002, a semantic analysis module 1003, and a shopping guide information output module 1004:
[0239] The user terminal 1001 is configured to obtain a shopping guide requirement input by the user terminal and a content enhancement configuration carried by the shopping guide requirement;
[0240] A prompt word generation module 1002 is configured to generate prompt words describing the shopping guide requirements based on the content enhancement configuration;
[0241] Semantic analysis module 1003 is configured to perform semantic analysis on the prompt word using a trained large language model to determine multiple application programming interfaces (APIs) required to respond to the shopping guide requirement. The trained large language model is obtained by adjusting parameters of the large language model to be trained based on predicted shopping guide information. The predicted shopping guide information is obtained by screening and summarizing the return results of multiple application programming interfaces (APIs) required for training the shopping guide requirement based on a preset database. The multiple application programming interfaces are determined by the large language model to be trained after performing semantic analysis on the training prompt word for the shopping guide requirement.
[0242] The shopping guide information output module 1004 is used to filter and summarize the return results of the multiple application program interfaces based on a preset database, generate and output target shopping guide information to the user terminal.
[0243] In Figure 10, the user terminal 1001 in the system can be an input interface corresponding to the user (buyer). For any user terminal 1001, the user terminal 1001 can be installed with a buyer version application corresponding to the online delivery platform, and the user's shopping guide training needs can be entered on the display page of the application.
[0244] The user terminal 1001 can be a mobile phone, tablet computer, desktop, laptop, notebook computer, ultra-mobile personal computer (UMPC), handheld computer, netbook, personal digital assistant (PDA), wearable electronic device, virtual reality device, etc.
[0245] In the shopping guide system based on the large language model, the user terminal 1001, the prompt word generation module 1002, the semantic analysis module 1003 and the shopping guide information output module 1004 can communicate through the network. The network can include a medium that provides a communication link, or it can be the Internet including network equipment and transmission media, but is not limited to this.
[0246] Optionally, the transmission medium can be a wired link (such as but not limited to coaxial cable, optical fiber and digital subscriber line (DSL)) or a wireless link (such as but not limited to wireless Fidelity (WIFI), Bluetooth and mobile device network).
[0247] In some possible implementations, the shopping guide information output module is also used to perform quality inspection on the target shopping guide information to obtain a quality inspection result; if the quality inspection result meets the preset quality inspection conditions, it is determined whether the target shopping guide information contains shielded information in a preset shielded information library; if the shielded information does not exist in the target shopping guide information, the target shopping guide information is output on the page for inputting the shopping guide requirements.
[0248] In some possible implementations, the shopping guide information output module 1004 is also used to obtain preset shopping guide information if the quality inspection result does not meet the preset quality inspection conditions or the shielding information exists in the target shopping guide information; and output the preset shopping guide information on the page for inputting the shopping guide requirements.
[0249] In some possible implementations, the shopping guide information output module 1004 is also used to, if the shopping guide demand is a knowledge question and answer demand, use the trained large language model in the knowledge base of the trained large language model to determine and output target shopping guide information matching the knowledge question and answer demand to the user terminal.
[0250] In some possible implementations, the shopping guide information output module 1004 is also used to obtain target interaction information of the user terminal for the target shopping guide information; bind the target interaction information and the target shopping guide information to the shopping guide requirements respectively to obtain a binding result; and update the preset database based on the binding result to obtain an updated preset database.
[0251] It should be noted that the aforementioned embodiments of the shopping guide device are merely illustrative of the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, i.e., the internal structure of a computer device can be divided into different functional modules to perform all or part of the aforementioned functions. Furthermore, the aforementioned embodiments of the shopping guide device and the shopping guide method embodiments share the same concept. The detailed implementation process is described in the method embodiments and will not be further elaborated here.
[0252] An embodiment of the present application further provides an electronic device. FIG11 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0253] Exemplarily, as shown in FIG11 , the electronic device 1100 includes: a memory 1101 and a processor 1102 , wherein the memory 1101 stores an executable program code 11011 , and the processor 1102 is used to call and execute the executable program code 11011 to perform a shopping guide method based on a large language model.
[0254] In addition, an embodiment of the present application also protects a device, which may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to execute a shopping guide method based on a large language model provided in an embodiment of the present application.
[0255] In this embodiment, the device can be divided into functional modules based on the above-described method examples. For example, each functional module can be mapped to a specific functional module, or two or more functions can be integrated into a single processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and represents only a logical functional division. In actual implementation, other division methods may be used.
[0256] In the case of dividing each module into modules corresponding to each function, the device may further include a signal uploading module, a determination module, an adjustment module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0257] It should be understood that the device provided in this embodiment is used to execute the above-mentioned shopping guide method based on a large language model, and thus can achieve the same effect as the above-mentioned implementation method.
[0258] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a device, the processing module may be used to control and manage the operation of the device. The storage module may be used to support the device in executing mutual program codes, etc.
[0259] The processing module may be a processor or controller that implements or executes various exemplary logic blocks, modules, and circuits disclosed herein. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor (DSP) and a microprocessor, and the storage module may be a memory.
[0260] In addition, the device provided in the embodiments of the present application can specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a shopping guide method based on a large language model provided in the above embodiment.
[0261] This embodiment also provides a computer-readable storage medium, which stores computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement a shopping guide method based on a large language model provided in the above embodiment.
[0262] This embodiment also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement a shopping guide method based on a large language model provided by the above embodiment.
[0263] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0264] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0265] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0266] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A shopping guide method based on a large language model, wherein: The method comprises: Acquire a shopping guide training requirement and a content enhancement configuration carried by the shopping guide training requirement; Based on the content enhancement configuration, generating training prompt words describing the shopping guide training needs; Using the large language model to be trained to perform semantic analysis on the training prompt words to determine a plurality of application program interfaces required to respond to the shopping guide training requirements; Filtering and summarizing the returned results of the plurality of application program interfaces based on a preset database to obtain predicted shopping guide information; Based on the predicted shopping guide information and the shopping guide training demand, adjusting parameters of the large language model to be trained to obtain a trained large language model; When conducting shopping guide, based on the prompt words corresponding to the shopping guide needs input by the user terminal, the trained large language model is guided to generate and output target shopping guide information matching the prompt words to the user terminal.
2. The method according to claim 1, wherein: The method of screening and summarizing the returned results of the plurality of application program interfaces based on a preset database to obtain predicted shopping guide information includes: Determining a calling sequence among the plurality of application program interfaces; Sending the calling instructions to the plurality of application program interfaces according to the calling sequence; Based on the historical association information in the preset database that matches the training shopping guide needs, the return results of the application interface are screened, summarized and processed to generate and output the predicted shopping guide information; wherein, the preset database is used to store the historical association information of historical training shopping guide needs, and the historical association information includes: historical shopping guide information of the historical training shopping guide needs and interactive information corresponding to the historical shopping guide information.
3. The method according to claim 2, wherein: The step of sending the calling instructions to the plurality of application program interfaces in accordance with the calling sequence includes: Acquire the function of any one of the multiple application program interfaces and the return result of the previous application program interface; wherein the previous application program interface is an application program interface arranged before and adjacent to any one of the application program interfaces in the calling sequence; Generate calling parameters of any one of the application program interfaces according to the function of any one of the application program interfaces and the return result of the previous application program interface; Sending a calling instruction carrying the calling parameters to any one of the application program interfaces.
4. The method according to claim 2, wherein: The returned result includes: a plurality of initial shopping guide objects that respond to the shopping guide training requirement, and based on the historical association information in the preset database that matches the shopping guide training requirement, the returned result of the application program interface is screened and summarized to generate and output the predicted shopping guide information, including: If the type of the returned result is business type, the multiple initial shopping guide objects are screened according to preset screening rules and the historical association information, and the predicted shopping guide information is generated and output.
5. The method according to claim 4, wherein: If the type of the returned result is business type, screening the multiple initial shopping guide objects according to the preset screening rules and the historical association information, generating and outputting the predicted shopping guide information, including: If the type of the returned result is the business class, screening out a set of candidate shopping guide objects from the multiple initial shopping guide objects according to the preset screening rule; Filtering and sorting the candidate shopping guide object set based on the historical association information and a preset number to obtain sorted shopping guide objects less than the preset number; Based on the sorted shopping guide objects, the predicted shopping guide information is determined and output.
6. The method according to claim 4 or 5, wherein: The preset screening rules include at least one of the following: The favorable comments are ranked in the top n favorable comments of each of the multiple initial shopping guide objects; wherein n is a positive integer less than the number of the initial shopping guide objects; The sales volume is ranked in the top n of the sales volume of the initial shopping guide objects; The distance between the location and the location corresponding to the shopping guide training requirement is arranged in the last n of the initial shopping guide objects; The selling prices are arranged in the last n positions of the prices of the initial shopping guide objects.
7. The method according to claim 5, wherein: The determining and outputting the predicted shopping guide information based on the sorted shopping guide objects includes: Determine description information of the sorted shopping guide objects; The description information is merged with the sorted shopping guide objects to obtain and output the predicted shopping guide information.
8. A shopping guide method based on a large language model, wherein: The method comprises: Acquire the shopping guide requirements input by the user and the content enhancement configuration carried by the shopping guide requirements; Based on the content enhancement configuration, generating prompt words describing the shopping guide needs; The trained large language model is used to perform semantic analysis on the prompt words to determine multiple application program interfaces required to respond to the shopping guide demand; wherein the trained large language model is obtained by adjusting parameters of the large language model to be trained based on the predicted shopping guide information, the predicted shopping guide information is obtained by screening and summarizing the return results of multiple application program interfaces required for the training shopping guide demand based on a preset database, and the multiple application program interfaces are determined after the large language model to be trained performs semantic analysis on the training prompt words of the training shopping guide demand; The returned results of the plurality of application program interfaces are screened and summarized based on a preset database, and target shopping guide information is generated and output to the user terminal.
9. A shopping guide system based on a large language model, wherein: The system comprises: A training data acquisition module, used to acquire training shopping guide requirements and content enhancement configurations carried by the training shopping guide requirements; A training prompt word generation module, used to generate training prompt words describing the training shopping guide requirements based on the content enhancement configuration; An application program interface determination module, used to perform semantic analysis on the training prompt words using a large language model to be trained, so as to determine a plurality of application program interfaces required to respond to the shopping guide training requirements; A predicted shopping guide information determination module, configured to filter and summarize the returned results of the plurality of application program interfaces based on a preset database to obtain predicted shopping guide information; A model training module, used for adjusting parameters of the large language model to be trained based on the predicted shopping guide information and the shopping guide training demand, to obtain a trained large language model; The target shopping guide information output module is used to guide the trained large language model to generate and output the target shopping guide information matching the prompt word to the user terminal when conducting shopping guide based on the prompt word corresponding to the shopping guide demand input by the user terminal.
10. A shopping guide system based on a large language model, wherein: The system includes: a user terminal and a server; the server includes: a prompt word generation module, a semantic analysis module and a shopping guide information output module; wherein: The user terminal is used to obtain the shopping guide requirements input by the user terminal and the content enhancement configuration carried by the shopping guide requirements; The prompt word generation module is used to generate prompt words describing the shopping guide requirements based on the content enhancement configuration; The semantic analysis module is used to perform semantic analysis on the prompt word using a trained large language model to determine a plurality of application program interfaces required to respond to the shopping guide demand; wherein the trained large language model is obtained by adjusting parameters of the large language model to be trained based on the predicted shopping guide information, the predicted shopping guide information is obtained by screening and summarizing the return results of the plurality of application program interfaces required for the training shopping guide demand based on a preset database, and the plurality of application program interfaces are determined after the large language model to be trained performs semantic analysis on the training prompt word of the training shopping guide demand; The shopping guide information output module is used to filter and summarize the return results of the multiple application program interfaces based on a preset database, and generate and output target shopping guide information to the user terminal.
Citation Information
Patent Citations
Conversation recommendation method and device, equipment and storage medium
CN116595150A
Commodity recommendation method and device, storage medium and electronic equipment
CN116823387A
Commodity recommendation method and device
CN116843428A
Information recommendation method based on generative large language model and related device
CN116932733A
Shopping guide method and system based on large language model
CN117350825A
Cited By
Data query method and device based on large language model and storage medium
CN120508640A
Automatic meal reporting method and system based on natural language recognition
CN120746772A
An automatic meal ordering method and system based on natural language recognition
CN120746772B
Large model application optimization method and device based on user feedback, equipment and medium
CN120806172A
Real-time interaction auxiliary system and method for store sales based on AI intelligent agent
CN120851886A