CN116881420A - Interaction information generation method and device based on GPT hybrid model - Google Patents

Interaction information generation method and device based on GPT hybrid model Download PDF

Info

Publication number
CN116881420A
CN116881420A CN202310888137.4A CN202310888137A CN116881420A CN 116881420 A CN116881420 A CN 116881420A CN 202310888137 A CN202310888137 A CN 202310888137A CN 116881420 A CN116881420 A CN 116881420A
Authority
CN
China
Prior art keywords
information
disease
user input
keyword
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310888137.4A
Other languages
Chinese (zh)
Inventor
汤文巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN202310888137.4A priority Critical patent/CN116881420A/en
Publication of CN116881420A publication Critical patent/CN116881420A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a method and a device for generating interaction information based on a GPT hybrid (GPTHygrid) model, wherein the method comprises the following steps: constructing a mapping table of disease keywords and disease characteristic information; receiving user input information; judging whether numerical prediction requirements are contained or not based on the user input information; when the user input information contains numerical prediction requirements, extracting disease keywords based on the user input information, finding corresponding disease feature information from the disease keyword and disease feature information mapping table, and taking the user disease keywords and the disease feature information as input of a large language model to generate guide information; receiving response information of a user to the guide information; reply information about the user input information is generated based on the response information. The application can improve the accuracy of the large language model answer in the vertical energization field.

Description

