Intelligent purchase question and answer management method and system based on large language model

By using a large language model to identify procurement intentions and verify business rules in the intelligent procurement question and answer system, the problem of difficulty in identifying intentions when there are no clear keywords is solved, and more accurate and smooth procurement question and answer feedback is achieved.

CN119807384AActive Publication Date: 2025-04-11MINORAND (ZHEJIANG) NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510286293.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-04-11
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

The existing knowledge graph-based Q&A procurement system cannot accurately identify customers' procurement intentions when there are no clear keywords, resulting in mechanization of dialogue content, lack of a deep thinking chain, and the inability to achieve efficient and dynamic adjustment feedback based on Q&A business rules, resulting in poor accuracy and fluency of procurement Q&A feedback.

Method used

Intelligent procurement question-and-answer management methods and systems based on large language models are adopted, and data input is used to use the large language model including the GPT model to identify the intention information in the question-and-answer conversation, and the pre-constructed procurement business rule verification model is used to determine whether the user's intention meets the procurement business rules, and the Q&A procurement plan under the corresponding procurement business rules is output.

Benefits of technology

In the case of a small amount or no need for core keyword input, accurately identify the user's procurement intentions, improve the accuracy and efficiency of automated analysis and processing during the procurement process, and enhance the accuracy and depth of Q&A feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807384A_ABST
    Figure CN119807384A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent purchase question and answer management method and system based on a large language model, and the method comprises the steps: constructing an API interface and a purchase business database which are connected with the large language model, and configuring a cross-field verification model in the API interface; presetting a field table based on purchasing business categories, configuring a purchasing business verification rule in the API interface, and setting a finite-state machine based on different purchasing categories based on the purchasing business verification rule; obtaining input content of a user side, inputting the input content into the large language model, outputting a user intention text by utilizing the large language model, and verifying a purchase intention of the user through an API interface according to the intention text; and querying a state field in the user purchase intention text by using a finite-state machine, judging a state and an expected action of a corresponding service category, verifying the intention of the user in combination with a cross-field verification model, and outputting a purchase question and answer text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to an intelligent procurement question-answering management method and system based on a large language model. Background Art

[0002] The current technical solution for the existing Q&A purchasing robot is to match and compare keywords based on the knowledge graph. After collecting the core keywords in the Q&A dialogue with the customer, the core keywords are further matched with the corresponding procurement-related knowledge graph, and the corresponding customer-purchased product information is output after the matching knowledge graph entity information is obtained. However, the above-mentioned knowledge graph-based Q&A dialogue cannot accurately identify the corresponding customer's purchasing intention when there are no clear keywords, which leads to the mechanization of the dialogue content and the lack of long-term thinking chain thinking. In addition, the existing knowledge graph-based Q&A system cannot achieve efficient dynamic adjustment feedback based on the business rules of the Q&A content, which makes the accuracy and fluency of the feedback of procurement Q&A in the existing technology poor. Summary of the invention

[0003] One of the invention purposes of the present invention is to provide an intelligent procurement question-and-answer management method and system based on a large language model, wherein the method and system are based on a large language model including but not limited to a GPT model for data input, and are used to identify the intent information in the output question-and-answer dialogue, and search for a pre-built procurement business rule verification model based on the intent information, and use the business rule verification model to determine whether the current user intention meets the procurement business rules of the question-and-answer dialogue, and if the current question-and-answer dialogue meets the procurement business rules, then the question-and-answer procurement plan under the corresponding procurement business rules is output. Therefore, based on the powerful language intent reasoning ability of the large language model, the present invention can accurately identify the input user's procurement intent under the question-and-answer condition with a small amount of or no core keyword input, and improve the accuracy and efficiency of automated procurement analysis and processing in the procurement process.

[0004] Another invention object of the present invention is to provide an intelligent procurement question and answer management method and system based on a large language model. The method and system use the Pydantic model to build the API of the large language model, and use the Pydantic model to verify at least one procurement business rule on the intent text output by the large language model. The present invention uses the model-level validator of the Pydantic model to perform cross-field logical verification on the intent output by the large language model, thereby realizing linkage verification between different procurement business rules, and outputting the actual business keywords corresponding to the linkage verified procurement business as the large language model input data for the next round of question and answer dialogue, so that the present invention greatly improves the accuracy of judgment of procurement intent and the depth of question and answer feedback in procurement questions and answers.

