[go: up one dir, main page]

CN118446315A - Problem solving method, device, storage medium and computer program product - Google Patents

Problem solving method, device, storage medium and computer program product Download PDF

Info

Publication number
CN118446315A
CN118446315A CN202410591683.6A CN202410591683A CN118446315A CN 118446315 A CN118446315 A CN 118446315A CN 202410591683 A CN202410591683 A CN 202410591683A CN 118446315 A CN118446315 A CN 118446315A
Authority
CN
China
Prior art keywords
knowledge
text
segments
question
information
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
CN202410591683.6A
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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202410591683.6A priority Critical patent/CN118446315A/en
Publication of CN118446315A publication Critical patent/CN118446315A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/041Abduction
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • G06N5/022Knowledge engineering; Knowledge acquisition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure provides a problem solving method, apparatus, storage medium and computer program product, wherein the method comprises: performing expansion processing on the question text to generate a question retrieval text corresponding to the question text; obtaining knowledge segments matched with the problem retrieval text from a knowledge base as related knowledge segments; the knowledge fragment is document information corresponding to each level of the hierarchical structure, which is obtained by analyzing the knowledge document based on the hierarchical structure of the knowledge document; generating problem inquiry information based on the problem text and the related knowledge segments; based on the question query information, obtaining the answer information of the question text by using a question answer model. The method and the system can enable the knowledge segments to keep the hierarchical information of the knowledge document, can infer and expand the problems, can improve the accuracy of obtaining the knowledge segments, can improve the accuracy and the effectiveness of provided search contexts and problem query information, and can improve the answering accuracy of the problem answer model.

Description

