Controllable response method and device based on large language model and storage medium

By employing a controllable response method based on a large language model, and utilizing dialogue commands and controllable response modes for literature recall and retrieval, this approach addresses the problem of generalized response content in existing AI question answering systems, achieving personalized and professional responses and improving response accuracy.

CN119150984BActive Publication Date: 2026-01-13TONGFANG KNOWLEDGE DIGITAL PUBLISHING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411063903.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2026-01-13
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

In existing AI question-answering technologies, the content of user-inputted responses is too generalized, lacking personalization and professionalism, resulting in low accuracy.

Method used

By employing a controllable response method based on a large language model, the system utilizes dialogue instructions to determine input information and controllable response methods, performs literature retrieval and keyword identification, constructs an extended literature list, conducts information retrieval in specified literature, and outputs personalized and professional response information.

Benefits of technology

It improves the accuracy of response information, meets the actual needs of users, and realizes personalized and professional response content output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150984B_ABST
    Figure CN119150984B_ABST
Patent Text Reader

Abstract

The application discloses a controllable response method and device based on a large language model and a storage medium, the method comprising: in response to a dialogue instruction for the large language model, determining input information and a controllable response mode indicated by the dialogue instruction; determining input extension information corresponding to the input information, and performing literature recall in a preset literature segment database based on the input extension information to obtain recalled literature segments; determining at least one search keyword based on the input extension information and the literature to which the recalled literature segments belong; performing literature recall in a preset literature database based on each search keyword to obtain keyword-recalled literature, and forming an extended literature list from the keyword-recalled literature and the literature to which the recalled literature segments belong; determining target extended literature indicated by the controllable response mode in the extended literature list, and inputting the target extended literature and the input extension information into the large language model for information retrieval to obtain response information corresponding to the input information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to a controllable response method, apparatus and storage medium based on a large language model. Background Technology

[0002] With the rapid development of artificial intelligence technology, AI question answering technology has been widely applied in many fields, such as literature knowledge retrieval.

[0003] Currently, responses are typically output directly based on user questions. However, because users require highly personalized responses, and when faced with complex problems or difficult-to-express demands, they often struggle to fully articulate their intentions. Consequently, responses output based solely on user questions tend to be overly generalized, lacking specificity and professionalism, and fail to meet users' actual needs, resulting in low accuracy. Summary of the Invention

[0004] This invention provides a controllable response method, device, and storage medium based on a large language model, which mainly enables the output response content to be more personalized and professional, thereby meeting the actual needs of users.

[0005] According to a first aspect of the present invention, a controllable response method based on a large language model is provided, comprising:

[0006] In response to a dialogue instruction for a large language model, determine the input information indicated by the dialogue instruction and the controllable response method;

[0007] Determine the input extended information corresponding to the input information, and perform literature retrieval in a preset literature fragment database based on the input extended information to obtain the retrieved literature fragments;

[0008] Based on the input extended information and the literature to which the recalled document fragment belongs, at least one search keyword is determined;

[0009] Based on the search keywords, literature is retrieved from a preset literature database to obtain keyword-retrieved literature, and an extended literature list is formed by the keyword-retrieved literature and the literature to which the retrieved literature fragments belong.

[0010] The target extended document indicated by the controllable response method is determined in the extended document list, and the target extended document and the input extended information are jointly input into the large language model for information retrieval to obtain the response information corresponding to the input information.

[0011] Optionally, determining the input extended information corresponding to the input information includes:

[0012] Based on the domain and type of the input information, a preset extended information template is determined, wherein the preset extended information template includes key information filling positions;

[0013] Determine the key information in the input information, and fill the key information filling positions in the preset extended information template based on the key information to obtain the initial input extended information corresponding to the input information;

[0014] Semantic analysis is performed on the initial input extended information to obtain an extended semantic information vector, and semantic analysis is performed on the input information to obtain an input semantic information vector;

[0015] Based on the extended semantic information vector and the input semantic information vector, the similarity between the initial input extended information and the input information is calculated, and based on the similarity, it is determined whether the initial input extended information meets the extension requirements;

[0016] If the extended requirements are met, the initial input extended information is determined as the input extended information corresponding to the input information; otherwise, the input extended information corresponding to the input information is redefined.

[0017] Optionally, determining at least one search keyword based on the input extended information and the document to which the recalled document fragment belongs includes:

[0018] The document to which the recalled document fragment belongs is segmented into words to obtain each word contained in the document to which the recalled document fragment belongs.

[0019] Determine the extended feature vector corresponding to the input extended information, and determine the word segmentation feature vector corresponding to each word segmentation;

[0020] Based on the extended feature vector and each of the word segmentation feature vectors, the input extended information is semantically similar to each of the word segments to obtain similarity matching results;

[0021] Based on the similarity matching results, at least one search keyword is determined in each of the word segments.

[0022] Optionally, determining the target extended document indicated by the controllable response method in the extended document list includes:

[0023] If the controllable response method is a text-selectable controllable response method, then the target extended document indicated by the text-selectable controllable response method is determined in the extended document list;

[0024] If the controllable response method is a grouped controllable response method, then for the target clustering type indicated by the grouped controllable response method, each extended document in the extended document list is clustered to obtain extended documents under different clustering topics corresponding to the target clustering type, wherein the different clustering topics correspond to different keywords;

[0025] The target keywords indicated by the grouped controllable response method are determined from the different keywords, and literature recall is performed based on the target keywords to obtain the subject-recalled documents, and the subject-recalled documents are determined as the target extended documents.

[0026] Optionally, the step of clustering each extended document in the extended document list to obtain extended documents under different clustering topics corresponding to the target clustering type includes:

[0027] Determine the document feature vector corresponding to each of the extended documents;

[0028] Initialize the centroid vectors corresponding to different clusters under the target clustering type;

[0029] Calculate the cosine similarity between the feature vectors of each document and the centroid vectors corresponding to the different clusters, and classify each extended document into the different clusters based on the cosine similarity corresponding to the different clusters;

[0030] Based on the document feature vectors corresponding to the extended documents in the different clusters, the updated centroid vectors corresponding to the different clusters are obtained;

[0031] Based on the updated centroid vector, each extended document is reclassified into the different clusters until the updated centroid vector remains unchanged. The extended documents finally classified into the different clusters are then identified as extended documents under different clustering topics corresponding to the target clustering type.

[0032] Optionally, determining the target topic indicated by the grouped controllable response method among the different topic terms includes:

[0033] Determine the word frequency of each of the aforementioned keywords in the corresponding extended documents in the extended document list;

[0034] Based on the word frequency, a preset number of high-frequency topic words are determined from each of the topic words;

[0035] The target keywords indicated by the grouped controllable response method are determined from each of the aforementioned high-frequency keywords.

[0036] Optionally, the method further includes:

[0037] The extended input information and the recalled document fragments are input together into the large language model for information retrieval, resulting in response information corresponding to the input information; or,

[0038] An expanded list of documents is constructed based on the documents to which the recalled document fragments belong;

[0039] The extended literature indicated by the text-controlled response method is determined in the extended literature list, and the extended literature and the input extended information are jointly input into the large language model for information retrieval to obtain the response information corresponding to the input information.

[0040] According to a second aspect of the present invention, a controllable response device based on a large language model is provided, comprising:

[0041] The first determining unit is configured to determine the input information and controllable response method indicated by the dialogue instruction in response to a large language model.

[0042] The first recall unit is used to determine the input extended information corresponding to the input information, and to perform document recall in a preset document fragment database based on the input extended information to obtain the recalled document fragments.

[0043] The second determining unit is used to determine at least one search keyword based on the input extended information and the document to which the recalled document fragment belongs;

[0044] The second recall unit is used to recall documents in a preset document database based on each of the search keywords, obtain keyword-recalled documents, and form an extended document list by the keyword-recalled documents and the documents to which the recalled document fragments belong.

[0045] The information retrieval unit is used to determine the target extended document indicated by the controllable response method in the extended document list, and input the target extended document and the input extended information into the large language model for information retrieval to obtain the response information corresponding to the input information.

[0046] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the above-described controllable response method based on a large language model.

[0047] According to a fourth aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described controllable response method based on a large language model.

[0048] According to the present invention, a controllable response method, apparatus, and storage medium based on a large language model, compared with the current method of directly outputting response content based on user questions, the present invention determines the input information and controllable response method indicated by the dialogue instruction for the large language model; determines the input extended information corresponding to the input information, and performs literature retrieval in a preset literature fragment database based on the input extended information to obtain retrieved literature fragments; determines at least one search keyword based on the input extended information and the literature to which the retrieved literature fragments belong; performs literature retrieval in the preset literature database based on each search keyword to obtain keyword-retrieved literature, and constructs an extended literature list from the keyword-retrieved literature and the literature to which the retrieved literature fragments belong; determines the target extended literature indicated by the controllable response method in the extended literature list, and inputs the target extended literature and the input extended information together into the large language model for information retrieval to obtain the response information corresponding to the input information. Therefore, this invention expands the user's input information to obtain expanded input information that fully expresses the user's intent. Information retrieval is then performed based on this expanded input information, resulting in the output of response information that better meets the user's actual needs, thereby improving the accuracy of the output response information. Furthermore, in the information retrieval process based on the expanded input information, the large language model in this invention introduces a controllable response method to control the retrieval process of the large language model. This controls the large language model to retrieve information from specified documents, making the retrieved response content more personalized and professional, thus meeting the user's actual needs and further improving the accuracy of the output response information. Attached Figure Description

[0049] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:

[0050] Figure 1 A flowchart of a controllable response method based on a large language model provided by an embodiment of the present invention is shown;

[0051] Figure 2 The flowchart of another controllable response method based on a large language model provided by an embodiment of the present invention is shown;

[0052] Figure 3 The illustration shows a variety of response information output methods based on a large language model provided by an embodiment of the present invention;

[0053] Figure 4 A schematic diagram of the structure of a controllable response device based on a large language model provided in an embodiment of the present invention is shown.

[0054] Figure 5 A schematic diagram of another controllable response device based on a large language model provided in an embodiment of the present invention is shown;

[0055] Figure 6 A schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation

[0056] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present application can be combined with each other.

[0057] Currently, the method of directly outputting response content based on user questions results in overly generalized responses that lack specificity and professionalism, failing to meet users' actual needs and thus leading to low accuracy in the output of response content.

[0058] To address the aforementioned problems, embodiments of the present invention provide a controllable response method based on a large language model, such as... Figure 1 As shown, the method includes:

[0059] 101. In response to dialogue instructions for a large language model, determine the input information indicated by the dialogue instructions and the controllable response method.

[0060] In this embodiment of the invention, a pre-constructed database of document fragments is built. The specific construction method is as follows: Document data from various websites, including journals, dissertations, newspapers, and conferences, are integrated. The integrated data is then vectorized, segmented into vectorized data fragments, forming a set of vectorized data fragments. The process of processing and integrating the document data is the data vectorization process, which consists of the following four steps: Preparing training data: Preprocessing the XML structured data to extract document titles, subheadings, and corresponding text as training data; Setting training parameters: Setting training parameters based on the characteristics of the document data, such as the number of iterations and the learning rate; Model training: Training a text embedding model, such as the BGE M3 model, based on the training data and the set parameters; Text vectorization: Converting the structured text into 1024-dimensional vector data based on the trained model. Finally, the document fragments corresponding to each vectorized data fragment constitute the pre-constructed database of document fragments.

[0061] Controllable response methods refer to controlling the output of response information by the dialogue system (large language model question-answering system) according to user needs. Controllable response methods include text-based controllable response methods and group-based controllable response methods. Text-based controllable response methods involve information retrieval within specified documents chosen by the user, while group-based controllable response methods involve information retrieval within documents within user-specified groups. Specifically, during user interaction with the question-answering system, the user can trigger a dialogue command by inputting or selecting content provided by the system. For example, the user can input text or voice to express their question. If the user inputs voice, it needs to be converted to text. Simultaneously, the user can input or select a controllable response method within the system to trigger the dialogue command. Then, during the information retrieval process based on the input information, the large language model uses controllable response methods to control the retrieval process, preventing the large language model from outputting generalized information. This ensures that the output response information meets the user's actual needs, thereby improving the accuracy of the output response information.

[0062] 102. Determine the extended input information corresponding to the input information, and perform literature retrieval in the preset literature fragment database based on the extended input information to obtain the retrieved literature fragments.

[0063] Among them, extended input information refers to information that is standardized, semantically similar to or related to the input information, and can more clearly and comprehensively express the user's query intent. It also expands the input information, including research topics and question requirements.

[0064] In this embodiment of the invention, when a user inputs information to ask a question, the dialogue system first generates extended input information on a related topic based on the input information. Specifically, it can generate extended input information using specific prompt words, which includes information such as the research topic and question requirements of the input information. Then, it searches a preset literature fragment database for recall literature fragments with high similarity to the extended input information. Finally, it performs information retrieval based on the extended input information and the recalled literature fragments. Thus, by expanding the input information, this embodiment of the invention makes the expanded input information clearer and more accurate in expressing the user's intent. Subsequent information retrieval using the expanded input information ensures that the retrieved information better meets the user's actual needs, thereby improving the accuracy of the output response information.

[0065] 103. Based on the input extended information and the literature to which the recalled document fragments belong, determine at least one search keyword.

[0066] In this embodiment of the invention, after expanding the input information to obtain expanded input information, it is also necessary to determine at least one search keyword in the literature to which the recalled document fragment belongs based on the expanded input information. Specifically, the literature to which the recalled document fragment belongs can be segmented into words, and then at least one search keyword with a high similarity to the expanded input information can be determined from each segment. Alternatively, prompt words can be determined based on the expanded input information, and then search keywords can be determined in the literature to which the recalled document fragment belongs based on the prompt words. Then, document recall can be performed based on the keywords, which can improve the accuracy of document recall.

[0067] 104. Based on each search keyword, retrieve literature from the preset literature database to obtain keyword-retrieved literature, and form an extended literature list by combining the keyword-retrieved literature and the literature to which the retrieved literature fragments belong.

[0068] The preset literature database includes literature from various fields and of various types. In this embodiment of the invention, to ensure that the output response information meets the user's actual needs, a literature list that meets the input information requirements needs to be pre-constructed. Then, the large language model in the dialogue system is controlled to perform information retrieval based on each document in the literature list, thereby ensuring that the retrieved response information meets the user's actual needs and avoiding displaying broad response information to the user. Based on this, to achieve the above effect, it is first necessary to construct a literature list. Specifically, the dialogue system can perform literature retrieval in the built-in literature database based on each search keyword to obtain multiple documents (keyword-recalled documents). When using each keyword for information retrieval, if each keyword includes keyword 1, keyword 2, and keyword 3, the retrieval will be performed first in the form of keyword 1 and keyword 2 and keyword 3. If the above search content is empty, a traditional retrieval can be performed in the form of keyword 1 and keyword 2, keyword 2 and keyword 3, or keyword 1 and keyword 3 to retrieve the keyword-recalled documents. Then, the keyword-recalled documents and the documents to which the recalled document fragments in step 103 belong constitute an extended literature list. Afterward, the user can specify a part of the documents in the extended literature list and control the dialogue system to perform information retrieval in that part of the documents based on the input extended information. Thus, by controlling the retrieval scope of the dialogue system during the information retrieval process, that is, controlling the dialogue system to search for the scope specified by the user, the retrieved response information can better meet the user's actual needs, thereby improving the accuracy of the response information output.

[0069] 105. Determine the target extended literature indicated by the controllable response method in the extended literature list, and input the target extended literature and the input extended information together into the large language model for information retrieval to obtain the response information corresponding to the input information.

[0070] In this embodiment of the invention, the controllable response method includes a text-based controllable response method and a group-based controllable response method. The text-based controllable response method refers to the user directly selecting at least one target extended document from the extended document list. Then, based on the input extended information, the large language model in the dialogue system is controlled to directly retrieve response information from the target extended documents. The group-based controllable response method refers to pre-grouping the documents in the extended document list. Then, the user specifies at least one target group within each group. Finally, based on the input extended information, the large language model in the dialogue system is controlled to directly retrieve response information from the documents under the target group. For example, for the text-based controllable response method, in the extended document list, a set of documents specified by the user in the text-based controllable response method is determined, forming a document dataset X = {x1………,x…}. n}, where x1, x2...x n The extended literature list represents user-specified documents. The large language model is trained on the full-text content of dataset X, forming a knowledge training result set D(X) for dataset X. Here, D(X) is a set of fragmented knowledge vector data trained on the full-text content. The controllable generation function will provide answers with extended input information based on the vectorized data of the full-text content in the knowledge training result set D(X). Simultaneously, for the grouped controllable response method, the documents in the extended literature list are clustered according to different themes such as topic, publication time, research level, and author elements. Taking topic clustering analysis as an example, the documents in the extended literature list are clustered into different themes, and then sorted according to the frequency of the keywords corresponding to different themes. The 20 most frequent keywords are obtained, and a group of keywords is selected from these to form a keyword dataset Z = {z1………,z…}. n}, where z1...z n This represents the selected keywords. Then, based on the keyword set Z, a literature search is performed to obtain multiple retrieved documents. Subsequently, based on the input extended information, the large language model can be controlled to retrieve response information from these multiple retrieved documents. Simultaneously, to further narrow the search scope and make the retrieved information more relevant to the user's actual needs, while improving information retrieval efficiency, the user can specify a set of document datasets X = {x1, ..., x...} within each retrieved document. nAs a dataset D(X) that can be controllably generated by topic grouping, the grouping controllable generation function will respond with input extended information based on the vectorized data of abstracts, titles, and keywords in dataset D(X). This controllable response method narrows the search scope according to user needs, improving information retrieval efficiency. Simultaneously, it ensures that the retrieved information better meets the user's actual needs, thus improving the accuracy of information retrieval. Furthermore, this embodiment of the invention can not only control the dialogue system based on user-specified documents for information retrieval, but also control the dialogue system based on user-specified groups, including topics, publication dates, research levels, and authors, enabling diversified retrieval control methods to meet diverse user needs.

[0071] According to the present invention, a controllable response method based on a large language model, compared with the current method of directly outputting response content based on user questions, the present invention determines the input information and controllable response method indicated by the dialogue instruction for the large language model; determines the input extended information corresponding to the input information, and performs literature retrieval in a preset literature fragment database based on the input extended information to obtain retrieved literature fragments; determines at least one search keyword based on the input extended information and the literature to which the retrieved literature fragments belong; performs literature retrieval in the preset literature database based on each search keyword to obtain keyword-retrieved literature, and constructs an extended literature list from the keyword-retrieved literature and the literature to which the retrieved literature fragments belong; determines the target extended literature indicated by the controllable response method in the extended literature list, and inputs the target extended literature and the input extended information together into the large language model for information retrieval to obtain the response information corresponding to the input information. Therefore, this invention expands the user's input information to obtain expanded input information that fully expresses the user's intent. Information retrieval is then performed based on this expanded input information, resulting in the output of response information that better meets the user's actual needs, thereby improving the accuracy of the output response information. Furthermore, in the information retrieval process based on the expanded input information, the large language model in this invention introduces a controllable response method to control the retrieval process of the large language model. This controls the large language model to retrieve information from specified documents, making the retrieved response content more personalized and professional, thus meeting the user's actual needs and further improving the accuracy of the output response information.

[0072] Furthermore, to better illustrate the above-described process of controllable response based on a large language model, as a refinement and extension of the above embodiments, this invention provides another controllable response method based on a large language model, such as... Figure 2 As shown, the method includes:

[0073] 201. In response to dialogue instructions for a large language model, determine the input information indicated by the dialogue instructions and the controllable response method.

[0074] Specifically, the dialogue system performs question matching and answer generation based on vectorized data. At the same time, the dialogue system also supports grouping and controllable text selection generation functions. Users can select literature, topics, publication time, research level, authors, etc. as needed to conduct literature searches, and the dialogue system will generate corresponding answers based on the literature selection results or group selection results.

[0075] 202. Determine the extended input information corresponding to the input information, and perform literature retrieval in the preset literature fragment database based on the extended input information to obtain the retrieved literature fragments.

[0076] In this embodiment of the invention, because users often struggle to fully express their intentions when faced with complex problems or difficult-to-express demands, meaning they may be unable to clearly and accurately convey their intent, relying solely on the user's direct input in the dialogue system for information retrieval will result in low accuracy. Therefore, to improve information retrieval accuracy, it is first necessary to determine the input extension information corresponding to the input information. Based on this, step 202 specifically includes: determining a preset extension information template based on the domain and type of the input information, wherein the preset extension information template includes key information filling positions; determining the key information in the input information, and based on the key information, modifying the preset extension information template... The key information filling positions in the extended information template are filled to obtain the initial input extended information corresponding to the input information; semantic analysis is performed on the initial input extended information to obtain an extended semantic information vector, and semantic analysis is performed on the input information to obtain an input semantic information vector; based on the extended semantic information vector and the input semantic information vector, the similarity between the initial input extended information and the input information is calculated, and based on the similarity, it is determined whether the initial input extended information meets the extension requirements; if the extension requirements are met, the initial input extended information is determined as the input extended information corresponding to the input information; otherwise, the input extended information corresponding to the input information is re-determined.

[0077] Specifically, different extended information templates are pre-constructed based on different fields and information types. According to the characteristics of literature retrieval, a series of extended information templates are designed to cover different retrieval angles and depths. Extended information templates can include synonym replacement, hypernym / hypernym expansion, and related concept association. For the synonym replacement template, thesaurus, online resources, or professional terminology lists can be used to add synonyms or near-synonyms of keywords in the input information to the search query. For example, if the user's input information is "machine learning", then the extended information after synonym replacement may include "machine learning", "artificial intelligence algorithm", "automatic learning", etc. For templates related to hypernym / hyponym expansion, hyponym expansion can be used to broaden the search scope and find a wider range of relevant literature. Hypernyms can be obtained by consulting classification systems, thesaurus, or professional books. Hyponym expansion is used for precise retrieval to find more specific relevant literature. It also requires the use of resources such as classification systems and thesaurus. For example, taking the input information as "machine learning", its hypernym might be "artificial intelligence", while hyponyms might include "deep learning", "support vector machine", "decision tree", etc. Combining hypernyms and hyponyms yields the input expansion information corresponding to the input information.

[0078] Furthermore, the extended information template can be a fixed string format containing placeholders (positions for key information to fill), which can be replaced by key information from the input question during the information expansion process. Furthermore, after obtaining the input information entered by the user in the dialogue system, the domain and type of the input information are first determined. Then, based on the domain and type, a preset extended information template that meets the extension requirements is selected from different extended information templates. Next, key information is extracted from the input information. For example, NLP (Natural Language Processing) technology (such as named entity recognition, part-of-speech tagging, etc.) can be used to extract key information from the input information, such as time, location, person, action, etc. Then, the extracted key information is represented in a structured form (such as a dictionary, list, or tree) to facilitate subsequent expansion processing. Then, based on the preset extended information template and the extracted key information, an extended question is generated, that is, the placeholders in the preset extended information template are replaced with the actual key information values, or the key information values ​​are filled into the key information filling positions in the preset extended information template. In another embodiment of the present invention, in order to increase the diversity and coverage of extended information, multiple templates can be designed, and different templates can be applied to the same basic input information to generate multiple extended information. Furthermore, to verify the accuracy of expanding the input information, the semantic information of both the input information and the expanded input information needs to be analyzed first to obtain semantic information vectors. Then, based on these semantic information vectors, the similarity between the input information and the expanded input information is calculated. If the similarity is greater than a preset threshold (a value set according to actual needs), the expanded input information is considered accurate. If the similarity is less than the preset threshold, the expanded input information is considered inaccurate, and the input information is expanded again until the similarity between the expanded input information and the input information meets the requirements. For example, the input information is: "How is the weather today?" The preset expanded information template is: "How is the weather at [time] in [location]?"; "What is the weather forecast for [time]?"; "Can you tell me about the weather conditions at [time] in [location]?" Key information extraction: Time: Today, Location, Generated expanded information: "How is the weather in XX city today?"; "What is the weather forecast for today?"; "Can you tell me about the weather conditions in XX city today?". Therefore, by expanding the input information, this embodiment of the invention can compensate for the deficiencies of insufficient information and unclear intent in the user-defined input information. By using the expanded information for information retrieval, the accuracy of information retrieval can be improved, and the efficiency of information retrieval can also be increased.

[0079] Furthermore, after expanding the input information to obtain expanded input information, the system searches the entire vector database (which contains document fragments corresponding to various documents and their corresponding vector fragments) for document fragments that are highly similar to the expanded input information.

[0080] 203. Based on the input extended information and the literature to which the recalled document fragments belong, determine at least one search keyword.

[0081] In one embodiment of the present invention, after determining the recalled document fragment, the response information can be retrieved based solely on the input extended information and the recalled document fragment. That is, the input extended information and the recalled document fragment are jointly input into the large language model for information retrieval to obtain the response information corresponding to the input information. Simultaneously, the large language model also outputs the document ID of the recalled document fragment. In another embodiment of the present invention, to improve the retrieval accuracy of the response information, after the large language model outputs the document ID to which the recalled document fragment belongs, the corresponding document is obtained based on the document ID. Based on the input extended information and each document, search keywords are determined. Based on this, the method includes: performing word segmentation on the document to which the recalled document fragment belongs to obtain each word contained in the document to which the recalled document fragment belongs; determining the extended feature vector corresponding to the input extended information, and determining the word segmentation feature vector corresponding to each word; performing semantic similarity matching between the input extended information and each word segment based on the extended feature vector and each word segmentation feature vector to obtain a similarity matching result; and determining at least one search keyword in each word segment based on the similarity matching result.

[0082] Specifically, the process involves identifying the individual word segments corresponding to the document containing the recalled document fragment, determining the key information in the input extended information, and performing similarity matching between this key information and each word segment. Target word segments that meet the similarity requirements are then identified within each word segment, and these target word segments are ultimately determined as search keywords. Information retrieval based on these search keywords simplifies the input information, thereby improving retrieval efficiency. Furthermore, identifying search keywords within the document itself ensures that the search keywords closely match the document's format, thus improving the accuracy of information retrieval.

[0083] 204. Based on each search keyword, retrieve literature from the preset literature database to obtain keyword-retrieved literature, and form an extended literature list by combining the keyword-retrieved literature and the literature to which the retrieved literature fragments belong.

[0084] The preset literature database includes various documents. Specifically, based on each search keyword, literature is retrieved from the preset literature database to obtain keyword-retrieved documents. An extended literature list is then formed by the keyword-retrieved documents and the documents to which the retrieved document fragments belong. This extended literature list contains various documents corresponding to the input extended information. However, the information in each document in this extended literature list may not all meet the user's actual needs. Therefore, to find information that meets the user's actual needs, the documents in the extended literature list need to be narrowed down. That is, the scope of each document in the extended literature list is narrowed down through a controllable response method. Then, the large language model is controlled to perform information retrieval within the narrowed literature. By performing information retrieval within a smaller scope, not only can the efficiency of information retrieval be improved, but the accuracy of information retrieval can also be improved.

[0085] 205. If the controllable response method is the text-selectable controllable response method, then determine the target extended document indicated by the text-selectable controllable response method in the extended document list.

[0086] Specifically, different controllable response methods are selected by the user according to their preferences. If the user selects the text-based controllable response method, the target extended literature indicated by the text-based controllable response method is determined from the extended literature list. Then, based on the input extended information, the large language model retrieves response information from a smaller range of literature specified by the user, thereby enabling the retrieved response information to better meet the user's actual needs. In another embodiment of the present invention, when using the text-based controllable response method, in order to shorten the retrieval time, an extended literature list can be directly constructed based on the literature to which the recalled literature fragment belongs. Then, the extended literature indicated by the text-based controllable response method is determined from the extended literature list, and the extended literature and the input extended information are jointly input into the large language model for information retrieval to obtain the response information corresponding to the input information.

[0087] 206. If the controllable response method is a grouped controllable response method, then for the target clustering type indicated by the grouped controllable response method, each extended document in the extended document list is clustered to obtain extended documents under different clustering topics corresponding to the target clustering type, where different clustering topics correspond to different keywords.

[0088] The target clustering types include at least one of the following: topic keyword clustering type, publication time clustering type, research level clustering type, author element clustering type, etc.

[0089] In this embodiment of the invention, if the user selects the grouped controllable response method, the target clustering type indicated by the grouped controllable response method must first be determined. Then, for the target clustering type, each extended document in the extended document list is clustered. For example, if the target clustering type is the author element clustering type, each extended document in the extended document list is clustered according to different authors, and the documents corresponding to author A, author B, author C, etc. are obtained. Among them, author A, author B, and author C are the keywords under different clustering categories. The specific clustering method includes: determining the document feature vector corresponding to each of the extended documents; initializing the centroid vectors corresponding to different clusters under the target clustering type; calculating the cosine similarity between each document feature vector and the centroid vectors corresponding to the different clusters, and classifying each of the extended documents into the different clusters based on the cosine similarity corresponding to the different clusters; obtaining the updated centroid vectors corresponding to the different clusters based on the document feature vectors corresponding to the extended documents in the different clusters; reclassifying each of the extended documents into the different clusters based on the updated centroid vectors, until the updated centroid vectors do not change, and finally determining the extended documents finally classified into the different clusters as extended documents under the different clustering topics corresponding to the target clustering type.

[0090] Specifically, the feature vectors of each extended document in the extended document list are determined using methods such as word embedding. Then, the centroid vectors corresponding to the initial centroids of K clusters are selected. For each feature vector of each extended document, the cosine similarity between each feature vector and the K centroid vectors is calculated. Specifically, the cosine similarity between each feature vector and the K centroid vectors can be calculated using the following formula:

[0091]

[0092] Where cos(θ) represents the cosine similarity between any document feature vector and any centroid vector, x i Let y represent the i-th component in the feature vector of any extended document. iLet represent the i-th component of the centroid vector in any cluster, and n represent the number of components in the feature vector of any extended document. Based on the above formula, the cosine similarity between each extended document and the centroid vector of each cluster can be calculated. Further, after calculating the cosine similarity between each extended document and the centroid vector of each cluster, each document feature vector is assigned to the cluster corresponding to the centroid vector with the highest cosine similarity. Then, for each cluster, the centroid and its corresponding centroid vector are recalculated, and each extended document is reclassified into a different cluster. This process is repeated until the position of the centroid remains unchanged, i.e., the centroid vector remains unchanged. Finally, the extended documents classified into different clusters are determined as texts under different clustering themes.

[0093] 207. Determine the target keywords indicated by the grouped controllable response method among different keywords, and conduct literature recall based on the target keywords to obtain the subject recall literature, and determine the subject recall literature as the target extended literature.

[0094] In this embodiment of the invention, different clustering topics correspond to different keyword terms. For example, if each extended document is clustered according to the publication time clustering type, extended documents under different publication times are obtained, such as extended documents corresponding to 2020, extended documents corresponding to 2021, and extended documents corresponding to 2022, then 2020, 2021, and 2022 are keyword terms. Further, in order to narrow the search scope, it is necessary to determine the target keyword term indicated by the grouped controllable response method among different keyword terms. Based on this, step 207 specifically includes: determining the word frequency of each keyword term in each extended document corresponding to the extended document list; determining a preset number of high-frequency keyword terms among each keyword term based on the word frequency; and determining the target keyword term indicated by the grouped controllable response method among each high-frequency keyword term.

[0095] Specifically, while clustering the extended documents in the extended document list to obtain extended documents under different cluster themes, the subject terms corresponding to different cluster themes are also determined. Then, the frequency of each subject term in each extended document corresponding to the extended document list is determined, i.e., word frequency. Then, high-frequency subject terms with word frequencies greater than a preset frequency threshold are determined and displayed to the user. The user will select the target subject term from the high-frequency subject terms, i.e., determine the target subject term indicated by the grouped controllable response method. Finally, based on the input extended information, the large language model is controlled to retrieve response information in the documents recalled by the target subject term (target extended documents). At the same time, in order to further narrow down the deceleration range and improve the retrieval accuracy, after determining the target subject term, a document search can be performed based on the target subject term to obtain multiple documents. Then, the target document indicated by the grouped available response method (target extended documents) is determined from the multiple documents. Finally, based on the input extended information, the large language model is controlled to retrieve response information in the target documents. Therefore, this embodiment of the invention employs a grouped and controllable retrieval method based on high-frequency keywords. Since high-frequency keywords are words that frequently appear in documents, they often represent the core themes or key concepts of the documents. By searching for these high-frequency keywords, the search scope can be quickly narrowed, reducing unnecessary information filtering work and thus improving search efficiency. In addition, since high-frequency keywords are usually closely related to the main content of documents, searching for information in documents containing these high-frequency keywords is more likely to find content that is highly relevant to the target theme, avoiding the retrieval of a large number of documents that are irrelevant or only marginally related to the theme, thereby improving the accuracy of search results. Furthermore, since the appearance of high-frequency keywords often reflects research hotspots and trends in a certain field, searching for these high-frequency keywords makes it easier to obtain the latest research results and cutting-edge developments in that field.

[0096] 208. Input the target extended literature and the input extended information into the large language model for information retrieval to obtain the response information corresponding to the input information.

[0097] Specifically, in one embodiment of the present invention, if a user-specified target extended literature is determined in the extended literature list through a text selection controllable method, the large language model is directly controlled to retrieve response information from the target extended literature based on the input extended information. Since the information retrieval is performed in the user-specified literature, the retrieved response information can better meet the user's actual needs. In another embodiment of the present invention, if high-frequency keywords appearing in the extended literature list are selected through a group-controlled response method, and then response information is retrieved through a group-controlled response method based on high-frequency keywords, the search scope can be quickly narrowed, unnecessary information filtering work can be reduced, thereby improving search efficiency and making it easier to obtain the latest research results and cutting-edge developments in the field.

[0098] In yet another embodiment of the invention, such as Figure 3 As shown, Figure 3 Various methods for outputting response information are illustrated, and embodiments of the present invention can select any one of these methods according to requirements. Figure 3 In this context, the input question refers to the input information, the model refers to the large language model, and the question refers to the extended input information.

[0099] According to another controllable response method based on a large language model provided by the present invention, compared with the current method of directly outputting response content based on user questions, the present invention determines the input information and controllable response method indicated by the dialogue instruction for the large language model; determines the input extended information corresponding to the input information, and performs literature retrieval in a preset literature fragment database based on the input extended information to obtain retrieved literature fragments; determines at least one search keyword based on the input extended information and the literature to which the retrieved literature fragments belong; performs literature retrieval in the preset literature database based on each search keyword to obtain keyword-retrieved literature, and constructs an extended literature list from the keyword-retrieved literature and the literature to which the retrieved literature fragments belong; determines the target extended literature indicated by the controllable response method in the extended literature list, and inputs the target extended literature and the input extended information together into the large language model for information retrieval to obtain the response information corresponding to the input information. Therefore, this invention expands the user's input information to obtain expanded input information that fully expresses the user's intent. Information retrieval is then performed based on this expanded input information, resulting in the output of response information that better meets the user's actual needs, thereby improving the accuracy of the output response information. Furthermore, in the information retrieval process based on the expanded input information, the large language model in this invention introduces a controllable response method to control the retrieval process of the large language model. This controls the large language model to retrieve information from specified documents, making the retrieved response content more personalized and professional, thus meeting the user's actual needs and further improving the accuracy of the output response information.

[0100] Furthermore, as Figure 1 In specific implementation, embodiments of the present invention provide a controllable response device based on a large language model, such as... Figure 4 As shown, the device includes: a first determining unit 31, a first recall unit 32, a second determining unit 33, a second recall unit 34, and an information retrieval unit 35.

[0101] The first determining unit 31 can be used to determine the input information and controllable response mode indicated by the dialogue instruction in response to a dialogue instruction for a large language model.

[0102] The first recall unit 32 can be used to determine the input extended information corresponding to the input information, and to perform document recall in a preset document fragment database based on the input extended information to obtain the recalled document fragments.

[0103] The second determining unit 33 can be used to determine at least one search keyword based on the input extended information and the document to which the recalled document fragment belongs.

[0104] The second recall unit 34 can be used to recall documents in a preset document database based on each of the search keywords, obtain keyword-recalled documents, and form an extended document list by the keyword-recalled documents and the documents to which the recalled document fragments belong.

[0105] The information retrieval unit 35 can be used to determine the target extended document indicated by the controllable response method in the extended document list, and input the target extended document and the input extended information together into the large language model for information retrieval to obtain the response information corresponding to the input information.

[0106] In specific application scenarios, in order to determine the extended input information corresponding to the input information, such as... Figure 5 As shown, the first recall unit 32 includes a first determination module 321, a filling module 322, a semantic analysis module 323, and a judgment module 324.

[0107] The first determining module 321 can be used to determine a preset extended information template based on the domain and type to which the input information belongs, wherein the preset extended information template includes key information filling positions.

[0108] The filling module 322 can be used to determine key information in the input information and fill the key information filling positions in the preset extended information template based on the key information to obtain the initial input extended information corresponding to the input information.

[0109] The semantic analysis module 323 can be used to perform semantic analysis on the initial input extended information to obtain an extended semantic information vector, and to perform semantic analysis on the input information to obtain an input semantic information vector.

[0110] The judgment module 324 can be used to calculate the similarity between the initial input extended information and the input information based on the extended semantic information vector and the input semantic information vector, and to determine whether the initial input extended information meets the extension requirements based on the similarity.

[0111] The first determining module 321 can be specifically used to determine the initial input extension information as the input extension information corresponding to the input information if the extension requirement is met, otherwise to re-determine the input extension information corresponding to the input information.

[0112] In specific application scenarios, in order to determine search keywords, the second determining unit 33 includes a word segmentation module 331, a second determining module 332, and a matching module 333.

[0113] The word segmentation module 331 can be used to perform word segmentation processing on the document to which the recalled document fragment belongs, and obtain each word contained in the document to which the recalled document fragment belongs.

[0114] The second determining module 332 can be used to determine the extended feature vector corresponding to the input extended information, and to determine the word segmentation feature vector corresponding to each word segmentation.

[0115] The matching module 333 can be used to perform semantic similarity matching between the input extended information and each of the word segments based on the extended feature vector and the word segmentation feature vectors, so as to obtain similarity matching results.

[0116] The second determining module 332 can be specifically used to determine at least one search keyword in each of the word segments based on the similarity matching results.

[0117] In specific application scenarios, in order to determine the target extended documents indicated by the controllable response method, the information retrieval unit 35 includes a third determination module 351 and a clustering module 352.

[0118] The third determining module 351 can be used to determine the target extended document indicated by the selected text controllable response method in the extended document list if the controllable response method is a text-selectable controllable response method.

[0119] The clustering module 352 can be used to cluster each extended document in the extended document list according to the target clustering type indicated by the grouped controllable response method if the controllable response method is a grouped controllable response method, so as to obtain extended documents under different clustering topics corresponding to the target clustering type, wherein the different clustering topics correspond to different keywords.

[0120] The third determining module 351 can also be used to determine the target topic words indicated by the grouped controllable response method among the different topic words, and to perform document recall based on the target topic words to obtain topic recall documents, and to determine the topic recall documents as the target extended documents.

[0121] In specific application scenarios, in order to cluster each extended document in the extended document list, the clustering module 352 can be used to determine the document feature vector corresponding to each extended document; initialize the centroid vectors corresponding to different clusters under the target clustering type; calculate the cosine similarity between each document feature vector and the centroid vectors corresponding to the different clusters, and classify each extended document into the different clusters based on the cosine similarity corresponding to the different clusters; obtain the updated centroid vectors corresponding to the different clusters based on the document feature vectors corresponding to the extended documents in the different clusters; and reclassify each extended document into the different clusters based on the updated centroid vectors until the updated centroid vectors do not change. The extended documents finally classified into the different clusters are determined as extended documents under the different clustering topics corresponding to the target clustering type.

[0122] In a specific application scenario, in order to determine the target keywords indicated by the grouped controllable response method, the third determining module 351 can be used to determine the word frequency of each of the keywords in each of the extended documents corresponding to the extended document list; based on the word frequency, determine a preset number of high-frequency keywords among the keywords; and determine the target keywords indicated by the grouped controllable response method among the high-frequency keywords.

[0123] In specific application scenarios, for information retrieval, the information retrieval unit 35 can also be used to input the input extended information and the recalled document fragments into the large language model for information retrieval, and obtain the response information corresponding to the input information.

[0124] The information retrieval unit 35 can also be used to construct an extended literature list based on the literature to which the recalled literature fragment belongs; determine the extended literature indicated by the text-controlled response method in the extended literature list; and input the extended literature and the input extended information into the large language model for information retrieval to obtain the response information corresponding to the input information.

[0125] It should be noted that other corresponding descriptions of the functional modules involved in the controllable response device based on a large language model provided in this embodiment of the invention can be found in [reference]. Figure 1 The corresponding description of the method shown will not be repeated here.

[0126] Based on the above, Figure 1Accordingly, this embodiment of the invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the following steps: in response to a dialogue instruction for a large language model, determining the input information and controllable response mode indicated by the dialogue instruction; determining the input extension information corresponding to the input information, and performing document retrieval in a preset document fragment database based on the input extension information to obtain retrieved document fragments; determining at least one search keyword based on the input extension information and the document to which the retrieved document fragments belong; performing document retrieval in the preset document database based on each search keyword to obtain keyword-retrieved documents, and constructing an extended document list from the keyword-retrieved documents and the document to which the retrieved document fragments belong; determining the target extended document indicated by the controllable response mode in the extended document list, and inputting the target extended document and the input extension information together into the large language model for information retrieval to obtain response information corresponding to the input information.

[0127] Based on the above, Figure 1 The method shown and as Figure 4 The embodiment of the device shown in the invention also provides a physical structure diagram of a computer device, such as... Figure 6 As shown, the computer device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor. Both the memory 42 and the processor 41 are mounted on a bus 43. When the processor 41 executes the program, it performs the following steps: in response to a dialogue instruction for a large language model, it determines the input information and controllable response mode indicated by the dialogue instruction; it determines the input extension information corresponding to the input information, and performs document retrieval in a preset document fragment database based on the input extension information to obtain retrieved document fragments; based on the input extension information and the documents to which the retrieved document fragments belong, it determines at least one search keyword; based on each search keyword, it performs document retrieval in the preset document database to obtain keyword-retrieved documents, and constructs an extended document list from the keyword-retrieved documents and the documents to which the retrieved document fragments belong; it determines the target extended document indicated by the controllable response mode in the extended document list, and inputs the target extended document and the input extension information into the large language model for information retrieval to obtain response information corresponding to the input information.

[0128] Through the technical solution of this invention, the invention, in response to a dialogue instruction for a large language model, determines the input information and controllable response method indicated by the dialogue instruction; determines the input extension information corresponding to the input information, and performs literature retrieval in a preset literature fragment database based on the input extension information to obtain retrieved literature fragments; determines at least one search keyword based on the input extension information and the literature to which the retrieved literature fragments belong; performs literature retrieval in the preset literature database based on each search keyword to obtain keyword-retrieved literature, and constructs an extended literature list from the keyword-retrieved literature and the literature to which the retrieved literature fragments belong; determines the target extended literature indicated by the controllable response method in the extended literature list, and inputs the target extended literature and the input extension information together into the large language model for information retrieval to obtain the response information corresponding to the input information. Therefore, this invention expands the user's input information to obtain expanded input information that fully expresses the user's intent. Information retrieval is then performed based on this expanded input information, resulting in the output of response information that better meets the user's actual needs, thereby improving the accuracy of the output response information. Furthermore, in the information retrieval process based on the expanded input information, the large language model in this invention introduces a controllable response method to control the retrieval process of the large language model. This controls the large language model to retrieve information from specified documents, making the retrieved response content more personalized and professional, thus meeting the user's actual needs and further improving the accuracy of the output response information.

[0129] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.

[0130] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A controllable response method based on a large language model, characterized in that, The method comprises the following steps: in response to a dialogue instruction for a large language model, determining input information and a controllable response mode indicated by the dialogue instruction; determining input extension information corresponding to the input information, and performing literature retrieval in a preset literature fragment database based on the input extension information to obtain a retrieved literature fragment; determining at least one search keyword based on the input extension information and the literature to which the retrieved literature fragment belongs; based on each search keyword, performing literature retrieval in a preset literature database to obtain keyword-retrieved literature, and forming an extended literature list from the keyword-retrieved literature and the literature to which the retrieved literature fragment belongs; determining a target extended literature indicated by the controllable response mode in the extended literature list, and inputting the target extended literature and the input extension information into a large language model for information retrieval to obtain response information corresponding to the input information.

2. The method of claim 1, wherein, The method comprises the following steps: based on the field and type to which the input information belongs, determining a preset extension information template, wherein the preset extension information template includes a key information filling position; determining key information in the input information, and filling the key information filling position in the preset extension information template based on the key information to obtain initial input extension information corresponding to the input information; performing semantic analysis on the initial input extension information to obtain an extension semantic information vector, and performing semantic analysis on the input information to obtain an input semantic information vector; based on the extension semantic information vector and the input semantic information vector, calculating the similarity between the initial input extension information and the input information, and based on the similarity, determining whether the initial input extension information meets the extension requirement; if the extension requirement is met, the initial input extension information is determined as the input extension information corresponding to the input information, otherwise the input extension information corresponding to the input information is re-determined.

3. The method of claim 1, wherein, The method comprises the following steps: performing word segmentation on the literature to which the retrieved literature fragment belongs to obtain each word segment contained in the literature to which the retrieved literature fragment belongs; determining an extension feature vector corresponding to the input extension information, and determining a word segment feature vector corresponding to each word segment; based on the extension feature vector and each word segment feature vector, respectively, performing semantic similarity matching between the input extension information and each word segment to obtain a similarity matching result; based on the similarity matching result, determining at least one search keyword in each word segment.

4. The method of claim 1, wherein, The method comprises the following steps: if the controllable response mode is a selected text controllable response mode, determining a target extended literature indicated by the selected text controllable response mode in the extended literature list; If the controllable response mode is a group controllable response mode, each extended document in the extended document list is clustered according to a target cluster type indicated by the group controllable response mode, to obtain extended documents under different cluster topics corresponding to the target cluster type, wherein the different cluster topics correspond to different subject headings; A target subject heading indicated by the group controllable response mode is determined from the different subject headings, and document retrieval is performed based on the target subject heading to obtain subject recall documents, and the subject recall documents are determined as the target extended documents.

5. The method of claim 4, wherein, The clustering of each extended document in the extended document list to obtain extended documents under different cluster topics corresponding to the target cluster type comprises: determining a document feature vector corresponding to each extended document; initializing a centroid vector corresponding to each different cluster under the target cluster type; calculating a cosine similarity between each document feature vector and the centroid vector corresponding to each different cluster, and dividing each extended document into the different clusters based on the cosine similarity corresponding to each different cluster; obtaining an updated centroid vector corresponding to each different cluster based on the document feature vectors corresponding to the extended documents in the different cluster; re-dividing each extended document into the different clusters based on the updated centroid vector until the updated centroid vector does not change, and determining the extended documents finally divided into the different clusters as the extended documents under different cluster topics corresponding to the target cluster type.

6. The method of claim 4, wherein, The determination of the target subject heading indicated by the group controllable response mode from the different subject headings comprises: determining a word frequency of each subject heading in each extended document corresponding to the extended document list; determining a preset number of high-frequency subject headings from each subject heading based on the word frequency; determining the target subject heading indicated by the group controllable response mode from each high-frequency subject heading.

7. The method of claim 1, wherein, The method further comprises: inputting the input extended information and the recall document segment into the large language model for information retrieval to obtain a response information corresponding to the input information; or, constructing an extended document list based on the document to which the recall document segment belongs; determining an extended document indicated by a selected document controllable response mode from the extended document list, and inputting the extended document and the input extended information into the large language model for information retrieval to obtain a response information corresponding to the input information.

8. A controllable response device based on a large language model, characterized by, comprises: a first determination unit configured to determine input information and a controllable response mode indicated by a dialogue instruction for a large language model in response to the dialogue instruction; a first recall unit configured to determine input extended information corresponding to the input information, and perform document retrieval in a preset document segment database based on the input extended information to obtain a recall document segment; a second determination unit configured to determine at least one search keyword based on the input extended information and a document to which the recall document segment belongs. A second recall unit is configured to perform literature recall in a preset literature database based on each search keyword, to obtain keyword recall literature, and to form an extended literature list from the keyword recall literature and the literature to which the recall literature segment belongs; An information retrieval unit is configured to determine a target extended literature indicated by the controllable response mode in the extended literature list, and to input the target extended literature and the input extended information together into a large language model to perform information retrieval, to obtain response information corresponding to the input information.

9. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 7.

10. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The computer program, when executed by a processor, implements the steps of the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Searching method and device and computer equipment

    CN112749328A

  • Text processing method and device, computer equipment and storage medium

    CN113704462A