Interaction information generation method and device based on GPT hybrid model
Technical Field
The application relates to a large language model technology in an artificial intelligence technology, in particular to an interactive information generation method and device based on a GPT Hybrid model.
Background
With the rapid alternation of artificial intelligence technology, more and more intelligent chat language models are being developed. The user can connect to and create a conversation with the chat bot in a convenient manner, such as web page access, software access, etc. Along with the rapid updating of language models, the demand of artificial intelligence technology applied to the field is increasing, and the physical and virtual chat robots not only can simplify part of the workflow, but also can provide more convenience for users.
Currently, the application examples of large language model virtual chat robots in the field are few, especially in the field of psychology and medical science. In addition, in a specific application scene, a large language model provides questions related to specific data, probability evaluation and the like for a user, and the problems that the answer accuracy is not high and even the answer is not possible exist, which are the questions to be solved urgently by combining the large language model with the knowledge energy of the vertical field.
Disclosure of Invention
The application aims to provide a method and a device for generating interactive information based on a GPT Hybrid model, which can improve the accuracy of answering a large language model in the field of vertical energization.
The technical scheme adopted for solving the technical problems is as follows: the interactive information generation method based on the GPT Hybrid model comprises the following steps:
constructing a mapping table of disease keywords and disease characteristic information;
receiving user input information;
judging whether numerical prediction requirements are contained or not based on the user input information;
when the user input information contains numerical prediction requirements, extracting disease keywords based on the user input information, finding corresponding disease feature information from a disease keyword and disease feature information mapping table, and taking the user disease keywords and the disease feature information as input of a large language model to generate guide information, wherein the guide information is used for guiding a user to provide disease feature values corresponding to the disease feature information;
receiving response information of a user to the guide information;
reply information about the user input information is generated based on the response information.
And each disease keyword in the disease keyword and disease characteristic information mapping table corresponds to a plurality of disease characteristic information.
The judging whether the numerical prediction requirement is contained based on the user input information specifically comprises:
and extracting a numerical prediction keyword from the user input information, and judging whether the user input information contains numerical prediction requirements or not based on the numerical prediction keyword.
The generating reply information about the user input information based on the response information specifically includes:
taking the response information as the input of a prediction model to obtain an output value;
taking the user input information as the input of a large language model to obtain an output text;
and merging the output value with the output text to generate reply information.
Before generating the reply information about the user input information based on the response information, the method further comprises:
extracting a disease characteristic value in the response information;
comparing the disease characteristic value with the disease characteristic information corresponding to the disease keyword in the disease characteristic information mapping table, and judging whether the disease characteristic information corresponding to the disease keyword is missing or not;
if the disease characteristic value is missing compared with the disease characteristic information corresponding to the disease keyword in the disease characteristic information mapping table, missing disease characteristic information is found, and the user disease keyword and the missing disease characteristic information are used as input of a large language model to generate new guide information.
When the user input information does not contain the quantitative numerical prediction requirement, the user input information is used as input of a large language model, and reply information about the user input information is generated.
The technical scheme adopted for solving the technical problems is as follows: provided is an interactive information generating device based on a GPT Hybrid (GPT Hybrid) model, comprising:
the construction module is used for constructing a mapping table of disease keywords and disease characteristic information;
the first receiving module is used for receiving user input information;
the first judging module is used for judging whether the quantitative numerical prediction requirement is contained or not based on the user input information;
the guiding information generation module is used for extracting disease keywords based on the user input information when the user input information contains quantitative numerical prediction requirements, finding corresponding disease feature information from the disease keyword and disease feature information mapping table, and generating guiding information by taking the user disease keywords and the disease feature information as input of a large language model; the guiding information is used for guiding a user to provide a disease characteristic value corresponding to the disease characteristic information;
the second receiving module is used for receiving response information of the user to the guide information;
and the reply module is used for generating reply information about the user input information based on the response information.
The first judging module extracts a numerical prediction keyword from the user input information and judges whether the user input information contains numerical prediction requirements or not based on the numerical prediction keyword.
The reply module includes:
the prediction unit is used for taking the response information as the input of a prediction model to obtain an output value;
the text output unit is used for taking the user input information as the input of the large language model to obtain an output text;
and the reply unit is used for merging the output value and the output text to generate reply information.
The reply module further comprises:
the extraction module is used for extracting the disease characteristic value in the response information;
the second judging module is used for judging whether the disease characteristic value is missing compared with disease characteristic information corresponding to the disease keyword in the disease keyword and disease characteristic information mapping table;
and the new guide information generation module is used for finding out missing disease characteristic information when the disease characteristic value is missing compared with the disease characteristic information corresponding to the disease keyword in the disease characteristic information mapping table, and generating new guide information by taking the user disease keyword and the missing disease characteristic information as input of a large language model.
Advantageous effects
Due to the adoption of the technical scheme, compared with the prior art, the application has the following advantages and positive effects: according to the application, a large language model is combined with a definite mathematical prediction model, after a user inputs a problem, semantic extraction is firstly carried out according to the problem proposed by the user, whether the problem needs to provide a prediction result by means of the definite mathematical model is analyzed, if so, a disease keyword is extracted, guide information is generated for user response by combining the disease keyword and corresponding disease characteristic information in a disease characteristic information mapping table, and finally final reply content is generated based on the response information of the user to the guide information.
Drawings
Fig. 1 is a flowchart of an interactive information generation method according to a first embodiment of the present application.
Detailed Description
The application will be further illustrated with reference to specific examples. It is to be understood that these examples are illustrative of the present application and are not intended to limit the scope of the present application. Furthermore, it should be understood that various changes and modifications can be made by one skilled in the art after reading the teachings of the present application, and such equivalents are intended to fall within the scope of the application as defined in the appended claims.
The first embodiment of the application relates to a method for generating interaction information based on a GPT Hybrid model, as shown in fig. 1, comprising the following steps:
and step 1, constructing a mapping table of disease keywords and disease characteristic information. Taking the medical field as an example, wherein the disease keywords can be names of various diseases, and the disease characteristic information is the characteristic to be understood corresponding to different diseases. The disease keyword and disease feature information mapping table in this embodiment is shown in table 1.
TABLE 1
Disease 1 Feature 1 Feature 2 Feature 3 Feature 4 ... Feature n
... Feature 1 Feature 2 Feature 3 Feature 4 ... Feature n
Disease n Feature 1 Feature 2 Feature 3 Feature 4 ... Feature n
Step 2, receiving user input information; the user input information here may be a user's counseling questions about the illness.
Step 3, judging whether the numerical prediction requirement is contained or not based on the user input information, specifically: and extracting a numerical prediction keyword from the user input information, and judging whether the user input information contains numerical prediction requirements or not based on the numerical prediction keyword. For example, the user input information is "alzheimer's disease found 5 years ago, and about how many years of life can be self-managed", and at this time, by extracting a numerical prediction keyword from the user input information, a numerical prediction keyword of "how many years, alzheimer's disease can be obtained, and it can be determined that the user input information includes a numerical prediction requirement according to the numerical prediction keyword.
And 4, when the user input information contains numerical prediction requirements, extracting disease keywords based on the user input information, finding corresponding disease feature information from the disease keyword and disease feature information mapping table, and taking the user disease keywords and the disease feature information as input of a large language model to generate guide information, wherein the guide information is used for guiding a user to provide disease feature values corresponding to the disease feature information. The method and the device can guide the reply information of the user, improve interaction efficiency and avoid the situation that the user replies some irrelevant information, so that the input of a large language model is too tedious.
According to the embodiment in step 3, it can be known that the numerical prediction requirement is included in the user input information after the numerical prediction keyword of "how many years" is extracted, at this time, the disease keyword "alzheimer's disease" is extracted from the user input information, then the disease feature information corresponding to "alzheimer's disease" is found from the disease keyword and disease feature information mapping table, and then "alzheimer's disease" and the disease feature information are used as inputs of the large language model, so as to generate the guiding information of "how old you are", "how old you are receiving the treatment of alzheimer's disease", "what sex you are", and so on, and guide the user to input the relevant content.
Step 5, receiving response information of the user to the guide information; after receiving the guidance information, the user may input a corresponding reply (i.e., response information) according to the guidance information.
And 6, after receiving response information replied by the user, extracting a disease characteristic value in the response information, judging whether the disease characteristic value is missing compared with disease characteristic information corresponding to the disease keyword in the disease characteristic information mapping table, namely judging whether the disease characteristic value is in one-to-one correspondence with the disease characteristic information corresponding to the disease keyword, if the disease characteristic value is not in one-to-one correspondence with the disease characteristic information corresponding to the disease keyword, indicating that the disease characteristic value is missing, finding out missing disease characteristic information, taking the user disease keyword and the missing disease characteristic information as input of a large language model, and generating new guide information so that the user replies again until the received disease characteristic value can be in one-to-one correspondence with the disease characteristic information corresponding to the disease keyword. By the method, the integrity of the disease features input by the user can be ensured, so that the prediction model can accurately predict during prediction.
And 7, generating reply information about the user input information based on the response information. In the step, the response information is used as the input of a prediction model to obtain an output value; taking the user input information as the input of a large language model to obtain an output text; and combining the output value with the output text to generate reply information about the user input information. The method combines the output value of the prediction model and the text output of the large language model, so that the output of the large language model is more comprehensive, and the problems of the user can be solved from various aspects.
It is easy to find that the application combines the big language model with the definite mathematical prediction model, after the user inputs the question, firstly, according to the question raised by the user, the semantic extraction is carried out, whether the question needs to provide the prediction result by means of the definite mathematical model is analyzed, if so, the disease key word is extracted, the disease key word and the corresponding disease characteristic information in the disease characteristic information mapping table are combined to generate the guiding information for the user to respond, finally, the final reply content is generated based on the response information of the user to the guiding information.
A second embodiment of the present application relates to an interactive information generating apparatus based on a GPT Hybrid (GPT Hybrid) model, including:
the construction module is used for constructing a mapping table of disease keywords and disease characteristic information;
the first receiving module is used for receiving user input information;
the first judging module is used for judging whether the numerical prediction requirement is contained or not based on the user input information;
the guiding information generation module is used for extracting disease keywords based on the user input information when the user input information contains numerical prediction requirements, finding corresponding disease feature information from the disease keyword and disease feature information mapping table, and generating guiding information by taking the user disease keywords and the disease feature information as input of a large language model; the guiding information is used for guiding a user to provide a disease characteristic value corresponding to the disease characteristic information;
the second receiving module is used for receiving response information of the user to the guide information;
and the reply module is used for generating reply information about the user input information based on the response information.
The first judging module extracts a numerical prediction keyword from the user input information and judges whether the user input information contains numerical prediction requirements or not based on the numerical prediction keyword.
The reply module includes:
the prediction unit is used for taking the response information as the input of a prediction model to obtain an output value;
the text output unit is used for taking the user input information as the input of the large language model to obtain an output text;
and the reply unit is used for merging the output value and the output text to generate reply information.
The reply module further comprises:
the extraction module is used for extracting the disease characteristic value in the response information;
the second judging module is used for judging whether the disease characteristic value is missing compared with disease characteristic information corresponding to the disease keyword in the disease keyword and disease characteristic information mapping table;
and the new guide information generation module is used for finding out missing disease characteristic information when the disease characteristic value is missing compared with the disease characteristic information corresponding to the disease keyword in the disease characteristic information mapping table, and generating new guide information by taking the user disease keyword and the missing disease characteristic information as input of a large language model.