Problem solving method, device, storage medium and computer program product
Technical Field
The present invention relates to the field of computer technology, and in particular, to a method, an apparatus, a storage medium, and a computer program product for solving a problem.
Background
In various application scenarios, accurate answers need to be provided for clients quickly, so that the satisfaction of the clients is improved. Currently, a question answer model may be used to answer a customer's question. Based on the question reply model, the large-scale corpus can be trained through a deep learning technology, so that rich language knowledge is obtained. When the problem is solved, RAG (RETRIEVAL-Augmented Generation, retrieval enhancement generation) technology can be used for matching the problem text proposed by the client with knowledge documents in the knowledge base to obtain knowledge segments; after the knowledge segments are acquired, query information is generated based on the question text and the knowledge segments, a question answer model is input, and answer information output by the question answer model is returned to the client.
Disclosure of Invention
The present disclosure provides a problem solving method, apparatus, storage medium, and computer program product.
According to a first aspect of the present disclosure, there is provided a problem solving method, including: performing expansion processing on the question text to generate a question retrieval text corresponding to the question text; obtaining knowledge segments matched with the problem retrieval text from a knowledge base as related knowledge segments; the knowledge segments are document information corresponding to the hierarchy of the hierarchy structure, which is obtained by analyzing the knowledge document based on the hierarchy structure of the knowledge document; generating problem inquiry information based on the problem text and the related knowledge segments; and obtaining the answer information of the question text by using a question answer model based on the question query information.
Optionally, the expanding the question text to generate a question search text corresponding to the question text includes: analyzing the problem text by utilizing a retrieval enhancement model to generate a problem sub-text of the problem text; and expanding the question sub-text by using the retrieval enhancement model to generate the question retrieval text.
Optionally, the obtaining a knowledge segment matching the question retrieval text includes, as a relevant knowledge segment: and determining the relevant knowledge segments in the knowledge base by utilizing the retrieval enhancement model based on indexes set for the knowledge segments.
Optionally, the number of the relevant knowledge pieces is a plurality; the generating the question query information based on the question text and the related knowledge segments includes: determining matching knowledge segments from all the relevant knowledge segments according to the relevance information between each relevant knowledge segment and the question retrieval text; and generating the problem inquiry information based on the problem text and the matching knowledge segments.
Optionally, determining the matching knowledge segments from all the relevant knowledge segments according to the relevance information between each relevant knowledge segment and the question retrieval text includes: determining a first relevance between each relevant knowledge segment and the question retrieval text by using a first relevance determining model; and determining one or more relevant knowledge segments with highest first relevance as the matching knowledge segments.
Optionally, generating the question query information based on the question text and the matching knowledge segments includes: acquiring a knowledge segment positioned at the upper level of the matched knowledge segment as an additional knowledge segment; acquiring names of knowledge segments of one or more levels located above the additional knowledge segments as additional knowledge names based on the level attribute information; and generating the problem inquiry information based on the problem text, the additional knowledge segments and the additional knowledge names.
Optionally, determining a knowledge segment with a reply reference relation with the reply information in the knowledge segments to be determined as a reference knowledge segment; wherein the knowledge piece to be determined includes: the matching knowledge piece and/or the additional knowledge piece; and displaying the reference knowledge segment under the condition of displaying the reply information.
Optionally, in the knowledge segments to be determined, determining a knowledge segment with a reply reference relation with the reply information, wherein the knowledge segment is used as a reference knowledge segment and comprises: dividing the reply information into information blocks; determining a second correlation degree between the information block and all knowledge pieces to be determined by using a second correlation degree determination model; and determining one or more knowledge segments to be determined with the highest second correlation degree as reference knowledge segments of the information block.
Optionally, the displaying the reference knowledge piece includes: constructing a reply reference association relationship between the information block and the reference knowledge piece; and displaying the reference knowledge segments of the information blocks based on the reply reference association relationship.
Optionally, the hierarchy includes: a parent-child hierarchy; wherein, in the knowledge base, one or more knowledge segments are stored for each level of the parent-child hierarchical structure.
According to a second aspect of the present disclosure, there is provided a problem solving apparatus including: the problem expansion module is used for carrying out expansion processing on the problem text and generating a problem retrieval text corresponding to the problem text; the related information determining module is used for obtaining knowledge fragments matched with the problem retrieval text from a knowledge base to serve as related knowledge fragments; the knowledge segments are document information corresponding to the hierarchy of the hierarchy structure, which is obtained by analyzing the knowledge document based on the hierarchy structure of the knowledge document; the query information determining module is used for generating the query information of the questions based on the questions text and the related knowledge segments; and the answer information obtaining module is used for obtaining answer information of the question text by utilizing a question answer model based on the question query information.
According to a third aspect of the present disclosure, there is provided a problem solving apparatus including: a memory; and a processor coupled to the memory, the processor configured to perform the method as described above based on instructions stored in the memory.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium storing computer instructions for execution by a processor of a method as described above.
According to a fifth aspect of the present disclosure there is provided a computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the method as described above.
The method, the device, the storage medium and the computer program product for solving the problems can enable the knowledge segments to keep the hierarchical information of the knowledge document, can infer and expand the problems, can improve the accuracy of obtaining the knowledge segments, can improve the accuracy and the effectiveness of provided search contexts and the problem query information, and can improve the solving accuracy of the problem reply model.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in more detail embodiments thereof with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of embodiments of the disclosure, and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure, without limitation to the disclosure. The foregoing and other objects and advantages of the disclosure are further described below in connection with the following detailed description of the embodiments, with reference to the accompanying drawings. In the drawings, the same or corresponding technical features or components will be denoted by the same or corresponding reference numerals.
FIG. 1 is a flow diagram of one embodiment of a problem solving method according to the present disclosure;
FIG. 2 is a flow diagram of an augmented question text in one embodiment of a question answering method according to the present disclosure;
FIG. 3 is a flow diagram of obtaining issue query information in one embodiment of an issue resolution method according to the present disclosure;
FIG. 4 is a flow diagram of generating issue query information in one embodiment of an issue resolution method according to the present disclosure;
FIG. 5 is a flow diagram showing a reference knowledge segment in one embodiment of a problem solving method according to the present disclosure;
FIG. 6 is a block diagram of one embodiment of a problem solving apparatus according to the present disclosure;
FIG. 7 is a block diagram of a query information determination module in one embodiment of a problem solving apparatus according to the present disclosure;
FIG. 8 is a block diagram of another embodiment of a problem solving apparatus according to the present disclosure;
fig. 9 is a block diagram of still another embodiment of a problem solving apparatus according to the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure will be described hereinafter with reference to the accompanying drawings. In the interest of clarity and conciseness, not all features of an embodiment are described in the specification. However, it should be appreciated that many implementation-specific arrangements must be made in implementing the embodiments in order to achieve a developer's specific goals, such as compliance with those constraints related to equipment and business, and that these constraints may vary from one implementation to another. Moreover, it will be appreciated that such a development effort might be complex and time-consuming, but would nevertheless be a routine undertaking for those of ordinary skill in the art having the benefit of this disclosure.
It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless it is specifically stated otherwise.
It will be appreciated by those of skill in the art that the terms "first," "second," etc. in embodiments of the present disclosure are used merely to distinguish between different steps, devices, or models, etc., and do not represent any particular technical meaning nor necessarily logical order between them.
It should also be understood that in embodiments of the present disclosure, "plurality" may refer to two or more, and "at least one" may refer to one, two or more.
It should also be appreciated that any component, data, or structure referred to in the presently disclosed embodiments may be generally understood as one or more without explicit limitation or the contrary in the context.
In addition, the term "and/or" in this disclosure is merely an association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" in the present disclosure generally indicates that the front and rear association objects are an or relationship.
It should also be understood that the description of the various embodiments of the present disclosure emphasizes the differences between the various embodiments, and that the same or similar features may be referred to each other, and for brevity, will not be described in detail.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
Furthermore, in order to avoid obscuring the present disclosure with unnecessary detail, only processing steps and/or apparatus structures that are closely related to at least the schemes according to the present disclosure are shown in the drawings, while other details that are not greatly relevant to the present disclosure are omitted. It should also be noted that like reference numerals and letters in the figures indicate like items, and thus once an item is defined in one figure, it is not necessary to discuss it again for subsequent figures.
In the related art known to the inventor, when a customer presents a problem, a RAG technique is used to obtain knowledge segments in a knowledge base, query information is generated based on a problem text and the knowledge segments, and a problem answer model is input, and solution information is generated through the problem answer model. At present, in the process of dividing a knowledge document into a plurality of knowledge segments, dividing the knowledge document into a plurality of small blocks according to the set size of the knowledge segments, and not considering the hierarchical relationship of the knowledge document, so that the knowledge segments are not in hierarchical relationship and the situation that information is incomplete possibly occurs, and the accuracy of outputting solution information by a question-answer model is affected; in addition, when the problem text is matched with the knowledge document, the problem text input by the client is directly used, the client problem is not expanded, and the accuracy of the answer information is low.
Fig. 1 is a flow diagram of one embodiment of a problem solving method according to the present disclosure. As shown in fig. 1, the problem solving method includes steps S101 to S104.
Step S101, performing expansion processing on the question text to generate a question search text corresponding to the question text.
In some embodiments, the question text may be obtained using a variety of methods. For example, converting speech input by a customer to generate a question text; or receiving question text entered by the customer via a dialog box. In the multiple questions of the client, there is a scene that the client continuously questions a plurality of questions, and if the questions are not expanded, the accuracy of the answer information may be low. The question text may be expanded or otherwise processed to generate one or more question search texts.
Step S102, obtaining knowledge segments matched with the question retrieval text in a knowledge base as related knowledge segments.
In some embodiments, using a search enhancement generation technique, knowledge segments that match the customer's question text may be retrieved from a knowledge base, such that the question-answer model may be processed in conjunction with the question text and the retrieved relevant knowledge segments to generate answer information. A plurality of knowledge documents may be stored in advance, and the knowledge documents may be a plurality of types of documents.
The knowledge segments in the knowledge base are document segments obtained by analyzing the knowledge document based on the hierarchical structure of the knowledge document; the knowledge document may be segmented based on a hierarchical structure of the knowledge document, and a plurality of knowledge segments may be obtained and stored in a knowledge base. The hierarchy may be a variety of hierarchies such as parent-child hierarchies.
For example, the parent-child hierarchies of the knowledge document are, from high to low, respectively: documents, sections, blocks, paragraphs, sentences; wherein, the file level is highest in level, and the sentence level is lowest in level. The knowledge document is segmented according to a parent-child hierarchical structure, knowledge fragments corresponding to file, chapter, block, segment and sentence levels are generated, the word number of each hierarchical fragment does not exceed the readable text length limit (token) of models such as a question-answer model, and the token can be a basic unit of text or code.
Some other content may be added to the content of the knowledge segments to ensure the readability of the content of the knowledge segments. For example, the knowledge segments may be segmented and some overlapping text content added using a variety of methods such as the existing window segmentation method.
Each knowledge piece is configured with information such as name, content, hierarchical information, etc. For example, the names of the file knowledge pieces are file names, the names of the chapter knowledge pieces are chapter names, and the like; the hierarchy information includes the hierarchy of the knowledge piece itself and upper and lower hierarchy information thereof. The content of the knowledge segments may include the content of the knowledge segments at the next hierarchical level. For example, the knowledge pieces of the next hierarchy of the file knowledge piece a include a chapter knowledge piece B, a chapter knowledge piece C, and the like, and the contents of the file knowledge piece a include the contents of the knowledge piece B, the chapter knowledge piece C, and the like; the knowledge segments of the next level of the segment knowledge segments E include sentence knowledge segments F, sentence knowledge segments G, and the like, and the contents of the segment knowledge segments E include the contents of the sentence knowledge segments F, the sentence knowledge segments G, and the like.
Knowledge pieces may be obtained using a variety of methods. For example, a knowledge segment is obtained by using a trained document segmentation model, and the document segmentation model can be a model such as a convolutional neural network model; the knowledge document 1 is input into a document segmentation model, the document segmentation model segments the knowledge document based on a parent-child hierarchical structure of the knowledge document, and a plurality of knowledge segments are output. If the length of the knowledge segment exceeds the token length limit, the document segmentation model can edit the content of the knowledge segment, and generate the content of the knowledge segment meeting the length requirement under the condition of keeping content information
The relevant knowledge pieces may be determined using a variety of methods. For example, the retrieval may be performed based on the question retrieval text, and one or more knowledge segments matching the question retrieval text may be obtained as related knowledge segments from the knowledge segments in the knowledge base.
Step S103, generating question query information based on the question text and the related knowledge segments.
Step S104, based on the question query information, obtaining the answer information of the question text by using the question answer model.
In some embodiments, the question reply model may be a variety of models, such as a LLM (Large Language Model ) model, or the like. The method can be used for carrying out merging and other processing according to the problem text and the related knowledge segments to generate problem inquiry information; and inputting the question query information into a question answer model to obtain answer information output by the question answer model.
According to the problem solving method in the embodiment, the problem searching text is generated by performing expansion processing on the problem text, and a knowledge segment with hierarchical attribute corresponding to the problem searching text is obtained and used for generating problem inquiry information and obtaining reply information of the problem text by using a problem reply model; the knowledge segments can be enabled to retain the hierarchical information of the knowledge document, the questions can be inferred and expanded, the accuracy of obtaining the knowledge segments can be improved, the accuracy and the effectiveness of the provided search context and the question query information can be improved, and the answering accuracy of the question answering model can be improved.
FIG. 2 is a flow diagram of augmenting problem text in one embodiment of a problem solving method according to the present disclosure. As shown in fig. 2, the method of augmenting question text includes steps S201-S202.
Step S201, analyzing the question text by utilizing the retrieval enhancement model to generate a question sub-text of the question text.
Step S202, expanding the question sub-text by using the retrieval enhancement model to generate a question retrieval text.
In some embodiments, the problem text is preprocessed, wherein the preprocessing comprises the processes of unification of case and case, correction of wrongly written characters and the like; the question text may be set as a question or the like that has to be answered. If the question text is directly retrieved, the accuracy of the reply information is low. For example, the text of a question is "how fully 100 minus 20 coupons are configured", which is because "fully 100 minus 20 coupons" belongs to business entities, the accuracy of outputting answer information by a language model is low by directly using "how fully 100 minus 20 coupons are configured" to input a question answer model, and it is difficult to obtain a valid knowledge piece by directly using "how fully 100 minus 20 coupons are configured" to obtain a knowledge piece.
The search enhancement model may be a variety of models, such as a trained neural network model, and the like. The method comprises the steps of segmenting a question text 'how to configure full 100 minus 20 coupons' by utilizing a retrieval enhancement model, and generating a question sub-text of the question text, wherein the question sub-text comprises: "full 100 minus 20 coupons", "how coupons are configured", and the like; expanding the question sub-text by using a retrieval enhancement model to generate a question retrieval text, wherein the question retrieval text comprises: what the full 100 minus 20 coupon is, what the full 100 minus 20 coupon belongs to, what the coupon is configured, and so on.
In the knowledge base, indexes are set for each knowledge segment, and the indexes can be indexes such as ES indexes, vector indexes and the like. Based on the index, a relevant knowledge segment can be determined from among a plurality of knowledge segments using a retrieval enhancement model.
In some embodiments, indexes such as ES (ElasticSearch) indexes, vector indexes, etc. are set on knowledge segments in the knowledge base. The index may be set for a combination of sentence content, paragraph title, and paragraph content, or for a combination of file title, chapter title, block title, and paragraph title, or the like.
The relevant knowledge segments may be obtained in a variety of ways based on the index. For example, the knowledge base is an elastic search full-text retrieval system, and an ES index is set for the knowledge segments in the knowledge base; and obtaining the relevant knowledge segments of the problem retrieval text based on the existing retrieval method by utilizing the retrieval enhancement model and based on the ES index.
The method can also set a vector index for the knowledge segments in the knowledge base, obtain the vector of the question search text by using the search enhancement model, and determine the similarity between the question search text and the knowledge segments based on the similarity by using a similarity algorithm such as Euclidean distance and cosine similarity between the vector of the question search text and the vector index, so as to obtain the relevant knowledge segments of the question search text based on the similarity search. For example, one or more knowledge segments with highest similarity may be used as relevant knowledge segments for question retrieval text.
Fig. 3 is a flow diagram of obtaining problem query information in one embodiment of a problem solving method according to the present disclosure. As shown in fig. 3, the method of obtaining question query information includes steps S301 to S302.
Step S301, according to the correlation information between the relevant knowledge segments and the question retrieval text, the matching knowledge segments are determined in all relevant knowledge segments.
In some embodiments, the number of relevant knowledge pieces obtained by the retrieval may be multiple. Under the condition that a plurality of related knowledge segments are provided, a first correlation degree determining model is utilized to determine the first correlation degree between each related knowledge segment and the question retrieval text; and determining one or more relevant knowledge segments with highest first relevance as matching knowledge segments.
For example, the relevant knowledge segments obtained by searching are knowledge segment 1, knowledge segment 2, knowledge segment 3 and knowledge segment 4. The first correlation determination model may be a variety of models, such as a trained convolutional neural network model or the like. Determining first correlations between the knowledge segments 1, 2, 3 and 4 and the problem retrieval text respectively by using a first correlation determination model, wherein the first correlations are 1.2, 1.3 and 0.8 respectively; knowledge segments 1 and 2 with the highest first correlation degree can be determined and used as matching knowledge segments.
Step S302, generating question query information based on the question text and the matching knowledge segments.
Various methods may be employed to generate the problem query information. Fig. 4 is a flow diagram of generating problem query information in one embodiment of a problem solving method according to the present disclosure. As shown in fig. 4, the method of generating question query information includes steps S3021 to S3023.
In step S3021, knowledge pieces located at the upper level of the matching knowledge pieces are acquired as additional knowledge pieces.
In step S3022, the names of knowledge pieces of one or more hierarchical levels located above the additional knowledge pieces are acquired as additional knowledge names.
In step S3023, question query information is generated based on the question text, the additional knowledge piece, and the additional knowledge name.
In some embodiments, hierarchical attribute information of all hierarchical knowledge segments in the knowledge base is obtained, wherein the hierarchical attribute information comprises information such as hierarchical relationship information of each knowledge segment. Based on the hierarchy attribute information, a knowledge fragment located at the upper hierarchy of the matching knowledge fragment is acquired.
For example, knowledge segment 1 is a sentence-level knowledge segment, knowledge segment 5 is determined as the knowledge segment of the previous level of knowledge segment 1 based on the level attribute information, knowledge segment 5 is a paragraph-level knowledge segment, and knowledge segment 5 is taken as an additional knowledge segment.
The knowledge segment 2 is a block knowledge segment, the knowledge segment of the upper layer of the knowledge segment 2 is determined to be a knowledge segment 6 based on layer attribute information, the knowledge segment 6 is a section layer knowledge segment, and the knowledge segment 6 is taken as an additional knowledge segment.
Based on the hierarchy attribute information, names of knowledge pieces of one or more hierarchies located above the additional knowledge pieces are determined as additional knowledge names. For example, the names of knowledge segments 7 and 8 of two levels above knowledge segment 5 are determined, knowledge segment 7 being a block knowledge segment and knowledge segment 8 being a section knowledge segment; the names of the knowledge pieces 7 and 8 are taken as additional knowledge names.
Determining the name of a knowledge segment 9 of a hierarchy above the knowledge segment 6, wherein the knowledge segment 9 is a file knowledge segment; the name of the knowledge piece 9 is taken as an additional knowledge name.
Based on the question text, the knowledge segments 5, the knowledge segments 6, the additional knowledge names and the association relation between the knowledge segments and the additional knowledge names, generating question query information.
The knowledge segments are restored according to the forward information (hierarchical attribute information) of the knowledge segments, knowledge segment information, knowledge segment names and the like of one or more hierarchies on the current knowledge segments are obtained, more additional information can be provided, and the model can be effectively helped to understand the content of the reference knowledge.
Prompt template is a template for inputting text or queries to a Large Language Model (LLM) for directing the model to generate a desired output or response. And a template can be constructed, and the template is utilized to combine the problem text, the additional knowledge segments and the additional knowledge names to generate the template data which is used as the problem inquiry information.
FIG. 5 is a flow diagram showing a reference knowledge segment in one embodiment of a problem solving method according to the present disclosure. As shown in fig. 5, the method for displaying the reference knowledge segments includes steps S501-S502.
In step S501, a knowledge segment having a reply reference relationship with the reply information is determined as a reference knowledge segment among knowledge segments to be determined. The knowledge segments to be determined include matching knowledge segments and/or additional knowledge segments, etc.
In some embodiments, the reply information is segmented into information blocks, and a second correlation degree determination model is utilized to determine the second correlation degree between the information blocks and all knowledge pieces to be determined; and determining one or more knowledge segments to be determined with the highest second correlation degree as reference knowledge segments of the information block.
The reply information may be segmented into a plurality of information blocks in sentence units. For example, the reply information 1 has 5 sentences, and the reply information 1 is segmented into 5 pieces of information in sentence units, which are pieces of information 1 to 5, respectively. The second correlation determination model may be a variety of models, such as a trained convolutional neural network model or the like. The knowledge segments to be determined comprise information such as a matching knowledge segment and a reduction level, namely knowledge segments to be determined are knowledge segment 1, knowledge segment 2, knowledge segment 5, knowledge segment 6 and the like.
And determining the second correlation degree between the information block 1 and the knowledge segments 1,2, 5 and 6 respectively by using a second correlation degree determination model, and determining one knowledge segment to be determined with the highest second correlation degree as the knowledge segment 5, wherein the knowledge segment 5 is used as a reference knowledge segment of the information block. By analogy, the pieces of information blocks 2-5 reference knowledge can be determined.
In step S502, in the case of displaying the reply information, a reference knowledge piece is displayed.
In some embodiments, a reply reference association between the information block and the reference knowledge piece is constructed; in the case of displaying reply information, a reference knowledge piece of the information block is displayed based on the reply reference association.
For example, an association relationship between the information block 1 and the knowledge piece 5 (reference knowledge piece) is constructed; when the information block 1 is displayed, the knowledge piece 5 may be displayed based on the reply reference association relationship at the same time. There are various ways to display the knowledge piece 5, for example, a link to the knowledge piece 5 may be displayed, and the client clicks on the link to review.
In the case of displaying reply information, the reference knowledge pieces of the information block are displayed based on the reply reference association relationship, the reference content of the reply information can be reversely located, and it can be judged to some extent whether the reply information is generated based on the provided knowledge pieces.
Providing a plurality of knowledge segments as search context information for use by the question reply model when generating the question query information; the answer information generated by the question answer model is usually generated based on less than three knowledge segments, and in order to realize better user experience, reference content of the answer information, namely, reference knowledge segments, need to be positioned for reference by a user.
Based on the problem solving method in the embodiment, the problem searching text is generated by expanding the problem text, and a knowledge segment with hierarchical attribute corresponding to the problem searching text is obtained to generate problem inquiry information and obtain the reply information of the problem text by using a problem reply model; the knowledge segments can be enabled to retain the hierarchical information of the knowledge document, the questions can be inferred and expanded, the accuracy of obtaining the knowledge segments can be improved, the accuracy and the effectiveness of the provided search context and the question query information can be improved, and the answering accuracy of the question answering model can be improved; when the problem inquiry information is generated, knowledge segments can be expanded, more knowledge details can be provided, and the understanding capability and the resolution accuracy of the problem reply model to the problem can be further improved; the method can provide the reference information obtained by the answers when the answers are displayed, and can improve the use feeling of the clients.
In some embodiments, as shown in fig. 6, the present disclosure provides a problem solving apparatus 60 including a problem expansion module 61, a related information determination module 62, a query information determination module 63, and a solution information obtaining module 64.
The question expansion module 61 expands the question text to generate a question search text corresponding to the question text. For example, the question expansion module 61 parses the question text using the search enhancement model to generate a question sub-text of the question text; the question expansion module 61 expands the question sub-text by using the search enhancement model to generate a question search text.
The related information determination module 62 determines a related knowledge piece of the question retrieval text among a plurality of knowledge pieces. For example, the related information determination module 62 determines a related knowledge segment among a plurality of knowledge segments using a retrieval enhancement model based on an index set to the knowledge segment.
The query information determination module 63 generates question query information based on the question text and the relevant knowledge segments. The answer information obtaining module 64 obtains answer information of the question text using the question answer model based on the question query information.
In some embodiments, as shown in fig. 7, the query information determining module 63 includes a match information determining unit 631 and a query information generating unit 632. The matching information determination unit 631 determines matching knowledge segments among all the relevant knowledge segments based on the correlation information between the relevant knowledge segments and the question retrieval text. For example, the matching information determination unit 631 determines the first degree of correlation between each relevant knowledge segment and the question retrieval text using the first degree of correlation determination model; the matching information determining unit 631 determines one or more pieces of related knowledge having the highest first degree of correlation as pieces of matching knowledge.
The query information generation unit 632 generates question query information based on the question text and the pieces of matching knowledge. For example, the query information generating unit 632 acquires, as the additional knowledge pieces, knowledge pieces located at the upper level of the matching knowledge piece based on the level attribute information of the plurality of knowledge pieces; the query information generation unit 632 acquires, as additional knowledge names, names of knowledge pieces of one or more levels located above the additional knowledge pieces based on the level attribute information; the query information generation unit 632 generates the question query information based on the question text, the additional knowledge piece, the additional knowledge name, and the like.
The query information generation unit 632 may combine the question text, the reduced knowledge piece, and the additional knowledge name using a template of the template to generate the template data as the question query information.
In one embodiment, as shown in fig. 8, the present disclosure provides a problem solving apparatus 60' including a problem expansion module 61, a related information determination module 62, a query information determination module 63, a solution information obtaining module 64, and a solution reference display module 65.
The answer reference display module 65 determines, among the knowledge pieces to be determined, a knowledge piece having an answer reference relationship with the answer information as a reference knowledge piece; the knowledge segments to be determined comprise matching knowledge segments and/or additional knowledge segments; the solution reference display module 65 displays the reference knowledge piece in the case of displaying the reply information.
For example, the answer reference display module 65 divides the answer information into information blocks, and determines second relatedness between the information blocks and all knowledge pieces to be determined using a second relatedness determination model; the solution reference display module 65 determines one or more knowledge segments to be determined with the highest second correlation degree as reference knowledge segments of the information block.
The answer reference display module 65 constructs an answer reference association between the information block and the reference knowledge piece, and displays the reference knowledge piece of the information block based on the answer reference association.
In some embodiments, as shown in fig. 9, the present disclosure provides a problem solving apparatus that may include a memory 72, a processor 71, a communication interface 73, and a bus 74. The memory 72 is used for storing instructions, the processor 71 is coupled to the memory 72, and the processor 71 is configured to implement the problem solving method described above based on the instructions stored in the memory 72.
The memory 72 may be a high-speed RAM memory, a nonvolatile memory (non-volatile memory), or the like, and the memory 72 may be a memory array. The memory 72 may also be partitioned and the blocks may be combined into virtual volumes according to certain rules. Processor 71 may be a central processing unit CPU, or an Application-specific integrated Circuit ASIC (Application SPECIFIC INTEGRATED Circuit), or one or more integrated circuits configured to implement the problem-solving methods of the present disclosure.
In some embodiments, the present disclosure provides a computer-readable storage medium storing computer instructions that, when executed by a processor, perform a method as in any of the embodiments above.
A computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium may include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Embodiments of the present disclosure may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform steps in a method according to various embodiments of the present disclosure described in the above "exemplary method" section of the present description.
The problem solving method, the device, the storage medium and the computer program product in the embodiment can enable the knowledge segments to keep the hierarchical information of the knowledge document, can infer and expand the problem, can improve the accuracy of obtaining the knowledge segments, can improve the accuracy and the effectiveness of provided search context and problem query information, and can improve the solving accuracy of the problem answering model; when the problem inquiry information is generated, knowledge segments can be expanded, more knowledge details can be provided, and the understanding capability and the resolution accuracy of the problem reply model to the problem can be further improved; the method can provide the reference information obtained by the answers when the answers are displayed, and can improve the use feeling of the clients.
The basic principles of the present disclosure have been described above in connection with specific embodiments, but it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present disclosure. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, since the disclosure is not necessarily limited to practice with the specific details described.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, so that the same or similar parts between the embodiments are mutually referred to. For system embodiments, the description is relatively simple as it essentially corresponds to method embodiments, and reference should be made to the description of method embodiments for relevant points.
The block diagrams of the devices, apparatuses, devices, systems referred to in this disclosure are merely illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
It is also noted that in the apparatus, devices and methods of the present disclosure, components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered equivalent to the present disclosure.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the disclosure to the form disclosed herein. While various exemplary aspects and embodiments have been discussed above, those of skill in the art will appreciate that the above-described embodiments are merely illustrative and do not limit the scope of the disclosure. It will be appreciated by those skilled in the art that the above-described embodiments can be combined, modified or substituted without departing from the scope and spirit of the disclosure.

Claims (14)

1. A method of solving a problem, comprising:
Performing expansion processing on the question text to generate a question retrieval text corresponding to the question text;
obtaining knowledge segments matched with the problem retrieval text from a knowledge base as related knowledge segments; the knowledge segments are document information corresponding to the hierarchy of the hierarchy structure, which is obtained by analyzing the knowledge document based on the hierarchy structure of the knowledge document;
generating problem inquiry information based on the problem text and the related knowledge segments;
And obtaining the answer information of the question text by using a question answer model based on the question query information.
2. The method of claim 1, wherein the expanding the question text to generate question retrieval text corresponding to the question text comprises:
analyzing the problem text by utilizing a retrieval enhancement model to generate a problem sub-text of the problem text;
And expanding the question sub-text by using the retrieval enhancement model to generate the question retrieval text.
3. The method of claim 2, wherein the obtaining knowledge segments that match the question retrieval text as related knowledge segments comprises:
And determining the relevant knowledge segments in the knowledge base by utilizing the retrieval enhancement model based on indexes set for the knowledge segments.
4. The method of claim 1, wherein the number of relevant knowledge segments is a plurality; the generating the question query information based on the question text and the related knowledge segments includes:
Determining matching knowledge segments from all the relevant knowledge segments according to the relevance information between each relevant knowledge segment and the question retrieval text;
and generating the problem inquiry information based on the problem text and the matching knowledge segments.
5. The method of claim 4, wherein said determining matching knowledge segments among all relevant knowledge segments based on relevance information between each relevant knowledge segment and the question retrieval text comprises:
Determining a first relevance between each relevant knowledge segment and the question retrieval text by using a first relevance determining model;
And determining one or more relevant knowledge segments with highest first relevance as the matching knowledge segments.
6. The method of claim 4, wherein generating question query information based on the question text and the matching knowledge segments comprises:
acquiring a knowledge segment positioned at the upper level of the matched knowledge segment as an additional knowledge segment;
Acquiring names of knowledge segments of one or more levels located above the additional knowledge segments as additional knowledge names based on the level attribute information;
and generating the problem inquiry information based on the problem text, the additional knowledge segments and the additional knowledge names.
7. The method of claim 6, further comprising:
determining a knowledge segment with a reply reference relation with the reply information in the knowledge segments to be determined as a reference knowledge segment; wherein the knowledge piece to be determined includes: the matching knowledge piece and/or the additional knowledge piece;
and displaying the reference knowledge segment under the condition of displaying the reply information.
8. The method of claim 7, wherein the determining, among knowledge pieces to be determined, a knowledge piece having a reply reference relationship with the reply information as a reference knowledge piece includes:
dividing the reply information into information blocks;
determining a second correlation degree between the information block and all knowledge pieces to be determined by using a second correlation degree determination model;
and determining one or more knowledge segments to be determined with the highest second correlation degree as reference knowledge segments of the information block.
9. The method of claim 8, wherein the displaying the reference knowledge piece comprises:
Constructing a reply reference association relationship between the information block and the reference knowledge piece;
And displaying the reference knowledge segments of the information blocks based on the reply reference association relation.
10. The method according to any one of claim 1 to 9, wherein,
The hierarchy includes: a parent-child hierarchy;
Wherein, in the knowledge base, one or more knowledge segments are stored for each level of the parent-child hierarchical structure.
11. A problem solving apparatus comprising:
the problem expansion module is used for carrying out expansion processing on the problem text and generating a problem retrieval text corresponding to the problem text;
The related information determining module is used for obtaining knowledge fragments matched with the problem retrieval text from a knowledge base to serve as related knowledge fragments; the knowledge segments are document information corresponding to the hierarchy of the hierarchy structure, which is obtained by analyzing the knowledge document based on the hierarchy structure of the knowledge document;
The query information determining module is used for generating the query information of the questions based on the questions text and the related knowledge segments;
and the answer information obtaining module is used for obtaining answer information of the question text by utilizing a question answer model based on the question query information.
12. A problem solving apparatus comprising:
a memory; and a processor coupled to the memory, the processor configured to perform the method of any of claims 1-10 based on instructions stored in the memory.
13. A computer readable storage medium storing computer instructions for execution by a processor of the method of any one of claims 1 to 10.
14. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 10.
CN202410591683.6A 2024-05-13 2024-05-13 Problem solving method, device, storage medium and computer program product Pending CN118446315A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410591683.6A CN118446315A (en) 2024-05-13 2024-05-13 Problem solving method, device, storage medium and computer program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410591683.6A CN118446315A (en) 2024-05-13 2024-05-13 Problem solving method, device, storage medium and computer program product

Publications (1)

Publication Number Publication Date
CN118446315A true CN118446315A (en) 2024-08-06

Family

ID=92319397

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410591683.6A Pending CN118446315A (en) 2024-05-13 2024-05-13 Problem solving method, device, storage medium and computer program product

Country Status (1)

Country Link
CN (1) CN118446315A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118733715A (en) * 2024-09-03 2024-10-01 杭州孚嘉科技有限公司 A retrieval enhancement method based on semantic understanding and semantic generation model

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118733715A (en) * 2024-09-03 2024-10-01 杭州孚嘉科技有限公司 A retrieval enhancement method based on semantic understanding and semantic generation model

Similar Documents

Publication Publication Date Title
US8386240B2 (en) Domain dictionary creation by detection of new topic words using divergence value comparison
US11651015B2 (en) Method and apparatus for presenting information
US10585924B2 (en) Processing natural-language documents and queries
GB2401972A (en) Identifying special word usage in a document
US9336186B1 (en) Methods and apparatus related to sentence compression
WO2009026850A1 (en) Domain dictionary creation
US11436278B2 (en) Database creation apparatus and search system
CN110245349B (en) Syntax dependence analysis method and apparatus, and electronic device
Selamat et al. Word-length algorithm for language identification of under-resourced languages
CN111859940A (en) Keyword extraction method and device, electronic equipment and storage medium
CN118446315A (en) Problem solving method, device, storage medium and computer program product
Gupta et al. Text analysis and information retrieval of text data
Li et al. Infographics retrieval: A new methodology
CN114141384A (en) Method, apparatus and medium for retrieving medical data
Lee N-Gram Language Model
CN113157888A (en) Multi-knowledge-source-supporting query response method and device and electronic equipment
KR101663038B1 (en) Entity boundary detection apparatus in text by usage-learning on the entity's surface string candidates and mtehod thereof
JP5447368B2 (en) NEW CASE GENERATION DEVICE, NEW CASE GENERATION METHOD, AND NEW CASE GENERATION PROGRAM
CN112559711A (en) Synonymous text prompting method and device and electronic equipment
CN114328895B (en) News abstract generation method and device and computer equipment
Chien et al. Semantic tagging of mathematical expressions
Chaonithi et al. A hybrid approach for Thai word segmentation with crowdsourcing feedback system
CN113901798B (en) A syntax analysis method, device, equipment and storage medium
JP4478042B2 (en) Word set generation method with frequency information, program and program storage medium, word set generation device with frequency information, text index word creation device, full-text search device, and text classification device
CN113901217B (en) A sentence classification method, device, 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