Large model adjustment method, question-answering processing method and device based on large model technology

By automatically generating reference questions and tool call requests, the problem of manual reliance on obtaining large model training samples is solved, which improves efficiency and enhances the adaptability of large models.

CN119357351BActive Publication Date: 2025-09-19BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411348065.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2025-09-19
Estimated Expiration
2044-09-25

AI Technical Summary

Technical Problem

Existing technologies rely heavily on manual intervention when obtaining large model training samples, resulting in low efficiency.

Method used

The first model generates reference questions, the second model generates tool call requests, and after the request successfully calls the target tool, training samples are generated. The entire process does not require human intervention.

Benefits of technology

It improves the efficiency of obtaining training samples, reduces human intervention, lowers the error rate, and enhances the flexibility and adaptability of large models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357351B_ABST
    Figure CN119357351B_ABST
Patent Text Reader

Abstract

The present disclosure provides a large-scale model adjustment method, a question-answering processing method and device based on large-scale model technology, which relate to the field of artificial intelligence, and in particular to technical fields such as large-scale models, natural language processing, and deep learning, and can be used in application fields such as generative search, intelligent assistants, and intelligent customer service. The specific implementation scheme is as follows: based on the description information of the target tool, a first large-scale model is used to generate a reference question, and the reference question requires the target tool to generate a corresponding reply in the question-answering dialogue; based on the reference question, a second large-scale model is used to generate a tool call request for the target tool; when the tool call request successfully calls the target tool, a training sample for training the third large-scale model is generated based on the tool call request and the corresponding reference question.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, specifically to technical fields such as big models, natural language processing, and deep learning. It can be used in application fields such as generative search, intelligent assistants, and intelligent customer service, and in particular relates to a big model adjustment method, a question-answering processing method and device based on big model technology. Background Art

[0002] While large language models (LLMs) have demonstrated impressive performance across a wide range of application scenarios in recent years, their tooling capabilities still need improvement. To improve these capabilities, related technologies have proposed acquiring training samples for targeted training of large models. However, these techniques rely heavily on manual intervention to obtain training samples, resulting in low efficiency. Summary of the Invention

[0003] The present disclosure provides a large model adjustment method, a question-answering processing method and a device based on large model technology.

[0004] According to a first aspect of the present disclosure, a method for obtaining training samples of a large model is provided, comprising: generating a reference question using a first large model based on description information of a target tool, wherein the reference question requires calling the target tool to generate a corresponding reply in a question-and-answer dialogue; generating a tool call request for the target tool using a second large model based on the reference question; and generating training samples for training a third large model based on the tool call request and the corresponding reference question when the tool call request successfully calls the target tool.

[0005] According to a second aspect of the present disclosure, a large model adjustment method is provided, comprising: obtaining training samples of the large model, wherein the training samples are obtained based on the large model training sample acquisition method described in the first aspect; and adjusting model parameters of the large model based on the training samples.

[0006] According to the third aspect of the present disclosure, a question-answering processing method based on big model technology is provided, including: obtaining a question to be answered; inputting the question into a big model to obtain a reply output by the big model to the question, wherein the big model is obtained based on the big model adjustment method described in the second aspect.

[0007] According to a fourth aspect of the present disclosure, a training sample acquisition device for a large model is provided, comprising: a first generation module for generating a reference question using a first large model according to description information of a target tool, wherein the reference question requires calling the target tool to generate a corresponding reply in a question-and-answer dialogue; a second generation module for generating a tool call request for the target tool using a second large model according to the reference question; and a third generation module for generating a training sample for training the third large model according to the tool call request and the corresponding reference question, when the tool call request successfully calls the target tool.

[0008] According to the fifth aspect of the present disclosure, a large model adjustment device is provided, including: a sample acquisition module for acquiring training samples of the large model, where the training samples are obtained based on the large model training sample acquisition method described in the first aspect; and an adjustment module for adjusting model parameters of the large model based on the training samples.

[0009] According to the sixth aspect of the present disclosure, a question-answering processing device based on a big model technology is provided, including: a question acquisition module for acquiring questions to be answered; a reply module for inputting the questions into a big model to obtain replies output by the big model for the questions, wherein the big model is obtained based on the big model adjustment method described in the second aspect.

[0010] According to a seventh aspect of the present disclosure, there is provided an electronic device, including:

[0011] at least one processor; and

[0012] a memory communicatively connected to the at least one processor; wherein,

[0013] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the training sample acquisition method of the large model as described in the first aspect, or execute the large model adjustment method as described in the second aspect, or execute the question and answer processing method based on the large model technology as described in the third aspect.

[0014] According to the eighth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the large model training sample acquisition method as described in the first aspect, or to execute the large model adjustment method as described in the second aspect, or to execute the question and answer processing method based on the large model technology as described in the third aspect.

[0015] According to the ninth aspect of the present disclosure, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the method for acquiring training samples of the large model as described in the first aspect, or implement the method for adjusting the large model as described in the second aspect, or implement the steps of the question-and-answer processing method based on the large model technology as described in the third aspect.

[0016] The present disclosure provides a large model adjustment method, a question-answering processing method and a device based on large model technology, which have the following beneficial effects:

[0017] Based on the description information of the target tool, a first model is used to generate reference questions. The reference questions require the target tool to generate corresponding responses in the question-and-answer dialogue; based on the reference questions, a second model is used to generate a tool call request for the target tool; when the tool call request successfully calls the target tool, training samples for training the third model are generated based on the tool call request and the corresponding reference questions. The present disclosure uses the first model to automatically generate reference questions based on the description information of the target tool, and uses the second model to automatically generate tool call requests based on the reference questions, and then automatically generates training samples based on the tool call requests and the corresponding reference questions. The entire process does not require human intervention, which improves the efficiency of obtaining training samples.

[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are used to better understand the present invention and do not constitute a limitation of the present invention.

[0020] Figure 1 1 is a flow chart of a method for obtaining training samples for a large model according to an embodiment of the present disclosure;

[0021] Figure 2 is a flowchart of a method for obtaining training samples for a large model provided in accordance with another embodiment of the present disclosure;

[0022] Figure 3 is a flowchart of a method for obtaining training samples for a large model provided in accordance with another embodiment of the present disclosure;

[0023] Figure 4 is a flowchart of a method for obtaining training samples for a large model provided in accordance with another embodiment of the present disclosure;

[0024] Figure 5 is a flowchart of a large model adjustment method provided according to an embodiment of the present disclosure;

[0025] Figure 6 1 is a flowchart of a question-answering processing method based on a large model technology according to an embodiment of the present disclosure;

[0026] Figure 7 A schematic structural diagram of a large model training sample acquisition device according to an embodiment of the present disclosure;

[0027] Figure 8 It is a flow chart of a large model adjustment device provided according to an embodiment of the present disclosure;

[0028] Figure 9 This is a flow chart of a question-answering processing device based on a large model technology according to an embodiment of the present disclosure;

[0029] Figure 10 It is a block diagram of an electronic device used to implement the large model training sample acquisition method or large model adjustment method or large model technology-based question and answer processing method of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0031] In the technical solutions disclosed herein, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, comply with relevant laws and regulations, and do not violate public order and good morals.

[0032] In order to improve the tool calling capabilities of large models, related technologies propose training methods based on standard fine-tuning (SFT) or training methods based on preset prompts (Prompt) to conduct targeted training on large models. However, the SFT-based training method requires manual labeling of the data set, and the Prompt-based training method requires manual design of prompts to construct training samples. Both methods are overly dependent on manual operations, resulting in low efficiency in obtaining training samples.

[0033] Therefore, in order to improve the efficiency of obtaining training samples, the embodiments of the present disclosure propose a large model adjustment method, a question-answering processing method and device based on large model technology.

[0034] The following describes the large model adjustment method, the question and answer processing method and device based on the large model technology according to the embodiments of the present disclosure with reference to the accompanying drawings.

[0035] It should be noted that the execution subject of the large model training sample acquisition method of this embodiment is the large model training sample acquisition device, and the execution subject of the large model adjustment method is the large model adjustment device. The large model training sample acquisition device or the large model adjustment device can be implemented by software and / or hardware, and can be configured in an electronic device, which may include but is not limited to a terminal, a server, etc.

[0036] Figure 1 It is a flowchart of a method for obtaining training samples for a large model provided according to an embodiment of the present disclosure.

[0037] like Figure 1 As shown, the training sample acquisition method of the large model includes:

[0038] Step 101: Based on the description information of the target tool, a first model is used to generate reference questions. The reference questions require the target tool to generate corresponding responses in the question-answering dialogue.

[0039] The target tool may refer to any tool that can be called by the large model, such as a weather query tool or a search tool. The description information of the target tool may include information such as the tool identifier, tool function description information, and tool parameter description information. It should be noted that the tool identifier may refer to the tool name.

[0040] The reference questions generated using the first model may refer to questions that require invoking the target tool when generating corresponding responses to the reference questions. It should be noted that the reference questions may refer to questions based on natural language expressions, and the number of reference questions generated using the first model may be one or more.

[0041] For example, if the target tool is a weather query tool, the reference questions can be "Tell me the weather in city A tomorrow", "I plan to travel to city B next week. Can you help me check the weather in city B for the next ten days?" and "I want to know the weather in city C for the next three days. Do you have any suggestions?"

[0042] Step 102: Generate a tool call request for the target tool using the second largest model according to the reference question.

[0043] The second largest model and the first largest model may refer to the same large model or different large models.

[0044] The tool call request may include the target tool's tool identifier and tool input parameters. For example, if the target tool is a weather query tool and the reference question is "Tell me tomorrow's weather in city A," the tool call request would be [tool identifier: get_city_weather, tool input parameters: {"city": A, "date_range": 1}].

[0045] Step 103 : When the tool call request successfully calls the target tool, a training sample for training the third model is generated according to the tool call request and the corresponding reference question.

[0046] The third largest model, the first largest model, and the second largest model may refer to the same large model or different large models. It should be noted that if the third largest model, the first largest model, and the second largest model refer to the same large model, then the large model is a pre-trained model. After obtaining the training samples, the large model can be fine-tuned based on the training samples.

[0047] The training samples include tool call requests and corresponding reference questions.

[0048] It should be noted that if the tool call request fails to successfully call the target tool, it means that the generated tool call request may be inaccurate, and inaccurate training samples will affect the training effect of the large model. Based on this, in order to ensure the training effect of the large model, the present disclosure generates training samples based on the tool call request that successfully calls the target tool and the corresponding reference questions.

[0049] In an embodiment of the present disclosure, a first model is used to generate reference questions based on the description information of the target tool. The reference questions require the target tool to be called to generate corresponding replies in a question-and-answer dialogue; a second model is used to generate a tool call request for the target tool based on the reference questions; and when the tool call request successfully calls the target tool, training samples for training the third model are generated based on the tool call request and the corresponding reference questions. The present disclosure uses the first model to automatically generate reference questions based on the description information of the target tool, and uses the second model to automatically generate tool call requests based on the reference questions, and then automatically generates training samples based on the tool call requests and the corresponding reference questions. The entire process does not require manual intervention, thereby improving the efficiency of obtaining training samples.

[0050] Figure 2 It is a flowchart of a method for obtaining training samples for a large model provided in accordance with another embodiment of the present disclosure.

[0051] like Figure 2 As shown, the training sample acquisition method of the large model includes:

[0052] Step 201: Generate a reference question using the first large model according to the description information of the target tool.

[0053] Step 202: Obtain a first prompt template, wherein the first prompt template is used to prompt the second large model to generate a tool call request based on the question.

[0054] The first prompt template includes instructions for generating a tool call request based on a task, a question example, and a tool call request example.

[0055] Exemplarily, the first prompt template may be:

[0056] In all subsequent conversations, you can use external tools to answer questions. If you need to use an external tool, you must generate a tool call request in the following format. The tool call request consists of only two lines and does not need to output any explanation or other irrelevant content:

[0057] Tool ID / Action: The name of the tool used

[0058] Action Input: Parameters used by the tool, in json format

[0059] If you do not need to use external tools, then there is no need to output Action and Action Input, just output your answer directly.

[0060] Here is an example:

[0061] Question: Tell me the weather in city A tomorrow.

[0062] Tool call request: Action: get_city_weather

[0063] Action Input: {"city": "A", "date_range": 1}

[0064] In addition to prompting the second largest model to generate a tool call request based on the question, the first prompt template can also be used to prompt the second largest model to generate a reply to the question based on the tool processing result.

[0065] Exemplarily, the first prompt template may be:

[0066] In all subsequent conversations, you can use external tools to answer questions. If you need to use an external tool, you must generate a tool call request in the following format. The tool call request consists of only two lines and does not need to output any explanation or other irrelevant content:

[0067] Tool ID / Action: The name of the tool used

[0068] Action Input: Parameters used by the tool, in json format

[0069] In addition, when you obtain the tool processing results based on the tool call request, you can determine whether you need to use other tools further based on the tool processing results, or give your response based on the tool processing results.

[0070] If you do not need to use external tools, you do not need to output Action and Action Input, just output your answer directly.

[0071] Here is an example:

[0072] Question: Tell me the weather in city A tomorrow.

[0073] Tool call request: Action: get_city_weather

[0074] Action Input: {"city": A, "date_range": 1}

[0075] Tool processing results: "date": 2023-10-11, "weather": cloudy, "high": 26, "low": 17

[0076] Reply: The weather in city A tomorrow will be cloudy, with a maximum temperature of 26℃ and a minimum temperature of 17℃.

[0077] Step 203: Fill the reference question into the first prompt template to obtain a first prompt word.

[0078] Filling the reference question into the first prompt template may refer to replacing the question example in the first prompt template with the reference question to obtain the first prompt word, or may refer to filling the reference question into the set question slot in the first prompt template to obtain the first prompt word.

[0079] Step 204: Input the first prompt word into the second largest model to obtain a tool call request of the target tool output by the second largest model.

[0080] The first prompt word is input into the second largest model so that the second largest model outputs a corresponding tool call request for the reference question.

[0081] Step 205 : When the tool call request successfully calls the target tool, a training sample for training the third model is generated according to the tool call request and the corresponding reference question.

[0082] Among them, when the first prompt template is also used to prompt the second largest model to generate a response to the question based on the tool processing result, the response output by the second largest model for the reference question can be obtained; and a training sample is generated based on the reference question, the corresponding tool call request and the response.

[0083] It should be noted that, for the explanation of step 201 and step 205, reference can be made to the relevant description in any embodiment of the present disclosure, and no further details are given here.

[0084] In an embodiment of the present disclosure, a first prompt template is obtained, wherein the first prompt template is used to prompt the second largest model to generate a tool call request based on a question; a reference question is filled into the first prompt template to obtain a first prompt word; the first prompt word is input into the second largest model to obtain a tool call request for the target tool output by the second largest model. Through the first prompt template, the first prompt word corresponding to the reference question can be quickly generated, improving the efficiency of obtaining the prompt word; in addition, the versatility and scalability of the first prompt template enable the present disclosure to adapt to a wider range of question types; in addition, based on the guidance of the first prompt word, the second largest model can generate the tool call request corresponding to the reference question more quickly, which not only improves the efficiency of obtaining training samples, but also avoids human intervention and reduces the error rate in the training sample generation process.

[0085] Figure 3 It is a flowchart of a method for obtaining training samples for a large model provided in accordance with another embodiment of the present disclosure.

[0086] like Figure 3 As shown, the training sample acquisition method of the large model includes:

[0087] Step 301: Generate a reference question using the first large model based on the description information of the target tool.

[0088] Step 302: Generate a tool call request for a target tool using the second largest model according to the reference question.

[0089] Step 303 : When the tool call request successfully calls the target tool, a training sample for training the third model is generated according to the tool call request and the corresponding reference question.

[0090] Step 304: When there are multiple target tools, the fourth model is used to combine the reference questions corresponding to the target tools to obtain a compound question, wherein the compound question requires calling at least two target tools to generate corresponding replies in the question-and-answer dialogue.

[0091] Among them, the fourth largest model, the first largest model, the second largest model, and the third largest model may refer to the same large model or different large models.

[0092] In one possible implementation, the fourth model can be used to combine questions based on the tool category corresponding to the target tool and reference questions, so that the combined compound question needs to call at least two target tools to generate corresponding responses in the question-and-answer dialogue.