Claims (10)

1. The interactive information generation method based on the GPT hybrid model is characterized by comprising the following steps of:
constructing a mapping table of disease keywords and disease characteristic information;
receiving user input information;
judging whether numerical prediction requirements are contained or not based on the user input information;
when the user input information contains numerical prediction requirements, extracting disease keywords based on the user input information, finding corresponding disease feature information from a disease keyword and disease feature information mapping table, and taking the user disease keywords and the disease feature information as input of a large language model to generate guide information, wherein the guide information is used for guiding a user to provide disease feature values corresponding to the disease feature information;
receiving response information of a user to the guide information;
reply information about the user input information is generated based on the response information.
2. The interactive information generating method based on the GPT hybrid model of claim 1, wherein each disease keyword in the disease keyword-disease feature information mapping table corresponds to a plurality of disease feature information.
3. The interactive information generating method based on the GPT hybrid model according to claim 1, wherein the determining whether the numerical prediction requirement is included based on the user input information is specifically:
and extracting a numerical prediction keyword from the user input information, and judging whether the user input information contains numerical prediction requirements or not based on the numerical prediction keyword.
4. The interactive information generating method based on the GPT hybrid model of claim 1, wherein the generating reply information about the user input information based on the response information specifically comprises:
taking the response information as the input of a prediction model to obtain an output value;
taking the user input information as the input of a large language model to obtain an output text;
and merging the output value with the output text to generate reply information.
5. The GPT-hybrid-model-based interactive information generation method according to claim 1, wherein before generating reply information on the user input information based on the response information, further comprising:
extracting a disease characteristic value in the response information;
judging whether the disease characteristic value is missing compared with disease characteristic information corresponding to the disease keyword in a disease characteristic information mapping table;
if the disease characteristic value is missing compared with the disease characteristic information corresponding to the disease keyword in the disease characteristic information mapping table, missing disease characteristic information is found, and the user disease keyword and the missing disease characteristic information are used as input of a large language model to generate new guide information.
6. The interactive information generation method based on the GPT hybrid model according to claim 1, wherein when the user input information does not include a numerical prediction requirement, the user input information is used as an input of a large language model, and reply information about the user input information is generated.
7. An interactive information generating device based on a GPT hybrid model, which is characterized by comprising:
the construction module is used for constructing a mapping table of disease keywords and disease characteristic information;
the first receiving module is used for receiving user input information;
the first judging module is used for judging whether the numerical prediction requirement is contained or not based on the user input information;
the guiding information generation module is used for extracting disease keywords based on the user input information when the user input information contains numerical prediction requirements, finding corresponding disease feature information from the disease keyword and disease feature information mapping table, and generating guiding information by taking the user disease keywords and the disease feature information as input of a large language model; the guiding information is used for guiding a user to provide a disease characteristic value corresponding to the disease characteristic information;
the second receiving module is used for receiving response information of the user to the guide information;
and the reply module is used for generating reply information about the user input information based on the response information.
8. The GPT-hybrid-model-based interactive information generation apparatus according to claim 7, wherein the first determination module extracts a numerical prediction keyword from the user input information, and determines whether the user input information contains a numerical prediction requirement based on the numerical prediction keyword.
9. The GPT-hybrid-model-based interaction information generation apparatus of claim 7, wherein the reply module comprises:
the prediction unit is used for taking the response information as the input of a prediction model to obtain an output value;
the text output unit is used for taking the user input information as the input of the large language model to obtain an output text;
and the reply unit is used for merging the output value and the output text to generate reply information.
10. The interactive information generating device based on the GPT hybrid model according to claim 7, wherein the reply module further comprises:
the extraction module is used for extracting the disease characteristic value in the response information;
the second judging module is used for judging whether the disease characteristic value is missing compared with disease characteristic information corresponding to the disease keyword in the disease keyword and disease characteristic information mapping table;
and the new guide information generation module is used for finding out missing disease characteristic information when the disease characteristic value is missing compared with the disease characteristic information corresponding to the disease keyword in the disease characteristic information mapping table, and generating new guide information by taking the user disease keyword and the missing disease characteristic information as input of a large language model.
CN202310888137.4A 2023-07-19 2023-07-19 Interaction information generation method and device based on GPT hybrid model Pending CN116881420A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310888137.4A CN116881420A (en) 2023-07-19 2023-07-19 Interaction information generation method and device based on GPT hybrid model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310888137.4A CN116881420A (en) 2023-07-19 2023-07-19 Interaction information generation method and device based on GPT hybrid model

