Human-computer interaction method, device, electronic device, and storage medium
By identifying and generating a second dialogue text based on plugin descriptions, the method addresses the challenges of plugin selection and excessive input text in large-scale language models, enhancing user experience and efficiency.
Patent Information
- Application Number
- JP2024554682
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-31
- Filing Date
- 2024-06-14
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-06-14
AI Technical Summary
Large-scale language models struggle with accurately answering questions about newly added data due to the limitations of artificial neural networks, and the manual selection of plug-ins becomes cumbersome as the number of plug-ins increases, leading to excessive input text length and reduced processing efficiency and accuracy.
A method to identify a target plugin associated with dialogue text, generate a second dialogue text based on the first dialogue text and plugin description, and input it into the large-scale language model to obtain an answer text, optimizing plugin selection and reducing input text length.
Improves user experience by automating plugin selection, enhances processing efficiency, and maintains accuracy by minimizing excessive input text, thus improving the performance of large-scale language models.
Smart Images

Figure 2025538027000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to the fields of deep learning, natural language processing, and large-scale model technology. [Background technology]
[0002] A dialogue system based on a large-scale language model is an intelligent system that uses deep learning and natural language processing techniques to simulate human dialogue. By learning and training on large amounts of text data, it can capture subtle differences in natural language, better understand user input, and generate more natural responses. Summary of the Invention
[0003] The present disclosure provides a human-computer interaction method, apparatus, electronic device, and storage medium.
[0004] According to one aspect of the present disclosure, there is provided a human-computer interaction method including: in response to a human-computer interaction request, identifying a first target plugin related to the first dialogue text from a plurality of plugins registered in a large-scale language model based on a first dialogue text included in the human-computer interaction request; obtaining a second dialogue text based on the first dialogue text and a description text of the first target plugin; and inputting the second dialogue text into the large-scale language model to obtain an answer text.
[0005] According to another aspect of the present disclosure, there is provided a human-computer interaction device including: an identification module for, in response to a human-computer interaction request, identifying a first target plugin related to the first dialogue text from a plurality of plugins registered in a large-scale language model based on a first dialogue text included in the human-computer interaction request; a first processing module for obtaining a second dialogue text based on the first dialogue text and a description text of the first target plugin; and a first input module for inputting the second dialogue text into the large-scale language model to obtain an answer text.
[0006] According to another aspect of the present disclosure, there is provided an electronic device including at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and wherein the instructions, when executed by the at least one processor, enable the at least one processor to perform the method as described above.
[0007] According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the above-described method.
[0008] According to another aspect of the present disclosure, there is provided a computer program product including a computer program which, when executed by a processor, implements the method as set out above.
[0009] It should be understood that the contents described in this section are not intended to depict key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will be readily understood from the following description. [Brief explanation of the drawings]
[0010] The drawings are for a better understanding of the invention and are not intended to limit the disclosure. [Figure 1] FIG. 1 schematically illustrates an exemplary system architecture to which the human-computer interaction method and apparatus according to an embodiment of the present disclosure can be applied. [Figure 2] FIG. 2 schematically illustrates a flowchart of a human-computer interaction method according to an embodiment of the present disclosure. [Figure 3A] FIG. 3A schematically illustrates a schematic diagram of a matching flow of a first target plug-in according to an embodiment of the present disclosure. [Figure 3B] FIG. 3B schematically illustrates a schematic diagram of a matching flow of a first target plug-in according to another embodiment of the present disclosure. [Figure 4A] FIG. 4A schematically illustrates a schematic diagram of an answer text generation flow according to an embodiment of the present disclosure. [Figure 4B] FIG. 4B schematically illustrates a schematic diagram of an answer text generation flow according to another embodiment of the present disclosure. [Figure 5] FIG. 5 schematically shows a flowchart of a human-computer interaction method according to another embodiment of the present disclosure. [Figure 6] FIG. 6 illustrates a schematic block diagram of a human-computer interaction device according to an embodiment of the present disclosure. [Figure 7] FIG. 7 shows a schematic block diagram of an exemplary electronic device for implementing embodiments of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, exemplary embodiments of the present disclosure will be described with reference to the drawings. Hereinafter, various details of the embodiments of the present disclosure are included for ease of understanding, and should be considered as examples. Therefore, it should be understood that those skilled in the art can make various changes and modifications to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for clarity and conciseness, the following description will omit descriptions of well-known functions and configurations.
[0012] With the continuous development of artificial intelligence technology, dialogue systems, as one of its important application fields, have been widely applied in fields such as human-computer interaction, smart customer service, smart assistants, etc. Here, large-scale language models, as a key component of dialogue systems, play a very important role in dialogue systems.
[0013] The realization of large-scale language models mainly relies on deep learning and natural language processing technologies. Here, deep learning technology uses multi-layer neural networks and backpropagation algorithms to learn and train input text data and obtain output results. Natural language processing technology processes and analyzes text data to process and understand input natural language, thereby realizing the functions of a dialogue system.
[0014] In practical applications, large-scale language models have a common drawback of artificial neural networks: they cannot accurately answer questions about newly added data other than the training data set. To address this drawback, relevant engineers have begun to deploy plug-ins in large-scale language models, which become the "eyes and ears" of the large-scale language model and allow it to access new, private, or specific information not included in the training data, allowing the large-scale language model to better serve users. Meanwhile, plug-ins, combined with the large-scale language model's powerful content generation and context understanding capabilities, can also expand the application field of the large-scale language model and increase the reliability of the generated results. Plug-ins can also delegate safe and restricted operations to the large-scale language model, improving the practicality of the entire system.
[0015] In the related plug-in management method, the user needs to manually select the desired plug-in. When the user interacts, the dialogue system can input the plug-in selected by the user into the large-scale language model in the form of a plug-in description in the form of a prompt, that is, insert the plug-in description of the plug-in selected by the user into the context of the dialogue content entered by the user, and input the processed dialogue content into the large-scale language model. The large-scale language model can determine which plug-in the currently entered dialogue content needs to use and call the corresponding plug-in to complete the related function.
[0016] As the number of plug-ins to be placed in a large-scale language model increases, for example, tens of thousands of plug-ins may be placed, making it difficult for users to select desired plug-ins at low cost. Meanwhile, in the process of multiple dialogues with a user, a dialogue system based on a large-scale language model adds the input dialogue content and output answer content of a historical dialogue to the context of a subsequent dialogue, resulting in the dialogue content of a new round of dialogue having a long context. When the plug-in descriptions of each of the multiple plug-ins selected by the user are inserted into the context of the dialogue content entered by the user, the actual text input to the large-scale language model becomes too long, thereby exceeding the limit on the number of tokens for the input content of the large-scale language model, thereby lengthening the processing time of the large-scale language model and reducing the accuracy of the output answer content.
[0017] In view of this, embodiments of the present disclosure provide a human-computer interaction method, an apparatus, an electronic device, and a storage medium for at least partially solving the above problem, which includes: in response to a human-computer interaction request, determining a first target plugin associated with a first dialogue text included in the human-computer interaction request from a plurality of plugins registered in a large-scale language model based on the first dialogue text, obtaining a second dialogue text based on the first dialogue text and a description text of the first target plugin, and inputting the second dialogue text into the large-scale language model to obtain an answer text.
[0018] FIG. 1 schematically illustrates an exemplary system architecture to which the human-computer interaction method and apparatus according to an embodiment of the present disclosure can be applied.
[0019] 1 merely illustrates an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure cannot be applied to other devices, systems, environments, or scenes. For example, in another embodiment, an exemplary system architecture to which the human-computer interaction method and apparatus can be applied may include a terminal device, but the terminal device does not need to interact with a server and can realize the human-computer interaction method and apparatus provided in the embodiments of the present disclosure.
[0020] 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as, for example, wired and / or wireless communication links.
[0021] The terminal devices 101, 102, and 103 may be various electronic devices that have a display and support web page browsing, including, but not limited to, smartphones, tablet computers, laptop computers, and desktop computers.
[0022] A client application of a dialogue system may be installed on the terminal devices 101, 102, and 103, and the dialogue system may be a dialogue system based on a large-scale language model. A user can perform text processing using the large-scale language model via the client application on the terminal devices 101, 102, and 103.
[0023] The server 105 may be a server that provides various services or a cloud server. The server 105 may have a back-end application of the dialogue system installed thereon.
[0024] It should be noted that the human-computer interaction method provided by the embodiments of the present disclosure may generally be performed by the terminal device 101, 102, or 103. Accordingly, the human-computer interaction device provided by the embodiments of the present disclosure may be provided in the terminal device 101, 102, or 103.
[0025] Alternatively, the human-computer interaction method provided by the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the human-computer interaction apparatus provided by the embodiments of the present disclosure may be generally provided in the server 105. The human-computer interaction method provided by the embodiments of the present disclosure may be performed by a server or server cluster that can communicate with the terminal devices 101, 102, 103 and / or the server 105, different from the server 105. Accordingly, the human-computer interaction apparatus provided by the embodiments of the present disclosure may be provided in a server or server cluster that can communicate with the terminal devices 101, 102, 103 and / or the server 105, different from the server 105.
[0026] It should be understood that the number of terminal devices, networks, and servers in Figure 1 is merely an example, and any number of terminal devices, networks, and servers may be included as required for implementation.
[0027] In the technical solution disclosed herein, the collection, storage, use, processing, transmission, provision, disclosure, application and other processes of user personal information comply with the provisions of relevant laws and regulations and do not violate public order and morals.
[0028] In the technical solutions disclosed herein, before obtaining or collecting personal information of users, permission or consent of the users is obtained.
[0029] FIG. 2 schematically illustrates a flowchart of a human-computer interaction method according to an embodiment of the present disclosure.
[0030] As shown in FIG. 2, the method includes operations S210 to S230.
[0031] In operation S210, in response to a human-computer interaction request, a first target plug-in associated with the first dialogue text is identified from a plurality of plug-ins registered in the large-scale language model based on a first dialogue text included in the human-computer interaction request.
[0032] In operation S220, a second dialogue text is obtained based on the first dialogue text and the description text of the first target plug-in.
[0033] In operation S230, the second dialogue text is input into a large-scale language model to obtain a response text.
[0034] According to an embodiment of the present disclosure, a human-computer interaction request can be triggered when a user interacts with a dialogue system. The dialogue system can include an information input interface, such as a text input control or an audio input control. For example, a user can input dialogue text into a text box included in the text input control. After completing the dialogue text input, the user can click a send button included in the text input control to input the dialogue text into the dialogue system. When the dialogue system receives the dialogue text, it can trigger the human-computer interaction request. For example, a user can press a dialogue button included in an audio input control to input audio information through an audio receiving device disposed in an electronic device equipped with the dialogue system. The input audio information can be converted into dialogue text using natural language processing. After the user releases the dialogue button, the converted dialogue text can be input into the dialogue system. When the dialogue system receives the dialogue text, it can trigger the human-computer interaction request. The dialogue system described above can be a dialogue system based on a large-scale language model, i.e., the dialogue system can process the received dialogue text using a large-scale language model.
[0035] According to an embodiment of the present disclosure, the first dialogue text is a dialogue text received by the dialogue system when triggering a human-computer interaction request.
[0036] According to an embodiment of the present disclosure, a developer can pre-register multiple plug-ins for a large-scale language model. After the plug-in registration is complete, the large-scale language model can call the plug-in using its description text. The plug-in description text may include, for example, a function description text of the plug-in and a usage example of the plug-in. The function description text may be used to interpret the role of the plug-in. For example, in the case of a weather query plug-in, the function description text of the plug-in may be, for example, "This plug-in can output weather conditions based on the city and date entered by the user." The usage examples of the plug-in may include, but are not limited to, correct and incorrect usage examples of the plug-in. Each usage example may include at least the format of the user's input text and the format of the output text of the large-scale language model. For example, for a weather query plug-in, a usage example of the weather query plug-in may be, "Input: Query the weather in City A on Year B, Month C, and Day D; Output: The weather in City A on Year B, Month C, and Day D is sunny, the temperature is E°C, the relative humidity is F%, and the wind speed is G." Specifically, the large-scale language model may call a plugin to process dialogue text by adjusting the dialogue text to the same text format as the input for the use case, and then using the plugin to perform processing based on the adjusted dialogue text, thereby obtaining the output text of the plugin.
[0037] According to an embodiment of the present disclosure, identifying a first target plug-in from a plurality of plug-ins may involve, for example, matching the dialogue text with the text of the input portion of the use case included in the description text of the plug-in, and identifying the plug-in with the highest degree of match, where the plug-in with the highest degree of match is the first target plug-in.
[0038] According to an embodiment of the present disclosure, the second dialogue text can be obtained by splicing the first dialogue text and the description text of the first target plugin. Alternatively, the first dialogue text and the description text of the first target plugin can be entered into the same text template to obtain the second dialogue text. Alternatively, the second dialogue text can be obtained by performing text reconstruction on the first dialogue text and the description text of the first target plugin using a large-scale language model. The second dialogue text can simultaneously include the text content and feature information of the first dialogue text and the text content and feature information of the description text of the first target plugin. The second dialogue text can be the text actually input into the large-scale language model.
[0039] According to an embodiment of the present disclosure, in an optional embodiment, in response to a human-computer interaction request, it can be determined whether the first dialogue text can be realized using the functions of the large-scale language model itself. If it is determined that the first dialogue text can be realized using the functions of the large-scale language model itself, the large-scale language model can be directly used to process the first dialogue text to obtain an answer text. If it is determined that the first dialogue text cannot be realized using the functions of the large-scale language model itself, the text content of the first dialogue text can be used to match an optimal first target plug-in, and then the function of the first target plug-in can be used to generate an answer text.
[0040] According to an embodiment of the present disclosure, when a user inputs new dialogue text into a dialogue system to trigger a human-computer interaction request, the system can match and obtain the most relevant first target plugin from a plurality of registered plugins based on the text content of the first dialogue text, and input a second dialogue text fused based on the first dialogue text and the description text of the first target plugin into a large-scale language model to obtain an answer text corresponding to the first dialogue text. By matching plugins based on the text content of the first dialogue text, the user does not need to actively select the plugin required for dialogue, which effectively improves the user experience. At the same time, by selecting plugins, the dialogue system does not need to splice excessive plugin description text into the context of the dialogue text, which effectively reduces the length of text actually input into the large-scale language model and improves the processing efficiency and accuracy of the large-scale language model.
[0041] Hereinafter, with reference to FIGS. 3A-3B, 4A-4B and 5, the method shown in FIG. 2 will be further described with reference to specific examples.
[0042] According to an embodiment of the present disclosure, in order to satisfy the invocation of a plug-in by a large-scale language model, the plug-in needs to be registered in the large-scale language model. When registering the plug-in, an index is established based on the description of the plug-in, and then when performing human-computer interaction, the plug-in can be matched based on the index.
[0043] According to an embodiment of the present disclosure, taking the plug-in to be registered as the third target plug-in as an example, the plug-in registration process may include the following operations:
[0044] In response to the plug-in registration request, index information for the third target plug-in is generated based on the description text of the third target plug-in included in the plug-in registration request, and the index information for the third target plug-in is written to the plug-in information library.
[0045] According to an embodiment of the present disclosure, the plug-in registration request may be actively triggered by a user. Specifically, the user can introduce the third target plug-in to be registered into the dialogue system by an instruction sequence command, a plug-in registration control on the front-end page of the dialogue system, etc., and trigger the plug-in registration request.
[0046] According to an embodiment of the present disclosure, the format of the index information of a plug-in is not limited here. For example, the index information of a plug-in may include one or more keywords, and the one or more keywords may be extracted from the description text of the plug-in. Also, for example, the index information of a plug-in may be represented as a vector, and the vector may be a feature vector obtained based on the description text of the plug-in.
[0047] According to an embodiment of the present disclosure, the plug-in information library may be any type of database, or the plug-in information library may be represented as other types of data structures, and is not limited thereto.
[0048] According to an embodiment of the present disclosure, in accordance with the plug-in registration process, when matching plug-ins, the plug-in matching can also be achieved by using the respective index information of each plug-in in the plug-in information library. Specifically, based on the first dialogue text included in the human-computer interaction request, identifying a first target plug-in related to the first dialogue text from multiple plug-ins registered in the large-scale language model can include the following operations:
[0049] The index information of each of the plurality of plug-ins is obtained from the plug-in information library, the first dialogue text is matched with the index information of each of the plurality of plug-ins to obtain a plurality of matching results, and a first target plug-in is identified from the plurality of plug-ins based on the plurality of matching results.
[0050] FIG. 3A schematically illustrates a schematic diagram of a matching flow of a first target plug-in according to an embodiment of the present disclosure.
[0051] 3A, N registered plug-ins 301 may be placed in the large-scale language model, and may be represented as plug-in 1, plug-in 2, ..., plug-in N. N pieces of index information 303 corresponding to the N plug-ins 301 may be recorded in the plug-in information library 302, and may include, for example, index information 1 corresponding to plug-in 1, index information 2 corresponding to plug-in 2, and index information N corresponding to plug-in N.
[0052] According to an embodiment of the present disclosure, the first dialogue text 304 can be used to match N pieces of index information 303, respectively, to obtain N matching results 305. For example, by matching the first dialogue text 304 with index information 1, matching result 1 can be obtained, and by matching the first dialogue text 304 with index information 2, matching result 2 can be obtained.
[0053] According to an embodiment of the present disclosure, the N matching results 305 may all be expressed as numerical values within a certain range, and based on the calculation method of the matching results, the probability of matching represented by the matching results and the magnitude of the numerical value of the matching results have a certain correspondence relationship. For example, the N matching results may all be between 0 and 1, and the closer the numerical value of the matching result is to 1, the closer the matching result is to the matching result's match with the first dialogue text. The first target plug-in 306 is identified based on the N matching results, i.e., the magnitudes of the N matching results are compared to identify the matching result with the maximum value, and the plug-in corresponding to the matching result with the maximum value is the first target plug-in 306.
[0054] According to an embodiment of the present disclosure, the specific calculation method of the matching result may be related to the generation method and format of the index information when registering the plug-in.
[0055] For example, when registering a plug-in, feature extraction can be performed on the description text of the plug-in to obtain a feature vector of the description text, and index information of the plug-in can be generated based on the feature vector, i.e., the index information of the plug-in can include the feature vector of the description text of the plug-in. Matching the first dialogue text with the index information of each of the multiple plug-ins and obtaining multiple matching results can include the following operations.
[0056] Feature extraction is performed on the first dialogue text to obtain a feature vector of the first dialogue text, similarity calculation is performed on the feature vector of the first dialogue text with the feature vector of each description text of a plurality of plug-ins to obtain a plurality of similarity calculation results, and a plurality of matching results are obtained based on the plurality of similarity calculation results.
[0057] According to an embodiment of the present disclosure, the similarity calculation can be realized by any method for calculating the similarity between vectors, including, but not limited to, the cosine similarity calculation method, the correlation coefficient method, etc.
[0058] According to an embodiment of the present disclosure, the larger the numerical value of the similarity calculation result, the higher the similarity between the feature vector of the first dialogue text and the feature vector of the description text of the corresponding plugin, and the corresponding matching result can also be expressed as a closer match.
[0059] Furthermore, for example, when registering a plug-in, keyword extraction can be performed on the description text of the plug-in to obtain at least one keyword in the description text, and index information of the plug-in can be generated based on the at least one keyword, that is, the index information of the plug-in can include at least one keyword related to the description text of the plug-in. Matching the first dialogue text with the index information of each of the multiple plug-ins to obtain multiple matching results can include the following operations.
[0060] Keyword extraction is performed on the first dialogue text to obtain keywords associated with the first dialogue text, and the keywords associated with the first dialogue text are respectively matched with at least one keyword associated with the description text of each of the plurality of plug-ins to obtain a plurality of matching results.
[0061] According to an embodiment of the present disclosure, the similarity between the index information of the plug-in and the first dialogue text can be determined based on the number of keyword hits, i.e., the matching result can be expressed as the number of keyword hits. For example, keyword extraction can be performed on the description text of plug-in α to obtain keyword a, keyword b, keyword c, and keyword d. Similarly, keyword extraction can be performed on the first dialogue text to obtain keyword b, keyword d, and keyword e. Because plug-in α and the first dialogue text both contain keyword b and keyword d, the matching result obtained by matching the first dialogue text with plug-in α can be expressed as 2.
[0062] According to an embodiment of the present disclosure, by setting index information for a plug-in when registering the plug-in, high-speed plug-in matching can be achieved based on the index information when performing plug-in matching, which can effectively improve the accuracy of plug-in matching and improve the efficiency of plug-in matching operations.
[0063] According to an embodiment of the present disclosure, each plug-in may have a problem type that it can process, for example, plug-in 1 is used to solve mathematical calculation problems, and plug-in 2 is used to solve weather query problems. This allows multiple registered plug-ins to be grouped based on the problems they can solve. For example, since the weather query plug-in and the humidity query plug-in are both used to solve the problem of how to query the climate, the weather query plug-in and the humidity query plug-in can be classified into one category, and it can be determined that the plug-in types of the weather query plug-in and the humidity query plug-in are both climate type plug-ins.
[0064] According to an embodiment of the present disclosure, as an optional embodiment, the plug-in information library may contain a large number of index information items, and plug-in matching based on the index information may still take time. Therefore, before plug-in matching based on the index information is performed, initial selection of plug-ins may be performed based on the plug-in type.
[0065] FIG. 3B schematically illustrates a schematic diagram of a matching flow of a first target plug-in according to another embodiment of the present disclosure.
[0066] As shown in FIG. 3B, N registered plugins 301 may be placed in the large-scale language model, and N index information 303 corresponding to each of the N plugins 301 may be recorded in the plugin information library 302.
[0067] According to an embodiment of the present disclosure, based on the first dialogue text 304, plugin type information 307 associated with the first dialogue text 304 can be identified. Based on the plugin type information 307, at least one second target plugin 308 can be identified from the N plugins 301. That is, the plugin type of each of the at least one second target plugin 308 matches the plugin type indicated by the plugin type information 307. After identifying the at least one second target plugin 308, index information 303 for each of the at least one second target plugin 308 can be obtained from the plugin information library 302. The first dialogue text 304 is matched with the index information 303 for each of the at least one second target plugin 308 to obtain at least one matching result 305. Based on the at least one matching result 305, a first target plugin 306 can be identified from the at least one second target plugin 308.
[0068] According to an embodiment of the present disclosure, the process of matching at least one second target plug-in and the process of identifying a first target plug-in from at least one second target plug-in can be realized using the method of matching multiple plug-ins and the method of identifying a first target plug-in from multiple plug-ins as described above, and the description thereof will be omitted here.
[0069] According to an embodiment of the present disclosure, by initially selecting plug-ins based on their types before performing plug-in matching based on index information, it is possible to effectively reduce the computational resources consumed in the plug-in matching process and improve processing efficiency.
[0070] According to an embodiment of the present disclosure, after identifying the first target plugin, the text that is actually input into the large-scale language model, i.e., the second dialogue text, can be obtained based on the first dialogue text and the description text of the first target plugin.
[0071] According to an embodiment of the present disclosure, a second dialogue text can be generated based on the first dialogue text and the description text of the first target plugin by a direct splicing method, that is, the description text of the first target plugin can be spliced into the context of the first dialogue text to obtain the second dialogue text.
[0072] According to an embodiment of the present disclosure, for example, the first dialogue text may be "Please calculate how much 256 multiplied by 4 is," the first target plug-in matched based on the first dialogue text may be a mathematical calculation plug-in, the description text of the mathematical calculation plug-in may be "A mathematical calculation plug-in, which can input an expression consisting of numbers and operators and output the calculation result," and the second dialogue text obtained by splicing the description text of the first target plug-in into the context of the first dialogue text may be "A mathematical calculation plug-in, which can input an expression consisting of numbers and operators and output the calculation result. Please calculate how much 256 multiplied by 4 is."
[0073] According to an embodiment of the present disclosure, a template-based splicing method may be adopted to generate a second dialogue text based on the first dialogue text and the description text of the first target plug-in, that is, the first dialogue text and the description text of the first target plug-in may be respectively filled into a first prompt template to obtain the second dialogue text.
[0074] According to an embodiment of the present disclosure, the first prompt template may be a text template having one or more replaceable text paragraphs set by a user, and a language expression scheme suitable for inputting into a large-scale language model. The replaceable text paragraphs may be represented as information slots in the first prompt template. For example, the first prompt template may include two information slots, a first text information slot and a plug-in information slot, respectively. The first text information slot is suitable for entering dialogue text entered by a user, and the plug-in information slot is suitable for entering description text of a plug-in. A second dialogue text generated based on the first prompt template is used to guide the large-scale language model to invoke the plug-in and process the text.
[0075] According to an embodiment of the present disclosure, for example, a first prompt template may be expressed as, “The question can be answered by using the following plug-in: [Insert Text 1]. The following question is given: [Insert Text 2].” In the first prompt template, “[Insert Text 1]” indicates the plug-in information slot, and “[Insert Text 2]” indicates the first text information slot. The first dialogue text may be, “Please calculate how much 256 is multiplied by 4.” The first target plug-in matched based on the first dialogue text may be a mathematical calculation plug-in, and the description text of the mathematical calculation plug-in may be, “A mathematical calculation plug-in that can input an expression consisting of numbers and operators and output a calculation result.” The first dialogue text may be entered into the first text information slot, and the description text of the first target plug-in may be entered into the plug-in information slot to obtain the second dialogue text. The obtained second dialogue text may be expressed as, "The question can be answered by using the following plugin: a mathematical calculation plugin, which allows you to input an expression consisting of numbers and operators and output the calculation result. The following question is given: Please calculate how much 256 multiplied by 4 is."
[0076] According to an embodiment of the present disclosure, after generating the second dialogue text, a large-scale language model can be used to call the first target plug-in to process the second dialogue text and obtain an answer text.
[0077] According to an embodiment of the present disclosure, the output text obtained after the first target plug-in processes the second dialogue text may be a text having an actual meaning or a specific meaning, in which case the output text can be directly used as the answer text of the large-scale language model, that is, the second dialogue text can be input into the large-scale language model, and the large-scale language model can be used to call the first target plug-in based on the description text of the first target plug-in contained in the second dialogue text, and process the first dialogue text contained in the second dialogue text to obtain the answer text.
[0078] FIG. 4A schematically illustrates a schematic diagram of an answer text generation flow according to an embodiment of the present disclosure.
[0079] 4A , a second dialogue text 401 can be input to a large-scale language model 402. The large-scale language model can call a first target plug-in 403 to process a first dialogue text 4012 contained in the second dialogue text 401 based on a description text 4011 contained in the second dialogue text 401, and the obtained processing result of the first target plug-in 403 is an answer text 404 of the large-scale language model 402.
[0080] For example, the second dialogue text may be expressed as "The question can be answered by using the following plug-in: a mathematical calculation plug-in, which can input an expression consisting of numbers and operators and output the calculation result. The following question is given: Please calculate how much you get when you multiply 256 by 4." After the second dialogue text is input into the large-scale language model, the large-scale language model determines that the plug-in to be called is a mathematical calculation plug-in based on the description text "a mathematical calculation plug-in, which can input an expression consisting of numbers and operators and output the calculation result" contained in the second dialogue text, and then uses the mathematical calculation plug-in to process the first dialogue text "Please calculate how much you get when you multiply 256 by 4" contained in the second dialogue text. After processing, an output text "1024" can be obtained, and the output text can be directly used as the answer text of the large-scale language model.
[0081] According to an embodiment of the present disclosure, as an optional embodiment, the processing result output by the first target plug-in can be input back into the large-scale language model, and the text processing capability of the large-scale language model can be utilized to output an answer text that is closer to a human expression style. For example, the second dialogue text can be input into the large-scale language model, and the large-scale language model can be used to invoke the first target plug-in based on the description text of the first target plug-in contained in the second dialogue text, to process the first dialogue text contained in the second dialogue text to obtain an initial answer text, and based on the first dialogue text and the initial answer text, a third dialogue text can be obtained, and the third dialogue text can be input into the large-scale language model to obtain the answer text.
[0082] FIG. 4B schematically illustrates a schematic diagram of an answer text generation flow according to another embodiment of the present disclosure.
[0083] As shown in FIG. 4B , second dialogue text 401 can be input into a large-scale language model 402. Based on description text 4011 included in the second dialogue text 401, the large-scale language model can invoke a first target plug-in 403 to process first dialogue text 4012 included in the second dialogue text 401 to obtain initial answer text 405. The initial answer text 405 can be fused with the first dialogue text 4012 to obtain third dialogue text 406. Specifically, the first dialogue text 4012 and the initial answer text 405 can be entered into a second prompt template, respectively, to obtain third dialogue text 406. Then, the third dialogue text 406 can be input into the large-scale language model 402 to obtain answer text 404.
[0084] According to an embodiment of the present disclosure, similar to the first prompt template, the second prompt template may include multiple information slots. For example, the number of information slots included in the second prompt template may be two, which may be represented as a second text information slot and a third text information slot, respectively. It should be noted that the second prompt template may include more than two information slots, and this is not limited thereto.
[0085] According to an embodiment of the present disclosure, entering the first dialogue text 4012 and the initial answer text 405 into the second prompt template respectively to obtain the third dialogue text 406 may specifically mean entering the first dialogue text 4012 into the second text information slot and the initial answer text 405 into the third text information slot to obtain the third dialogue text 406.
[0086] For example, the second prompt template may be represented as "The question can be answered based on the following information: [Insert Text 3]. The following question is given: [Insert Text 4]." Here, the information slot "[Insert Text 3]" may indicate the third text information slot, and the information slot "[Insert Text 4]" may indicate the second text information slot. The first dialogue text may be represented as "Please calculate how much you get when you multiply 256 by 4," the initial answer text may be represented as "1024," and the third dialogue text obtained after entering the first dialogue text and the initial answer text into the second prompt template may be represented as "The question can be answered based on the following information: 1024. The following question is given: Please calculate how much you get when you multiply 256 by 4." After inputting the third dialogue text into a large-scale language model, the obtained answer text may be represented as "The result of multiplying 256 by 4 is 1024."
[0087] According to the embodiments of the present disclosure, the understanding capability of the large-scale language model allows the corresponding plug-in to be called based on the description text of the plug-in to process tasks that the large-scale language model cannot originally process, which can effectively improve the availability and versatility of the large-scale language model, eliminate the need to retrain the large-scale language model when facing different tasks, and reduce the cost of using the large-scale language model.
[0088] According to an embodiment of the present disclosure, as a selectable embodiment, a user can manually select a plug-in to instruct the large-scale language model to process the dialogue text, i.e., the user can specify that the description text of some plug-ins needs to be added to the context of the dialogue text. In this case, the text actually input to the large-scale language model may include the first dialogue text, the description text of the plug-in autonomously selected by the dialogue system, and the description text of the plug-in manually selected by the user.
[0089] According to an embodiment of the present disclosure, a user's manual selection operation may be used to change the selection status mark of a plug-in, for example, a user may manually select at least one fourth target plug-in, and accordingly, the multiple plug-ins may include at least one fourth target plug-in, and any of the at least one fourth target plug-in may be marked as selected.
[0090] FIG. 5 schematically shows a flowchart of a human-computer interaction method according to another embodiment of the present disclosure.
[0091] As shown in FIG. 5, the method includes operations S510 to S530.
[0092] In operation S510, in response to a human-computer interaction request, a first target plug-in associated with the first dialogue text is identified from a plurality of plug-ins registered in the large-scale language model based on a first dialogue text included in the human-computer interaction request.
[0093] In operation S520, a fourth dialogue text is obtained based on the first dialogue text, the description text of the first target plug-in, and the description text of each of the at least one fourth target plug-in.
[0094] In operation S530, the fourth dialogue text is input into a large-scale language model to obtain an answer text.
[0095] According to the embodiment of the present disclosure, the method for identifying the first target plug-in from a plurality of plug-ins can refer to the above-described first target plug-in matching flow, and the description thereof will be omitted here.
[0096] According to an embodiment of the present disclosure, the method for obtaining the fourth dialogue text based on the first dialogue text, the description text of the first target plugin, and each description text of at least one fourth target plugin can be achieved by referring to the method for generating the second dialogue text as described above, replacing the description text of the first target plugin with the description text of the first target plugin and each description text of at least one fourth target plugin, and further replacing the second dialogue text with the fourth dialogue text, and the description thereof will not be repeated here.
[0097] According to an embodiment of the present disclosure, in the process of generating an answer text, at least one matching result obtained by matching the first dialogue text with at least one fourth target plugin may be further identified. Based on the at least one matching result, it may be determined whether the plugin that actually processes the first dialogue text is the first target plugin selected autonomously by the dialogue system or the plugin selected by the user. That is, the fourth dialogue text may be input into a large-scale language model, and the large-scale language model may be used to identify a fourth target plugin from the first target plugin and at least one fourth target plugin based on the fourth dialogue text. The large-scale language model may be used to invoke the fourth target plugin based on the description text of the fourth target plugin included in the fourth dialogue text, and the first dialogue text included in the fourth dialogue text may be processed to obtain an answer text. The process of obtaining an answer text using the fourth dialogue text may refer to the above-described process of generating an answer text, and a description thereof will be omitted here. The method used to match the first dialogue text with at least one fourth target plugin may be different from the method used to match the first dialogue text with multiple plugins. Furthermore, a correction coefficient greater than 1 may be added to the matching result of the fourth target plug-in so that the large-scale language model can process text using the plug-in selected by the user as much as possible.
[0098] According to an embodiment of the present disclosure, the description text of the plug-in automatically selected by the dialogue system and the description text of the plug-in selected by the user are both added to the context of the dialogue text, thereby improving the user experience and ensuring the tendency of the large-scale language model when processing text, so that the answer text output by the large-scale language model is more in line with the user's intention, and improving the usability of the dialogue system.
[0099] FIG. 6 illustrates a schematic block diagram of a human-computer interaction device according to an embodiment of the present disclosure.
[0100] As shown in FIG. 6, the human-computer interaction apparatus 600 includes a specifying module 610, a first processing module 620, and a first input module 630.
[0101] The identification module 610, in response to a human-computer interaction request, identifies a first target plug-in associated with the first dialogue text from a plurality of plug-ins registered in the large-scale language model based on a first dialogue text included in the human-computer interaction request.
[0102] The first processing module 620 obtains a second dialogue text based on the first dialogue text and the description text of the first target plug-in.
[0103] The first input module 630 inputs the second dialogue text into the large-scale language model to obtain the answer text.
[0104] According to an embodiment of the present disclosure, the identification module 610 includes a first identification unit, a second identification unit, and a third identification unit.
[0105] The first identification unit acquires index information of each of the plurality of plug-ins from the plug-in information library.
[0106] The second identification unit respectively matches the first dialogue text with the index information of each of the plurality of plug-ins to obtain a plurality of matching results.
[0107] The third identification unit identifies a first target plug-in from the plurality of plug-ins based on the plurality of matching results.
[0108] According to an embodiment of the present disclosure, the index information of a plug-in includes a feature vector of the description text of the plug-in.
[0109] According to an embodiment of the present disclosure, the second specific unit includes a first specific subunit, a second specific subunit, and a third specific subunit.
[0110] The first identifying sub-unit performs feature extraction on the first dialogue text to obtain a feature vector of the first dialogue text.
[0111] The second specifying subunit calculates the similarity between the feature vector of the first dialogue text and the feature vector of each description text of the plurality of plug-ins, respectively, to obtain a plurality of similarity calculation results.
[0112] The third identifying subunit obtains a plurality of matching results based on the plurality of similarity calculation results.
[0113] According to an embodiment of the present disclosure, the index information of a plug-in includes at least one keyword associated with the description text of the plug-in.
[0114] According to an embodiment of the present disclosure, the second specific unit includes a fourth specific sub-unit and a fifth specific sub-unit.
[0115] The fourth identification subunit performs keyword extraction on the first dialogue text to obtain keywords related to the first dialogue text.
[0116] The fifth identifying subunit respectively matches a keyword associated with the first dialogue text with at least one keyword associated with the description text of each of the plurality of plug-ins to obtain a plurality of matching results.
[0117] According to an embodiment of the present disclosure, the identification module 610 includes a fourth identification unit, a fifth identification unit, a sixth identification unit, a seventh identification unit, and an eighth identification unit.
[0118] The fourth identifying unit identifies, based on the first dialogue text, plug-in type information associated with the first dialogue text.
[0119] The fifth identification unit identifies at least one second target plug-in from the plurality of plug-ins based on the plug-in type information.
[0120] The sixth identification unit obtains index information of each of the at least one second target plug-in from the plug-in information library.
[0121] The seventh identification unit respectively matches the first dialogue text with the index information of each of the at least one second target plug-in to obtain at least one matching result.
[0122] The eighth identification unit identifies a first target plug-in from the at least one second target plug-in based on the at least one matching result.
[0123] According to an embodiment of the present disclosure, the human-computer interaction apparatus 600 further includes a generating module and a writing module.
[0124] The generation module, in response to the plug-in registration request, generates index information for the third target plug-in based on the description text of the third target plug-in included in the plug-in registration request.
[0125] The write module writes the index information of the third target plug-in into the plug-in information library.
[0126] According to an embodiment of the present disclosure, the first processing module 620 includes a first processing unit.
[0127] The first processing unit splices the description text of the first target plug-in into the context of the first dialogue text to obtain a second dialogue text.
[0128] According to an embodiment of the present disclosure, the first processing module 620 includes a second processing unit.
[0129] The second processing unit respectively fills in the first dialogue text and the description text of the first target plug-in into a first prompt template to obtain a second dialogue text.
[0130] According to an embodiment of the present disclosure, the first prompt template includes a first text information slot and a plug-in information slot.
[0131] According to an embodiment of the present disclosure, the second processing unit includes a processing sub-unit.
[0132] The processing subunit fills in the first dialogue text into the first text information slot, fills in the description text of the first target plug-in into the plug-in information slot, and obtains the second dialogue text.
[0133] According to an embodiment of the present disclosure, the first input module 630 includes a first input unit.
[0134] The first input unit inputs the second dialogue text into a large-scale language model, and uses the large-scale language model to invoke the first target plugin based on the description text of the first target plugin included in the second dialogue text, and processes the first dialogue text included in the second dialogue text to obtain an answer text.
[0135] According to an embodiment of the present disclosure, the first input module 630 includes a second input unit, a third input unit, and a fourth input unit.
[0136] The second input unit inputs the second dialogue text into the large-scale language model, and uses the large-scale language model to invoke the first target plugin based on the description text of the first target plugin included in the second dialogue text, and processes the first dialogue text included in the second dialogue text to obtain an initial answer text.
[0137] The third input unit inputs the first dialogue text and the initial answer text into the second prompt template respectively to obtain a third dialogue text.
[0138] The fourth input unit inputs the third dialogue text into the large-scale language model to obtain an answer text.
[0139] According to an embodiment of the present disclosure, the second prompt template includes a second text information slot and a third text information slot.
[0140] According to an embodiment of the present disclosure, the third input unit includes an input sub-unit.
[0141] The input subunit writes the first dialogue text into the second text information slot and writes the initial response text into the third text information slot to obtain the third dialogue text.
[0142] According to an embodiment of the present disclosure, the plurality of plug-ins includes at least one fourth target plug-in, where each of the at least one fourth target plug-in is marked as selected.
[0143] According to an embodiment of the present disclosure, the human-computer interaction device 600 further includes a second processing module and a second input module.
[0144] The second processing module obtains a fourth dialogue text based on the first dialogue text, the description text of the first target plug-in, and the description text of each of the at least one fourth target plug-in.
[0145] The second input module inputs the fourth dialogue text into the large-scale language model to obtain an answer text.
[0146] According to an embodiment of the present disclosure, the second input module includes a fifth input unit and a sixth input unit.
[0147] The fifth input unit inputs the fourth dialogue text into the large-scale language model, and identifies a fourth target plugin from the first target plugin and the at least one fourth target plugin based on the fourth dialogue text using the large-scale language model.
[0148] The sixth input unit uses a large-scale language model to call the fourth target plugin based on the description text of the fourth target plugin included in the fourth dialogue text, and processes the first dialogue text included in the fourth dialogue text to obtain an answer text.
[0149] According to embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium, and a computer program product.
[0150] According to an embodiment of the present disclosure, there is provided an electronic device including at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor can perform the method as described above.
[0151] According to an embodiment of the present disclosure, there is provided a non-transitory computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the above-described method.
[0152] According to an embodiment of the present disclosure, there is provided a computer program product including a computer program that, when executed by a processor, implements the method as described above.
[0153] 7 shows a schematic block diagram of an exemplary electronic device for implementing embodiments of the present disclosure. The electronic device is intended to represent various types of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various types of mobile devices, such as personal digital assistants, mobile phones, smartphones, wearable devices, and other similar computing devices. The components, their connections and relationships, and their functions shown herein are merely exemplary and do not limit the implementation of the present disclosure as described and / or claimed herein.
[0154] 7, device 700 includes a computing unit 701, which may perform various appropriate operations and processes based on a computer program stored in a read-only memory (ROM) 702 or loaded from a storage unit 708 into a random access memory (RAM) 703. The RAM 703 may further store various programs and data necessary for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0155] The components of the device 700 are connected to an I / O interface 705, which includes an input unit 706 such as a keyboard, a mouse, etc., an output unit 707 such as various types of displays, speakers, etc., a storage unit 708 such as a magnetic disk, an optical disk, etc., and a communication unit 709 such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 enables the device 700 to exchange information and data with other devices via a computer network such as the Internet and / or various electrical networks.
[0156] The computing unit 701 may be various general-purpose and / or specialized processing modules having processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, computing units running various machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs each of the methods and processes described above, such as the human-computer interaction method. For example, in some embodiments, the human-computer interaction method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 708. In some embodiments, some or all of the computer program may be loaded and / or installed into the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, it may perform one or more steps of the human-computer interaction method described above. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the human-computer interaction method in any other suitable manner (eg, via firmware).
[0157] Various embodiments of the systems and techniques described herein above may be implemented in digital electronic circuitry systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may be embodied in one or more computer programs that can be executed and / or interpreted by a programmable system that includes at least one programmable processor, which may be a special purpose or general purpose programmable processor, and that can receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
[0158] Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, so that when the program code is executed by the processor or controller, the functions and operations specified in the flowcharts and / or block diagrams are performed. The program code may be executed entirely on a device, partially on a device, partially on a device as a separate software package, and partially on a remote device, or entirely on a remote device or server.
[0159] In the context of this disclosure, a machine-readable medium may be a tangible medium, and may contain or store a program for use in or in connection with an instruction execution system, device, or electronic device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or electronic device, or any suitable combination of the above. More specific examples of machine-readable storage media include an electrical connection of one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0160] To provide for user interaction, a computer may implement the systems and techniques described herein and include a display device (e.g., a cathode ray tube (CRT) or liquid crystal display (LCD) monitor) for displaying information to a user, and a keyboard and pointing device (e.g., a mouse or trackball) through which a user can provide input to the computer. Other types of devices may also provide for user interaction; for example, the feedback provided to the user may be any form of sensing feedback (e.g., visual feedback, auditory feedback, or tactile feedback) and may receive input from the user in any form (including voice input, speech input, or tactile input).
[0161] The systems and techniques described herein can be implemented in a computing system including background components (e.g., a data server), or middleware components (e.g., an application server), or front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with embodiments of the systems and techniques described herein), or any combination of such background, middleware, or front-end components. The components of the system can be connected to each other by any form or medium of digital data communication (e.g., a communications network). Examples of communications networks include, by way of example, a local area network (LAN), a wide area network (WAN), and the Internet.
[0162] A computer system may include clients and servers. Clients and servers are generally remote and typically interact through a communication network. The relationship of client and server is created by computer programs running on the corresponding computers and having the client-server relationship.
[0163] It should be understood that various types of flows shown above may be used, and operations may be rearranged, added, or deleted. For example, the operations described in this disclosure may be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this specification is not limited thereto.
[0164] The above specific embodiments do not limit the scope of protection of the present disclosure. Those skilled in the art should understand that various modifications, combinations, subcombinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present disclosure should be included within the scope of protection of the present disclosure.
Claims
1. In response to a human-computer interaction request, based on a first dialogue text included in the human-computer interaction request, identifying a first target plug-in associated with the first dialogue text from a plurality of plug-ins registered in a large-scale language model; Obtaining a second dialogue text based on the first dialogue text and a description text of the first target plug-in; inputting the second dialogue text into the large-scale language model to obtain an answer text; Human-computer interaction methods.
2. Identifying a first target plug-in associated with a first dialogue text from a plurality of plug-ins registered in a large-scale language model based on a first dialogue text included in the human-computer interaction request includes: acquiring index information for each of the plurality of plug-ins from a plug-in information library; respectively matching the first dialogue text with index information of each of the plurality of plug-ins to obtain a plurality of matching results; and identifying the first target plug-in from the plurality of plug-ins based on the plurality of matching results. The method of claim 1.
3. The index information of the plug-in includes a feature vector of the description text of the plug-in; respectively matching the first dialogue text with index information of each of the plurality of plug-ins to obtain a plurality of matching results; performing feature extraction on the first dialogue text to obtain a feature vector of the first dialogue text; calculating a similarity between a feature vector of the first dialogue text and a feature vector of each description text of the plurality of plug-ins, and obtaining a plurality of similarity calculation results; and obtaining the plurality of matching results based on the plurality of similarity calculation results. The method of claim 2.
4. the index information of the plug-in includes at least one keyword associated with a description text of the plug-in; respectively matching the first dialogue text with index information of each of the plurality of plug-ins to obtain a plurality of matching results; performing keyword extraction on the first dialogue text to obtain keywords related to the first dialogue text; respectively matching a keyword associated with the first dialogue text with at least one keyword associated with a description text of each of the plurality of plug-ins to obtain the plurality of matching results; The method of claim 2.
5. Identifying a first target plug-in associated with a first dialogue text from a plurality of plug-ins registered in a large-scale language model based on a first dialogue text included in the human-computer interaction request includes: Identifying plug-in type information associated with the first dialogue text based on the first dialogue text; identifying at least one second target plug-in from the plurality of plug-ins based on the plug-in type information; obtaining index information for each of the at least one second target plug-in from a plug-in information library; respectively matching the first dialogue text with index information of each of the at least one second target plug-in to obtain at least one matching result; and identifying the first target plug-in from the at least one second target plug-in based on the at least one matching result. The method of claim 1.
6. In response to a plug-in registration request, generating index information for the third target plug-in based on a description text of the third target plug-in included in the plug-in registration request; and writing index information of the third target plug-in into the plug-in information library. The method according to any one of claims 2 to 5.
7. Obtaining a second dialogue text based on the first dialogue text and a description text of the first target plug-in includes: splicing a description text of the first target plug-in into the context of the first dialogue text to obtain the second dialogue text. The method of claim 1.
8. Obtaining a second dialogue text based on the first dialogue text and a description text of the first target plug-in includes: and inputting the first dialogue text and the description text of the first target plug-in into a first prompt template to obtain the second dialogue text. The method of claim 1.
9. the first prompt template includes a first text information slot and a plug-in information slot; and inputting the first dialogue text and the description text of the first target plug-in into a first prompt template to obtain the second dialogue text, entering the first dialogue text into the first text information slot and entering description text of the first target plug-in into the plug-in information slot to obtain the second dialogue text; The method of claim 8.
10. inputting the second dialogue text into the large-scale language model to obtain an answer text, inputting the second dialogue text into the large-scale language model, invoking the first target plug-in based on description text of the first target plug-in included in the second dialogue text using the large-scale language model, and processing the first dialogue text included in the second dialogue text to obtain the answer text; The method of claim 1.
11. inputting the second dialogue text into the large-scale language model to obtain an answer text, inputting the second dialogue text into the large-scale language model, and using the large-scale language model to call the first target plug-in based on the description text of the first target plug-in included in the second dialogue text, and processing the first dialogue text included in the second dialogue text to obtain an initial answer text; Entering the first dialogue text and the initial response text into a second prompt template to obtain a third dialogue text; inputting the third dialogue text into the large-scale language model to obtain the answer text; The method of claim 1.
12. the second prompt template includes a second text information slot and a third text information slot; inputting the first dialogue text and the initial response text into a second prompt template to obtain a third dialogue text, entering the first dialogue text into the second text information slot and the initial response text into the third text information slot to obtain the third dialogue text. The method of claim 11.
13. the plurality of plug-ins includes at least one fourth target plug-in, and each of the at least one fourth target plug-in is marked as selected; The method comprises: obtaining a fourth dialogue text based on the first dialogue text, a description text of the first target plug-in, and a description text of each of the at least one fourth target plug-in; inputting the fourth dialogue text into the large-scale language model to obtain the answer text. The method of claim 1.
14. inputting the fourth dialogue text into the large-scale language model to obtain the answer text, inputting the fourth dialogue text into the large-scale language model, and identifying a fourth target plug-in from the first target plug-in and the at least one fourth target plug-in based on the fourth dialogue text using the large-scale language model; calling the fourth target plug-in based on a description text of the fourth target plug-in included in the fourth dialogue text using the large-scale language model, and processing the first dialogue text included in the fourth dialogue text to obtain the answer text; The method of claim 13.
15. an identification module responsive to a human-computer interaction request for identifying a first target plug-in associated with the first dialogue text from a plurality of plug-ins registered in a large-scale language model based on a first dialogue text included in the human-computer interaction request; a first processing module for obtaining a second dialogue text based on the first dialogue text and a description text of the first target plug-in; a first input module for inputting the second dialogue text into the large-scale language model to obtain an answer text; Human-computer interaction device.
16. The specific module is a first identifying unit for obtaining index information of each of the plurality of plug-ins from a plug-in information library; a second identification unit for respectively matching the first dialogue text with index information of each of the plurality of plug-ins to obtain a plurality of matching results; a third identification unit for identifying the first target plug-in from the plurality of plug-ins based on the plurality of matching results; 16. The apparatus of claim 15.
17. The index information of the plug-in includes a feature vector of the description text of the plug-in; The second identification unit is a first identifying subunit for performing feature extraction on the first dialogue text to obtain a feature vector of the first dialogue text; a second specifying subunit for calculating a similarity between a feature vector of the first dialogue text and a feature vector of each description text of the plurality of plug-ins, respectively, to obtain a plurality of similarity calculation results; a third identification subunit for obtaining the plurality of matching results based on the plurality of similarity calculation results; 17. The apparatus of claim 16.
18. the index information of the plug-in includes at least one keyword associated with a description text of the plug-in; The second identification unit is a fourth identifying subunit for performing keyword extraction on the first dialogue text to obtain keywords related to the first dialogue text; a fifth identification subunit for respectively matching a keyword associated with the first dialogue text with at least one keyword associated with a description text of each of the plurality of plug-ins to obtain the plurality of matching results; 17. The apparatus of claim 16.
19. The specific module is a fourth identifying unit for identifying plug-in type information associated with the first dialogue text based on the first dialogue text; a fifth identification unit for identifying at least one second target plug-in from the plurality of plug-ins based on the plug-in type information; a sixth identification unit for obtaining index information of each of the at least one second target plug-in from a plug-in information library; a seventh identifying unit for respectively matching the first dialogue text with each index information of the at least one second target plug-in to obtain at least one matching result; an eighth identification unit for identifying the first target plug-in from the at least one second target plug-in based on the at least one matching result; 16. The apparatus of claim 15.
20. a generating module for generating index information of the third target plug-in based on a description text of the third target plug-in included in the plug-in registration request in response to the plug-in registration request; a write module for writing index information of the third target plug-in into the plug-in information library; 20. Apparatus according to any one of claims 16 to 19.
21. The first processing module a first processing unit for splicing a description text of the first target plug-in into the context of the first dialogue text to obtain the second dialogue text; 16. The apparatus of claim 15.
22. The first processing module a second processing unit for inputting the first dialogue text and the description text of the first target plug-in into a first prompt template, respectively, to obtain the second dialogue text; 16. The apparatus of claim 15.
23. the first prompt template includes a first text information slot and a plug-in information slot; The second processing unit a processing subunit for entering the first dialogue text into the first text information slot and entering a description text of the first target plug-in into the plug-in information slot to obtain the second dialogue text; 23. The apparatus of claim 22.
24. The first input module is a first input unit for inputting the second dialogue text into the large-scale language model, calling the first target plug-in based on a description text of the first target plug-in included in the second dialogue text using the large-scale language model, and processing the first dialogue text included in the second dialogue text to obtain the answer text; 16. The apparatus of claim 15.
25. The first input module is a second input unit for inputting the second dialogue text into the large-scale language model, and using the large-scale language model to call the first target plug-in based on a description text of the first target plug-in included in the second dialogue text, and processing the first dialogue text included in the second dialogue text to obtain an initial answer text; a third input unit for inputting the first dialogue text and the initial answer text into a second prompt template respectively to obtain a third dialogue text; a fourth input unit for inputting the third dialogue text into the large-scale language model to obtain the answer text.
16. The apparatus of claim 15.
26. the second prompt template includes a second text information slot and a third text information slot; The third input unit is an input subunit for inputting the first dialogue text into the second text information slot and inputting the initial response text into the third text information slot to obtain the third dialogue text; 26. The apparatus of claim 25.
27. the plurality of plug-ins includes at least one fourth target plug-in, and each of the at least one fourth target plug-in is marked as selected; The device comprises: a second processing module for obtaining a fourth dialogue text based on the first dialogue text, a description text of the first target plug-in, and a description text of each of the at least one fourth target plug-in; a second input module for inputting the fourth dialogue text into the large-scale language model to obtain the answer text.
16. The apparatus of claim 15.
28. The second input module is a fifth input unit for inputting the fourth dialogue text into the large-scale language model and identifying a fourth target plug-in from the first target plug-in and the at least one fourth target plug-in based on the fourth dialogue text using the large-scale language model; a sixth input unit for calling the fourth target plug-in based on a description text of the fourth target plug-in included in the fourth dialogue text by utilizing the large-scale language model, and processing the first dialogue text included in the fourth dialogue text to obtain the answer text; 28. The apparatus of claim 27.
29. at least one processor; a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor such that the at least one processor can perform the method of any one of claims 1 to 14; electronic equipment.
30. A non-transitory computer-readable storage medium having computer instructions stored thereon, comprising: The computer instructions are used to cause the computer to carry out the method of any one of claims 1 to 14. A non-transitory computer-readable storage medium.
31. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Human-computer interaction method, device and system
CN116483980A
Knowledge question and answer method, device and equipment and storage medium
CN116561278A
Information processing device, information processing method, and computer program
JP7441366B1