[0093] It should be noted that the present disclosure only describes the situation where a compound question requires calling at least two target tools to generate corresponding replies in a question-and-answer dialogue. In actual application, the reference questions can also be randomly combined. In this case, the compound question obtained needs to call one or at least two target tools to generate corresponding replies in the question-and-answer dialogue.

[0094] In one possible implementation, the reference questions corresponding to each of the target tools can be combined to obtain a composite question in the following manner: obtaining a second prompt template, wherein the second prompt template is used to prompt the fourth model to combine the questions; filling the reference questions corresponding to each target tool into the second prompt template to obtain a second prompt word; inputting the second prompt word into the fourth model to obtain the composite question output by the fourth model.

[0095] The second prompt template may include instructions for combining questions to obtain a compound question, question examples, and compound question examples.

[0096] Exemplarily, the second prompt template may be:

[0097] Your task is to combine the five simple questions to get two compound questions. The combination rules are as follows:

[0098] 1. The input is a json (object notation) array containing N strings, representing N simple questions.

[0099] 2. The output is also a JSON array containing two objects, representing two compound questions. The object has three fields: source1, source2, and result. Source1 and source2 need to be obtained from the input array, and source1 and source2 are combined to generate result.

[0100] 3. You can add details / background as appropriate, and the combined compound question needs to be as coherent as possible.

[0101] Here is an example:

[0102] Example 1:

[0103] Input array: ["Tell me what are the most popular movies of 2021", "Please provide an abstract for a paper on machine learning", "Can you help me find recent news in Italy?", "What is the relative strength index of company D's stock symbol from January 1, 2022 to December 31, 2022?", "What are the recent football matches?"]

[0104] Output array: [{"source1":"What is the relative strength index of company D's stock symbol from January 1, 2022, to December 31, 2022?","source2":"Please provide an abstract of a paper on machine learning.","result":"I am researching stocks and machine learning. Please tell me the relative strength index of company D's stock symbol from January 1, 2022, to December 31, 2022, and give me an abstract of a paper on machine learning that processes stock data."},{"source1":"Tell me what are the most popular movies in 2021.","source2":"Can you help me find some recent news in Italy?","result":"I want to know what are the most popular movies in 2021. Also, please help me find some recent news in Italy."}]

[0105] Example 2:

[0106] Input array: ["Tell me the weather in City A tomorrow.", "How is the air quality in City A?", "I'm going to City B today and want to know what the weather in City B will be like in the next few days.", "Is there any news in City B recently?", "Please tell me what the weather in City C will be like in the next week?"]

[0107] Output array: [{"source1":"I'm going to City B today and would like to know what the weather will be like in City B in the next few days.","source2":"Is there any news about City B recently?","result":"I'm going to City B today. Please tell me the weather forecast for City B in the next few days and provide some recent news about City B so that I can better understand the local situation."}, {"source1":"How is the air quality in City A?","source2":"Please tell me what the weather will be like in City C in the next week?","result":"I'd like to know the air quality in City A and please provide the weather forecast for City C in the next week so that I can make relevant arrangements."}].

[0108] It should be noted that, in the above example, there are two weather query tools corresponding to City A and City C.

[0109] The second prompt template contains instructions or examples that guide the fourth model in understanding how to combine multiple independent questions into a more complex question. By filling the second prompt template with reference questions corresponding to each target tool, the fourth model receives a more complete and structured input, namely the second prompt word, which helps the fourth model generate more reasonable and accurate compound questions. In addition, the present disclosure automatically assigns the task of question combination to the large model, reducing the manual burden and improving the efficiency of question combination.

[0110] In a possible implementation, candidate reference questions for the target tool corresponding to the target tool that is successfully called by the screening tool call request are selected from the reference questions corresponding to each target tool; the candidate reference questions are filled into the second prompt template to obtain a second prompt word.

[0111] Since the tool call request generated by the second largest model is not necessarily accurate, the tool call based on the tool call request will most likely fail. Therefore, in order to ensure the quality of the training samples, improve the training effect of the large model, and reduce the occurrence rate of large model call failure, the present disclosure first screens the reference questions and the corresponding tool call requests, and retains the tool call requests that have successfully been called and the corresponding reference questions for question combination.

[0112] Step 305: Generate tool call requests for at least two target tools using the fifth model according to the complex problem.

[0113] Among them, the fifth largest model, the first largest model, the second largest model, the third largest model, and the fourth largest model may refer to the same large model or different large models.

[0114] Among them, the compound question can be filled into the first prompt template to obtain the fourth prompt word, and the fourth prompt word can be input into the fifth model to obtain the tool call request of at least two target tools output by the fifth model.

[0115] Step 306 : When the tool call request successfully calls at least two target tools, a training sample for training the sixth model is generated according to the tool call request and the corresponding composite question.

[0116] Among them, the sixth largest model, the first largest model, the second largest model, the third largest model, the fourth largest model, and the fifth largest model may refer to the same large model or different large models.

[0117] It should be noted that after large-scale question combinations, there will be a certain number of compound questions in the generated training samples, corresponding to at least two target tools with a certain calling order. Training the large model based on these compound questions can enable the large model to learn and generalize the ability to autonomously decompose problems and autonomously plan the tool calling order, thereby improving the large model's multi-tool calling capabilities, enhancing the large model's flexibility and adaptability, and enabling the large model to perform more complex dialogue tasks.

[0118] It should be noted that, for the explanation of steps 301 to 303 , reference can be made to the relevant description in any embodiment of the present disclosure, and no further details are given here.

[0119] In an embodiment of the present disclosure, when there are multiple target tools, the fourth model is used to combine the reference questions corresponding to each target tool to obtain a compound question, wherein the compound question requires calling at least two target tools to generate a corresponding reply in a question-and-answer dialogue; based on the compound question, the fifth model is used to generate a tool call request for at least two target tools; when the tool call request successfully calls at least two target tools, a training sample for training the sixth model is generated based on the tool call request and the corresponding compound question. Compound questions can be used to improve the multi-tool calling capability of the large model in a single-round dialogue. The present disclosure can automatically generate compound questions that require calling at least two target tools to generate corresponding replies in a question-and-answer dialogue based on the large model, which is highly efficient and enriches the training samples of the large model.

[0120] Figure 4 It is a flowchart of a method for obtaining training samples for a large model provided in accordance with another embodiment of the present disclosure.

[0121] like Figure 4 As shown, the training sample acquisition method of the large model includes:

[0122] Step 401: Acquire initial information obtained by collecting information on a target tool.

[0123] The initial information may refer to the original information obtained by collecting information about the target tool, and may include tool identification, initial function description information, tool input parameters, tool calling uniform resource locator (URL), calling method and other information.

[0124] It should be noted that the initial information directly collected corresponds to a language category. For example, the language category corresponding to the initial information may be Chinese, English, or the like.

[0125] Step 402 : If the language category of the initial information is not the target language category, the initial information is converted into a language based on the target language category to obtain description information of the target tool.

[0126] The target language category is related to the main language environment of the large model. For example, if the main language environment of the large model is Chinese, the target language category is the Chinese category.

[0127] The language category of the initial information is different from the main language environment of the large model, which makes it difficult for the large model to understand the information. Therefore, when the language category of the initial information is not the target language category, language conversion of the initial information can enable the first large model to understand and process the information more accurately.

[0128] In one possible implementation, the initial information is converted into a language based on a target language category to obtain target information, which includes initial functional description information of the target tool; the initial functional description information is expanded to obtain target functional description information; and based on the target functional description information, description information of the target tool is obtained.

[0129] Usually, the initial functional description information collected is relatively short and not easy for the model to understand. Therefore, expanding the initial functional description information can not only help the large model capture the key points of information more accurately and improve the understanding and processing capabilities of the large model, but also guide the large model to generate more specific and targeted reference questions.

[0130] Step 403: Obtain a third prompt template, wherein the third prompt template is used to prompt the first large model to generate questions that require calling the tool to generate corresponding responses in the question-and-answer dialogue based on the description information of the tool.

[0131] The third prompt template may include instructions for generating relevant questions based on the description information of the tool, description information examples, and question examples.

[0132] Exemplarily, the third prompt template may be:

[0133] Your task is to generate 5 relevant requests described in natural language for a given interface, according to the following rules:

[0134] 1. The tool description information consists of the tool identifier, function description information, and tool input parameters. The tool input parameters are a JSON object that conforms to the JSON schema format.

[0135] 2. The generated questions need to contain parameters described in natural language as much as possible.

[0136] 3. The generated questions must be in natural language format, while maintaining diversity and complexity, and be as colloquial and close to real humans as possible.

[0137] 4. When the tool input parameters require a field like an identity document (ID), please include the randomly generated ID in the generated questions.

[0138] 5. The generated request is a JSON array containing five strings, corresponding to the five questions. Please generate the JSON array directly without generating irrelevant explanations or other information.

[0139] Here is an example:

[0140] Example 1:

[0141] Description of the tool:

[0142] Tool ID: baidu_search

[0143] Function description information: Baidu Search is a general search engine that can be used to access the Internet, query encyclopedia knowledge, understand what is happening, etc.

[0144] Tool input parameters: {{"type":"object","properties":{{"json":{{"properties":{{"query":{{"type":"string","description":"Search for a keyword or phrase."}}}},"type":"object"}}}}}}

[0145] Generated questions: ["Introduce some must-read books for introductory economics", "Where is the highest peak in the world?", "Compare the two movies "The Wandering Earth 2" and "Avatar 2", "What news is there in City A and City B today?", "What news is there about the 2023 Asian Games? Please write a news report in the style of App E"]

[0146] Example 2:

[0147] Description of the tool:

[0148] Tool ID: get_city_weather

[0149] Function description: Query the weather in a specified city.

[0150] Tool input parameters: {"type":"object","properties":{"city":{"type":"string","description":"city name"},"date_range":{"type":"integer","description":"Date range, hope to query the weather for the next N days"}},"required":["city"]}

[0151] Generated questions: ["Tell me the weather forecast for city A tomorrow.", "I'm planning a trip to city B next week. Can you help me check the weather for city B for the next ten days?", "I'm going to city D today and want to know what the weather will be like in the next few days.", "Please tell me what the weather will be like in city F in the next week?", "I'd like to know the weather for city H in the next three days. Do you have any suggestions?"]

[0152] Step 404: Fill the description information of the target tool into the third prompt template to obtain a third prompt word.

[0153] For filling the description information of the target tool into the third prompt template, reference may be made to the relevant description of filling the reference question into the first prompt template in the above embodiment, which will not be repeated here.

[0154] Step 405: Input the third prompt word into the first large model to obtain a reference question generated by the first large model.

[0155] Among them, after receiving the third prompt word, the first large model can parse and process the third prompt word to output a reference question corresponding to the target tool.

[0156] Step 406: Generate a tool call request for the target tool using the second largest model based on the reference question.

[0157] Step 407 : When the tool call request successfully calls the target tool, a training sample for training the third model is generated according to the tool call request and the corresponding reference question.

[0158] It should be noted that the explanation of step 406 and step 407 can be found in the relevant description of any embodiment of the present disclosure, and will not be repeated here.

[0159] In the embodiment of the present disclosure, initial information obtained by collecting information on the target tool is obtained; when the language category of the initial information is not the target language category, the initial information is converted into a language based on the target language category to obtain descriptive information of the target tool; a third prompt template is obtained, and the descriptive information of the target tool is filled into the third prompt template to obtain a third prompt word; the third prompt word is input into the first large model to obtain a reference question generated by the first large model. When the language category of the initial information is not the target language category, the initial information is converted into a language, so that the first large model can understand and process the information more accurately. In addition, based on the third prompt template, a large number of reference questions can be automatically generated for the target tool, thereby obtaining a large number of training samples, so that the large model trained based on the training samples can learn and generalize the ability to adapt to various problems, thereby enhancing the flexibility and adaptability of the large model.

[0160] Figure 5 It is a flowchart of a large model adjustment method provided according to an embodiment of the present disclosure.

[0161] like Figure 5 As shown, the large model adjustment method includes:

[0162] Step 501: Obtain training samples of the large model.

[0163] The training samples are obtained based on the training sample acquisition method of the large model in the above embodiment.

[0164] Step 502: Adjust the model parameters of the large model based on the training samples.

[0165] In the embodiment of the present disclosure, the present disclosure automatically generates training samples based on the description information of the target tool, which is highly efficient. The training samples include reference questions / compound questions and corresponding tool call requests, and the questions are rich. Therefore, the trained large model can accurately extract and convert key information from the questions, thereby improving the accuracy of the generated responses. In addition, the traditional large model integration method may require writing a large amount of code to adapt to the interfaces and protocols of different tools. However, by providing standardized tool description information, the trained large model can directly call these tools without writing additional adaptation code. This greatly simplifies the integration process and reduces the difficulty of integration.

[0166] Figure 6 It is a flowchart of a question-answering processing method based on large model technology provided according to an embodiment of the present disclosure.

[0167] like Figure 6 As shown, the question-answering processing method based on the large model technology includes:

[0168] Step 601: Get questions to be answered.

[0169] The question to be answered may refer to a question input by the user.

[0170] Step 602: Input the question into the big model and obtain the response output by the big model to the question.

[0171] The large model is obtained based on the large model adjustment method in the above embodiment.

[0172] In the disclosed embodiments, since the training samples include reference questions and compound questions, the questions are rich in variety. Therefore, the large model generated using the large model adjustment method described in the above embodiments can adapt to a variety of complex questions. Furthermore, the large model generated using the large model adjustment method described in the above embodiments can accurately extract and transform key information from questions, resulting in highly accurate responses.

[0173] Figure 7 It is a structural diagram of a training sample acquisition device for a large model provided according to an embodiment of the present disclosure.

[0174] like Figure 7 As shown, the training sample acquisition device of the large model includes:

[0175] A first generation module 701 is configured to generate reference questions using the first model based on the description of the target tool. The reference questions require the target tool to generate corresponding responses in the question-and-answer dialogue.

[0176] A second generating module 702 is configured to generate a tool call request for a target tool using a second large model according to a reference problem;

[0177] The third generating module 703 is used to generate training samples for training the third model according to the tool calling request and the corresponding reference questions when the tool calling request successfully calls the target tool.

[0178] As a possible implementation of the embodiment of the present disclosure, the second generating module 702 is configured to:

[0179] Obtaining a first prompt template, wherein the first prompt template is used to prompt the second largest model to generate a tool call request based on the question;

[0180] Fill the reference question into the first prompt template to obtain the first prompt word;

[0181] The first prompt word is input into the second largest model to obtain a tool call request of the target tool output by the second largest model.

[0182] As a possible implementation of the embodiment of the present disclosure, the device further includes:

[0183] A combination module is used to combine the reference questions corresponding to the target tools using the fourth model to obtain a compound question when there are multiple target tools. The compound question requires at least two target tools to generate corresponding responses in the question-answering dialogue;

[0184] a fourth generation module, configured to generate tool call requests for at least two target tools using the fifth model according to the complex problem;

[0185] The fifth generation module is used to generate training samples for training the sixth model according to the tool call request and the corresponding complex problem when the tool call request successfully calls at least two target tools.

[0186] As a possible implementation of the embodiment of the present disclosure, a combination module is used to:

[0187] Obtaining a second prompt template, wherein the second prompt template is used to prompt the fourth model to combine questions;

[0188] Fill the reference questions corresponding to each target tool into the second prompt template to obtain the second prompt words;

[0189] The second prompt word is input into the fourth model to obtain the compound question output by the fourth model.

[0190] As a possible implementation of the embodiment of the present disclosure, a combination module is used to:

[0191] From the reference questions corresponding to each target tool, candidate reference questions for which the tool call request successfully calls the corresponding target tool are screened;

[0192] Fill the candidate reference question into the second prompt template to obtain the second prompt word.

[0193] As a possible implementation of the embodiment of the present disclosure, the first generating module 701 is configured to:

[0194] Obtaining a third prompt template, wherein the third prompt template is used to prompt the first model to generate a question that requires invoking the tool to generate a corresponding response in the question-and-answer dialogue based on the description information of the tool;

[0195] Filling the description information of the target tool into the third prompt template to obtain a third prompt word;

[0196] The third prompt word is input into the first model to obtain a reference question generated by the first model.

[0197] As a possible implementation of the embodiment of the present disclosure, the device further includes:

[0198] An information acquisition module is used to obtain initial information obtained by collecting information from the target tool;

[0199] The conversion module is used to perform language conversion on the initial information based on the target language category to obtain description information of the target tool when the language category of the initial information is not the target language category.

[0200] As a possible implementation of the embodiment of the present disclosure, the conversion module is used to

[0201] Based on the target language category, the initial information is converted into a language to obtain target information, which includes the initial functional description information of the target tool;

[0202] The initial function description information is expanded to obtain target function description information, and based on the target function description information, description information of the target tool is obtained.

[0203] It should be noted that the aforementioned explanation of the method for obtaining training samples for a large model is also applicable to the apparatus for obtaining training samples for a large model in this embodiment and will not be repeated here.

[0204] Figure 8 It is a structural diagram of a large model adjustment device provided according to an embodiment of the present disclosure.

[0205] like Figure 8 As shown, the large model adjustment device includes:

[0206] A sample acquisition module 801 is used to acquire training samples of a large model, where the training samples are obtained based on the large model training sample acquisition method described in the first aspect;

[0207] The adjustment module 802 is configured to adjust the model parameters of the large model based on the training samples.

[0208] It should be noted that the above explanation of the large model adjustment method is also applicable to the large model adjustment device of this embodiment and will not be repeated here.

[0209] Figure 9 It is a structural diagram of a question-answering processing device based on large model technology provided according to an embodiment of the present disclosure.

[0210] like Figure 9 As shown, the question-answering processing device based on the large model technology includes:

[0211] Question acquisition module 901, used to obtain questions to be answered;

[0212] The reply module 902 is used to input the question into the big model and obtain the reply output by the big model to the question. The big model is obtained based on the big model adjustment method described in the second aspect.

[0213] It should be noted that the aforementioned explanation of the question-answering processing method based on large model technology is also applicable to the question-answering processing device based on large model technology in this embodiment, and will not be repeated here.

[0214] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0215] Figure 10 A schematic block diagram of an example electronic device 1000 that can be used to implement embodiments of the present disclosure is shown. The electronic device 1000 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0216] like Figure 10 As shown, the electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 1002 or a computer program loaded from a storage unit 1008 into a RAM (Random Access Memory) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An I / O (Input / Output) interface 1005 is also connected to the bus 1004.

[0217] Multiple components in the electronic device 1000 are connected to the I / O interface 1005, including an input unit 1006, such as a keyboard, a mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a magnetic disk, an optical disk, etc.; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the electronic device 1000 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0218] The computing unit 1001 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Unit), various dedicated AI (Artificial Intelligence) computing chips, various computing units that run machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 1001 performs the various methods and processes described above, such as a large model training sample acquisition method, a large model adjustment method, and a question-and-answer processing method based on a large model technology. For example, in some embodiments, the large model training sample acquisition method, the large model adjustment method, and the question-and-answer processing method based on a large model technology can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1008. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into RAM 1003 and executed by the computing unit 1001, one or more steps of the large model training sample acquisition method, large model adjustment method, and large model-based question-answering processing method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute the large model training sample acquisition method, large model adjustment method, or large model-based question-answering processing method by any other appropriate means (e.g., by means of firmware).

[0219] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application-Specific Standard Products), SOCs (System on Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0220] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0221] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more wires, a portable computer disk, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0222] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0223] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0224] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact via a communication network. This client-server relationship is established by computer programs running on the respective computers, establishing a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host, a host product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosts and VPS services ("Virtual Private Servers" or simply "VPS"). The server may also be a server in a distributed system or a server integrated with blockchain.

[0225] It's important to note that artificial intelligence (AI) is the study of how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). This encompasses both hardware and software technologies. AI hardware technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, and big data processing. AI software technologies primarily encompass computer vision, speech recognition, natural language processing, machine learning / deep learning, big data processing, and knowledge graphs.

[0226] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.

[0227] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A method for obtaining training samples for a large model, comprising: Based on the description information of the target tool, a reference question is generated using the first large model, wherein the reference question requires calling the target tool to generate a corresponding response in a question-and-answer dialogue; wherein, based on the description information of the target tool, the reference question is generated using the first large model, including: obtaining a third prompt template, wherein the third prompt template is used to prompt the first large model to generate a question based on the description information of the tool, wherein the third prompt template is used to prompt the first large model to generate a question that requires calling the tool to generate a corresponding response in a question-and-answer dialogue; filling the description information of the target tool into the third prompt template to obtain a third prompt word; and inputting the third prompt word into the first large model to obtain the reference question generated by the first large model; generating a tool call request for the target tool using a second model according to the reference problem; In a case where the tool calling request successfully calls the target tool, a training sample for training the third largest model is generated according to the tool calling request and the corresponding reference question.

2. The method according to claim 1, wherein Generating a tool call request for the target tool using the second largest model according to the reference question includes: Obtain a first prompt template, wherein the first prompt template is used to prompt the second large model to call a request based on a question generation tool; Filling the reference question into the first prompt template to obtain a first prompt word; The first prompt word is input into the second large model to obtain a tool call request of the target tool output by the second large model.

3. The method according to claim 1, wherein The method further comprises: In the case where there are multiple target tools, the fourth model is used to combine the reference questions corresponding to the target tools to obtain a compound question, wherein the compound question requires calling at least two target tools to generate corresponding responses in the question-and-answer dialogue; generating tool call requests for the at least two target tools using a fifth model according to the complex problem; In a case where the tool calling request successfully calls the at least two target tools, a training sample for training the sixth model is generated according to the tool calling request and the corresponding composite question.

4. The method according to claim 3, wherein: The fourth model is used to combine the reference questions corresponding to the target tools to obtain a composite question, including: Obtaining a second prompt template, wherein the second prompt template is used to prompt the fourth model to combine questions; Filling the reference questions corresponding to the target tools into the second prompt template to obtain a second prompt word; The second prompt word is input into the fourth model to obtain the compound question output by the fourth model.

5. The method according to claim 4, wherein Filling the reference questions corresponding to the target tools into the second prompt template to obtain the second prompt words includes: Filtering, from the reference questions corresponding to the target tools, candidate reference questions corresponding to the target tools that are successfully called by the tool call request; Fill the candidate reference question into the second prompt template to obtain the second prompt word.

6. The method according to claim 1, wherein Before generating the reference question using the first large model according to the description information of the target tool, the method further includes: Acquiring initial information obtained by collecting information from the target tool; In a case where the language category of the initial information is not the target language category, language conversion is performed on the initial information based on the target language category to obtain description information of the target tool.

7. The method according to claim 6, wherein: The language conversion of the initial information based on the target language category to obtain the description information of the target tool includes: Based on the target language category, the initial information is converted into a language to obtain target information, wherein the target information includes initial functional description information of the target tool; The initial function description information is expanded to obtain target function description information, and description information of the target tool is acquired based on the target function description information.

8. A large model adjustment method comprising: Obtaining a training sample of a large model, wherein the training sample is obtained based on the method according to any one of claims 1 to 7; Based on the training samples, model parameters of the large model are adjusted.

9. A question-answering method based on large model technology, comprising: Get questions waiting for answer; The question is input into a large model to obtain a response output by the large model to the question, wherein the large model is obtained based on the method according to claim 8.

10. A training sample acquisition device for a large model, comprising: A first generation module is configured to generate a reference question using a first large model based on the description information of a target tool, wherein the reference question requires calling the target tool to generate a corresponding response in a question-and-answer dialogue; wherein the first generation module is configured to: obtain a third prompt template, wherein the third prompt template is configured to prompt the first large model to generate a question based on the description information of the tool, wherein the third prompt template is configured to prompt the first large model to generate a question that requires calling the tool to generate a corresponding response in a question-and-answer dialogue; fill the description information of the target tool into the third prompt template to obtain a third prompt word; and input the third prompt word into the first large model to obtain the reference question generated by the first large model; A second generating module is configured to generate a tool call request for the target tool using a second large model according to the reference problem; The third generating module is used to generate training samples for training the third model according to the tool calling request and the corresponding reference question when the tool calling request successfully calls the target tool.

11. The device according to claim 10, wherein The second generating module is used to: Obtain a first prompt template, wherein the first prompt template is used to prompt the second large model to call a request based on a question generation tool; Filling the reference question into the first prompt template to obtain a first prompt word; The first prompt word is input into the second large model to obtain a tool call request of the target tool output by the second large model.

12. The device according to claim 10, wherein The device further comprises: a combining module for combining reference questions corresponding to multiple target tools using the fourth model to generate a composite question, wherein the composite question requires generating corresponding responses from at least two target tools in a question-and-answer dialogue; a fourth generating module, configured to generate tool call requests for the at least two target tools using the fifth model according to the complex problem; The fifth generating module is used to generate training samples for training the sixth model according to the tool calling request and the corresponding complex problem when the tool calling request successfully calls the at least two target tools.

13. The device according to claim 12, wherein The combined module is used for: Obtaining a second prompt template, wherein the second prompt template is used to prompt the fourth model to combine questions; Filling the reference questions corresponding to the target tools into the second prompt template to obtain a second prompt word; The second prompt word is input into the fourth model to obtain the compound question output by the fourth model.

14. The device according to claim 13, wherein The combined module is used for: Filtering, from the reference questions corresponding to the target tools, candidate reference questions corresponding to the target tools that are successfully called by the tool call request; Fill the candidate reference question into the second prompt template to obtain the second prompt word.

15. The device according to claim 10, wherein The device further comprises: An information acquisition module, configured to acquire initial information obtained by collecting information from the target tool; The conversion module is configured to, when the language category of the initial information is not the target language category, perform language conversion on the initial information based on the target language category to obtain description information of the target tool.

16. The device according to claim 15, wherein The conversion module is used to Based on the target language category, the initial information is converted into a language to obtain target information, wherein the target information includes initial functional description information of the target tool; The initial function description information is expanded to obtain target function description information, and description information of the target tool is acquired based on the target function description information.

17. A large model adjustment device comprising: A sample acquisition module, configured to acquire training samples for a large model, wherein the training samples are obtained based on the method according to any one of claims 1 to 7; An adjustment module is used to adjust the model parameters of the large model based on the training samples.

18. A question-answering processing device based on large model technology, comprising: Question acquisition module, used to obtain questions to be answered; A reply module is used to input the question into a large model to obtain a reply output by the large model to the question, wherein the large model is obtained based on the method described in claim 8.

19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method of any one of claims 1 to 7, or the method of claim 8, or the method of claim 9.

20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the method according to any one of claims 1 to 7, or the method according to claim 8, or the method according to claim 9.

21. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 7, or the method according to claim 8, or the method according to claim 9.

Citation Information

Patent Citations

  • Language model training method and device, reward model training method and device and electronic equipment

    CN117273117A

  • Financial knowledge intelligent question and answer method and system, terminal equipment and storage medium

    CN117875292A