[0005] Another inventive object of the present invention is to provide an intelligent procurement question and answer management method and system based on a large language model. The method and system perform multi-field verification of procurement intention based on the model-level validator of the Pydantic model, and also set up a finite state machine (FSM). According to the finite state machine (FSM), the definition of the corresponding procurement business state and the conversion rules of different procurement business states are configured, and the fields of the corresponding procurement business state are used as the corresponding fields of the model-level validator of the Pydantic model for cross-field verification, so that the large language model API constructed by the present invention based on the Pydantic model and the finite state machine (FSM) can effectively perform in-depth procurement business verification output on procurement business of different procurement business states, and improve the accuracy and efficiency of procurement business based on business rules in combination with the intention recognition capability of the large language model.

[0006] In order to achieve at least one of the above-mentioned invention objects, the present invention further provides an intelligent procurement question-answering management method based on a large language model, the method comprising: Constructing an API interface connecting a large language model and a procurement business database, and configuring a data validation model for the large API interface, wherein the data validation model includes a cross-field validation model; Presetting a field table based on the procurement business category, configuring procurement business validation rules in the API interface, and setting a finite state machine based on different procurement categories based on the procurement business validation rules; Acquire user-side input content, input the input content into the large language model, use the large language model to output user intention text, and verify the user's purchasing intention through the API interface according to the intention text; The finite state machine is used to query the status field in the current user's purchasing intention text to determine the status and expected action of the corresponding business category, and after verifying the user's intention in combination with the cross-field verification model, the purchasing question and answer text is output.

[0007] According to one of the preferred embodiments of the present invention, the data validation model is a Pydantic model, and the method for performing multi-field validation using the Pydantic model includes: defining the Pydantic model as a base class model BaseModel, inputting the user's input content into the large language model to obtain output user intent text, performing data conversion on the user intent text using the Pydantic model to obtain Python object data that meets the requirements of the base class model BaseModel, performing field extraction on the Python object data and performing field type checking to ensure that the Python object data conforms to the Pydantic model field declaration type.

[0008] According to another preferred embodiment of the present invention, after obtaining the field table of the procurement business category, the corresponding field objects of the procurement business category are extracted according to different procurement business rules, and the model-level validator annotation @model_validator is configured according to the Pydantic model. According to the procurement business rules, the corresponding field objects and the model-level validator annotation @model_validator are encapsulated into a class method ClassMethod of the API interface, and the validation methods corresponding to the field objects of the multiple procurement business categories are defined in the class method ClassMethod. Verification of the corresponding field objects of different procurement businesses is performed based on the methods in the class method ClassMethod.

[0009] According to another preferred embodiment of the present invention, the method for performing multi-field verification by the Pydantic model includes: pre-configuring a service SDK, and at the beginning of a procurement dialogue, calling a historical procurement field object in a procurement business database through the service SDK and a corresponding field object of a corresponding procurement business category, and performing numerical range verification of different procurement business categories based on the historical procurement field object using the model-level validator annotation @model_validator configured by the Pydantic model, wherein the numerical verification method includes: after obtaining the historical procurement field object according to the procurement business rule, using a len() function or a range() function of a defined numerical field as a numerical range verification of the different procurement business categories, and if there is at least one historical procurement field object whose numerical range of the procurement business category does not meet the numerical verification result, outputting a standard procurement requirement text based on the corresponding procurement business rule through a preset mapping rule of the ORM.

[0010] According to another preferred embodiment of the present invention, the method includes: in each round of procurement question-and-answer dialogue, using the pre-processing mode of the Pydantic model to perform data cleaning and data conversion on historical procurement field objects obtained by the service SDK, user input text, and user intention text based on large language model feedback, wherein data cleaning includes removing stop words, removing spaces, filling default values, and format conversion, and using the field-level validator annotation @field_validator of the Pydantic model to clean complex fields to obtain clean field objects, and based on the field objects after data cleaning, using the post-processing mode mode='after of the model-level validator annotation @model_validator in the Pydantic model to perform cross-field validation.