Publications (1)

Publication Number Publication Date
CN116881420A true CN116881420A (en) 2023-10-13

Family

ID=88258357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310888137.4A Pending CN116881420A (en) 2023-07-19 2023-07-19 Interaction information generation method and device based on GPT hybrid model

Country Status (1)

Country Link
CN (1) CN116881420A (en)

Similar Documents

Publication Publication Date Title
CN110909137A (en) Information pushing method and device based on man-machine interaction and computer equipment
RU2708941C1 (en) Method and apparatus for recognizing segmented sentences for a human-machine intelligent question-answer system
CN112163424B (en) Data labeling method, device, equipment and medium
CN109408821B (en) Corpus generation method and device, computing equipment and storage medium
CN116737908A (en) Knowledge question-answering method, device, equipment and storage medium
CN110795913A (en) Text encoding method and device, storage medium and terminal
CN112685550B (en) Intelligent question-answering method, intelligent question-answering device, intelligent question-answering server and computer readable storage medium
CN110795544B (en) Content searching method, device, equipment and storage medium
CN114461777B (en) Intelligent question-answering method, device, equipment and storage medium
CN114647713A (en) Knowledge graph question-answering method, device and storage medium based on virtual confrontation
CN110717021A (en) Input text and related device for obtaining artificial intelligence interview
CN111400340A (en) Natural language processing method and device, computer equipment and storage medium
CN115186080A (en) Intelligent question-answering data processing method, system, computer equipment and medium
CN115714030A (en) Medical question-answering system and method based on pain perception and active interaction
CN110674276A (en) Robot self-learning method, robot terminal, device and readable storage medium
CN114020886A (en) Speech intention recognition method, device, equipment and storage medium
CN112966076A (en) Intelligent question and answer generating method and device, computer equipment and storage medium
CN113705207A (en) Grammar error recognition method and device
CN112288584A (en) Insurance application processing method and device, computer readable medium and electronic equipment
CN109344385B (en) Natural language processing method, device, computer equipment and storage medium
CN116186219A (en) Man-machine dialogue interaction method, system and storage medium
CN116842143A (en) Dialog simulation method and device based on artificial intelligence, electronic equipment and medium
CN116881420A (en) Interaction information generation method and device based on GPT hybrid model
CN113901793A (en) Event extraction method and device combining RPA and AI
CN113468306A (en) Voice conversation method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination