CN119066172A - Question and answer processing method, device, computer equipment, readable storage medium and program product - Google Patents

Question and answer processing method, device, computer equipment, readable storage medium and program product Download PDF

Info

Publication number
CN119066172A
CN119066172A CN202411176682.1A CN202411176682A CN119066172A CN 119066172 A CN119066172 A CN 119066172A CN 202411176682 A CN202411176682 A CN 202411176682A CN 119066172 A CN119066172 A CN 119066172A
Authority
CN
China
Prior art keywords
text
question
answer
optimized
initial
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
CN202411176682.1A
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.)
Guangzhou Quyan Network Technology Co ltd
Original Assignee
Guangzhou Quyan Network Technology Co ltd
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 Guangzhou Quyan Network Technology Co ltd filed Critical Guangzhou Quyan Network Technology Co ltd
Priority to CN202411176682.1A priority Critical patent/CN119066172A/en
Publication of CN119066172A publication Critical patent/CN119066172A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/194Calculation of difference between files
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a question-answering processing method, a question-answering processing device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of obtaining initial question texts input to a question-answer large model, conducting text optimization processing on the initial question texts to obtain an optimized text set, wherein the optimized text set comprises the initial question texts and optimized question texts with at least two text optimization dimensions, retrieving reference document information matched with each text in the optimized text set from a preset knowledge base, obtaining target question-answer prompts according to the reference document information matched with each text and a preset prompt word template, wherein the target question-answer prompts are used for indicating the question-answer large model to output target answer content used for responding to the initial question texts by referring to the reference document information matched with each text, and displaying the target answer content output by the question-answer large model. The method can improve the accuracy of the question reply.

Description

Question-answering processing method, question-answering processing device, computer device, readable storage medium, and program product
Technical Field
The present application relates to the field of artificial intelligence technology, and in particular, to a question-answering processing method, apparatus, computer device, computer readable storage medium, and computer program product.
Background
Artificial intelligence (AI, artificial Intelligence) is a comprehensive technology of computer science, and by researching the design principle and implementation method of various intelligent machines, the machines have the functions of sensing, reasoning and decision. Artificial intelligence technology is a comprehensive subject, and relates to a wide range of fields, including natural language processing technology, machine learning/deep learning and other directions, and with the development of technology, the artificial intelligence technology will be applied in more fields and has an increasingly important value.
Large language models are an important application of natural language processing techniques. Along with continuous optimization and development of the large language model, the intelligent question-answering system updates and iterates from simple keyword matching to the fact that the large language model understands user characters, recognizes intention and acquires more relevant information to answer, and the effect of the intelligent question-answering system in the field of man-machine conversation is greatly improved. Because of this, the requirements of the intelligent question-answering system are higher, and the core is that the intelligent system can correctly recognize and understand the semantics of the language of the user.
However, in the related art, because of the complexity and ambiguity of the language of the user question, the questions may contain professional vocabulary or ambiguous abbreviations with various meanings, resulting in lower accuracy of the question answers.
Therefore, there is a problem in the related art that the accuracy of the question reply is low.
Disclosure of Invention
Based on this, it is necessary to provide a question-answering processing method, apparatus, computer device, computer-readable storage medium, and computer program product capable of improving accuracy of question-answering in view of the above-described technical problems.
In a first aspect, the present application provides a question-answering processing method, including:
obtaining an initial question text input by a big question-answer model, and performing text optimization processing on the initial question text to obtain an optimized text set, wherein the optimized text set comprises the initial question text and optimized question texts of at least two text optimization dimensions;
Retrieving reference document information matched with each text in the optimized text set from a preset knowledge base;
The target question-answer prompt is used for indicating the question-answer big model to output target answer content for responding to the initial question text by referring to the reference document information matched with each text;
And displaying the target answer content output by the question-answer large model.
In one embodiment, the text optimization processing is performed on the initial question text to obtain an optimized text set, including:
acquiring historical dialogue content of the question-answer large model;
According to the context information in the history dialogue content, performing text optimization processing on the initial question text to obtain the optimized question text;
And obtaining the optimized text set according to the optimized question text and the initial question text.
In one embodiment, the text optimization dimension includes a question extension, and performing text optimization processing on the initial question text according to the context information in the historical dialog content to obtain the optimized question text, where the text optimization processing includes:
Expanding the initial question text according to the context information in the history dialogue content to obtain an expanded question text, wherein the question completeness of the expanded question text is higher than that of the initial question text;
And taking the expanded question text as the optimized question text.
In one embodiment, the text optimization dimension includes a question transformation, and the text optimization processing is performed on the initial question text to obtain an optimized text set, including:
Converting the initial question text to obtain a converted question text, wherein the question complexity of the converted question text is lower than that of the initial question text;
and taking the converted question text as the optimized question text.
In one embodiment, the text optimization processing is performed on the initial question text to obtain an optimized text set, including:
acquiring historical dialogue content of the question-answer large model;
generating initial answer text for responding to the initial question text according to the context information in the historical dialogue content;
And obtaining the optimized text set according to the initial answer text, the optimized question text and the initial question text.
In one embodiment, the reference document information comprises document text information and rich text information, the rich text information comprises image link and image description information, and the target question-answer prompt is obtained according to the reference document information matched with each text and a preset prompt word template, and the method comprises the following steps:
According to a preset arrangement sequence, arranging document text information matched with each text, matched image links and matched image description information to obtain arranged reference document information matched with each text;
And obtaining the target question-answering prompt according to the matched reference document information of the texts and the prompt word template.
In a second aspect, the present application further provides a question-answering processing apparatus, including:
The optimizing unit is used for obtaining an initial question text input by the big question-answer model, and carrying out text optimization processing on the initial question text to obtain an optimized text set;
The retrieval unit is used for retrieving the reference document information matched with each text in the optimized text set from a preset knowledge base;
The determining unit is used for obtaining a target question-answer prompt according to the reference document information matched with each text and a preset prompt word template, wherein the target question-answer prompt is used for indicating the question-answer big model to output target answer content for responding to the initial question text by referring to the reference document information matched with each text;
and the display unit is used for displaying the target answer content output by the question-answer large model.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, the memory storing a computer program which, when executed by the processor, implements the steps of the method described above.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the method described above.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, implements the steps of the method described above.
The question-answering processing method, the question-answering processing device, the computer equipment, the computer readable storage medium and the computer program product are used for obtaining an optimized text set by obtaining an initial question text input to a question-answering large model, conducting text optimization processing on the initial question text, wherein the optimized text set comprises the initial question text and optimized question texts with at least two text optimization dimensions, retrieving reference document information matched with each text in the optimized text set from a preset knowledge base, obtaining a target question-answering prompt according to the reference document information matched with each text and a preset prompt word template, wherein the target question-answering prompt is used for indicating the question-answering large model to output target answer content used for responding to the initial question text by referring to the reference document information matched with each text, and displaying the target answer content output by the question-answering large model.
In this way, through carrying out text optimization processing on an initial question text input to a question-answer large model, an optimized question text set containing at least two text optimization dimensions and an initial question text is obtained, so that reference document information matched with each text in the optimized text set is searched from a knowledge base, multi-dimensional retrieval content recall is realized, the problem of deficient content of single question retrieval in the related art is solved, and when the initial question text is retrieved to the knowledge base, the problem that final answer accuracy is low due to incomplete recall content is solved, and a target question-answer prompt is obtained according to the reference document information matched with each text and a preset prompt word template, so that the question-answer large model can output target answer content for responding to the initial question text by referring to the reference document information matched with each text, and the question-answer accuracy of the question-answer large model can be effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are needed in the description of the embodiments of the present application or the related technologies will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other related drawings may be obtained according to these drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a flow chart of a question-answering method according to one embodiment;
FIG. 2 is a flowchart of a question-answering method according to another embodiment;
FIG. 3 is a block diagram of a question-answering processing system according to one embodiment;
FIG. 4 is a block diagram of a question-answering apparatus according to one embodiment;
fig. 5 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
In one embodiment, as shown in fig. 1, a question-answering processing method is provided, and this embodiment is applied to a computer device for illustration, where it is understood that the computer device may be a terminal, a server, or a system including a terminal and a server. In this embodiment, the method includes the steps of:
Step S110, an initial question text input to the question-answer large model is obtained, and text optimization processing is carried out on the initial question text to obtain an optimized text set.
The optimized text set comprises an initial question text and optimized question texts of at least two text optimization dimensions.
The initial question text may be an original question text input by the user account in the interactive interface of the question-answering large model.
The optimized question text may be an optimized question text obtained by performing text optimization processing on the initial question text in a corresponding text optimization dimension.
Where text optimization dimensions may refer to different aspects that may be considered in the text optimization process.
Where the question and answer large model may refer to a large model for replying to question text entered by a user account.
In a specific implementation, the user account can input an initial question text in an interactive interface of the question-answer large model, so that the computer equipment can acquire the initial question text input to the question-answer large model, and perform text optimization processing on the initial question text according to at least two text optimization dimensions to obtain an optimized text set, wherein the optimized text set comprises the initial question text and optimized question texts of at least two text optimization dimensions.
Step S120, retrieving the reference document information matched with each text in the optimized text set from a preset knowledge base.
The preset knowledge base may be an external knowledge base. The reference document information matched with each text in the optimized text set is retrieved from a preset knowledge base, and can be data which is not trained by a question-answer large model and never seen before, such as proprietary research, technical files or communication in different professional fields.
In a specific implementation, the computer device may traverse each text in the optimized text set, and perform content retrieval to a preset knowledge base in parallel, so as to retrieve reference document information matched with each text in the optimized text set from the preset knowledge base.
And step S130, obtaining a target question-answer prompt according to the matched reference document information of each text and a preset prompt word template.
The target question-answer prompt is used for indicating the question-answer big model to output target answer content for responding to the initial question text by referring to the matched reference document information of each text.
The preset Prompt word template can be a Prompt template of a question-answering large model.
Where promt is an instruction, question, or statement that can be used to direct or instruct a language model to generate a particular text output. Prompt is the starting point for a user to interact with a language model, which tells the model about the user's intent, and expects the model to respond in a meaningful and relevant way.
Wherein the target answer content may be answer content for replying to the initial question text. Wherein the target answer content may include, but is not limited to, text information, image information, etc.
In the specific implementation, the computer equipment can obtain a target question-answer prompt according to the matched reference document information of each text and a preset prompt word template, and the target question-answer prompt is used as a parameter to call a question-answer large model so as to instruct the question-answer large model to output target answer content for responding to the initial question text by referring to the matched reference document information of each text.
And step S140, displaying target answer content output by the question-answer large model.
In a specific implementation, the computer device may present the target answer content output by the question-answer large model.
According to the question-answer processing method, an initial question text input to a question-answer large model is obtained, text optimization processing is conducted on the initial question text to obtain an optimized text set, the optimized text set comprises the initial question text and optimized question texts with at least two text optimization dimensions, reference document information matched with each text in the optimized text set is retrieved from a preset knowledge base, target question-answer prompts are obtained according to the reference document information matched with each text and a preset prompt word template, the target question-answer prompts are used for indicating the question-answer large model to output target answer content used for responding to the initial question text through reference to the reference document information matched with each text, and the target answer content output by the question-answer large model is displayed.
In this way, through carrying out text optimization processing on an initial question text input to a question-answer large model, an optimized question text set containing at least two text optimization dimensions and an initial question text is obtained, so that reference document information matched with each text in the optimized text set is searched from a knowledge base, multi-dimensional retrieval content recall is realized, the problem of deficient content of single question retrieval in the related art is solved, and when the initial question text is retrieved to the knowledge base, the problem that final answer accuracy is low due to incomplete recall content is solved, and a target question-answer prompt is obtained according to the reference document information matched with each text and a preset prompt word template, so that the question-answer large model can output target answer content for responding to the initial question text by referring to the reference document information matched with each text, and the question-answer accuracy of the question-answer large model can be effectively improved.
In one embodiment, text optimization processing is performed on an initial question text to obtain an optimized text set, wherein the optimized text set comprises obtaining historical dialogue contents of a question-answer large model, text optimization processing is performed on the initial question text according to context information in the historical dialogue contents to obtain optimized question text of at least two text optimization dimensions, and the optimized text set is obtained according to the optimized question text and the initial question text.
The historical dialogue content can be the previous dialogue content of the user account and the question-answer large model.
In a specific implementation, in the process that the computer device performs text optimization processing on the initial question text to obtain an optimized text set, the computer device may obtain historical dialogue contents of a user account and a question-answering model, for example, may obtain multiple rounds of historical dialogue contents, and may obtain 10 pieces of historical dialogue contents (a preset number of the historical dialogue contents may be set according to actual requirements and not specifically limited herein) before the initial question text. The computer equipment can conduct text optimization processing on the initial problem text according to the context information in the historical dialogue content to obtain the optimized problem text, for example, can conduct problem conversion pre-operations such as main body completion and reference resolution on the initial problem text according to the context information in the historical dialogue content, and therefore can obtain an optimized text set according to the optimized problem text and the initial problem text.
According to the technical scheme, the method comprises the steps of obtaining historical dialogue content of a question-answer large model, conducting text optimization processing on an initial question text according to context information in the historical dialogue content to obtain an optimized question text, and obtaining an optimized text set according to the optimized question text and the initial question text. Therefore, the text optimization processing is carried out on the initial question text according to the context information in the historical dialogue content, so that the ambiguity or potential ambiguity in the initial question text can be eliminated more accurately, the semantics of the initial question text can be understood more accurately, and the question text after optimization can represent the question intention of the user account more accurately.
In one embodiment, the text optimization dimension comprises problem expansion, and text optimization processing is performed on the initial problem text according to context information in the historical dialogue content to obtain an optimized problem text.
The question integrity degree of the expanded question text is higher than that of the original question text.
The completeness of the question may refer to the elaboration and/or clarity of the content of the question.
In a specific implementation, the text optimization dimension may include a question expansion, and in the process that the computer device performs text optimization processing on the initial question text according to the context information in the historical dialogue content to obtain the optimized question text, the computer device may expand the initial question text according to the context information in the historical dialogue content to obtain an expanded question text, where the question completeness of the expanded question text is higher than the question completeness of the initial question text. In this manner, the computer device may expand the expanded question text as an optimized question text for this text optimization dimension.
Further, the computer device can expand the initial question text according to the context information in the historical dialogue content through the question expansion large model to obtain the expanded question text.
The question extension large model may be a large model for extending a question text, among other things. Specifically, the computer device may obtain a Prompt word Prompt preset by the large problem expansion model, and expand the initial problem text by combining context information in the historical dialogue content to obtain an expanded problem text.
In some embodiments, expanding the initial question text may include the following methods, respectively:
1) Understanding the user's intent based on the contextual information, guessing the user's mind, creates a new problem. More associated content can be retrieved based on the context intent guess.
2) Content-filling the problem based on the context information. The problem presented by the user often has complexity and ambiguity, and understanding the intention to perform the problem context filling can be further optimized, so that more accurate reference content is retrieved.
3) And further analyzing the problem, and if the problem is a complex or compound problem, splitting the sub-problem aiming at the input initial problem text to form a plurality of sub-problems. Expanding a single query into multiple queries can enrich the content of the query, and a complex problem can be broken down into a series of simpler sub-problems using a small-to-large hinting approach. Further context information is provided to address any lack of specific nuances, thereby ensuring a better relevance of the generated answers.
In some embodiments, the Prompt word Prompt of the large model of the problem expansion is designed in advance, which includes the design corresponding to the preset roles and the respective capabilities, as follows:
1) Preset roles
As a user behavior insight expert, the method is good at analyzing the questions presented by the user, understanding the meaning of the questions, generating a new question set by expanding the questions, and outputting the questions according to the JSON format of the character string array.
2) Problem extension
Ability 1 guessing real problems
And analyzing the problem presented by the user and understanding the meaning of the problem.
Based on the initial question text of the user, the original intention of the user is guessed, and a hypothesis is made that the user may want to ask the related question, so as to generate a new question.
Capability 2 sub-problem resolution
And analyzing the problem presented by the user and understanding the meaning of the problem.
If multiple things or multiple dimensions are involved in a problem, the problem can be split into multiple problems.
Although it is possible to split into multiple questions, please focus on 1 to 2 questions of the core.
Capability 3 question Up and Down Wen Buquan
And analyzing the problem presented by the user and understanding the meaning of the problem.
If the problem is ambiguous, the context information is combined to complement the problem, and a new problem is generated.
For example:
what was recently a good-looking television show?
And B, showing the story of the TV play A in the second season and the main angle B in the river lake.
I want to see the first season.
The "i want to see first season" in the above dialogue is an ambiguous problem, and in combination with the context information, it can be complemented with "i want to see first season of drama a".
According to the technical scheme, the text optimization dimension comprises problem expansion, an initial problem text is expanded according to context information in historical dialogue content to obtain an expanded problem text, the question completeness of the expanded problem text is higher than that of the initial problem text, and the expanded problem text is used as the optimized problem text. Therefore, according to the context information in the historical dialogue content, the initial question text is expanded, the expanded question text with higher question completeness can be obtained, content retrieval is carried out based on the expanded question text with higher question completeness, more relevant and more accurate reference content can be retrieved, and the problem with lower answer accuracy caused by complex and ambiguous single questions can be solved.
In one embodiment, the text optimization dimension comprises question conversion, and text optimization processing is performed on the initial question text to obtain an optimized text set, wherein the text optimization dimension comprises the steps of converting the initial question text to obtain a converted question text, and taking the converted question text as the optimized question text.
The question complexity of the converted question text is lower than that of the original question text.
In the specific implementation, the text optimization dimension comprises question conversion, in the process that the computer equipment performs text optimization processing on an initial question text to obtain an optimized text set, the computer equipment can convert the initial question text to obtain a converted question text, and the question complexity of the converted question text is lower than that of the initial question text, so that the computer equipment can take the converted question text as the optimized question text of the text optimization dimension of the question conversion.
Further, the computer device can convert the initial question text through the question conversion large model to obtain a converted question text.
The question transformation large model may be a large model for transforming a question text, among other things. Specifically, the computer device may obtain a Prompt word Prompt preset by the large problem conversion model, and convert the initial problem text to obtain a converted problem text.
In practical application, the problem conversion large model and the problem expansion large model can be the same large model, and the large model can be the problem expansion and conversion large model.
In some embodiments, converting the initial question text may include the following methods:
The problem generalization operation abstracts the initial problem text, proposes a more superior problem, and can acquire more comprehensive information related to the problem.
In some embodiments, the Prompt word Prompt of the large model of the problem transformation is designed in advance, which includes the design corresponding to the preset roles and the respective capabilities, as follows:
1) Preset roles
As a user behavior insight expert, the method is good at analyzing the questions presented by the user, understanding the meaning of the questions, generating a new question set by converting the questions, and outputting the new question set according to the JSON format of the character string array.
2) Problem transformation
Capability 1 problem generalization
And analyzing the problem presented by the user and understanding the meaning of the problem.
And (3) carrying out upper summarization according to the questions of the user, and converting the initial question text into a question with lower question complexity, so that the answer is easier.
For example:
1. Initial question text what is politician C responsible for from month 5 of 1955 to month 4 of 1956?
Converted question text which positions are the politician C plays in his career?
2. Initial question text who was the spouse of movie star D in 1968 through 1974?
Post-conversion question text: who is the spouse of movie star D?
According to the technical scheme, the text optimization dimension comprises problem conversion, the converted problem text is obtained by converting the initial problem text, the question complexity of the converted problem text is lower than that of the initial problem text, and the converted problem text is used as the optimized problem text. Therefore, through content retrieval of the converted question text with lower question complexity, more comprehensive reference document information related to the initial question text can be obtained, and accordingly the comprehensiveness of answer content for the initial question text can be improved.
In one embodiment, text optimization processing is performed on an initial question text to obtain an optimized text set, wherein the optimized text set comprises the steps of obtaining historical dialogue contents of a question-answer large model, generating an initial answer text for responding to the initial question text according to context information in the historical dialogue contents, and obtaining the optimized text set according to the initial answer text, the optimized question text and the initial question text.
In the specific implementation, in the process of carrying out text optimization processing on an initial question text by computer equipment to obtain an optimized text set, the computer equipment can acquire historical dialogue contents of a question-answer large model, generate an initial answer text for responding to the initial question text according to context information in the historical dialogue contents, and obtain the optimized text set according to the initial answer text, the optimized question text and the initial question text. That is, the optimized text set may include initial answer text in addition to the initial question text and the optimized question text of at least two text optimization dimensions.
Wherein generating an initial answer text for responding to the initial question text may be understood as a hypothetical answer text generated in the text optimization dimension of question conversion. In particular, the computer device may present a hypothetical reply based on the context information and an understanding of the initial question text, followed by a search with the hypothetical reply text. In response to the initial question text, a hypothetical reply is constructed, rather than searching the database directly for reference document information and its calculated vector associated with the initial question text. It focuses on embedding similarities between answers rather than seeking embedding similarities for questions or queries.
Taking a problem conversion big model as an example, a Prompt word Prompt of the problem conversion big model is designed in advance, wherein the Prompt word Prompt comprises a preset role and designs corresponding to each capability, and the design is as follows:
1) Preset roles
As a user behavior insight expert, the method is good at analyzing the questions presented by the user, understanding the meaning of the questions, generating a new question set by converting the questions, and outputting the new question set according to the JSON format of the character string array.
2) Problem transformation
Ability 2 question hypothesis reply
And analyzing the questions posed by the user, understanding the meaning of the questions, and trying to answer.
In combination with the context information in the history dialogue content, the initial question text is answered, and an answer with pertinence and likelihood is generated as an initial answer text.
If the history dialogue content has the history answer related to the initial question text, the key point refers to the history answer as the answer basis of the question answer.
According to the technical scheme, the method comprises the steps of obtaining historical dialogue content of a question-answer large model, generating initial answer text for responding to initial question text according to context information in the historical dialogue content, and obtaining an optimized text set according to the initial answer text, the optimized question text and the initial question text. Therefore, the optimized text set further comprises the initial answer text generated in response to the initial question text, and the similarity between the embedded answers is focused in the process of searching the content in the preset knowledge base based on the initial answer text, so that more specific and relevant reference document information can be provided, and the accuracy of the answer content is further improved.
In one embodiment, the reference document information includes document text information and rich text information; the method comprises the steps of arranging document text information matched with each text, matched image links and matched image description information according to a preset arrangement sequence to obtain arranged reference document information matched with each text, and obtaining a target question-answer prompt according to the arranged reference document information matched with each text and a preset prompt word template.
The preset arrangement sequence may be the sequence of document text information, image links and image description information.
The method comprises the steps that in the process that a computer device obtains a target question-answer prompt according to the matched reference document information and a preset prompt word template of each text, the computer device can arrange the matched document text information, the matched image link and the matched image description information of each text according to a preset arrangement sequence to obtain the matched reference document information of each text, and therefore the computer device can obtain the target question-answer prompt according to the matched reference document information and the preset prompt word template of each text.
It can be appreciated that if the text-matched reference document information does not include rich text information, the computer device can obtain the target question-answer prompt according to the text-matched document text information and the prompt word template.
The multi-modal content in the rich text information is arranged as follows in the flow:
1) Content assembling structure
A.[text],image_url: [image_url],image_description: [image_description];
B.[text],image_url: [image_url],image_description: [image_description];
C.[text],image_url: [image_url],image_description: [image_description];
D......
2) On the Prompt project of Prompt
If the reference document information has image_url (image link) which matches the corresponding text, the image_url is placed after the corresponding text for reference by a user, and the image_url cannot be modified and is not randomly edited.
Image_url is placed after the text in the original order without changing the position of image_url.
If there is image description in the reference document information, it cannot be used to answer the user's question.
The data structure of the reference document information involved in the above-described flow is shown in tables 1 and 2 below:
Table 1 structural Table referring to document information units
The structure table of the reference document information unit (DocChunk) is shown in table 2:
TABLE 2 Structure Table of Futext information subunits (RichTextItem)
According to the technical scheme, the reference document information comprises document text information and rich text information, the rich text information comprises image links and image description information, the document text information matched with each text, the image links matched with each text and the image description information matched with each text are arranged according to a preset arrangement sequence to obtain the arranged reference document information matched with each text, and the target question-answer prompt is obtained according to the arranged reference document information matched with each text and the prompt word template. Therefore, through presetting the arrangement sequence, the document text information matched with each text, the matched image links and the matched image description information are arranged, and then the document text information is combined with the prompt word template, so that the reference document information can be effectively integrated, and the usability of the information is improved.
In other embodiments, a target question and answer prompt is obtained according to the matched reference document information of each text and a preset prompt word template, wherein the computer equipment can rank other reference document information according to the search similarity with the corresponding text from high to low to obtain ranked other reference document information, the other reference document information is the reference document information matched with the text except the initial question text in the optimized text set, the computer equipment can combine the ranked other reference document information with the reference document information matched with the initial question text to obtain a target reference document information set, and the computer equipment can obtain the target question and answer prompt according to the target reference document information set and the preset prompt word template.
The method comprises the steps of selecting a target reference document information set, wherein the reference document information matched with an initial problem text in the target reference document information set is ranked before other ranked reference document information.
Further, according to the target reference document information set and a preset prompt word template, a target question-answer prompt is obtained, and the method comprises the steps that computer equipment can screen target reference document information from the target reference document information set, wherein the target reference document information is the reference document information with the search similarity between the target reference document information and a matched text meeting the preset similarity condition, and according to the target reference document information and the preset prompt word template, the target question-answer prompt is obtained.
The preset similarity condition may be that the previous K (K is a positive integer, and a specific value of K is set according to actual requirements) bits are ordered in the target reference document information set.
In this way, the target question-answer prompt is obtained according to the target reference document information with the similarity meeting the preset similarity condition and the preset prompt word template in the target reference document information set, so that the number of the reference document information for generating the target answer prompt can be reduced, and the waste of computing resources is effectively reduced.
In another embodiment, as shown in fig. 2, a question-answering processing method is provided, and the method is applied to a computer device for illustration, and includes the following steps:
Step S202, acquiring an initial question text input to the question-answering large model.
Step S204, acquiring the historical dialogue content of the question-answer large model.
Step S206, expanding the initial question text according to the context information in the history dialogue content to obtain an expanded question text, and taking the expanded question text as an optimized question text.
Step S208, generating initial answer text for responding to the initial question text according to the context information in the history dialogue content.
Step S210, converting the initial question text to obtain a converted question text, and taking the converted question text as an optimized question text.
Step S212, obtaining an optimized text set according to the initial answer text, the optimized question text and the initial question text.
Step S214, retrieving the reference document information matched with each text in the optimized text set from a preset knowledge base.
Step S216, obtaining a target question-answer prompt according to the matched reference document information of each text and a preset prompt word template.
And step S218, displaying target answer content output by the question-answer large model.
It should be noted that, the specific limitation of the above steps may be referred to the specific limitation of a question-answering processing method.
In another embodiment, as shown in fig. 3, a question-answering processing system is provided, which includes the following seven modules:
1) The question acquisition and reply module is used for receiving an initial question text input by the user account, transmitting the initial question text to a downstream module, and simultaneously receiving a final target answer content processed downstream and returning the final target answer content to the user account;
2) The chat history context module is used for supporting the chat history context management of multiple rounds of conversations, providing a storage inquiry interface of the chat records to the outside and supporting the automatic expiration strategy configuration of the chat history;
3) The promptt management module is used for managing promptts required by the calling model, wherein the promptt management module comprises a promptt template of a question-answering large model, a promptt of a question extension and conversion large model and the like, supports acquisition of preset prompts, and supports arrangement and splicing of multi-mode retrieval contents to obtain final prompts;
4) The searching pre-optimization module is used for performing optimization processing on an initial problem text, at least comprising two text optimization dimensions of problem expansion and problem conversion, and finally returning an optimized text set containing a plurality of texts;
5) The retrieval module is mainly connected to a preset knowledge base in a butt joint mode, takes texts in the optimized text set as parameters to query the knowledge base, and obtains the matched reference document information of each text;
6) The post-search optimizing module is used for optimizing the search, merging, de-duplicating and rearranging the reference document information after obtaining the reference document information matched with each text so as to reduce resource waste;
7) And the model calling module is used for mainly receiving the target question-answer prompt and integrating related parameters to call a question-answer big model.
Taking the above-mentioned question-answering processing system as an example for implementing a question-answering processing method, referring to fig. 3, the question-answering processing method may include the following steps:
1) The method comprises the steps that a problem acquisition and reply module acquires an initial problem text input by a user account, wherein the type of the initial problem text is a character string, a chat history context module is called to acquire history dialogue contents, the history dialogue contents can be acquired according to preset quantity, and the history dialogue contents are the first 10 pieces by default;
2) And the retrieval front-end module receives the initial question text and the historical dialogue content, and performs expansion and conversion on the initial question text in parallel, namely acquiring Prompt word template of corresponding text optimization dimension from the template management module, and calling the question expansion and conversion large model through the large model calling module to generate related text. The problem expansion comprises the following operations of guessing a real problem, splitting a sub-problem, completing a problem context, and the problem conversion comprises the following operations of problem hypothesis reply and problem generalization, wherein the problem context Wen Buquan strongly depends on the history dialogue content, and if the history dialogue content is empty, the problem context completion is not executed;
3) The search front-end module integrates the text for generating the problem expansion and the problem conversion and the initial problem text to form a character string array, namely an optimized text set, wherein the optimized text set is subjected to simple full-matching de-duplication combination, and the processed optimized text set is transmitted to the search module;
4) The retrieval module acquires the optimized text set, traverses the optimized text set, performs content retrieval to the knowledge base in parallel, and acquires the reference document information matched with each text in the optimized text set. The reference document information is aggregated together and transmitted to a retrieval post-optimization module;
5) The post-search optimizing module sequentially performs the following operations of de-duplication according to the search keywords and sorting according to the search similarity, wherein the reference document information searched based on the initial problem text does not need to be sorted according to the search similarity, is preferentially arranged at the forefront of the whole, and then intercepts Top K pieces of content of all the reference document information according to a preset K value to obtain target reference document information.
6) And sorting the target reference document information obtained after the optimization of the retrieval post-optimization module, and acquiring document text information if the rich text information set is empty. The method comprises the steps of acquiring a preset Prompt word Prompt template of a question-answer big model from a Prompt management module and splicing multi-mode content in target reference document information, namely arranging document text information, image links and image description information in the target reference document information according to a preset arrangement sequence;
7) And the large model calling module calls a large question-answer model by using the target question-answer Prompt obtained by splicing the target reference document information and the question-answer large model Prompt word Prompt template as parameters, guides the large question-answer model to form final target answer content, and returns the final target answer content to the user account. The question-answer large model may be a large language model (Large Language Model, LLM).
The Prompt word Prompt of the question-answer large model is designed in advance, and the Prompt word Prompt comprises a preset role and designs corresponding to the capabilities, wherein the design is as follows:
1) Preset roles
As an expert in question information processing, the user is adept at understanding the questions, and the most conforming answers are formed according to the provided reference document information.
2) Preset capability
Ability 1 understanding problem
The nature and purpose of the problem is clearly understood from the problem of the user.
And deeply analyzing the problem, screening and analyzing the provided reference document information, and finding out the most relevant content and the most critical part from the reference document information.
If more content is acquired, the content is orderly arranged in a segmented and striped mode, so that the user can understand the content conveniently.
Capability 2 reference to reference source, operation on related content
If the questions with intention or similar meaning in the reference document information are referred and explicit answers are given, returning the answers of the questions as they are, wherein the answers comprise text information and image information, and the questions are not required to be modified, and are not required to be additionally summarized and refined;
for text processing in the related reference document information, secondary transformation is not needed, the text is faithful to the original text, and additional summarization and refinement are not needed.
Capability 3 reference to reference source, operation on irrelevant content
If the content in the reference document information is irrelevant to the problem, the part is automatically removed and is not used as a reference for the answer;
if all the contents in the reference document information are completely irrelevant to the problem, the user is explicitly informed of the reference document information which is not matched with the reference document information, and the non-programmable information answers.
Capability 4 interpretation information
If the content in the answer does not depend on the reference document information, the user needs to be explicitly told that the part is additionally provided;
when the reference document information is used for answering, no subjective interpretation or speculation is needed, and a reference document information source is needed to be given when the answer is ended;
after the answer is finished, please check if the answer meets all the requirements.
Therefore, through optimizing the input initial question text, including expansion and conversion, multi-dimensional retrieval content recall is realized, the problem of lack of content of single question retrieval is solved, the problem of poor question-answering effect caused by complex and ambiguous single questions is solved, and the accuracy of question-answering is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a question-answer processing device for realizing the above-mentioned question-answer processing method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in one or more embodiments of the question-answering device provided below may refer to the limitation of the question-answering method in the above description, and will not be repeated here.
In an exemplary embodiment, as shown in fig. 4, there is provided a question-answering processing apparatus including an optimizing unit 410, a retrieving unit 420, a determining unit 430, and a presenting unit 440, wherein:
The optimizing unit 410 is configured to obtain an initial question text input by the big question-answer model, perform text optimization processing on the initial question text, and obtain an optimized text set, where the optimized text set includes the initial question text and optimized question texts of at least two text optimization dimensions.
And the retrieving unit 420 is configured to retrieve, from a preset knowledge base, reference document information that matches each text in the optimized text set.
And a determining unit 430, configured to obtain a target question-answer prompt according to the reference document information matched with each text and a preset prompt word template, where the target question-answer prompt is used to instruct the question-answer big model to output target answer content for responding to the initial question text by referring to the reference document information matched with each text.
And a display unit 440, configured to display the target answer content output by the question-answer big model.
In one embodiment, the optimizing unit 410 is specifically configured to obtain the historical dialogue content of the question-answer large model, perform text optimization processing on the initial question text according to the context information in the historical dialogue content to obtain the optimized question text, and obtain the optimized text set according to the optimized question text and the initial question text.
In one embodiment, the text optimization dimension includes a question expansion, and the optimization unit 410 is specifically configured to expand the initial question text according to the context information in the historical dialog content to obtain an expanded question text, where the question integrity of the expanded question text is higher than the question integrity of the initial question text, and take the expanded question text as the optimized question text.
In one embodiment, the text optimization dimension includes question transformation, and the optimization unit 410 is specifically configured to transform the initial question text to obtain a transformed question text, where the question complexity of the transformed question text is lower than the question complexity of the initial question text, and take the transformed question text as the optimized question text.
In one embodiment, the optimizing unit 410 is specifically configured to obtain a history dialogue content of the big question-answer model, generate an initial answer text for responding to the initial question text according to context information in the history dialogue content, and obtain the optimized text set according to the initial answer text, the optimized question text and the initial question text.
In one embodiment, the reference document information includes document text information and rich text information, the rich text information includes image links and image description information, the determining unit 430 is specifically configured to arrange the document text information matched with each text and the image links matched with each other and the image description information matched with each other according to a preset arrangement sequence, to obtain the reference document information matched with each text after arrangement, and obtain the question-answer prompt target according to the reference document information matched with each text and the prompt word template matched with each text.
The respective units in the question-answering processing apparatus described above may be implemented in whole or in part by software, hardware, and a combination thereof. The units can be embedded in hardware or independent of a processor in the computer equipment, and can also be stored in a memory in the computer equipment in a software mode, so that the processor can call and execute the operations corresponding to the units.
In one exemplary embodiment, a computer device is provided, which may be a terminal, and an internal structure diagram thereof may be as shown in fig. 5. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The Communication interface of the computer device is used for conducting wired or wireless Communication with an external terminal, and the wireless Communication can be realized through WIFI, a mobile cellular network, near field Communication (NEAR FIELD Communication) or other technologies. The computer program is executed by a processor to implement a question-answering processing method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are both information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to meet the related regulations.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile memory and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (RESISTIVE RANDOM ACCESS MEMORY, reRAM), magneto-resistive Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computation, an artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) processor, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the present application.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1.一种问答处理方法,其特征在于,所述方法包括:1. A question-answering processing method, characterized in that the method comprises: 获取向问答大模型输入的初始问题文本,对所述初始问题文本进行文本优化处理,得到优化文本集合;所述优化文本集合包括所述初始问题文本和至少两种文本优化维度的优化后问题文本;Obtaining an initial question text input into the question-answering big model, performing text optimization processing on the initial question text to obtain an optimized text set; the optimized text set includes the initial question text and optimized question texts in at least two text optimization dimensions; 从预设的知识库中检索出与所述优化文本集合中各文本相匹配的参考文档信息;Retrieving reference document information matching each text in the optimized text set from a preset knowledge base; 根据各所述文本相匹配的参考文档信息和预设的提示词模板,得到目标问答提示;所述目标问答提示用于指示所述问答大模型通过参考各所述文本相匹配的参考文档信息,输出用于响应所述初始问题文本的目标回答内容;According to the reference document information matched by each of the texts and the preset prompt word template, a target question and answer prompt is obtained; the target question and answer prompt is used to instruct the question and answer large model to output a target answer content for responding to the initial question text by referring to the reference document information matched by each of the texts; 展示所述问答大模型输出的所述目标回答内容。Display the target answer content output by the question-answering model. 2.根据权利要求1所述的方法,其特征在于,所述对所述初始问题文本进行文本优化处理,得到优化文本集合,包括:2. The method according to claim 1, characterized in that the step of performing text optimization processing on the initial question text to obtain an optimized text set comprises: 获取所述问答大模型的历史对话内容;Obtain historical conversation content of the question-answering model; 根据所述历史对话内容中的上下文信息,对所述初始问题文本进行文本优化处理,得到所述优化后问题文本;According to the context information in the historical conversation content, the initial question text is optimized to obtain the optimized question text; 根据所述优化后问题文本和所述初始问题文本,得到所述优化文本集合。The optimized text set is obtained according to the optimized question text and the initial question text. 3.根据权利要求2所述的方法,其特征在于,所述文本优化维度包括问题扩展,所述根据所述历史对话内容中的上下文信息,对所述初始问题文本进行文本优化处理,得到所述优化后问题文本,包括:3. The method according to claim 2, wherein the text optimization dimension includes question expansion, and the text optimization processing of the initial question text according to the context information in the historical conversation content to obtain the optimized question text comprises: 根据所述历史对话内容中的上下文信息,对所述初始问题文本进行扩展,得到扩展后问题文本;所述扩展后问题文本的提问完整程度高于所述初始问题文本的提问完整程度;Expanding the initial question text according to the context information in the historical conversation content to obtain an expanded question text; the completeness of the question in the expanded question text is higher than that of the initial question text; 将所述扩展后问题文本作为所述优化后问题文本。The expanded question text is used as the optimized question text. 4.根据权利要求1所述的方法,其特征在于,所述文本优化维度包括问题转换,所述对所述初始问题文本进行文本优化处理,得到优化文本集合,包括:4. The method according to claim 1, characterized in that the text optimization dimension includes question conversion, and the text optimization processing of the initial question text to obtain an optimized text set includes: 对所述初始问题文本进行转换,得到转换后问题文本;所述转换后问题文本的提问复杂程度低于所述初始问题文本的提问复杂程度;Converting the initial question text to obtain a converted question text; the complexity of the question in the converted question text is lower than the complexity of the question in the initial question text; 将所述转换后问题文本作为所述优化后问题文本。The converted question text is used as the optimized question text. 5.根据权利要求1所述的方法,其特征在于,所述对所述初始问题文本进行文本优化处理,得到优化文本集合,包括:5. The method according to claim 1, characterized in that the step of performing text optimization processing on the initial question text to obtain an optimized text set comprises: 获取所述问答大模型的历史对话内容;Obtain historical conversation content of the question-answering model; 根据所述历史对话内容中的上下文信息,生成用于响应所述初始问题文本的初始回答文本;Generating an initial answer text for responding to the initial question text according to the context information in the historical conversation content; 根据所述初始回答文本、所述优化后问题文本和所述初始问题文本,得到所述优化文本集合。The optimized text set is obtained according to the initial answer text, the optimized question text and the initial question text. 6.根据权利要求1所述的方法,其特征在于,所述参考文档信息包括文档文本信息和富文本信息;所述富文本信息包括图像链接和图像描述信息;所述根据各所述文本相匹配的参考文档信息和预设的提示词模板,得到目标问答提示,包括:6. The method according to claim 1, characterized in that the reference document information includes document text information and rich text information; the rich text information includes image links and image description information; the step of obtaining a target question and answer prompt based on the reference document information matched with each of the texts and a preset prompt word template comprises: 按照预设编排顺序,将各所述文本相匹配的文档文本信息和相匹配的图像链接以及相匹配的图像描述信息进行编排,得到各所述文本相匹配的编排后的参考文档信息;Arranging the document text information, the image link and the image description information that match the texts according to a preset arrangement order, to obtain the arranged reference document information that matches the texts; 根据各所述文本相匹配的编排后的参考文档信息和所述提示词模板,得到所述目标问答提示。The target question and answer prompt is obtained according to the edited reference document information and the prompt word template that match each of the texts. 7.一种问答处理装置,其特征在于,所述装置包括:7. A question-answer processing device, characterized in that the device comprises: 优化单元,用于获取向问答大模型输入的初始问题文本,对所述初始问题文本进行文本优化处理,得到优化文本集合;所述优化文本集合包括所述初始问题文本和至少两种文本优化维度的优化后问题文本;An optimization unit, used for obtaining an initial question text input into the question-answering large model, performing text optimization processing on the initial question text, and obtaining an optimized text set; the optimized text set includes the initial question text and optimized question texts in at least two text optimization dimensions; 检索单元,用于从预设的知识库中检索出与所述优化文本集合中各文本相匹配的参考文档信息;A retrieval unit, used to retrieve reference document information matching each text in the optimized text set from a preset knowledge base; 确定单元,用于根据各所述文本相匹配的参考文档信息和预设的提示词模板,得到目标问答提示;所述目标问答提示用于指示所述问答大模型通过参考各所述文本相匹配的参考文档信息,输出用于响应所述初始问题文本的目标回答内容;A determination unit, used to obtain a target question and answer prompt according to the reference document information matched by each of the texts and a preset prompt word template; the target question and answer prompt is used to instruct the question and answer macromodel to output a target answer content for responding to the initial question text by referring to the reference document information matched by each of the texts; 展示单元,用于展示所述问答大模型输出的所述目标回答内容。A display unit is used to display the target answer content output by the question-answering model. 8.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至6中任一项所述的方法的步骤。8. A computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when executing the computer program. 9.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至6中任一项所述的方法的步骤。9. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented. 10.一种计算机程序产品,包括计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至6中任一项所述的方法的步骤。10. A computer program product, comprising a computer program, characterized in that when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
CN202411176682.1A 2024-08-26 2024-08-26 Question and answer processing method, device, computer equipment, readable storage medium and program product Pending CN119066172A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411176682.1A CN119066172A (en) 2024-08-26 2024-08-26 Question and answer processing method, device, computer equipment, readable storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411176682.1A CN119066172A (en) 2024-08-26 2024-08-26 Question and answer processing method, device, computer equipment, readable storage medium and program product

Publications (1)

Publication Number Publication Date
CN119066172A true CN119066172A (en) 2024-12-03

Family

ID=93633123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411176682.1A Pending CN119066172A (en) 2024-08-26 2024-08-26 Question and answer processing method, device, computer equipment, readable storage medium and program product

Country Status (1)

Country Link
CN (1) CN119066172A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119621944A (en) * 2025-02-12 2025-03-14 新华三人工智能科技有限公司 Data retrieval method, device, electronic device and medium
CN119782492A (en) * 2025-03-11 2025-04-08 新华三人工智能科技有限公司 Question and answer method and device based on large language model, electronic equipment and medium
CN120067458A (en) * 2025-04-16 2025-05-30 优视科技有限公司 Information processing method, electronic device, and computer storage medium
CN120804239A (en) * 2024-12-12 2025-10-17 北京奇虎科技有限公司 Question and answer optimization method, device, equipment and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120804239A (en) * 2024-12-12 2025-10-17 北京奇虎科技有限公司 Question and answer optimization method, device, equipment and storage medium
CN119621944A (en) * 2025-02-12 2025-03-14 新华三人工智能科技有限公司 Data retrieval method, device, electronic device and medium
CN119782492A (en) * 2025-03-11 2025-04-08 新华三人工智能科技有限公司 Question and answer method and device based on large language model, electronic equipment and medium
CN119782492B (en) * 2025-03-11 2025-08-01 新华三人工智能科技有限公司 Question and answer method and device based on large language model, electronic equipment and medium
CN120067458A (en) * 2025-04-16 2025-05-30 优视科技有限公司 Information processing method, electronic device, and computer storage medium

Similar Documents

Publication Publication Date Title
CN118394890B (en) Knowledge retrieval enhancement generation method and system based on large language model
US11899681B2 (en) Knowledge graph building method, electronic apparatus and non-transitory computer readable storage medium
US8756245B2 (en) Systems and methods for answering user questions
CN119066172A (en) Question and answer processing method, device, computer equipment, readable storage medium and program product
CN118627625A (en) A method and system for enhancing RAG question answering through hybrid retrieval method
CN118277588B (en) Query request processing method, electronic device and storage medium
CN119415661A (en) Method, device, equipment, medium and program product for responding to user question information
CN119719354A (en) Document generation method and device based on artificial intelligence
JP7849447B2 (en) Methods, apparatus, electronic devices, storage media, and computer programs for identifying interaction information
CN118210893A (en) Answer generation method, device, equipment, storage medium and product
CN119692469B (en) Reply text generation method and device, storage medium and program product
CN118228824A (en) Knowledge question answering method, device, electronic device and storage medium
CN119557462A (en) Information retrieval method, device, equipment, readable storage medium and program product
CN119988563A (en) Intelligent question-answering method, device, electronic device, and storage medium based on multimodal information processing
CN119088818A (en) Large model SQL generation method integrating few-sample prompts and multiple-choice mechanism
CN111881352B (en) Content push method, device, computer equipment and storage medium
CN120234390B (en) Method and device for organizing and question-answering type retrieval of geochemical operators based on large language model and knowledge graph
WO2023245523A1 (en) Method and apparatus for generating training data
CN118733744A (en) Intelligent question-answering method, device, computer equipment, and readable storage medium
CN119600619A (en) Model training data set generation method, device, computer equipment, readable storage medium and program product
CN119166769A (en) Information query method, device, computer equipment, storage medium and program product
CN118195011A (en) Medical LLM model reasoning method and device based on knowledge graph
CN118467795A (en) Feature vector similarity-based lake and bin integrated unstructured data searching method
CN117312517A (en) Human-computer interaction prompt library maintenance method, electronic equipment and storage medium
US12608417B1 (en) Artificial intelligence language model orchestrator for interactive searching

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