CN-121980412-A - Intent recognition method based on large language model
Abstract
The disclosure provides an intention recognition method based on a large language model, relates to the technical field of artificial intelligence, and particularly relates to the technical fields of large language models, deep learning and the like. The training data construction method based on the LLM comprises the steps of obtaining real data of a target field, carrying out intention recognition on the real data by adopting the LLM to obtain initial intention, verifying the initial intention by adopting the LLM to obtain target intention, generating a query statement by adopting the LLM based on the target intention, and constructing training data based on the query statement and the target intention. The present disclosure may improve the quality of training data for intent recognition tasks.
Inventors
- LIN CHEN
Assignees
- 北京百度网讯科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251212
Claims (13)
- 1. A training data construction method based on a large language model LLM comprises the following steps: acquiring real data of a target field; performing intention recognition on the real data by adopting LLM to obtain an initial intention; verifying the initial intention by adopting the LLM to obtain a target intention; generating a query statement based on the target intent using the LLM; training data is constructed based on the query statement and the target intent.
- 2. The method of claim 1, wherein the acquiring real data of the target area comprises: Sending first prompt information to LLM, wherein the first prompt information comprises a target field and company constraint information, so that the LLM calls a network search interface to obtain a company list of the target field; For each company in the company list, sending second prompt information to the LLM, wherein the second prompt information comprises company information and product constraint information, so that the LLM calls a network search interface to acquire an application list of each company; And sending third prompt information to the LLM aiming at each application in the application list, wherein the third prompt information comprises application information and document constraint information, so that the LLM calls a network search interface to acquire document data of each application as the real data.
- 3. The method of claim 1, wherein the employing LLM for intent recognition of the real data to obtain an initial intent comprises: And sending fourth prompt information to the LLM, wherein the fourth prompt information comprises the real data and intention constraint information so that the LLM generates the initial intention.
- 4. The method of claim 1, wherein the employing the LLM to verify the initial intent to obtain a target intent comprises: Sending fifth prompt information to the LLM, wherein the fifth prompt information comprises the initial intention and verification constraint information so that the LLM can acquire a verification result; and in response to the verification result being pass, regarding the initial intent as the target intent.
- 5. The method of claim 1, wherein the employing the LLM to generate a query statement based on the target intent comprises: And sending sixth prompt information to the LLM, wherein the sixth prompt information comprises the target intention and query constraint information so that the LLM generates the query statement.
- 6. An intent recognition model training method based on LLM, comprising: acquiring training data; Training an intention recognition model by adopting the training data; wherein the training data is generated using the method of any one of claims 1-5.
- 7. An LLM-based intent recognition method comprising: Acquiring a query sentence to be identified; performing intention recognition on the query statement by adopting an intention recognition model; wherein the intent recognition model is trained using the method of claim 6.
- 8. A LLM based training data construction apparatus comprising: The acquisition module is used for acquiring real data in the target field; the identification module is used for carrying out intention identification on the real data by adopting LLM so as to obtain an initial intention; The verification module is used for verifying the initial intention by adopting the LLM so as to obtain a target intention; A generation module for generating a query statement based on the target intent using the LLM; And the construction module is used for constructing training data based on the query statement and the target intention.
- 9. An LLM-based intent recognition model training apparatus comprising: The acquisition module is used for acquiring training data; The training module is used for training the intention recognition model by adopting the training data; wherein the training data is generated using the method of any one of claims 1-5.
- 10. An LLM based intent recognition device comprising: The acquisition module is used for acquiring the query statement to be identified; the recognition module is used for recognizing the intention of the query statement by adopting an intention recognition model; wherein the intent recognition model is trained using the method of claim 6.
- 11. An electronic device, comprising: at least one processor, and A memory communicatively coupled to the at least one processor, wherein, The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
- 12. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
- 13. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-7.
Description
Intent recognition method based on large language model Technical Field The disclosure relates to the technical field of artificial intelligence, in particular to the technical fields of large language models, deep learning and the like, and particularly relates to an intention recognition method based on the large language models. Background Training the intent recognition model requires high quality training data, but in the vertical field (e.g., finance, medical, government, etc.), the problem of lack of high quality training data is faced. Disclosure of Invention The present disclosure provides a large language model-based intent recognition method and related methods and products. According to one aspect of the disclosure, a training data construction method based on LLM is provided, and the training data construction method comprises the steps of obtaining real data of a target field, carrying out intention recognition on the real data by using LLM to obtain initial intention, verifying the initial intention by using the LLM to obtain target intention, generating query sentences by using the LLM based on the target intention, and constructing training data based on the query sentences and the target intention. According to another aspect of the present disclosure, there is provided a LLM-based intent recognition model training method including acquiring training data, training an intent recognition model using the training data, wherein the training data is generated using the method as set forth in any one of the above. According to another aspect of the disclosure, an intent recognition method based on LLM is provided, which comprises the steps of obtaining a query sentence to be recognized, and performing intent recognition on the query sentence by adopting an intent recognition model, wherein the intent recognition model is trained by adopting the method according to any one of the above. According to another aspect of the disclosure, a training data construction device based on LLM is provided, and the training data construction device comprises an acquisition module, a recognition module, a verification module, a generation module and a construction module, wherein the acquisition module is used for acquiring real data of a target field, the recognition module is used for carrying out intention recognition on the real data by using LLM to acquire initial intention, the verification module is used for verifying the initial intention by using LLM to acquire target intention, the generation module is used for generating query statement by using LLM based on the target intention, and the construction module is used for constructing training data based on the query statement and the target intention. According to another aspect of the disclosure, there is provided an intent recognition model training device based on LLM, which includes an acquisition module configured to acquire training data, and a training module configured to train an intent recognition model using the training data, wherein the training data is generated by using the method as set forth in any one of the above. According to another aspect of the disclosure, an intent recognition device based on LLM is provided, which comprises an acquisition module for acquiring a query sentence to be recognized, and a recognition module for performing intent recognition on the query sentence by using an intent recognition model, wherein the intent recognition model is trained by adopting the method according to any one of the above. According to another aspect of the present disclosure there is provided an electronic device comprising at least one processor and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the above aspects. According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method according to any one of the above aspects. According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method according to any of the above aspects. According to the embodiment of the disclosure, the quality of training data of an intention recognition task can be improved. It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification. Drawings The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein: FIG. 1 is a