An information processing method and apparatus
Patent Information
- Application Number
- CN202311388566.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-24
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-10-24
AI Technical Summary
[0002]在大语言模型(Large Language Model,LLM)应用领域,模型的输出数据通常不够定制化,例如,对于个性化问答场景,模型常常难以给出用户满意的定制化回答结果
[0039]由以上方案可知,本申请公开一种信息处理方法、装置和电子设备,其中,信息处理方法包括:获得用户的输入请求;基于所述输入请求与所述用户的用户信息之间的关系,至少确定目标数据源中,所述输入请求在所请求结果方向上与所述用户信息满足相关条件的第一数据;所述目标数据源包括与所述用户信息相关的多个数据;基于所述第一数据生成第一提示信息;将所述输入请求和模型提示信息发送至目标模型,以由所述目标模型基于所述模型提示信息、执行对所述输入请求的语言处理,得到所述输入请求在所请求结果方向上对应的反馈结果;所述模型提示信息包括所述第一提示信息。
Smart Images

Figure CN117390076B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of natural language processing and artificial intelligence technology, and in particular relates to an information processing method and apparatus. Background Technology
[0002] In the field of Large Language Model (LLM) applications, the output data of the models is often not customized enough. For example, in personalized question-answering scenarios, the models often struggle to provide users with satisfactory customized answers. Therefore, how to improve the customization level of the model's output data, enhance the model's processing performance, and enable users to obtain satisfactory customized results has become a pressing technical problem to be solved in this field. Summary of the Invention
[0003] Therefore, this application discloses the following technical solution:
[0004] An information processing method, comprising:
[0005] Obtain user input requests;
[0006] Based on the relationship between the input request and the user's user information, at least one first data in the target data source is determined in which the input request satisfies the relevant conditions with the user information in the direction of the requested result; the target data source includes multiple data related to the user information;
[0007] A first prompt message is generated based on the first data;
[0008] The input request and model prompt information are sent to the target model, so that the target model performs language processing on the input request based on the model prompt information to obtain the feedback result corresponding to the input request in the requested result direction; the model prompt information includes the first prompt information.
[0009] Optionally, the information processing method further includes:
[0010] Based on the relationship between the input request and the user information, at least one second data in the target data source is determined in which the input request does not meet the relevant conditions with the user information in the direction of the requested result.
[0011] A second prompt message is generated based on the second data; the model prompt message also includes the second prompt message, and the prompting method of the first prompt message may be the same as or different from the prompting method of the second prompt message.
[0012] Optionally, based on the relationship between the input request and the user's user information, determining at least the first data in the target data source in which the input request satisfies a relevant condition with the user information in the direction of the requested result includes:
[0013] If the keywords in the input request overlap with the keywords in the user information, the first index dataset is searched based on the overlapping keywords to obtain the first search result data, and the first search result data is determined as the first data.
[0014] The first index dataset is a dataset created based on the user information and the index data corresponding to each piece of data in the target data source.
[0015] Optionally, based on the relationship between the input request and the user information, determining at least the second data in the target data source where the input request does not satisfy the relevant conditions with the user information in the direction of the requested result includes:
[0016] If the keywords in the input request do not overlap with the keywords in the user information, the first index dataset is searched based on the semantic features of the input request, and the search results data is used as the second data.
[0017] The first index dataset is a dataset created based on the user information and the index data corresponding to each piece of data in the target data source.
[0018] Optionally, the step of determining, based on the relationship between the input request and the user information, at least in the target data source, a second set of data in which the input request does not satisfy a relevant condition with the user information in the direction of the requested result, further includes:
[0019] If the keywords in the input request overlap with the keywords in the user information, the first index dataset is searched based on the semantic features of the input request to obtain second search result data, and the second search result data is determined as the second data.
[0020] Alternatively, the first index dataset can be searched based on the semantic features of the input request other than the overlapping keywords, and the search results data can be used as the second data.
[0021] Optionally, generating the second prompt information based on the second data includes:
[0022] If the second data contains a portion of the second data that includes keywords related to the user information, a first sub-prompt message is generated based on the portion of the second data, and a second sub-prompt message is generated based on the data other than the portion of the second data in the second data.
[0023] If the second data does not contain any part of the second data that includes the keyword of the user information, a third sub-prompt information is generated based on the second data; the second prompt information includes the first sub-prompt information and the second sub-prompt information, or includes the third sub-prompt information, wherein the first sub-prompt information has the same prompting method as the first prompt information, and the second sub-prompt information and the third sub-prompt information have different prompting methods from the first prompt information.
[0024] Optionally, if the keywords in the input request overlap with the keywords in the user information, the method further includes the following before sending the input request and model prompt information to the target model:
[0025] The first prompt message and the first sub-prompt message are deduplicated.
[0026] Optionally, the target data source is an existing first data source, or a first data source determined based on a second data source;
[0027] The second data source is a public domain data source formed from public domain data, while the first data source is a non-public domain data source formed from multiple data related to the user information.
[0028] Optionally, the information processing method further includes:
[0029] If the feedback result does not meet the expected goal, at least one round of the following processing should be performed:
[0030] The target model shall at least send the output feedback result of the target model to the input request, so that the target model may update the feedback result of the input request based at least on the output feedback result.
[0031] An information processing device, comprising:
[0032] The acquisition module is used to obtain user input requests;
[0033] The first determining module is used to determine, based on the relationship between the input request and the user's user information, at least one piece of data in the target data source in which the input request satisfies a relevant condition with the user information in the direction of the requested result; the target data source includes multiple pieces of data related to the user information;
[0034] The first generation module is used to generate a first prompt message based on the first data;
[0035] The processing module is used to send the input request and model prompt information to the target model, so that the target model performs language processing on the input request based on the model prompt information to obtain the feedback result corresponding to the input request in the requested result direction; the model prompt information includes the first prompt information.
[0036] An electronic device, comprising:
[0037] Memory, used to store at least one set of computer instructions;
[0038] A processor for implementing the information processing method described in any of the preceding descriptions by executing the instruction set stored in the memory.
[0039] As can be seen from the above solutions, this application discloses an information processing method, apparatus, and electronic device. The information processing method includes: obtaining a user's input request; based on the relationship between the input request and the user's user information, determining at least first data from a target data source in which the input request satisfies a relevant condition with the user information in the direction of the requested result; the target data source includes multiple data related to the user information; generating first prompt information based on the first data; sending the input request and model prompt information to a target model, so that the target model performs language processing on the input request based on the model prompt information to obtain a feedback result corresponding to the input request in the direction of the requested result; the model prompt information includes the first prompt information. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0041] Figure 1 This is a flowchart illustrating one of the information processing methods provided in this application;
[0042] Figure 2 This is another flowchart illustrating the information processing method provided in this application;
[0043] Figure 3 This is another flowchart illustrating the information processing method provided in this application;
[0044] Figure 4This is a flowchart illustrating the application example of Method 1 provided in this application;
[0045] Figure 5 This is a structural diagram of the information processing device provided in this application;
[0046] Figure 6 This is a structural diagram of the electronic device provided in this application. Detailed Implementation
[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0048] This application discloses an information processing method and apparatus to improve the customization level of output data from target models such as large language models, enhance model processing performance, and provide users with more satisfactory customized results. The disclosed information processing method can be applied to electronic devices in numerous general-purpose or dedicated computing environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor devices, etc.
[0049] See Figure 1 The flowchart of the information processing method disclosed in the embodiments of this application is shown. The information processing method includes at least:
[0050] Step 101: Obtain the user's input request.
[0051] Optionally, the obtained input request can be a request to input into a target model such as a large language model so that the target model can perform language processing.
[0052] Large language models are deep learning models trained on massive amounts of text data that can generate natural language text or understand the meaning of language text. Large language models can handle various natural language tasks, such as text classification, question answering, and dialogue, and are an important pathway to artificial intelligence.
[0053] Taking a personalized question-and-answer scenario as an example, the input request can be a question raised by the user, specifically, it can be a question raised by the user through manual input or voice interaction.
[0054] Step 102: Based on the relationship between the input request and the user's user information, at least determine the first data in the target data source in which the input request satisfies the relevant conditions with the user information in the direction of the requested result; the target data source includes multiple data related to the user information.
[0055] User information includes, but is not limited to, the user's gender, age, occupation, location, and preferences (such as preferred electronic products, including their type, performance, and specifications). Optionally, user information can be obtained by prompting the user to input information and / or through other channels (such as collecting the user's registered information).
[0056] The target data source can be an existing first data source, or a first data source determined based on a second data source; alternatively, the target data source may include both an existing first data source and a first data source determined based on a second data source. The second data source is a public domain data source formed from public domain data, and the first data source is a non-public domain data source formed from multiple data related to the user information.
[0057] Furthermore, the existing first domain data source can be, but is not limited to, a user's personal domain data source or private domain data source. Personal domain data sources include, but are not limited to, data sources formed by a user's personal data such as personal collections and historical transactions. Private domain data sources can be data sources formed by non-public domain data that can be shared only among users within a certain scope, such as data sources formed by a user's and their friends' collections and historical transactions, or data sources formed by data shared within a user's work group.
[0058] The second data source is a public domain data source, which is optional. Specifically, it can be a data source formed from the range of data that can be searched by various public search engines.
[0059] Optionally, in this embodiment of the application, determining the first data source based on the second data source can be further implemented as follows: combining the input request with user information as search conditions to search the second data source, and using the search results data as the first data source (i.e., the first data source determined based on the second data source).
[0060] For example, the original text data of the input request and user information can be used directly as search criteria, or keywords of the input request and user information can be used as search criteria. The second data source can be searched by the corresponding search engine based on semantic similarity to obtain multiple search results (such as multiple documents, literature, news messages, etc.), and these results can be used as the first data source determined based on the second data source.
[0061] This application embodiment constructs a first index dataset, which is a dataset created based on the index data corresponding to each piece of data in the user information and the target data source. Each piece of index data includes the keywords and / or semantic features of the corresponding user information, or includes the keywords and / or semantic features of the corresponding data in the target data source.
[0062] The first index dataset can be built in real time or pre-built, without restriction, depending on the actual needs. For example, if a user is using a personalized question-and-answer application or website based on a large language model for the first time, the first index dataset can be built in real time based on the user information and the target data source for the first question the user inputs into the model (input request). For subsequent questions input by the user, the already built first index dataset can be reused, without the need to build it in real time.
[0063] Optionally, the relationship between the user's input request and the user information can be the relationship between the keywords of the input request and the keywords of the user information. Specifically, it can be that there is overlap between the keywords of the input request and the keywords of the user information, or that there is no overlap.
[0064] Accordingly, in step 102, the input request can be segmented and keywords extracted to obtain the keywords of the input request. It is then determined whether the keywords of the input request overlap with the keywords of the user information. If there is overlap, the first index dataset is searched based on the overlapping keywords (referred to as "overlapping keywords") to obtain the first search result data. This first search result data is then identified as the first data in which the input request meets the relevant conditions with the user information in the requested result direction. It is easy to understand that each piece of data in the first search result data (first data) can include the data information of the corresponding piece of data in the target data source. Taking each piece of data in the target data source as a document as an example, it can specifically include the corresponding document, or a series of keywords and / or semantic features contained in the corresponding document.
[0065] When determining whether the keywords in the input request overlap with the keywords in the user information, the keywords in the user information can be obtained by performing real-time word segmentation and keyword extraction on the user information, or the user information keywords obtained in the first index dataset construction stage can be reused.
[0066] In one optional implementation, searching the first index dataset based on overlapping keywords between the input request and user information to obtain first search result data can mean directly using each piece of data that meets the keyword matching condition with the overlapping keywords and is searched from the first index dataset as the first search result data.
[0067] However, this is not the only option. In another alternative implementation, the first index dataset is searched based on overlapping keywords between the input request and user information to obtain the first search result data. Alternatively, each piece of data that meets the keyword matching condition with the overlapping keywords and is searched from the first index dataset based on the overlapping keywords can be used as intermediate search result data. On this basis, the semantic similarity between each piece of data in the intermediate search result data and the input request is determined based on the semantic features of the input request and the semantic features of each piece of data in the intermediate search result data. Each piece of data in the intermediate search result data whose semantic similarity with the input request meets the semantic similarity condition can be used as the first search result data.
[0068] In this implementation, optionally, the semantic features of each piece of data in the intermediate search results data and the semantic features of the input request can be converted into feature vectors. The semantic similarity between the two is represented by calculating the distance between the feature vectors corresponding to each piece of data in the intermediate search results data and the input request. The feature vector distance and semantic similarity are inversely correlated; the larger the feature vector distance, the lower the semantic similarity, and vice versa.
[0069] The keyword matching conditions mentioned above may include, but are not limited to, a matching degree with overlapping keywords reaching a preset matching degree value, or a matching degree with overlapping keywords being among the top N in a descending sequence of matching degrees. Similarly, the semantic matching conditions mentioned above may include, but are not limited to, a distance between the target feature vector and the input request feature vector being less than a set distance value, or a distance between the target feature vector and the input request feature vector being among the top N in an ascending sequence of distances (feature vector distances). Here, N is an integer greater than or equal to 1.
[0070] In both of the above conditions, the value of N can be the same or different, without restriction. Similarly, the keyword matching conditions involved in the two implementation methods for obtaining the first search result data can be the same or different, also without restriction.
[0071] Step 103: Generate a first prompt message based on the first data.
[0072] Optionally, the first data can be directly used as the first prompt information.
[0073] However, this is not the only option. The first set of data can also be processed accordingly, and the processed data can be used as the first prompt information. For example, synonym merging and stop word removal can be performed on the keywords in each data entry contained in the first set of data, and the keywords retained after processing can be used as the first prompt information.
[0074] Step 104: Send the input request and model prompt information to the target model, so that the target model can perform language processing on the input request based on the model prompt information to obtain the feedback result corresponding to the input request in the requested result direction; the model prompt information includes the first prompt information.
[0075] After receiving the initial prompt, model prompts can be further derived based on the initial prompt. The model prompts include at least the initial prompt. Then, the user's input request and the model prompts are input into the target model, which performs language processing on the input request based on the model prompts.
[0076] The first data is the data in the target data source that satisfies the relevant conditions of the input request in the direction of the requested result with the user information. Since it satisfies the relevant conditions with the user information, the first data can be used as the data of points of interest that the input request is interested in in the direction of the requested result in the target data source. The first prompt information generated based on the first data can be used as the prompt information of the points of interest of the input request in the direction of the requested result. It can characterize the user's points of interest in the direction of the requested result of the input request, thereby prompting the target model to prompt the user's points of interest. The prompted points of interest are specifically the user's points of interest in the direction of the requested result of the input request.
[0077] The target model can, based at least on the first prompt information in the model prompt information, perform language processing on the input request to obtain the feedback result corresponding to the input request in the direction of the requested result.
[0078] Optionally, the target model can perform the required language processing on the input request to obtain various optional feedback results corresponding to the input request in the direction of the requested result. Based at least on the user interest points indicated by the first prompt information in the model prompt information, it can filter out one or more feedback results corresponding to the user interest points from the various optional feedback results and output them, so as to obtain a satisfactory customized result for the user.
[0079] Taking a personalized question-and-answer scenario as an example, the large language model processes the user's input question to generate multiple possible answers. For instance, for the user's input question "What computers meet the xx function?", multiple possible answers are generated. Based on this, at least according to the user's interest point represented by the first prompt information in the model's prompt information, one or more answers corresponding to the user's interest point are selected from the possible answers and output. For example, from various computers that meet the xx function, one or more computers that correspond to the device size, model, processor model, etc. represented by the user's interest point (specifically, they can be the same as or similar to the device size, model, processor model, etc. represented by the user's interest point) are selected, and the selection result information is output as the answer to the user's question. Thus, the answer data of the user's question in the requested result direction is obtained, and this answer data includes the answer corresponding to the user's interest point.
[0080] In summary, the information processing method disclosed in this application, after obtaining a user's input request, determines at least the first data in the target data source that satisfies the relevant conditions between the input request and the user information in the direction of the requested result, based on the relationship between the input request and the user information. It then generates first prompt information based on the first data and sends the model prompt information, including the first prompt information, along with the user's input request to the target model. The target model then performs language processing on the input request based on the model prompt information. This allows the target model to obtain feedback results corresponding to the user's interest points in the direction of the requested result, based at least on the user's interest points indicated by the first prompt information, when performing language processing on the input request. Consequently, it enables the user to obtain satisfactory customized results, thereby improving the customization level of the model's output data and enhancing the model's processing performance.
[0081] In an alternative embodiment, see Figure 2 The information processing method flowchart shown in this application may further include the following processes:
[0082] Step 201: Based on the relationship between the input request and the user's user information, at least determine the second data in the target data source where the input request does not meet the relevant conditions with the user information in the direction of the requested result.
[0083] Optionally, as mentioned above, the relationship between the input request and the user information can be the relationship between the keywords of the input request and the keywords of the user information. Specifically, it can be that there is overlap between the keywords of the input request and the keywords of the user information, or that there is no overlap.
[0084] In this step, the keywords of the input request and the keywords of the user information are obtained, and it is determined whether there is any overlap between the keywords of the input request and the keywords of the user information. If there is no overlap, the first index dataset is searched based on the semantic features of the input request, and the search results are used as the second data. It is easy to understand that each piece of data in the second data can also include the data information of the corresponding piece of data in the target data source. Taking each piece of data in the target data source as a document as an example, it can specifically include the corresponding document, or a series of keywords and / or semantic features contained in the corresponding document.
[0085] More specifically, this step can determine the similarity between the semantic features contained in each data in the first index dataset and the semantic features of the input request, and then filter out each data in the first index dataset that meets the semantic similarity condition with the input request, as the search result of the first index dataset, that is, as the second data.
[0086] Optionally, the similarity between the two semantic features mentioned above (semantic similarity) can also be represented by the distance between the feature vectors of the two semantic features (feature vector distance). The feature vector distance and semantic similarity are inversely related. The larger the feature vector distance, the lower the semantic similarity. Conversely, the smaller the feature vector distance, the higher the semantic similarity.
[0087] The semantic similarity conditions mentioned above can be, but are not limited to, the distance between the input request feature vector and the feature vector being less than a set distance value, or the distance between the input request feature vector and the feature vector being among the top K in the ascending sequence of distances (feature vector distances). Here, K is an integer greater than or equal to 1.
[0088] Step 202: Generate a second prompt message based on the second data.
[0089] The model prompts also include second prompts. The first or second prompt can be empty or not, depending on the specific situation. The prompting method of the first prompt may be the same as or different from that of the second prompt.
[0090] When generating a second prompt message based on the second data, it can first be determined whether there is a portion of the second data containing keywords of user information. If so, a first sub-prompt message is generated based on the portion of the second data, and a second sub-prompt message is generated based on the data other than the portion of the second data in the second data. In this case, the second prompt message includes the first sub-prompt message and the second sub-prompt message.
[0091] Conversely, if the second data does not contain any second data with keywords containing user information, then the third sub-prompt information is generated directly based on the second data. In this case, the second prompt information includes the third sub-prompt information.
[0092] Specifically, when generating the first sub-prompt information based on the aforementioned portion of the second data, the portion of the second data can be directly used as the first sub-prompt information, or the portion of the second data can be processed accordingly, and the processing result can be used as the first sub-prompt information. For example, synonym merging and stop word removal can be performed on the keywords in each data entry contained in the portion of the second data, and the keywords retained after processing can be used as the first sub-prompt information. The generation methods for the second and third sub-prompt information are similar to those for the first sub-prompt information and will not be described in detail here.
[0093] The first sub-prompt message is displayed in the same way as the first prompt message, while the second and third sub-prompt messages are displayed in different ways than the first prompt message.
[0094] As mentioned above, the first prompt information can serve as a prompt for the user's interest points in the direction of the requested result. It can characterize the user's interest points in that direction, thus prompting the target model to identify the user's points of interest. Specifically, the prompted interest points are the user's points of interest in the direction of the requested result. Accordingly, the first prompt information can be presented to the target model by indicating the user's points of interest in the direction of the requested result.
[0095] The data upon which the first sub-prompt information is generated is a portion of the second data containing keywords related to user information. Since this portion of the second data contains keywords related to user information, it can also be used as the data of points of interest (POIs) in the direction of the requested result from the target data source. The first sub-prompt information generated based on this portion of the second data can also serve as POI prompts in the direction of the requested result, thus representing the user's POIs in that direction. Therefore, the first sub-prompt information uses the same prompting method as the first prompt information; both methods prompt the target model to indicate the user's POIs in the direction of the requested result.
[0096] The data upon which the second or third sub-prompt information is generated does not contain keywords related to user information. This data can be considered as not falling on the user's points of interest. Specifically, it refers to data in the target data source that does not fall on the user's points of interest in the direction of the requested result. Therefore, the generated second or third sub-prompt information can serve as known data prompts for the target data source in the direction of the requested result, indicating to the target model what data the target data source possesses beyond the user's points of interest in the direction of the requested result (although this data does not fall on the user's points of interest, it is still data within the data range determined from the user's personal / private domain or public domain based on the input request, and therefore has a certain correlation with the user). Thus, the prompting method of the second or third sub-prompt information differs from that of the first prompt information.
[0097] This application embodiment includes the second or third sub-hint information generated based on these data, along with the first sub-hint information representing the user's interest points, in the model hint information. The model hint information is then sent to the target model to provide hints. This allows the target model to not only know the user's interest points but also to know relevant data from the target data source in the direction of the requested result of the input request, in addition to the user's interest points. This facilitates the target model to perform more reasonable and comprehensive customized language processing on the input request.
[0098] For example, in personalized question-answering scenarios, if the target model, through language processing, learns that none of the available answers to the user's input question correspond to the user's interests, it can select the answer that corresponds to the known data hints (second or third sub-hints) from the available answers and output it. The output answer still offers a degree of customization for the user. It's easy to understand that when an answer corresponding to the user's interests exists among the available answers, the target model prioritizes outputting that answer; that is, the output answer must include at least one that corresponds to the user's interests. In practical applications, the output answer can include both answers corresponding to the user's interests and answers corresponding to the known data hints from the target data source. These answers all demonstrate a degree of customization for the user, allowing them to easily select a satisfactory customized result.
[0099] This embodiment, based on the relationship between the input request and user information, at least identifies second data in the target data source where the input request does not meet the relevant conditions with the user information in the direction of the requested result. Based on this second data, it generates first / second / third sub-hint information, etc., and includes these sub-hint information in the model hint information to prompt the target model. This allows the target model to not only know the user's points of interest but also data from the target data source in the direction of the requested result, facilitating more reasonable and comprehensive customized language processing of the input request. This further enhances the customization of the model's output data and improves the model's processing performance.
[0100] In an optional embodiment, step 201, based on the relationship between the input request and the user's user information, at least determines second data in the target data source where the input request does not meet the relevant conditions with the user information in the direction of the requested result, and may further include any one of the following processes:
[0101] 1) If the keywords of the input request overlap with the keywords of the user information, the first index dataset is searched based on the semantic features of the input request to obtain second search result data, and the second search result data is determined as the second data;
[0102] 2) Search the first index dataset based on the semantic features of the input request other than the overlapping keywords, and use the search results data as the second data.
[0103] If the keywords in the input request overlap with the keywords in the user information, this embodiment uses either implementation method 1) or 2) above to generate the second data.
[0104] In implementation method 1), the similarity between the semantic features of the input request and the semantic features contained in each piece of data in the first index dataset can be determined, and each piece of data in the first index dataset whose similarity with the semantic features of the input request meets the semantic similarity condition can be searched out as the second search result data.
[0105] The similarity between the two semantic features mentioned above (semantic similarity) can also be characterized by the distance between the feature vectors of these two semantic features (feature vector distance), where the feature vector distance is inversely correlated with semantic similarity.
[0106] The semantic similarity conditions mentioned above can also include, but are not limited to, the distance between the input request feature vector and the feature vector being less than a set distance value, or the distance between the input request feature vector and the feature vector being among the top K in the ascending sequence of distances (feature vector distances). Here, K is an integer greater than or equal to 1.
[0107] It is easy to understand that the semantic similarity conditions involved in different embodiments of this application can be set to the same or different conditions in practical applications. For example, in the semantic similarity conditions involved in different embodiments, topX (topK, topN, etc.) all use the same value of X and the same distance value (used as the feature vector distance threshold), or different values of X and different distance values are used.
[0108] In implementation method 2), the first index dataset is searched based on the semantic features of the input request other than the overlapping keywords. That is, the semantic features of the request information other than the overlapping keywords (overlapping keywords between the input request and the user information) in the input request are used as the search basis to search the first index dataset. The search method is the same as that in implementation method 1). The only difference between implementation method 1 and implementation method 2 is the different search basis. For details, please refer to the search method in implementation method 1). It will not be described in detail here.
[0109] When generating the second prompt information based on the second data in this embodiment, it can also be first determined whether there is a portion of the second data containing keywords of user information. If there is, a first sub-prompt information is generated based on the portion of the second data, and a second sub-prompt information is generated based on the data other than the portion of the second data in the second data. In this case, the second prompt information includes the first sub-prompt information and the second sub-prompt information.
[0110] Conversely, if the second data does not contain any second data with keywords containing user information, then the third sub-prompt information is generated directly based on the second data. In this case, the second prompt information includes the third sub-prompt information.
[0111] For a more detailed implementation process of generating the first sub-prompt information, the second sub-prompt information, or the third sub-prompt information based on the second data, please refer to the relevant description in the previous embodiment, which will not be repeated here.
[0112] The generated first sub-prompt message is in the same way as the first prompt message, while the second and third sub-prompt messages are in different ways from the first prompt message.
[0113] Subsequently, the generated second prompt information can be included together with the first prompt information generated above in the model prompt information and sent to the target model to provide prompts. Based on the model prompt information, the target model can not only know the user's points of interest, but also know the data of the target data source other than the user's points of interest in the direction of the result requested by the input request. This makes it easier for the target model to perform more reasonable and comprehensive customized language processing on the input request, further improving the customization of the model output data and improving the model's processing effect.
[0114] In an optional embodiment, when there is overlap between the keywords in the input request and the keywords in the user information, the information processing method disclosed in this application may further include the following processing before sending the input request and model prompt information to the target model:
[0115] The first prompt message and the first sub-prompt message are deduplicated.
[0116] Both the first prompt information and the first sub-prompt information can serve as prompts for points of interest in the direction of the requested result, representing the user's points of interest in the direction of the requested result. Therefore, there may be duplicate data between the two, such as duplicate keywords or semantic features. Based on this, in the case where the model prompt information contains both the first prompt information and the first sub-prompt information, this embodiment first performs deduplication processing on the first prompt information and the first sub-prompt information before sending the model prompt information to the target model.
[0117] Specifically, it can be determined whether there is duplicate data in the first prompt information and the first sub-prompt information. If duplicate data exists, it is deduplicated, and only one of the multiple duplicate data is retained. The deduplicated prompt information is included in the model prompt information and sent to the target model. The target model then performs customized language processing on the prompt point represented by the model prompt information based on the model prompt information, so that the target model can output customized feedback results to the user.
[0118] In cases where the keywords in the input request overlap with the keywords in the user information, this embodiment performs deduplication processing on the first prompt information and the first sub-prompt information before sending the input request and model prompt information to the target model. This simplifies the model prompt information, removes redundant data, reduces storage costs, and improves the data processing efficiency of the target model.
[0119] In an alternative embodiment, see Figure 3 The information processing method flowchart shown in this application further includes the following processes:
[0120] Step 105: If the feedback result of the target model does not meet the expected target, perform at least one round of the following processing: send the output feedback result of the target model to the input request to the target model at least once, so that the target model can update the feedback result of the input request based at least on the output feedback result.
[0121] The feedback result of the target model does not meet the expected goal, which may include, but is not limited to, the user continuing to make the same input request after the user has been provided with the feedback result corresponding to the input request, or the user giving feedback information indicating dissatisfaction with the feedback result of the target model. For example, if the user is not satisfied with the answer information generated by the large language model, after the model outputs the answer information for the user's question, the user will repeatedly ask the same question to the model again, or the user will directly give feedback information indicating dissatisfaction with the answer.
[0122] If the feedback from the target model does not meet the expected goals, one or more rounds of interaction can continue until the target model outputs a satisfactory feedback result for the user's input request. In each round of interaction, the target model's output feedback result for the input request is used as reference information to trigger the model to execute the input request processing flow again. This allows the target model to use the output feedback result as a reference, combined with the model prompts, to perform language processing on the input request and ultimately output a customized feedback result that satisfies the user.
[0123] The output feedback results of the target model to the input request can be all or part of the output feedback results of the target model to the input request, without any restriction.
[0124] Optionally, when users repeatedly submit the same input request or provide feedback on the model's results, they can further specify their dissatisfaction. For example, in repetitive questions or feedback on the output answers, users can mark aspects such as the required product's performance or size to indicate dissatisfaction. Thus, if the feedback does not meet the expected goals and one or more rounds of interaction with the target model continue, the target model's output feedback on the input request, along with the user's indication of dissatisfaction, can be provided as reference information to help the target model quickly output satisfactory feedback.
[0125] In this embodiment, if the feedback result of the target model does not meet the expected goal, one or more rounds of interaction with the target model can be continued. In each round of interaction, the target model's output feedback result to the input request is used as reference information. This can help the target model to quickly obtain a customized feedback result that satisfies the user as much as possible through further processing if it does not output a user-satisfied feedback result on the first attempt.
[0126] The following is an application example of the information processing method disclosed in this application.
[0127] This example, based on the method of this application, uses a Large Language Model (LLM) to output customized feedback results for a user's query request.
[0128] First, we introduce the information processing flow when the target data source is a user's personal domain data source (such as a personal domain knowledge base), in conjunction with [see also...]. Figure 4 The specific processing procedure is as follows:
[0129] Step 1: Obtain user information (user profile) by prompting the user to input information and / or by obtaining information through other channels.
[0130] Step 2: Extract keywords and semantic features from user information and user personal domain data (data in the personal domain knowledge base) to build a personal domain index database.
[0131] Step 3: The user sends a query request, and keywords and semantic features are extracted from the query request data.
[0132] Step 4: If the keywords in the query request overlap with the keywords in the user information (i.e., there is overlap), use the overlapping keywords as a filtering condition, and search the index database to obtain the top N data that are most similar to the overlapping keywords. These top N data are used as candidate interest points prompts.
[0133] Step 5: Use the semantic feature values of the query request as filtering conditions to search the personal domain index database and obtain the top K data.
[0134] In this step, regardless of whether the keywords in the query request overlap with the keywords in the user information, the semantic feature value of the query request is used as a filtering condition to search the personal domain index database.
[0135] Step 6: If some entries in the topK data obtained in Step 5 contain keywords related to user information, select the topM data from those entries that have the highest keyword matching degree with user information as the candidate points of interest (prompts).
[0136] Step 7: Send the data from Steps 4, 5, and 6 that is unrelated to the user information keywords as the knowledge base known data prompt to the LLM.
[0137] Step 8: Remove duplicates from the candidate interest point prompts obtained in steps 4 and 6, and send the deduplicated data as interest point prompts to the LLM.
[0138] LLM performs language processing on query requests based on the obtained interest prompts and known data prompts from the knowledge base, in order to obtain customized feedback information for the query requests.
[0139] Step 9: If the LLM does not achieve the expected goal, continue to interact with the LLM for one or more rounds. In each round of interaction, use the feedback results output by the LLM as reference data and repeat the LLM's language processing of the query request until the output feedback results achieve the expected goal, thereby obtaining customized feedback results that are more in line with the user information and can satisfy the user.
[0140] The processing flow when the target data source is a private domain data source (such as a user's private domain knowledge base) is similar to that of a personal domain data source. The only difference is that the index database is replaced with private domain data instead of personal domain data, and the model feedback results are related to the private domain data.
[0141] For public domain data, please refer to [link / reference]. Figure 4 Specifically, a query request can be combined with user information as search criteria to search public domain data through a search engine, and the search results (such as the various documents found) can be used as the target data source. Then, by performing word segmentation (document segmentation), keyword extraction, and semantic feature extraction on each piece of data in the target data source, an index database corresponding to the target data source can be constructed. Based on this, through a processing flow similar to that of the personal domain data source, language processing of the query request can be performed in LLM based on model prompts to obtain customized feedback results corresponding to the query request.
[0142] Corresponding to the above-described information processing method, this application also discloses an information processing apparatus, the composition of which is as follows: Figure 5 As shown, it includes at least:
[0143] Module 501 is used to obtain user input requests;
[0144] The first determining module 502 is used to determine, based on the relationship between the input request and the user's user information, at least one piece of data in the target data source in which the input request satisfies a related condition with the user information in the direction of the requested result; the target data source includes multiple pieces of data related to the user information;
[0145] The first generation module 503 is used to generate a first prompt message based on the first data;
[0146] The processing module 504 is used to send the input request and model prompt information to the target model, so that the target model performs language processing on the input request based on the model prompt information to obtain the feedback result corresponding to the input request in the requested result direction; the model prompt information includes the first prompt information.
[0147] In an optional embodiment, the above-mentioned apparatus further includes:
[0148] The second determining module is used to determine, based on the relationship between the input request and the user information, at least in the target data source, a second piece of data in which the input request does not meet the relevant conditions with the user information in the direction of the requested result;
[0149] The second generation module is used to generate a second prompt message based on the second data; the model prompt message also includes the second prompt message, and the prompting method of the first prompt message is the same as or different from the prompting method of the second prompt message.
[0150] In an optional implementation, the first determining module 502 is specifically used for:
[0151] If the keywords in the input request overlap with the keywords in the user information, the first index dataset is searched based on the overlapping keywords to obtain the first search result data, and the first search result data is determined as the first data.
[0152] The first index dataset is a dataset created based on the user information and the index data corresponding to each piece of data in the target data source.
[0153] In one optional implementation, the second determining module is specifically used for:
[0154] If the keywords in the input request do not overlap with the keywords in the user information, the first index dataset is searched based on the semantic features of the input request, and the search results data is used as the second data.
[0155] The first index dataset is a dataset created based on the user information and the index data corresponding to each piece of data in the target data source.
[0156] In an optional implementation, the second determining module is further configured to:
[0157] If the keywords in the input request overlap with the keywords in the user information, the first index dataset is searched based on the semantic features of the input request to obtain second search result data, and the second search result data is determined as the second data.
[0158] Alternatively, the first index dataset can be searched based on the semantic features of the input request other than the overlapping keywords, and the search results data can be used as the second data.
[0159] In one optional implementation, the second generation module is specifically used for:
[0160] If the second data contains a portion of the second data that includes keywords related to the user information, a first sub-prompt message is generated based on the portion of the second data, and a second sub-prompt message is generated based on the data other than the portion of the second data in the second data.
[0161] If the second data does not contain any part of the second data that includes the keyword of the user information, a third sub-prompt information is generated based on the second data; the second prompt information includes the first sub-prompt information and the second sub-prompt information, or includes the third sub-prompt information, wherein the first sub-prompt information has the same prompting method as the first prompt information, and the second sub-prompt information and the third sub-prompt information have different prompting methods from the first prompt information.
[0162] In an optional embodiment, the above-mentioned device further includes a deduplication module, which is used to deduplicatize the first prompt information and the first sub-prompt information before sending the input request and model prompt information to the target model when there are overlapping keywords between the keywords of the input request and the keywords of the user information.
[0163] In one optional implementation, the target data source is an existing first data source, or a first data source determined based on a second data source;
[0164] The second data source is a public domain data source formed from public domain data, while the first data source is a non-public domain data source formed from multiple data related to the user information.
[0165] In an optional embodiment, the above apparatus further includes a result adjustment module, used for:
[0166] If the feedback result does not meet the expected goal, at least one round of the following processing should be performed:
[0167] The target model shall at least send the output feedback result of the target model to the input request, so that the target model may update the feedback result of the input request based at least on the output feedback result.
[0168] This application also discloses an electronic device, the composition and structure of which are as follows: Figure 6 As shown, it includes at least:
[0169] Memory 10 is used to store the computer instruction set;
[0170] Computer instruction sets can be implemented in the form of computer programs.
[0171] The processor 20 is configured to implement the information processing method disclosed in any of the above method embodiments by executing a computer instruction set.
[0172] The processor 20 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices.
[0173] Electronic devices have a display device and / or have a display interface and can connect to an external display device.
[0174] Optionally, the electronic device may also include a camera assembly, and / or be connected to an external camera assembly.
[0175] In addition to these components, electronic devices may also include communication interfaces, communication buses, and other parts. Memory, processor, and communication interface communicate with each other through the communication bus.
[0176] Communication interfaces are used for communication between electronic devices and other devices. Communication buses can be Peripheral Component Interconnect (PCI) buses or Extended Industry Standard Architecture (EISA) buses, and can be categorized into address buses, data buses, control buses, etc.
[0177] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0178] For ease of description, the above systems or devices are described separately as various modules or units based on their functions. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware components.
[0179] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence or the part that makes a creative contribution, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0180] Finally, it should be noted that in this document, relational terms such as first, second, third, and fourth are used to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0181] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. An information processing method, comprising: Obtain user input requests; Based on the relationship between the input request and the user's user information, at least the first data in the target data source that satisfies the relevant conditions of the input request and the user information in the direction of the requested result is determined; wherein, if the keywords of the input request overlap with the keywords of the user information, the target data source is searched based on the overlapping keywords to obtain first search result data as the first data; the target data source includes multiple data related to the user information; A first prompt message is generated based on the first data; The input request and model prompt information are sent to the target model, so that the target model performs language processing on the input request based on the model prompt information to obtain the feedback result corresponding to the input request in the requested result direction; the model prompt information includes the first prompt information.
2. The information processing method according to claim 1 further includes: Based on the relationship between the input request and the user information, at least one second data in the target data source is determined in which the input request does not meet the relevant conditions with the user information in the direction of the requested result. A second prompt message is generated based on the second data; The model prompt information also includes the second prompt information, and the prompting method of the first prompt information may be the same as or different from the prompting method of the second prompt information.
3. The information processing method according to claim 2, wherein determining, based on the relationship between the input request and the user's user information, at least first data in the target data source in which the input request satisfies a relevant condition with the user information in the direction of the requested result, includes: If the keywords in the input request overlap with the keywords in the user information, the first index dataset is searched based on the overlapping keywords to obtain the first search result data; The first index dataset is a dataset created based on the user information and the index data corresponding to each piece of data in the target data source.
4. The information processing method according to claim 2, wherein determining, based on the relationship between the input request and the user information, at least in the target data source, second data in which the input request does not satisfy a relevant condition with the user information in the direction of the requested result, includes: If the keywords in the input request do not overlap with the keywords in the user information, the first index dataset is searched based on the semantic features of the input request, and the search results data is used as the second data. The first index dataset is a dataset created based on the user information and the index data corresponding to each piece of data in the target data source.
5. The information processing method according to claim 3, wherein the step of determining, based on the relationship between the input request and the user information, at least in the target data source, second data in which the input request does not satisfy the relevant condition with the user information in the direction of the requested result, further includes: If the keywords in the input request overlap with the keywords in the user information, the first index dataset is searched based on the semantic features of the input request to obtain second search result data as the second data; Alternatively, the first index dataset can be searched based on the semantic features of the input request other than the overlapping keywords, and the search results data can be used as the second data.
6. The information processing method according to claim 4 or 5, wherein generating the second prompt information based on the second data includes: If the second data contains a portion of the second data that includes keywords related to the user information, a first sub-prompt message is generated based on the portion of the second data, and a second sub-prompt message is generated based on the data other than the portion of the second data in the second data. If the second data does not contain any part of the second data that includes the keyword of the user information, a third sub-prompt information is generated based on the second data; the second prompt information includes the first sub-prompt information and the second sub-prompt information, or includes the third sub-prompt information, wherein the first sub-prompt information has the same prompting method as the first prompt information, and the second sub-prompt information and the third sub-prompt information have different prompting methods from the first prompt information.
7. The information processing method according to claim 6, wherein the keywords of the input request and the keywords of the user information overlap, further comprising, before sending the input request and model prompt information to the target model: The first prompt message and the first sub-prompt message are deduplicated.
8. The information processing method according to claim 1, wherein the target data source is an existing first data source, or a first data source determined based on a second data source; The second data source is a public domain data source formed from public domain data, while the first data source is a non-public domain data source formed from multiple data related to the user information.
9. The information processing method according to claim 1, further comprising: If the feedback result does not meet the expected goal, at least one round of the following processing should be performed: The target model shall at least send the output feedback result of the target model to the input request, so that the target model may update the feedback result of the input request based at least on the output feedback result.
10. An information processing apparatus, comprising: The acquisition module is used to obtain user input requests; The first determining module is used to determine, based on the relationship between the input request and the user's user information, at least one first data in the target data source in which the input request and the user information satisfy relevant conditions in the direction of the requested result; wherein, if the keywords of the input request overlap with the keywords of the user information, the target data source is searched based on the overlapping keywords to obtain first search result data as the first data; the target data source includes multiple data related to the user information; The first generation module is used to generate a first prompt message based on the first data; The processing module is used to send the input request and model prompt information to the target model, so that the target model performs language processing on the input request based on the model prompt information to obtain the feedback result corresponding to the input request in the requested result direction; the model prompt information includes the first prompt information.
Citation Information
Patent Citations
Method for obtaining user feature data, and server
CN107798037A
information prompting method and a terminal device
CN109522706A