[0011] According to another preferred embodiment of the present invention, the implementation method of the finite state machine includes: setting the state State, trigger event Event, transition rule Transition and action Action corresponding to each procurement business category according to the finite state machine; and converting the state State, trigger event Event, transition rule Transition and action Action through the Pydantic model to obtain field objects of corresponding types; at the beginning of each procurement dialogue, obtaining the state State corresponding to each procurement business category, and converting the state State of the procurement business category to obtain a state field object, incorporating the state field object into the procurement business rule, and combining the state field object and the model-level validator annotation @model_validator of the Pydantic model to perform cross-field validation including state validation.

[0012] According to another preferred embodiment of the present invention, the method includes: in multiple rounds of procurement dialogues, creating a model by utilizing the create_model instruction, and inheriting the base class model BaseModel of the previous round of dialogue by static sharing, and configuring the validator type and verification method of the created model by utilizing the config instruction and the validators dictionary, so as to dynamically configure the Pydantic model parameter values.

[0013] According to another preferred embodiment of the present invention, the method for implementing the finite state machine includes: after obtaining the trigger event Event of the corresponding procurement business category through the service SDK, judging the transition rule Transition and action Action required for the current trigger event Event according to the finite state machine, generating a new state State of the procurement business category through the transition rule Transition and action Action, generating a new state field according to the new state State of the procurement business category, and using the new state field as the verification field of the corresponding procurement business verification rule.

[0014] In order to achieve at least one of the above-mentioned invention purposes, the present invention further provides an intelligent procurement question and answer management system based on a large language model, and the system executes the above-mentioned intelligent procurement question and answer management method based on a large language model.

[0015] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the above-mentioned intelligent procurement question and answer management method based on a large language model. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1Shown is a flow chart of an intelligent procurement question and answer management method based on a large language model according to the present invention. DETAILED DESCRIPTION

[0017] The following description is used to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are only examples, and those skilled in the art can think of other obvious variations. The basic principles of the present invention defined in the following description can be applied to other embodiments, variations, improvements, equivalents, and other technical solutions that do not deviate from the spirit and scope of the present invention.

[0018] It is to be understood that the term "one" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be multiple, and the term "one" should not be understood as a limitation on the quantity.

[0019] Please combine Figure 1 , the present invention discloses an intelligent procurement question and answer management method and system based on a large language model, the method includes the following steps: first, an API interface needs to be deployed in a procurement question and answer project, and the large language model access address is connected through the API interface, wherein the large language model access address may include but not limited to the deployment address of GPT, LLaMA and Tongyi Qianwen, wherein the API interface protocol may include but not limited to Http protocol, etc., and the relevant large language model path parameters may be configured by setting the URL of the Http protocol, etc., and a Pydantic model is configured in the deployed API interface, and the Pydantic model is used to verify the output text after deep reasoning from the large language model, wherein the present invention utilizes the cross-field verification of the Pydantic model combined with the relevant verification method to realize the verification of procurement rules for different procurement business categories. And the present invention also configures a finite state machine in the API interface, and uses the finite state machine to judge the current or predict the state State, trigger event Event, transition rule Transition and action Action of the corresponding procurement business category. And based on the current or next state State of the corresponding procurement business category, the state field is constructed. In the present invention, the state field and common fields such as the name and value of the corresponding procurement business category are subjected to cross-field verification of the above-mentioned Pydantic model, so that dynamic and high-precision procurement question and answer output for the procurement business can be achieved. In other words, the present invention utilizes the deep reasoning ability of the large language model for the input content, and combines the verification rules related to the procurement business content to perform targeted high-precision question and answer output, so that the traditional AI question and answer content has a deeper thinking chain based on professional question and answer, and improves the depth and accuracy of the thinking chain of question and answer output.

[0020] Specifically, after the deployment of the API interface in the present invention is completed, the dependency injection of the relevant generated files and configuration parameters of the Pydantic model provides an environment for generating the Pydantic model, wherein the generated files of the Pydantic model include JSON Schema files, OpenAPI Schema files, data dictionaries, etc., wherein the JSONSchema files are used to annotate and verify the files of JSON metadata; the OpenAPI Schema files are used to deploy the API files, and the data dictionary is the data serialized into a recognizable storage format (such as JOSN format) in the corresponding Pydantic model. The parameters configured by the Pydantic model may include but are not limited to ref_template (reference template), schema_type (schema type), etc., wherein the relevant generated files and configuration parameters of the above-mentioned Pydantic model can be implemented by calling the function method of model_json_schema() or Config(), and the relevant generated files and configuration parameters of the above-mentioned related Pydantic models are only exemplified, and the present invention will not elaborate on this.

[0021] Furthermore, after completing the configuration of the Pydantic model, the present invention needs to process the data of the API interface, wherein the data processing method can be implemented by the relevant method of the Pydantic model, and the specific steps include: data cleaning and data conversion of the user input text and the user intention text based on the feedback of the large language model, wherein the data cleaning includes removing stop words, removing spaces, filling default values ​​and format conversion, wherein the Pydantic model is used to declare field types, wherein the field types include: dict (dictionary), Callable (callable object), str (string) and bool (Boolean operation), etc.; when the input user intention text and the user input text are different from the field type declared by the Pydantic model, the format conversion is automatically performed to obtain the field type that meets the declaration. Alternatively, in the present invention, the field-level validator annotation @field_validator configured by the Pydantic model can also be used to perform data cleaning on complex fields. For example, the field-level validator annotation @field_validator can be used to remove trailing spaces and the case of the first letter: add a trim_whitespace method to the field-level validator annotation @field_validator (A1), wherein the function of the trim_whitespace method can achieve the removal of the first space of the field A1 and the case of the first letter. The above trim_whitespace method is an example, and those skilled in the art can set the cleaning method corresponding to the field-level validator annotation @field_validator according to actual conditions. It should be noted that in the present invention, the base class model BaseModel of the Pydantic model can be used to achieve the above-mentioned data cleaning and obtain a clean field object.

[0022] In one of the preferred embodiments of the present invention, it is necessary to pre-configure a service SDK (Software Development Kit) in the front-end software of the procurement project. The service SDK has tools to simplify the integration and development process of specific services or functions, wherein the service SDK can provide and procure API interfaces of the business database and the back-end server at the front-end deployment, and can also encapsulate related functional modules and event monitoring functions for the back-end server or database. The service SDK can also be used to encapsulate the verification method of the procurement business rules into the corresponding API, thereby realizing the interactive verification of the user intention problem output by the large language model and the database.

[0023] Furthermore, the core technical means of the present invention is to provide a cross-field validation method to solve the verification of different procurement business categories in the procurement project, wherein the verification content types include field content verification (used to determine whether a procurement business category exists), numerical range verification (used to determine whether the corresponding procurement business category numerical value meets the requirements), numerical calculation verification (used to determine whether the numerical calculation result of the corresponding procurement business category meets the requirements) and procurement business category status verification (used to determine whether the current corresponding procurement business category status meets the requirements). Among them, multiple of the above-mentioned different verification content types can be selected for combined verification. The selection of combined verification will be set separately according to the procurement business rules, and the present invention will not go into details. In the present invention, the cross-field validation is performed using the model-level validator annotation @model_validator configured in the Pydantic model, multiple field contents are configured after the model-level validator annotation @model_validator, and the verification method of the corresponding field content is configured. The model-level validator annotation @model_validator is configured with multiple field contents and corresponding field content verification methods, which can be encapsulated into a class method ClassMethod corresponding to the API interface of the large language model through the service SDK. The class method ClassMethod defines the corresponding multiple procurement business category field objects and corresponding field object verification methods, and the verification of the corresponding field objects of different procurement businesses is performed based on the method in the class method ClassMethod. When at least one field type verification does not meet the requirements, the basic business information corresponding to the field requirements that do not meet the requirements is output, and a templated procurement business question and answer feedback is provided. It is worth mentioning that in another preferred embodiment of the present invention, for the output procurement business question and answer feedback, the present invention can also output the corresponding demand text information through the preset mapping rules of ORM (Object-Relational Mapping), wherein in the ORM, the object can be configured as a class or Instance that encapsulates the procurement business category field object and the corresponding field object verification method, and the corresponding mapping relationship can include but is not limited to the database table, and the corresponding mapping can be the row data of the table, etc.

[0024] In one of the preferred embodiments of the present invention, the method for performing multi-field validation of the Pydantic model includes: according to the pre-configured service SDK, at the beginning of the procurement dialogue, the historical procurement field object in the procurement business database is called through the service SDK and the corresponding field object of the corresponding procurement business category, and the above historical procurement object can use the pre-processing mode (mode='before) of the Pydantic model to perform pre-processing of historical procurement data including data format type conversion, data cleaning, etc., to obtain a clean historical procurement field object. And based on the historical procurement field object, the model-level validator annotation @model_validator configured by the Pydantic model is used to perform numerical range validation of different procurement business categories, wherein the numerical validation method includes: after obtaining the historical procurement field object according to the procurement business rule, the numerical length len() function or the range() function of the defined numerical field is set as the numerical range validation of the different procurement business categories, and if there is at least one historical procurement field object whose numerical range of the procurement business category does not meet the numerical validation result, the standard procurement demand text based on the corresponding procurement business rule is output through the preset mapping rule of ORM.

[0025] The present invention also provides a finite state machine (FSM), which can determine the current or predict the next state of the corresponding procurement business category according to the procurement business category, wherein the implementation method of the finite state machine includes: setting the state State, trigger event Event, transition rule Transition and action Action corresponding to each procurement business category according to the finite state machine; and converting the state State, trigger event Event, transition rule Transition and action Action into field objects of corresponding types through the Pydantic model; at the beginning of each procurement dialogue, obtaining the state State corresponding to each procurement business category, and converting the state State of the procurement business category to obtain a state field object, and incorporating the state field object into the procurement business rule, for example, if the state of the procurement business category is (purchased), then the next state of the procurement business category can be predicted to be (to be shipped or shipped), and the corresponding action of the next state (goods collection, etc.) is predicted, and the cross-field validation including state validation is performed in combination with the state field object and the model-level validator annotation @model_validator of the Pydantic model. The status field obtained based on the finite state machine (FSM) can be dynamically verified and fed back based on the actual situation of different procurement business categories, so as to output procurement requirements that meet the actual situation.

[0026] The method for implementing the finite state machine includes: after obtaining the trigger event Event of the corresponding procurement business category through the service SDK, judging the transition rule Transition and action Action required for the current trigger event Event according to the finite state machine, generating a new state State of the procurement business category through the transition rule Transition and action Action, generating a new state field according to the new state State of the procurement business category, and using the new state field as the verification field of the corresponding procurement business verification rule.

[0027] In one of the preferred embodiments of the present invention, the Pydantic model can also be dynamically modified in multiple rounds of procurement dialogues. The specific method includes: in multiple rounds of procurement dialogues, a model is created by using the create_model instruction in the process, and the base class model BaseModel of the previous round of dialogue is inherited by static sharing. The created model is configured with the config instruction and the validators dictionary to configure the validator type and the validation method, which is used to dynamically configure the Pydantic model parameter value. By inheriting the model and using the config instruction, the Pydantic model does not need to be rebuilt on a large scale, and the Pydantic model can be dynamically modified by modifying a small range of parameters to adapt to different dialogue contents.

[0028] The embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. The embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part, and / or installed from a removable medium. When the computer program is executed by the central processing unit (CPU), the above functions defined in the method of the present application are executed. It should be noted that the computer-readable medium mentioned above in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of an electrical, magnetic, optical, electromagnetic, infrared segment, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wire segments, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, electrical wire, optical cable, RF, etc., or any suitable combination of the foregoing.

[0029] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0030] Those skilled in the art should understand that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The objectives of the present invention have been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments. Without departing from the principles, the implementation methods of the present invention may be deformed or modified in any way.

Claims

1. An intelligent procurement question-answering management method based on a large language model, characterized in that: The method comprises: Constructing an API interface connecting a large language model and a procurement business database, and configuring a data validation model for the API interface, wherein the data validation model includes a cross-field validation model; Presetting a field table based on the procurement business category, configuring procurement business validation rules in the API interface, and setting a finite state machine based on different procurement categories based on the procurement business validation rules; Acquire user-side input content, input the input content into the large language model, use the large language model to output user intention text, and verify the user's purchasing intention through the API interface according to the intention text; The finite state machine is used to query the status field in the current user's purchasing intention text to determine the status and expected action of the corresponding business category, and after verifying the user's intention in combination with the cross-field verification model, the purchasing question and answer text is output.

2. According to claim 1, the intelligent procurement question-answering management method based on a large language model is characterized in that: The data validation model is a Pydantic model. The method for performing cross-field validation using the Pydantic model includes: defining the Pydantic model as a base class model BaseModel, inputting user input content into the large language model to obtain output user intent text, performing data conversion on the user intent text using the Pydantic model to obtain Python object data that meets the requirements of the base class model BaseModel, performing field extraction on the Python object data and then performing field type checking to ensure that the Python object data conforms to the Pydantic model field declaration type.

3. According to claim 2, the intelligent procurement question-answering management method based on a large language model is characterized in that: After obtaining the field table of the procurement business category, the corresponding field objects of the procurement business category are extracted according to different procurement business rules, and the model-level validator annotation @model_validator is configured according to the Pydantic model. According to the procurement business rules, the corresponding field objects and the model-level validator annotation @model_validator are encapsulated into a class method ClassMethod of the API interface, and the validation methods corresponding to the field objects of the multiple procurement business categories are defined in the class method ClassMethod. Verification of the corresponding field objects of different procurement businesses is performed based on the methods in the class method ClassMethod.

4. According to claim 3, the intelligent procurement question-answering management method based on a large language model is characterized in that: The method for performing cross-field validation on the Pydantic model includes: pre-configuring a service SDK, and at the beginning of a procurement dialogue, calling a historical procurement field object in a procurement business database through the service SDK and a corresponding field object of a corresponding procurement business category, and performing numerical range validation on different procurement business categories based on the historical procurement field object using the model-level validator annotation @model_validator configured by the Pydantic model, wherein the numerical range validation method includes: after obtaining the historical procurement field object according to the procurement business rule, using a len() function or a range() function of a defined numerical field as a numerical range validation for the different procurement business categories, and if there is at least one historical procurement field object whose numerical range of the procurement business category does not satisfy the numerical validation result, outputting a standard procurement requirement text based on the corresponding procurement business rule through a preset mapping rule of the ORM.

5. According to claim 2, the intelligent procurement question-answering management method based on a large language model is characterized in that: The method includes: in each round of procurement question-and-answer dialogue, using the pre-processing mode of the Pydantic model to perform data cleaning and data conversion on historical procurement field objects obtained by the service SDK, user input text, and user intention text based on large language model feedback, wherein data cleaning includes removing stop words, removing spaces, filling default values, and format conversion, and using the field-level validator annotation @field_validator of the Pydantic model to clean complex fields to obtain clean field objects, and based on the field objects after data cleaning, using the post-processing mode mode='after of the model-level validator annotation @model_validator in the Pydantic model to perform cross-field validation.

6. According to claim 4, the intelligent procurement question-answering management method based on a large language model is characterized in that: The implementation method of the finite state machine includes: setting the state State, trigger event Event, conversion rule Transition and action Action corresponding to each procurement business category according to the finite state machine; and converting the state State, trigger event Event, conversion rule Transition and action Action through the Pydantic model to obtain field objects of corresponding types; at the beginning of each procurement dialogue, obtaining the state State corresponding to each procurement business category, and converting the state State of the procurement business category to obtain a state field object, incorporating the state field object into the procurement business rule, and combining the state field object and the model-level validator annotation @model_validator of the Pydantic model to perform cross-field validation including state validation.

7. According to claim 1, the intelligent procurement question-answering management method based on a large language model is characterized in that: The method includes: in multiple rounds of procurement dialogues, creating a model by using the create_model instruction, and inheriting the base class model BaseModel of the previous round of dialogue in a static sharing manner, and configuring the validator type and verification method of the created model by using the config instruction and the validators dictionary, so as to dynamically configure the Pydantic model parameter value.

8. The intelligent procurement question-answering management method based on a large language model according to claim 6 is characterized in that: The method for implementing the finite state machine includes: after obtaining the trigger event Event of the corresponding procurement business category through the service SDK, judging the transition rule Transition and action Action required for the current trigger event Event according to the finite state machine, generating a new state State of the procurement business category through the transition rule Transition and action Action, generating a new state field according to the new state State of the procurement business category, and using the new state field as the verification field of the corresponding procurement business verification rule.

9. An intelligent procurement question-answering management system based on a large language model, characterized in that: The system executes an intelligent procurement question and answer management method based on a large language model as described in any one of claims 1-8.

10. A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement an intelligent procurement question-and-answer management method based on a large language model as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Purchase scene vertical search method, device and system

    CN114756570A

  • Network policy intention translation system and method based on retrieval enhancement

    CN119513313A

  • Human resource interaction system, method and equipment and storage medium

    CN119557405A

  • NLP methods and systems for querying data sets

    US20240070152A1