Information processing method, device, computer equipment and storage medium
By performing intent recognition and pre-operation verification when the large language model processes user needs, it ensures that the intent and operation results are reasonable, solves the error problem caused by model illusion, and improves the accuracy of the processing process.
Patent Information
- Application Number
- CN202410255822.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-06
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-03-06
AI Technical Summary
When large language models process user needs, the final results are incorrect due to model illusion and cannot effectively meet user needs. How to improve the accuracy of the processing process has become a challenge.
By receiving user demand information, using large language models to generate work plans, and performing intent identification and pre-operation verification before executing operations, ensuring that the intent and operation results meet reasonable conditions before subsequent operations are performed to avoid errors caused by model illusions. .
It improves the accuracy of the final results of the large language model when processing user needs, ensures that subsequent operations are only performed when the intention and operation results are reasonable, and avoids errors caused by unreasonable results of pre-operations.
Smart Images

Figure CN117993381B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and in particular to an information processing method, apparatus, computer equipment and storage medium. Background Art
[0002] At present, large language models (LLM) are used in the process of processing user needs, such as the process of processing user refund needs, to replace some work of customer service personnel and save labor costs. In the related art, the large language model generates a workflow for the information indicating the user's needs based on the received information indicating the user's needs. The workflow for the information indicating the user's needs includes all operations for the information indicating the user's needs, and the operations for the information indicating the user's needs are performed in sequence. However, the large language model sometimes causes the final result obtained after all operations in the execution workflow are completed due to model hallucinations, which is wrong and cannot meet the user's needs. How to improve the accuracy of the final result obtained when using a large language model to process user needs has become a problem that needs to be solved. Summary of the invention
[0003] In view of this, embodiments of the present disclosure provide an information processing method, apparatus, computer device, and storage medium.
[0004] In a first aspect, an embodiment of the present disclosure provides an information processing method, the method comprising:
[0005] receiving demand information of a target user, wherein the demand information indicates the demand of the target user;
[0006] Using a large language model, based on the demand information, a work plan corresponding to the demand information is generated, wherein the work plan corresponding to the demand information indicates a plurality of operations with a sequence for the demand information;
[0007] Using the large language model, executing each of the following target operations in the multiple operations: performing intent recognition and pre-operation on the demand information, determining whether the intent recognized by the intent recognition satisfies the intent reasonableness condition, and determining whether the pre-operation result obtained by the pre-operation satisfies the result reasonableness condition corresponding to the pre-operation result;
[0008] When it is determined that the identified intention satisfies the intention rationality condition and it is determined that the result of the preceding operation satisfies the result rationality condition corresponding to the result of the preceding operation, at least some of the subsequent operations in the multiple operations are executed, wherein the subsequent operations are operations in the multiple operations other than each target operation, and the position of each target operation in the sequence is before the position of the subsequent operation in the sequence.
[0009] In a second aspect, an embodiment of the present disclosure provides an information processing device, the device comprising:
[0010] A receiving unit, configured to receive demand information of a target user, wherein the demand information indicates the demand of the target user;
[0011] A generating unit, configured to generate a work plan corresponding to the demand information according to the demand information by using a large language model, wherein the work plan corresponding to the demand information indicates a plurality of operations in a sequence for the demand information;
[0012] A first execution unit is used to use the large language model to execute each of the following target operations in the multiple operations: performing intent recognition and pre-operation on the demand information, determining whether the intent recognized by the intent recognition satisfies the intent reasonableness condition, and determining whether the pre-operation result obtained by the pre-operation satisfies the result reasonableness condition corresponding to the pre-operation result;
[0013] A second execution unit is used to execute at least part of the subsequent operations among the multiple operations when it is determined that the identified intention satisfies the intention rationality condition and it is determined that the previous operation result satisfies the result rationality condition corresponding to the previous operation result, wherein the subsequent operation is an operation among the multiple operations except each target operation, and the position of each target operation in the sequence is before the position of the subsequent operation in the sequence.
[0014] In a third aspect, an embodiment of the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding implementation manner thereof.
[0016] The information processing method provided by the disclosed embodiment judges whether the recognized intention is reasonable and whether the result of the preceding operation is reasonable when using a large language model to process the user's needs, that is, determines whether the recognized intention satisfies the reasonable intention condition and determines whether the preceding operation result satisfies the reasonable result condition corresponding to the preceding operation result. If the recognized intention satisfies the reasonable intention condition and determines that the preceding operation result satisfies the reasonable result condition corresponding to the preceding operation result, it can be determined that the recognized intention is reasonable and the preceding operation result is reasonable. Subsequent operations can be performed only when the intention and the preceding operation result are reasonable, avoiding the unreasonable operation result of the operation at the front position due to the model hallucination, resulting in the wrong operation result of the subsequent operation that depends on the operation result of the operation at the front position, and resulting in the wrong final result. Improve the accuracy of the final result obtained when using a large language model to process the user's needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 is a flowchart of an information processing method provided by an embodiment of the present disclosure;
[0019] Figure 2 is a flowchart of another information processing method provided by an embodiment of the present disclosure;
[0020] Figure 3 is a flowchart of an example of an information processing method provided by an embodiment of the present disclosure;
[0021] Figure 4 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0023] refer to Figure 1, which shows an example flow chart of the information processing method provided by an embodiment of the present disclosure.
[0024] In step S101, demand information of a target user is received.
[0025] The target user's demand information indicates the target user's demand.
[0026] In the embodiment of the present disclosure, the target user may be any user who can interact using the method provided by the embodiment of the present disclosure.
[0027] The target user's demand information may be generated by the target user's operation on the user's page of the application when the user uses the application running on the user's terminal. The system that executes the method provided by the embodiment of the present disclosure may receive the target user's demand information from the terminal used by the user. The system that executes the method provided by the embodiment of the present disclosure includes a large language model.
[0028] As an example, a user desires to refund a commodity purchased using an e-commerce application. The user enters information indicating that the user needs a refund, such as "I want a refund" in a page in the e-commerce application that interacts with the user, or clicks a button indicating a refund in a page in the e-commerce application that interacts with the user, and demand information indicating that a refund is needed is generated for the target user. The terminal running the e-commerce application sends the demand information of the target user to the system that executes the information processing method provided by the embodiment of the present disclosure.
[0029] In step S102, a large language model is used to generate a work plan corresponding to the target user's demand information according to the target user's demand information.
[0030] The work plan corresponding to the target user's demand information indicates a plurality of operations in sequence for the target user's demand information.
[0031] As an example, the target user's demand information indicates that a refund is required, "I want a refund", and the large language model determines that the multiple operations indicated by the work plan include: performing intent recognition on the target user's demand information, obtaining an order number, determining whether the intent identified by the intent recognition satisfies the reasonable intent condition and determining whether the obtained order number satisfies the reasonable result condition corresponding to the obtained order number, generating a code for obtaining detailed information of the order to which the order number belongs when it is determined that the identified intent satisfies the reasonable intent condition and the obtained order number satisfies the reasonable result condition corresponding to the obtained order number, obtaining detailed information of the order to which the order number belongs, the user confirms whether the form including the detailed information of the order to which the obtained order number belongs is correct, generating a code for calling the express delivery system API to express the form including the detailed information of the order to which the obtained order number belongs after the user confirms that the form including the detailed information of the order to which the obtained order number belongs is correct, express the form including the detailed information of the order to which the obtained order number belongs, the courier obtains the goods involved in the refund, transports the goods involved in the refund to the merchant, and updates the database. Updating the database includes adding the return information corresponding to the obtained order number to the database, and updating the status corresponding to the obtained order number recorded in the database to a successful refund.
[0032] In the embodiment of the present disclosure, some of the multiple operations indicated by the work plan corresponding to the target user's demand information can be performed by the large language model.
[0033] Each of the partial operations of the multiple operations indicated by the work plan corresponding to the target user's demand information can be executed by the agent of the large language model. The large language model can work in Multi-Agent mode. The agent of the large language model can autonomously execute chain calls and access external tools. Multiple agents of the large language model share a part of the memory, autonomously divide the work and cooperate with each other.
[0034] For example, the large language model can be used to identify the target user's demand information, obtain the order number, determine whether the intent identified by the intent identification satisfies the reasonable conditions of the intent and whether the obtained order number satisfies the reasonable conditions of the result corresponding to the obtained order number, and generate code for obtaining detailed information of the order to which the order number belongs when it is determined that the identified intent satisfies the reasonable conditions of the intent and the obtained order number satisfies the reasonable conditions of the result corresponding to the obtained order number. Operations such as the courier obtaining the goods involved in the refund and transporting the goods involved in the refund to the merchant are performed by the corresponding executor.
[0035] In step S103, the large language model is used to execute each of the following target operations among the multiple operations indicated by the work plan corresponding to the target user's demand information: performing intent recognition and pre-operation on the demand information, determining whether the intent identified by the intent recognition satisfies intention reasonable conditions, and determining whether the pre-operation result obtained by the pre-operation satisfies the result reasonable conditions corresponding to the pre-operation result.
[0036] Among them, performing intention recognition, pre-operation on the demand information, determining whether the intention recognized by the intention recognition meets the reasonable conditions of the intention, and determining whether the pre-operation result obtained by the pre-operation meets the reasonable conditions of the result corresponding to the pre-operation result are the first three operations in the order indicated by the work plan corresponding to the demand information of the target user.
[0037] The work plan corresponding to the target user's demand information indicates the sequential execution of the three operations of performing intention recognition on the demand information, pre-operation, determining whether the intention identified by the intention recognition satisfies the reasonable conditions of the intention, and determining whether the pre-operation result obtained by the pre-operation satisfies the reasonable conditions of the result corresponding to the pre-operation result. First, the demand information is subjected to intention recognition, and then the pre-operation is performed, and then it is determined whether the intention identified by the intention recognition satisfies the reasonable conditions of the intention and whether the pre-operation result obtained by the pre-operation satisfies the reasonable conditions of the result corresponding to the pre-operation result.
[0038] As an example, the target user's demand information is "I want a refund" indicating that a refund is needed. The large language model determines that multiple operations indicated by the work plan include: performing intent recognition on the target user's demand information, obtaining an order number, determining whether the intent identified through the intent recognition satisfies the reasonable conditions of the intent and determining whether the obtained order number satisfies the reasonable conditions of the result corresponding to the obtained order number, generating code for obtaining detailed information of the order to which the order number belongs when it is determined that the identified intent satisfies the reasonable conditions of the intent and that the obtained order number satisfies the reasonable conditions of the result corresponding to the obtained order number, obtaining the detailed information of the order to which the order number belongs, user confirmation whether the form including the detailed information of the order to which the obtained order number belongs is correct, generating code for calling the API of the express system to place an express order on the form including the detailed information of the order to which the obtained order number belongs after the user confirms that the form including the detailed information of the order to which the obtained order number belongs is correct, placing an express order on the form including the detailed information of the order to which the obtained order number belongs, the courier obtains the goods involved in the refund, transports the goods involved in the refund to the merchant, and updates the database. Updating the database includes adding the return information corresponding to the acquired order number into the database, and updating the status corresponding to the acquired order number recorded in the database to a successful refund.
[0039] In this example, the target operations include identifying the intention of the target user's demand information, obtaining the order number, determining whether the intention identified by the intention identification satisfies the reasonable conditions of the intention, and determining whether the obtained order number satisfies the reasonable conditions of the result corresponding to the obtained order number. Among them, obtaining the order number is a pre-operation, and the obtained order number is the pre-operation result.
[0040] In this example, the sequence of work plan instructions corresponding to the target user's demand information indicates that three target operations are first performed: identifying the intention of the target user's demand information, obtaining the order number, determining whether the intention identified through the intention identification meets the reasonable conditions of the intention, and determining whether the obtained order number meets the reasonable conditions of the result corresponding to the obtained order number.
[0041] In the embodiment of the present disclosure, the reasonable intention condition is a condition for judging whether the recognized intention is reasonable. The reasonable result condition corresponding to the pre-operation result is a condition for judging whether the pre-operation result is reasonable.
[0042] The identified intent indicates the operation that the target user expects to perform through the application. The target user enters the target user's demand information in this application. Whether the identified intent is reasonable can be measured based on whether the expected operation indicated by the identified intent is the operation that the user may expect to perform through the application when the user uses this application. To this end, multiple operations that the user may expect to perform through the application when the user uses this application can be pre-set. The reasonableness condition of the intent can be: whether the expected operation indicated by the identified intent is a pre-set operation that the user may expect to perform through the application when the user uses this application.
[0043] As an example, a user expects to refund an item purchased using an e-commerce application. The target user's demand information is "I want a refund" indicating that a refund is needed. If the identified user's intention is a refund, and multiple operations that the user may expect to perform through the application when the user uses this e-commerce application are pre-set, including a refund operation, then the identified intention meets the reasonable intention condition, and the identified intention is reasonable. If the identified user's intention is a tax refund, and this e-commerce application does not have a tax refund function, and a tax refund is not an operation that the user may expect to perform through the application when the user uses this e-commerce application, then the identified intention does not meet the reasonable intention condition, and the identified intention is unreasonable.
[0044] In the embodiment of the present disclosure, whether the result of the pre-operation is reasonable can be measured according to whether the target user has the authority to view the information including the result of the pre-operation and whether the format of the result of the pre-operation is one of multiple preset formats. The result reasonable condition corresponding to the result of the pre-operation can be: the target user has the authority to view the information including the result of the pre-operation and the format of the result of the pre-operation is one of multiple preset formats.
[0045] In step S104, when it is determined that the identified intention meets the intention rationality condition and the previous operation result meets the result rationality condition corresponding to the previous operation result, at least part of the subsequent operations among the multiple operations indicated by the work plan corresponding to the target user's demand information are executed.
[0046] Among them, the subsequent operations are operations among the multiple operations except each target operation, and the position of each target operation in the order indicated by the work plan corresponding to the target user's demand information is before the position of any subsequent operation in the order.
[0047] At least some of the subsequent operations among the multiple operations indicated by the work plan corresponding to the target user's demand information are executed sequentially in this order.
[0048] The sequence of work plan instructions corresponding to the target user's demand information first sequentially executes the three target operations of intention recognition, pre-operation, determining whether the intention identified by the intention recognition meets the reasonable conditions of the intention, and determining whether the pre-operation result obtained by the pre-operation meets the reasonable conditions of the result corresponding to the pre-operation result.
[0049] As an example, the target user's demand information indicates that a refund is required, "I want a refund", and the large language model determines that the multiple operations indicated by the work plan include: performing intent recognition on the target user's demand information, obtaining an order number, determining whether the intent identified by the intent recognition satisfies the reasonable intent condition and determining whether the obtained order number satisfies the reasonable result condition corresponding to the obtained order number, generating a code for obtaining detailed information of the order to which the order number belongs when it is determined that the identified intent satisfies the reasonable intent condition and the obtained order number satisfies the reasonable result condition corresponding to the obtained order number, obtaining detailed information of the order to which the order number belongs, the user confirms whether the form including the detailed information of the order to which the obtained order number belongs is correct, generating a code for calling the express delivery system API to express the form including the detailed information of the order to which the obtained order number belongs after the user confirms that the form including the detailed information of the order to which the obtained order number belongs is correct, express the form including the detailed information of the order to which the obtained order number belongs, the courier obtains the goods involved in the refund, transports the goods involved in the refund to the merchant, and updates the database. Updating the database includes adding the return information corresponding to the obtained order number to the database, and updating the status corresponding to the obtained order number recorded in the database to a successful refund.
[0050] In this example, the target operations include identifying the intention of the target user's demand information, obtaining the order number, determining whether the intention identified by the intention identification satisfies the reasonable conditions of the intention, and determining whether the obtained order number satisfies the reasonable conditions of the result corresponding to the obtained order number. Obtaining the order number is a pre-operation, and the obtained order number is the result of the pre-operation.
[0051] In this example, the sequence of work plan instructions corresponding to the target user's demand information indicates that three target operations are first performed: identifying the intention of the target user's demand information, obtaining the order number, determining whether the intention identified through the intention identification meets the reasonable conditions of the intention, and determining whether the obtained order number meets the reasonable conditions of the result corresponding to the obtained order number.
[0052] In this example, when it is determined that the identified intention meets the reasonable intention condition and it is determined that the obtained order number meets the reasonable result condition corresponding to the obtained order number, a code for obtaining the detailed information of the order to which the order number belongs is generated. In this example, after the code for obtaining the detailed information of the order to which the order number belongs is generated, the detailed information of the order to which the order number belongs can be obtained. After obtaining the detailed information of the order to which the order number belongs, the user can confirm whether the form including the detailed information of the order to which the obtained order number belongs is correct. After the user confirms that the form including the detailed information of the order to which the obtained order number belongs is correct, a code for calling the API of the express delivery system to express the form including the detailed information of the order to which the obtained order number belongs can be generated. After the code for calling the API of the express delivery system to express the form including the detailed information of the order to which the obtained order number belongs is generated, the code for calling the API of the express delivery system to express the form including the detailed information of the order to which the obtained order number belongs is executed to express the form including the detailed information of the order to which the obtained order number belongs. After the form including the detailed information of the order to which the obtained order number belongs is expressly ordered, the courier obtains the goods involved in the refund. After the courier obtains the goods involved in the refund, the goods involved in the refund are transported to the merchant. After the goods involved in the refund are transported to the merchant, the database is updated. Updating the database includes adding the return information corresponding to the obtained order number to the database and updating the status corresponding to the obtained order number recorded in the database to a successful refund.
[0053] In an embodiment of the present disclosure, before executing the information processing method provided by the embodiment of the present disclosure, the large language model is trained using the training data of the large language model. The training data of a large language model includes demand information for training and a plurality of operations in sequence that are pre-labeled and can successfully meet the requirements indicated by the demand information for training. By training the large language model using the training data, after completing the training of the large language model, the large language model can learn which operations should be generated for the requirements indicated by the demand information for training, including a work plan for the requirements indicated by the demand information for training. The work plan including the plurality of operations in sequence that are pre-labeled and can successfully meet the requirements indicated by the demand information for training can be understood as a work plan that the large language model should generate for the requirements indicated by the demand information for training.
[0054] refer to Figure 2 , which shows a flow chart of another information processing method provided by an embodiment of the present disclosure.
[0055] In step S201, demand information of a target user is received.
[0056] The process parameters of step S201 are the same as those of step S101.
[0057] In step S202, a large language model is used to generate a work plan corresponding to the target user's demand information according to the target user's demand information.
[0058] The process parameters of step S202 are the same as those of step S102.
[0059] In step S203, the large language model is used to execute each of the following target operations among the multiple operations indicated by the work plan corresponding to the target user's demand information: performing intent recognition and pre-operation on the demand information, determining whether the intent identified by the intent recognition satisfies intention reasonable conditions, and determining whether the pre-operation result obtained by the pre-operation satisfies result reasonable conditions corresponding to the pre-operation result.
[0060] The process parameters of step S203 are the same as those of step S103.
[0061] In step S204, when it is determined that the identified intention satisfies the reasonable conditions of intention and it is determined that the result of the preceding operation satisfies the reasonable conditions of the result corresponding to the result of the preceding operation, at least some of the subsequent operations among the multiple operations indicated by the work plan corresponding to the demand information of the target user are executed, wherein, after executing the first subsequent operation and before executing the second subsequent operation corresponding to the first subsequent operation, it is determined whether the code of the second subsequent operation generated by the first subsequent operation is legal; when it is determined that the code of the second subsequent operation is legal, the code of the second subsequent operation is executed to execute the second subsequent operation.
[0062] The first subsequent operation is an operation for generating a code among the multiple operations. The second subsequent operation corresponding to the first subsequent operation is the next operation of the first subsequent operation indicated in the sequence.
[0063] The first subsequent operation may be performed by an agent of the large language model.
[0064] For a subsequent operation among the multiple operations, if the subsequent operation is used to generate code and there is a next operation of the subsequent operation indicated by the sequence, then the subsequent operation can be used as a first subsequent operation.
[0065] In the disclosed embodiment, it is considered that if the code generated when using a large language model to perform a processing process for user needs is illegal, the system interacting with the user with the large language model will be unsafe. When it is determined that the code of the second subsequent operation is legal, the code of the second subsequent operation is executed to perform the second subsequent operation, which can avoid the situation where the code of the second subsequent operation is executed when the code of the second subsequent operation is illegal, causing the system interacting with the user with the large language model to be unsafe.
[0066] As an example, the target user's demand information indicates that a refund is required, "I want a refund", and the large language model determines that the work plan indicates multiple operations including: performing intent recognition on the target user's demand information, obtaining an order number, determining whether the intent identified by the intent recognition satisfies reasonable intent conditions and whether the obtained order number satisfies reasonable result conditions corresponding to the obtained order number, generating a code for obtaining detailed information of the order to which the order number belongs when it is determined that the identified intent satisfies reasonable intent conditions and that the obtained order number satisfies reasonable result conditions corresponding to the obtained order number, determining whether the code for generating detailed information of the order to which the order number belongs is legal, and obtaining detailed information of the order to which the order number belongs when it is determined that the code for generating detailed information of the order to which the order number belongs is legal. The user confirms whether the form including the detailed information of the order to which the acquired order number belongs is correct, after the user confirms that the form including the detailed information of the order to which the acquired order number belongs is correct, a code is generated for calling the API of the express delivery system to place an express order on the form including the detailed information of the order to which the acquired order number belongs, and whether the code for calling the API of the express delivery system to place an express order on the form including the detailed information of the order to which the acquired order number belongs is legal, and when it is determined that the code for calling the API of the express delivery system to place an express order on the form including the detailed information of the order to which the acquired order number belongs is legal, the express order is placed on the form including the detailed information of the order to which the acquired order number belongs, and the courier obtains the goods involved in the refund, transports the goods involved in the refund to the merchant, and updates the database. Updating the database includes adding the return information corresponding to the acquired order number to the database, and updating the status corresponding to the acquired order number recorded in the database to a successful refund.
[0067] In this example, generating code for obtaining detailed information of the order to which the order number belongs and generating code for calling the API of the express delivery system to express order a form including the details of the order to which the order number belongs are both first subsequent operations. The second subsequent operation corresponding to the code for generating detailed information of the order to which the order number belongs is to obtain the details of the order to which the order number belongs, and execute the code for obtaining the details of the order to which the order number belongs, thereby obtaining the details of the order to which the order number belongs. The second subsequent operation corresponding to the code for generating code for calling the API of the express delivery system to express order a form including the details of the order to which the order number belongs is to express order a form including the details of the order to which the order number belongs, and execute the code for calling the API of the express delivery system to express order a form including the details of the order to which the order number belongs, thereby express ordering a form including the details of the order to which the order number belongs.
[0068] In the disclosed embodiment, any means of detecting whether the code is legal can be used to detect whether the generated code is legal. When the generated code is detected to be illegal by at least one means of detecting whether the code is legal, the code is determined to be illegal. When the detection results of each detection means indicate that the code is legal, the generated code is determined to be legal.
[0069] As an example, it is detected whether the generated code satisfies at least one of the following items: the code is used to modify data in the data source, the code is used to delete data from the data source, the code is used to send confidential data to the external network, and the code is used to save confidential data locally. If yes, it is determined that the code is illegal. If no, it is determined that the code is legal.
[0070] In an embodiment of the present disclosure, determining whether a code for a second subsequent operation generated by a first subsequent operation and corresponding to the first subsequent operation is legal includes: performing at least one of a plurality of tests on a code for a second subsequent operation generated by the first subsequent operation and corresponding to the first subsequent operation, the plurality of tests including: detecting whether the code is used to modify data in a data source, detecting whether the code is used to delete data from a data source, detecting whether the code complies with preset grammatical rules, detecting whether the code is used to send confidential data to an external network, and detecting whether the code is used to save confidential data locally; when the test results of each test performed indicate that the code is legal, determining that the code is legal; when the test result of at least one test performed indicates that the code is illegal, determining that the code is illegal.
[0071] Wherein, when it is detected that the code is used to modify the data in the data source, the detection result of detecting whether the code is used to modify the data in the data source indicates that the code is illegal. When it is detected that the code is not used to modify the data in the data source, the detection result of detecting whether the code is used to modify the data in the data source indicates that the code is legal.
[0072] When it is detected that the code is used to delete data from the data source, the detection result of the detection of whether the code is used to delete data from the data source indicates that the code is illegal. When it is detected that the code is not used to delete data from the data source, the detection result of the detection of whether the code is used to delete data from the data source indicates that the code is legal.
[0073] When the code is detected to comply with the preset grammatical rules, the detection result of detecting whether the code complies with the preset grammatical rules indicates that the code is legal. When the code is detected to comply with the preset grammatical rules, the detection result of detecting whether the code complies with the preset grammatical rules indicates that the code is illegal.
[0074] When it is detected that the code is used to send confidential data to the external network, the detection result of detecting whether the code is used to send confidential data to the external network indicates that the code is illegal. When it is detected that the code is not used to send confidential data to the external network, the detection result of detecting whether the code is used to send confidential data to the external network indicates that the code is legal.
[0075] When it is detected that the code is used to save the confidential data locally, the detection result of detecting whether the code is used to save the confidential data locally indicates that the code is illegal. When it is detected that the code is not used to save the confidential data locally, the detection result of detecting whether the code is used to save the confidential data locally indicates that the code is legal.
[0076] In an embodiment of the present disclosure, when it is determined that the code of the second subsequent operation corresponding to the first subsequent operation is illegal, a preset code corresponding to the second subsequent operation may be executed, and the preset code corresponding to the second subsequent operation is predetermined to be legal.
[0077] In an embodiment of the present disclosure, in order to improve the accuracy of the work plan produced by the large language model, multiple first training data can be obtained. After the large model is launched, the first training data can be obtained from the log data that records the data generated during the interaction between the large model and the user. The first training data includes: demand information indicating the user's needs received during the completed processing of successfully meeting the user's needs using the large language model, and a work plan generated by the large language model to meet the needs indicated by the received demand information during the completed processing of successfully meeting the user's needs using the large language model; the large language model is fine-tuned using multiple first training data.
[0078] In an embodiment of the present disclosure, in order to improve the accuracy of the code generated by the large language model, multiple second training data can be obtained. After the large model is online, the second training data can be obtained from the log data that records the data generated during the interaction between the large model and the user. The second training data includes: demand information indicating the user's needs received during the completed processing of successfully meeting the user's needs using the large language model, and the code generated by the large language model during the completed processing of successfully meeting the user's needs using the large language model; the large language model is fine-tuned using multiple second training data. In addition, user privacy information can be removed from the code and a general code pattern can be summarized. The large language model is fine-tuned using the general code pattern and the received demand information indicating the user's needs.
[0079] refer to Figure 3 , which shows a flowchart of an example of an information processing method provided by an embodiment of the present disclosure.
[0080] In this example, the target user wants to apply for a refund for the goods purchased by the target user using an e-commerce application. The e-commerce application used by the target user sends a demand information indicating the target user's demand "I want a refund" to the large language model inference service. The large language model inference service interacts with the user through the large language model. The large language model simultaneously performs intent recognition and order number extraction on the target user's demand information, that is, obtains the order number. Checkpoint 1 can be an agent of the large language model. Checkpoint 1 checks whether the identified intent is reasonable and whether the obtained order number is reasonable. If it is found that the identified intent is unreasonable and / or the obtained order number is unreasonable, the check fails, and step 3a is performed to send a failure message to the target user. If it is found that the identified intent is reasonable and / or the obtained order number is reasonable, the check succeeds and step 3b is continued. The agent of the large language model used to generate code generates code for querying detailed information of unfinished orders. This code for querying detailed information of unfinished orders refers to the code for detailed information of the order to which the obtained order number belongs. Checkpoint 2 can be an agent of the large language model. Checkpoint 2 checks the legality of the code for querying the detailed information of the unfinished order. After confirming that the code for querying the detailed information of the unfinished order is legal, step 5a is performed to execute the code for querying the detailed information of the unfinished order to query the detailed information of the unfinished order. If the code for querying the detailed information of the unfinished order is illegal, step 5b can be performed to re-execute the intention recognition and code generation process. After step 5a, the user confirms the refund order including the detailed information of the unfinished order. After the user confirms the refund order, the agent of the large language model for generating the code for calling the API of the express system for express delivery order generates the code for calling the API of the express system. Checkpoint 3 can be the agent of the large language model. Checkpoint 3 performs a legality check on the generated code for calling the API of the express system. If the API of the express system is illegal, the preset code for calling the API of the express system for express delivery order is used to call the API of the express system to place an express order for the refund order. The courier picks up the goods involved in the refund and transports the goods involved in the refund to the merchant. The merchant receives the goods involved in the refund and conducts quality inspection. The database will be updated after the quality inspection is qualified. After the database is updated, the information of successful refund is pushed to the Agent of the large language model responsible for notifying the user, and the Agent of the large language model responsible for notifying the user informs the user of the result, that is, the successful refund.
[0081] The embodiments of the present disclosure provide an information processing device. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "unit" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0082] The information processing device comprises:
[0083] A receiving unit, configured to receive demand information of a target user, wherein the demand information indicates the demand of the target user;
[0084] A generating unit, configured to generate a work plan corresponding to the demand information according to the demand information by using a large language model, wherein the work plan corresponding to the demand information indicates a plurality of operations in a sequence for the demand information;
[0085] A first execution unit is used to use the large language model to execute each of the following target operations in the multiple operations: performing intent recognition and pre-operation on the demand information, determining whether the intent recognized by the intent recognition satisfies the intent reasonableness condition, and determining whether the pre-operation result obtained by the pre-operation satisfies the result reasonableness condition corresponding to the pre-operation result;
[0086] A second execution unit is used to execute at least part of the subsequent operations among the multiple operations when it is determined that the identified intention satisfies the intention rationality condition and it is determined that the previous operation result satisfies the result rationality condition corresponding to the previous operation result, wherein the subsequent operation is an operation among the multiple operations except each target operation, and the position of each target operation in the sequence is before the position of the subsequent operation in the sequence.
[0087] In an optional embodiment, the second execution unit is also used to determine whether the code of the second subsequent operation generated by the first subsequent operation is legal after executing the first subsequent operation and before executing the second subsequent operation corresponding to the first subsequent operation, the first subsequent operation being an operation used to generate the code among the multiple operations, and the second subsequent operation corresponding to the first subsequent operation is the next operation of the first subsequent operation indicated by the sequence; when it is determined that the code of the second subsequent operation is legal, the code of the second subsequent operation is executed to execute the second subsequent operation.
[0088] In an optional implementation, the information processing device further includes:
[0089] The third execution unit is configured to execute a preset code corresponding to the second subsequent operation when it is determined that the code of the second subsequent operation is illegal, where the preset code corresponding to the second subsequent operation is a code that is predetermined to be legal.
[0090] In an optional implementation, the first subsequent operation is performed by an agent of the large language model.
[0091] In an optional embodiment, the second execution unit is further used to perform at least one of multiple tests on the code of the second subsequent operation generated by the first subsequent operation, and the multiple tests include: detecting whether the code is used to modify data in the data source, detecting whether the code is used to delete data from the data source, detecting whether the code complies with preset grammatical rules, detecting whether the code is used to send confidential data to an external network, and detecting whether the code is used to save confidential data locally; when the test results of each test performed indicate that the code is legal, the code is determined to be legal; when the test result of at least one test performed indicates that the code is illegal, the code is determined to be illegal.
[0092] In an optional implementation, the information processing device further includes:
[0093] A first fine-tuning unit is used to obtain multiple first training data, the first training data including: demand information indicating user needs received during the process of successfully meeting user needs using the large language model, and a work plan generated by the large language model to meet the needs indicated by the received demand information during the process of successfully meeting user needs using the large language model; and fine-tune the large language model using the multiple first training data.
[0094] In an optional implementation, the information processing device further includes:
[0095] A second fine-tuning unit is used to obtain a plurality of second training data, the second training data including: demand information indicating user needs received during the completed processing of successfully meeting user needs using the large language model, and code generated by the large language model during the completed processing of successfully meeting user needs using the large language model; and fine-tune the large language model using the plurality of second training data.
[0096] In this embodiment, the device is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and a memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0097] The further functional description of each of the above units is the same as that of the above corresponding embodiments and will not be repeated here.
[0098] refer to Figure 4 , which shows a schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).
[0099] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0100] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0101] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0102] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0103] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means.
[0104] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0105] The present disclosure also provides a computer-readable storage medium. The above method according to the embodiment of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk, or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented. Although the embodiments of the present disclosure are described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. An information processing method, characterized in that: The method comprises: receiving demand information of a target user, wherein the demand information indicates the demand of the target user; Using a large language model, based on the demand information, a work plan corresponding to the demand information is generated, wherein the work plan corresponding to the demand information indicates a plurality of operations with a sequence for the demand information; Using the large language model, executing each of the following target operations in the multiple operations: performing intent recognition and pre-operation on the demand information, determining whether the intent recognized by the intent recognition satisfies the intent reasonableness condition, and determining whether the pre-operation result obtained by the pre-operation satisfies the result reasonableness condition corresponding to the pre-operation result; When it is determined that the identified intention satisfies the reasonable intention condition and it is determined that the result of the preceding operation satisfies the reasonable result condition corresponding to the result of the preceding operation, at least some of the subsequent operations among the multiple operations are executed, wherein the subsequent operations are operations among the multiple operations other than each target operation, and the position of each target operation in the sequence is before the position of the subsequent operation in the sequence, and executing at least some of the subsequent operations among the multiple operations includes: after executing a first subsequent operation and before executing a second subsequent operation corresponding to the first subsequent operation, determining whether the code of the second subsequent operation generated by the first subsequent operation is legal, the first subsequent operation being an operation among the multiple operations for generating code, and the second subsequent operation corresponding to the first subsequent operation being the next operation of the first subsequent operation indicated by the sequence; when it is determined that the code of the second subsequent operation is legal, executing the code of the second subsequent operation to execute the second subsequent operation.
2. The method according to claim 1, characterized in that The method further comprises: When it is determined that the code of the second subsequent operation is illegal, a preset code corresponding to the second subsequent operation is executed, where the preset code corresponding to the second subsequent operation is a code that is predetermined to be legal.
3. The method according to claim 1, characterized in that: The first subsequent operation is performed by an agent of the large language model.
4. The method according to claim 1, characterized in that Determining whether the code of the second subsequent operation generated by the first subsequent operation is legal includes: Perform at least one of multiple tests on the code of the second subsequent operation generated by the first subsequent operation, the multiple tests including: detecting whether the code is used to modify data in the data source, detecting whether the code is used to delete data from the data source, detecting whether the code complies with preset grammatical rules, detecting whether the code is used to send confidential data to an external network, and detecting whether the code is used to save confidential data locally; When the detection result of each detection performed indicates that the code is legal, determining that the code is legal; When a detection result of at least one detection performed indicates that the code is illegal, it is determined that the code is illegal.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Acquire a plurality of first training data, the first training data comprising: demand information indicating user demand received during a completed process of successfully satisfying the user demand using the large language model, and a work plan generated by the large language model to satisfy the demand indicated by the received demand information during a completed process of successfully satisfying the user demand using the large language model; The large language model is fine-tuned using a plurality of first training data.
6. The method according to claim 5, characterized in that The method further comprises: Acquire a plurality of second training data, the second training data comprising: demand information indicating the user's demand received in the process of successfully satisfying the user's demand using the large language model, The code generated by the large language model in the process of successfully meeting the needs of the user using the large language model has been completed; The large language model is fine-tuned using a plurality of second training data.
7. An information processing device, characterized in that: The device comprises: A receiving unit, configured to receive demand information of a target user, wherein the demand information indicates the demand of the target user; A generating unit, configured to generate a work plan corresponding to the demand information according to the demand information by using a large language model, wherein the work plan corresponding to the demand information indicates a plurality of operations in a sequence for the demand information; A first execution unit is used to use the large language model to execute each of the following target operations in the multiple operations: performing intent recognition and pre-operation on the demand information, determining whether the intent recognized by the intent recognition satisfies the intent reasonableness condition, and determining whether the pre-operation result obtained by the pre-operation satisfies the result reasonableness condition corresponding to the pre-operation result; The second execution unit is used to execute at least part of the subsequent operations among the multiple operations when it is determined that the identified intention satisfies the reasonable intention condition and the result of the preceding operation satisfies the reasonable result condition corresponding to the result of the preceding operation, wherein the subsequent operation is an operation among the multiple operations except for each target operation, and the position of each target operation in the sequence is before the position of the subsequent operation in the sequence. The second execution unit is also used to determine whether the code of the second subsequent operation generated by the first subsequent operation is legal after executing the first subsequent operation and before executing the second subsequent operation corresponding to the first subsequent operation, the first subsequent operation is an operation among the multiple operations for generating code, and the second subsequent operation corresponding to the first subsequent operation is the next operation of the first subsequent operation indicated by the sequence; when it is determined that the code of the second subsequent operation is legal, the code of the second subsequent operation is executed to execute the second subsequent operation.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 6.
