Controllable response method and device based on large language model and storage medium
Through dialogue instructions and controllable response methods, the input information and literature recall are extended, which solves the problem of generalization and insufficient professionalism of response content in AI Q&A technology, and achieves higher response accuracy and personalization.
Patent Information
- Application Number
- CN202411063903.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-05
AI Technical Summary
When existing AI Q&A technology deals with complex or difficult to express user needs, it is difficult to output personalized and professional response content, resulting in low response accuracy.
By responding to dialogue instructions, we determine the input information and controllable response methods, expand the input information and document recall, build an extended document list, and search information in a large language model to generate a response that is more in line with user needs.
It improves the personalization and professionalization of the response content, meets the actual needs of users, and improves the accuracy of the output of the response information.
Smart Images

Figure CN119150984A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a controllable response method, device and storage medium based on a large language model. Background Art
[0002] With the rapid development of artificial intelligence technology, AI question-answering technology has been widely used in many fields, such as literature knowledge retrieval.
[0003] At present, the answer content is usually directly output according to the user's question. However, since users need highly personalized answer content, and when faced with complex questions or difficult to express demands, it is often difficult for users to fully express their intentions, the answer content directly output according to the user's question is too generalized, and the pertinence and professionalism are not high, which cannot meet the actual needs of users, resulting in low accuracy of the output of the answer content. Summary of the invention
[0004] The present 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, so as to meet the actual needs of users.
[0005] According to a first aspect of the present invention, there is provided a controllable response method based on a large language model, comprising:
[0006] In response to a dialogue instruction for the large language model, determining input information and a controllable response mode indicated by the dialogue instruction;
[0007] Determine input extension information corresponding to the input information, and perform document recall in a preset document fragment database based on the input extension information to obtain recalled document fragments;
[0008] Determining at least one search keyword based on the input extension information and the document to which the recalled document fragment belongs;
[0009] Based on each of the search keywords, a document is recalled in a preset document database to obtain keyword-recalled documents, and an extended document list is formed by the keyword-recalled documents and the documents to which the recalled document fragments belong;
[0010] The target extended document indicated by the controllable response mode is determined in the extended document list, and the target extended document and the input extended information are input into the large language model for information retrieval to obtain the response information corresponding to the input information.
[0011] Optionally, the determining the input extension information corresponding to the input information includes:
[0012] Determine a preset extended information template based on the field and type to which the input information belongs, wherein the preset extended information template includes a key information filling position;
[0013] Determine key information in the input information, and fill the key information filling position in the preset extended information template based on the key information to obtain initial input extended information corresponding to the input information;
[0014] Performing semantic analysis on the initial input extended information to obtain an extended semantic information vector, and performing semantic analysis 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, calculating the similarity between the initial input extended information and the input information, and based on the similarity, determining whether the initial input extended information meets the extended requirement;
[0016] 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.
[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] Performing word segmentation processing on the document to which the recalled document fragment belongs, to obtain each word segmentation contained in the document to which the recalled document fragment belongs;
[0019] Determine an extended feature vector corresponding to the input extended information, and determine a word segmentation feature vector corresponding to each word segmentation;
[0020] Based on the extended feature vector and each of the word segmentation feature vectors, respectively matching the input extended information with each of the word segmentations in terms of semantic similarity to obtain a similarity matching result;
[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 mode in the extended document list includes:
[0023] If the controllable response mode is a text-selection controllable response mode, determining the target extended document indicated by the text-selection controllable response mode in the extended document list;
[0024] If the controllable response mode is a group controllable response mode, clustering each extended document in the extended document list according to the target cluster type indicated by the group controllable response mode to obtain extended documents under different cluster themes corresponding to the target cluster type, wherein the different cluster themes correspond to different subject words;
[0025] The target subject word indicated by the group controllable response method is determined among the different subject words, and the document is recalled based on the target subject word to obtain the subject recalled document, and the subject recalled document is determined as the target extended document.
[0026] Optionally, clustering the extended documents in the extended document list to obtain extended documents under different clustering themes corresponding to the target cluster 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] Calculating the cosine similarity between each of the document feature vectors and the centroid vectors corresponding to the different clusters, and dividing each of the extended documents into the different clusters based on the cosine similarities corresponding to the different clusters;
[0030] Based on the document feature vectors corresponding to the extended documents in the different clusters, obtaining updated centroid vectors corresponding to the different clusters;
[0031] Based on the updated centroid vector, each of the extended documents is re-divided into the different clusters until the updated centroid vector does not change, and the extended documents finally divided into the different clusters are determined as extended documents under different clustering themes corresponding to the target clustering type.
[0032] Optionally, the determining of the target subject word indicated by the group controllable answering mode from among the different subject words includes:
[0033] Determine the frequency of each of the subject terms in each of the extended documents corresponding to the extended document list;
[0034] Based on the word frequency, determining a preset number of high-frequency subject words in each of the subject words;
[0035] The target subject word indicated by the group controllable response mode is determined in each of the high-frequency subject words.
[0036] Optionally, the method further comprises:
[0037] Inputting the input extension information and the recalled document fragment into the large language model for information retrieval to obtain response information corresponding to the input information; or
[0038] Constructing an extended document list based on the documents to which the recalled document fragments belong;
[0039] The extended document indicated by the controllable response mode of the selected text is determined in the extended document list, and the extended document and the input extended information are 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, there is provided a controllable response device based on a large language model, comprising:
[0041] A first determining unit, configured to determine, in response to a dialogue instruction for a large language model, input information and a controllable response mode indicated by the dialogue instruction;
[0042] A first recall unit, configured to determine input extension information corresponding to the input information, and perform document recall in a preset document fragment database based on the input extension information to obtain a recalled document fragment;
[0043] A second determining unit, configured to determine at least one search keyword based on the input extended information and the document to which the recalled document fragment belongs;
[0044] A second recall unit is used to recall documents in a preset document database based on each of the search keywords to obtain keyword-recalled documents, and to form an extended document list from 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, there is provided a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above controllable response method based on a large language model.
[0047] According to a fourth aspect of the present invention, there is provided a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above controllable response method based on a large language model when executing the program.
[0048] According to a controllable response method, device and storage medium based on a large language model provided by the present invention, compared with the current method of directly outputting response content according to user questions, the present invention determines the input information indicated by the dialogue instruction and the controllable response method by responding to the dialogue instruction for the large language model; determines the input extension information corresponding to the input information, and recalls documents in a preset document fragment database based on the input extension information to obtain recalled document fragments; determines at least one search keyword based on the input extension information and the documents to which the recalled document fragments belong; recalls documents in a preset document database based on each of the search keywords to obtain keyword-recalled documents, and forms an extended document list with the keyword-recalled documents and the documents to which the recalled document fragments belong; determines the target extended document indicated by the controllable response method 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. Therefore, the present invention can obtain input extended information that fully expresses the user's intention by expanding the user's input information, and then perform information retrieval based on the input extended information to output response information, which can make the output response information better meet the user's actual needs, thereby improving the output accuracy of the response information. Then, in the process of performing information retrieval based on the input extended information, the large language model in the present invention introduces a controllable response method to control the retrieval process of the large language model, so as to control the large language model to perform information retrieval in designated documents, thereby making the retrieved response content more personalized and professional, thereby meeting the user's actual needs, and further improving the output accuracy of the response information. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0050] Figure 1 A flow chart of a controllable response method based on a large language model provided by an embodiment of the present invention is shown;
[0051] Figure 2 Another flow chart of a controllable response method based on a large language model provided by an embodiment of the present invention is shown;
[0052] Figure 3 A schematic diagram of multiple response information output modes based on a large language model provided in an embodiment of the present invention is shown;
[0053] Figure 4 A schematic diagram of the structure of a controllable response device based on a large language model provided by an embodiment of the present invention is shown;
[0054] Figure 5 A schematic diagram showing the structure of another controllable response device based on a large language model provided by an embodiment of the present invention;
[0055] Figure 6 A schematic diagram of the physical structure of a computer device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0056] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0057] At present, the method of directly outputting the answer content according to the user's question causes the output answer content to be too generalized, and lacks pertinence and professionalism, and cannot meet the actual needs of the user, resulting in low accuracy in the output of the answer content.
[0058] In order to solve the above problems, the embodiment of the present invention provides a controllable response method based on a large language model, such as Figure 1 As shown, the method includes:
[0059] 101. In response to a dialogue instruction for a large language model, determine input information and a controllable response method indicated by the dialogue instruction.
[0060] For the embodiment of the present invention, a preset document fragment database is pre-constructed. The specific construction method is: integrate the document data of journals, dissertations, newspapers, conferences, etc. collected from various websites, and vectorize the integrated data, cut it into vectorized data fragments, and form a vector data fragment set. The specific process of processing and integrating document data is the process of data vectorization, which is divided into the following four steps: prepare training data: pre-process xml structured data, extract document titles, subheadings, subheadings corresponding to document texts, etc. as training data; set training parameters: set training parameters according to the characteristics of document data, such as the number of iterations, learning rate, etc.; model training: based on the training data and the set parameters, train the text embedding model, such as the BGE M3 model, etc.; text vectorization: based on the trained model, convert the structured text into 1024-dimensional vector data. Finally, the document fragments corresponding to each vectorized data fragment constitute the preset document fragment database.
[0061] Among them, the controllable response mode refers to controlling the dialogue system (large language model question-answering system) according to user needs in the process of outputting response information. The controllable response mode includes a text-selection controllable response mode, a group-controllable response mode, etc. The text-selection controllable response mode refers to information retrieval in the specified documents selected by the user, and the group-controllable response mode refers to information retrieval in the documents under the group specified by the user. Specifically, during the interaction between the user and the question-answering system, the user can trigger a dialogue instruction by inputting or selecting the content provided by the question-answering system. For example, the user can input a text or voice to express the question he wants to ask at present, and generate a dialogue instruction. If the user inputs in the form of voice, voice-to-text conversion is required. At the same time, the user will also input or select a controllable response mode in the question-answering system to trigger the dialogue instruction. After that, the large language model uses the controllable response mode to control the retrieval process of the large language model in the process of information retrieval based on the input information, which can avoid the large language model from outputting generalized information, so that the output response information can meet the actual needs of the user, thereby improving the output accuracy of the response information.
[0062] 102. Determine input extension information corresponding to the input information, and perform document recall in a preset document fragment database based on the input extension information to obtain recalled document fragments.
[0063] Among them, input extended information refers to information that normalizes the input information, is semantically similar or related to the input information, and can more clearly and comprehensively express the user's query intention. At the same time, the input information will also be expanded, including extended information such as research topics and question requirements.
[0064] In the embodiment of the present invention, when a user inputs information to ask a question, the dialogue system first generates extended input information of a related topic based on the input information. Specifically, the input extended information can be generated through a specific prompt word (, and the input extended information includes information such as the research topic and question requirements of the input information. Then, the preset document fragment database is searched for recalled document fragments with high similarity to the extended input information, and then information retrieval is performed based on the input extended information and the recalled document fragment. Therefore, the embodiment of the present invention can make the expanded input extended information more clear and accurately express the user's intention by expanding the input information. Then, information retrieval is performed by inputting the extended information, so that the retrieved information can better meet the actual needs of the user, thereby improving the output accuracy of the response information.
[0065] 103. Determine at least one search keyword based on the input extended information and the document to which the recalled document fragment belongs.
[0066] For the embodiment of the present invention, after the input information is expanded to obtain the input extended information, it is also necessary to determine at least one search keyword in the document to which the recalled document fragment belongs based on the input extended information. Specifically, the document to which the recalled document fragment belongs can be segmented, and then at least one search keyword with a high similarity to the input extended information can be determined in each segmented word. In addition, a prompt word can be determined based on the input extended information, and then the search keyword can be determined in the document to which the recalled document fragment belongs based on the prompt word. Then, the document is recalled based on the keyword, which can improve the recall accuracy of the document.
[0067] 104. Based on each search keyword, a document recall is performed in a preset document database to obtain keyword-recalled documents, and an extended document list is formed by the keyword-recalled documents and the documents to which the recalled document fragments belong.
[0068] The preset document database includes documents of various fields and types. For the embodiment of the present invention, in order to make the output response information meet the actual needs of the user, it is necessary to pre-build a document list that meets the input information requirements, and then control the large language model in the dialogue system to perform information retrieval based on each document in the document list, so that the retrieved response information can meet the actual needs of the user and avoid showing the user broad response information. Based on this, in order to achieve the above effect, it is first necessary to construct a document list. The specific dialogue system can perform document retrieval in the built-in document 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 is preferably performed in the form of: keyword 1and keyword 2and keyword 3. If the above search content is empty, a traditional search can be performed in accordance with: "keyword 1and keyword 2" or "keyword 2and keyword 3" or "keyword 1and keyword 3" to retrieve the keyword recalled documents. Then, the keyword recalled documents and the documents to which the recalled document fragment in step 103 belongs constitute an extended document list. Then, the user can specify some documents in the extended document list, and based on the input extended information, control the dialogue system to perform information retrieval in the part of the documents. Therefore, by controlling the retrieval scope of the dialogue system during the information retrieval process, that is, controlling the dialogue system to search for the user-specified scope, the retrieved response information can better meet the actual needs of the user, thereby improving the output accuracy of the response information.
[0069] 105. 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 response information corresponding to the input information.
[0070] For the embodiments of the present invention, since the controllable response mode includes a text selection controllable response mode and a group controllable response mode, the text selection controllable response mode means that the user directly selects at least one target extended document in the extended document list, and then based on the input extension information, controls the large language model in the dialogue system to directly search for response information in the target extended document. The group controllable response mode means that the documents in the extended document list are grouped in advance, and then the user specifies at least one target group in each group, and then based on the input extension information, controls the large language model in the dialogue system to directly search for response information in the documents under the target group. For example, for the text selection controllable response mode, in the extended document list, a group of documents specified by the user in the text selection controllable response mode is determined to form a document data set X = {x1………,x n}, where x1, x2, ...x n Represents the document specified by the user. The large language model performs full-text content learning and training based on the data set X to form the knowledge training result set D(X) of the data set X, where D(X) is a set of knowledge fragmented vector data that has been trained with the full-text content. The controllable generation function will answer the input of extended information based on the vectorized data of the full-text content in the knowledge training result set D(X). At the same time, for the grouped controllable response method, each document in the extended document list is clustered into different clustering themes based on the clustering types such as subject, publication time, research level, and author elements. Taking thematic cluster analysis as an example, the extended document list is clustered into documents under different clustering themes, and then sorted according to the frequency of occurrence of the subject words corresponding to different clustering themes, and the 20 most frequently occurring high-frequency subject words are obtained. A group of subject words are selected from the high-frequency subject words to form a subject word data set Z = {z1………,z n}, where z1...z n represents the selected subject words, and then based on the subject word set Z, a document query is performed to obtain multiple search documents. Then, based on the input extension information, the large language model can be controlled to retrieve the answer information in the multiple search documents. At the same time, in order to further narrow the search scope so that the retrieved information can better meet the actual needs of the user and improve the efficiency of information retrieval, the user can specify a set of document data sets X = {x1………,x n}, as the data set D(X) generated by subject grouping controllably, the grouping controllably generating function will input the extended information answer based on the vectorized data of the abstract, title, and keywords in the data set D(X), thereby narrowing the search scope according to user needs through a controllable response method, which can improve the efficiency of information retrieval. At the same time, it can also make the retrieved information more meet the actual needs of users, that is, it can improve the accuracy of information retrieval. Further, the embodiment of the present invention can not only control the dialogue system for information retrieval according to the document specified by the user, but also control the dialogue system for information query according to the group specified by the user, including subject, publication time, research level, author, etc., and can realize diversified retrieval control methods, thereby meeting the diversified needs of users.
[0071] According to a controllable answering method based on a large language model provided by the present invention, compared with the current method of directly outputting answering content according to user questions, the present invention determines the input information indicated by the dialogue instruction and the controllable answering method by responding to the dialogue instruction for the large language model; determines the input extension information corresponding to the input information, and recalls documents in a preset document fragment database based on the input extension information to obtain recalled document fragments; determines at least one search keyword based on the input extension information and the documents to which the recalled document fragments belong; recalls documents in a preset document database based on each of the search keywords to obtain keyword-recalled documents, and forms an extended document list with the keyword-recalled documents and the documents to which the recalled document fragments belong; determines the target extended document indicated by the controllable answering method 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 answer information corresponding to the input information. Therefore, the present invention can obtain input extended information that fully expresses the user's intention by expanding the user's input information, and then perform information retrieval based on the input extended information to output response information, which can make the output response information better meet the user's actual needs, thereby improving the output accuracy of the response information. Then, in the process of performing information retrieval based on the input extended information, the large language model in the present invention introduces a controllable response method to control the retrieval process of the large language model, so as to control the large language model to perform information retrieval in designated documents, thereby making the retrieved response content more personalized and professional, thereby meeting the user's actual needs, and further improving the output accuracy of the response information.
[0072] Further, in order to better illustrate the process of the controllable response based on the large language model, as a refinement and extension of the above embodiment, the embodiment of the present invention provides another controllable response method based on the large language model, such as Figure 2 As shown, the method includes:
[0073] 201. In response to a dialogue instruction for a large language model, determine input information and a controllable response method indicated by the dialogue instruction.
[0074] Specifically, the dialogue system will match questions and generate answers based on vectorized data. At the same time, the dialogue system also supports grouping and controllable selection generation functions. Users can select documents, or groups such as topics, publication time, research level, and authors to conduct literature searches as needed. The dialogue system will generate corresponding answers based on the document selection results or group selection results.
[0075] 202. Determine input extension information corresponding to the input information, and perform document recall in a preset document fragment database based on the input extension information to obtain recalled document fragments.
[0076] Du Yu In the embodiment of the present invention, since it is often difficult for users to fully express their intentions when facing complex problems or demands that are difficult to express in words, that is, users may not be able to clearly and accurately express their intentions. In this case, information retrieval is performed only based on the information directly input by the user in the dialogue system, which will result in low accuracy of information retrieval. Therefore, in order to improve the accuracy of information retrieval, it is first necessary to determine the input extended information corresponding to the input information. Based on this, step 202 specifically includes: determining a preset extended information template based on the field and type to which the input information belongs, wherein the preset extended information template includes a key information filling position; determining the key information in the input information, and performing information retrieval on the preset information based on the key information; The key information filling position in the extended information template is filled to obtain the initial input extended information corresponding to the input information; the initial input extended information is semantically analyzed to obtain an extended semantic information vector, and the input information is semantically analyzed 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, whether the initial input extended information meets the extended requirements is determined; 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 re-determined.
[0077] Specifically, different extended information templates are constructed in advance according to different fields and different information types. According to the characteristics of document retrieval, a series of extended information templates are designed to cover different retrieval angles and depths. The extended information templates may include synonym replacement, hypernym / hyponym expansion, related concept association, etc. For the template for synonym replacement, the synonym dictionary, online resources or professional term list can be used to add synonyms or near-synonyms of the keywords in the input information to the search formula. For example, if the user's input information is "machine learning", the input extended information after synonym replacement may include "machine learning", "artificial intelligence algorithm", "automatic learning", etc. For the template of hypernym / hyponym expansion, hyponym expansion can be used to expand the search scope and find a wider range of relevant literature. Hypernyms can be obtained by consulting taxonomies, thesaurus or professional books. Hyponym expansion: used for precise search to find more specific relevant literature, it also needs to use resources such as taxonomies and thesaurus. For example, taking the input information as "machine learning", its hypernym may be "artificial intelligence", and hyponyms may include "deep learning", "support vector machine", "decision tree", etc. The hypernym and hyponym are combined to obtain the input expansion information corresponding to the input information.
[0078] Furthermore, the extended information template may be a fixed string format, including placeholders (key information filling positions), and these placeholders may be replaced by key information in the input question during the information expansion process. Furthermore, after obtaining the input information entered by the user in the dialogue system, the field and type to which the input information belongs are first determined, and then a preset extended information template that meets the extension requirements is determined in different extended information templates according to the field and type, and then 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.) technology can be used to extract key information from the input information, such as time, place, person, action, etc., and 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 expansion question is generated, that is, the placeholder in the preset extended information template is replaced with the actual key information value, or the key information value is filled into the key information filling position in the preset extended information template. In another embodiment of the present invention, in order to increase the diversity and coverage of the extended information, multiple templates can be designed, and different templates can be applied to the same basic input information to generate multiple extended information. Further, in order to verify the accuracy of the expansion of the input information, first, the input information and the input extension information need to be semantically analyzed respectively to obtain a semantic information vector, and then the similarity between the input information and the input extension information is calculated based on the semantic information vector. If the final similarity is greater than a preset threshold (a value set according to actual needs), the input extension information is determined to be accurate. If the similarity is less than the preset threshold, the input extension information is determined to be inaccurate, and the input information is expanded again until the similarity between the input extension information and the input information meets the requirements. For example, the input information: "How is the weather today?" The preset extension information template is: "How is the weather at [time] at [place]?; "What is the weather forecast at [time]?"; "Can you tell me about the weather conditions at [place] at [time]?" Key information extraction: time: today, place, generated extension information: "How is the weather in XX city today?"; "What is the weather forecast today?"; "Can you tell me about the weather conditions in XX city today?". Therefore, the embodiment of the present invention can make up for the defects of insufficient information and unclear intention of the input information determined by the user by expanding the input information, so that the accuracy of information retrieval can be improved by performing information retrieval based on the expanded information, and the information retrieval efficiency can also be improved.
[0079] Furthermore, after the input information is expanded to obtain the input extended information, the vector database of the entire library (wherein the vector database contains document fragments corresponding to multiple documents and their corresponding vector fragments) is searched for recalled document fragments with a high similarity to the input extended information.
[0080] 203. Determine at least one search keyword based on the input extended information and the document to which the recalled document fragment belongs.
[0081] In one embodiment of the present invention, after determining the recalled document fragment, the response information can be retrieved only according to the input extended information and the recalled document fragment, that is, the input extended information and the recalled document fragment are input into the large language model for information retrieval to obtain the response information corresponding to the input information. At the same time, the large language model also outputs the document ID described in the recalled document fragment. In another embodiment of the present invention, in order 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 according to the document ID, and the search keywords are determined according to the input extended information and each document. Based on this, the method includes: performing word segmentation processing on the document to which the recalled document fragment belongs to obtain each word segmentation 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 segmentation; based on the extended feature vector and each word segmentation feature vector, respectively performing semantic similarity matching between the input extended information and each word segmentation to obtain a similarity matching result; based on the similarity matching result, determining at least one search keyword in each word segmentation.
[0082] Specifically, the corresponding words of the document to which the recalled document fragment belongs are determined, and then the key information in the input extended information is determined, and the key information is matched with each word for similarity, and the target word that meets the similarity requirements is found in each word, and finally the target word is determined as the search keyword. After that, information retrieval is performed based on the search keyword, which can simplify the input information, thereby improving the information retrieval efficiency. At the same time, the search keyword is determined in the document, which can make the search keyword closer to the document form, thereby improving the information retrieval accuracy.
[0083] 204. Based on each search keyword, a document recall is performed in a preset document database to obtain keyword-recalled documents, and an extended document list is formed by the keyword-recalled documents and the documents to which the recalled document fragments belong.
[0084] Among them, the preset document database includes multiple documents. Specifically, according to each search keyword, the document is recalled in the preset document database to obtain the keyword recalled document, and the keyword recalled document and the document to which the recalled document fragment belongs constitute an extended document list, and the extended document list contains multiple documents corresponding to the input extended information, but the information in each document in the extended document list does not all meet the actual needs of the user, because, in order to find information that meets the actual needs of the user, it is necessary to reduce each document in the extended document list, that is, to reduce the scope of each document in the extended document list through a controllable response method, and then control the large language model to perform information retrieval in the reduced documents, and by performing information retrieval in a smaller range, not only the efficiency of information retrieval can be improved, but also the accuracy of information retrieval can be improved.
[0085] 205. If the controllable response mode is a text-selected controllable response mode, then the target extended document indicated by the text-selected controllable response mode is determined in the extended document list.
[0086] Specifically, different controllable response modes are selected by the user according to his / her will. If the user selects the text-selection controllable response mode, the target extended document indicated by the text-selection controllable response mode is determined in the extended document list. Then, based on the input extended information, the large language model searches for the response information in the documents with a smaller scope and specified by the user, so that the retrieved response information can better meet the actual needs of the user. In another embodiment of the present invention, when the text-selection controllable response mode is used, in order to shorten the search time, an extended document list can also be directly constructed based on the documents to which the recalled document fragment belongs, and then the extended document indicated by the text-selection controllable response mode is determined in the extended document list, and the extended document and the input extended information are 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 mode is a group controllable response mode, then according to the target clustering type indicated by the group controllable response mode, each extended document in the extended document list is clustered to obtain extended documents under different clustering themes corresponding to the target clustering type, wherein different clustering themes correspond to different keyword terms.
[0088] The target clustering type includes at least one of a subject keyword clustering type, a publication time clustering type, a research level clustering type, an author element clustering type, and the like.
[0089] For an embodiment of the present invention, if the user selects a group controllable response mode, it is first necessary to determine the target clustering type indicated by the group controllable response mode, and then cluster the extended documents in the extended document list according to the target clustering type. For example, if the target clustering type is an author element clustering type, the extended documents in the extended document list are clustered according to different authors, and the clustering obtains the documents corresponding to author A, the documents corresponding to author B, the documents corresponding to author C, etc., wherein author A, author B, and author C are the keywords under different clustering categories. Among them, 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 of the document feature vectors and the centroid vectors corresponding to the different clusters, and based on the cosine similarities corresponding to the different clusters, dividing each of the extended documents into the different clusters; based on the document feature vectors corresponding to the extended documents in the different clusters, obtaining the updated centroid vectors corresponding to the different clusters; based on the updated centroid vectors, re-dividing each of the extended documents into the different clusters until the updated centroid vector does not change, and determining the extended documents finally divided into the different clusters as extended documents under different clustering themes corresponding to the target clustering type.
[0090] Specifically, the document feature vectors of each extended document in the extended document list are determined by word embedding or other methods, and then the centroid vectors corresponding to the initial centroids corresponding to the K clusters are selected. For the document feature vectors corresponding to each extended document, the cosine similarity between each document feature vector and the K centroid vectors is calculated. Specifically, the cosine similarity between each document feature vector and the K centroid vectors can be calculated by the following formula:
[0091]
[0092] Among them, cos(θ) represents the cosine similarity between any document feature vector and any centroid vector, x i represents the i-th component of the document feature vector corresponding to any extended document, y iRepresents the ith component in the centroid vector of any cluster, and n represents the number of components in the document feature vector corresponding to any extended document. Therefore, according to the above formula, the cosine similarity between each extended document and the centroid vector of each cluster can be calculated. Furthermore, 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 largest cosine similarity. Then, for each cluster, the centroid of each cluster and its corresponding centroid vector are recalculated, and each extended document is re-divided into different clusters. In this way, each extended document is continuously divided until the position of the centroid does not change, that is, the centroid vector does not change, and finally the extended documents divided into different clusters are determined as texts under different clustering themes.
[0093] 207. Determine the target subject words indicated by the group controllable response method among different subject words, and recall documents based on the target subject words to obtain subject-recalled documents, and determine the subject-recalled documents as target extended documents.
[0094] For the embodiment of the present invention, different clustering topics correspond to different subject terms. For example, if each extended document is clustered according to the clustering type of publication time, each extended document under different publication times is obtained, for example, the extended documents corresponding to 2020, the extended documents corresponding to 2021, the extended documents corresponding to 2022, etc., then 2020, 2021, and 2022 are subject terms. Further, in order to narrow the search scope, it is necessary to determine the target subject terms indicated by the group controllable response method in different subject terms. Based on this, step 207 specifically includes: determining the word frequency of each of the subject terms in each of the extended documents corresponding to the extended document list; based on the word frequency, determining a preset number of high-frequency subject terms in each of the subject terms; determining the target subject terms indicated by the group controllable response method in each of the high-frequency subject terms.
[0095] Specifically, while clustering the extended documents in the extended document list to obtain the extended documents under different clustering themes, the subject words corresponding to the different clustering themes are also determined, and then the frequency of occurrence of each subject word in each extended document corresponding to the extended document list, that is, the word frequency, is determined respectively, and then the high-frequency subject words whose word frequency is greater than the preset frequency threshold are determined, and the high-frequency subject words are displayed to the user. The user will select the target subject word from the high-frequency subject words, that is, the target subject word indicated by the grouped controllable response method is determined, and finally based on the input extended information, the large language model is controlled to perform response information retrieval in the documents recalled by the target subject word (target extended document). At the same time, in order to further narrow the deceleration range and improve the retrieval accuracy, after determining the target subject word, a document search can be performed based on the target subject word to obtain multiple documents, and then the target document (target extended document) indicated by the grouped available response method is determined among the multiple documents, and finally based on the input extended information, the large language model is controlled to perform response information retrieval in the target document. Therefore, the embodiment of the present invention adopts a grouped controllable retrieval method of high-frequency subject words. Since high-frequency words are words that frequently appear in documents, they often represent the core topics or key concepts of the documents. By searching for these high-frequency words, the search scope can be quickly narrowed and unnecessary information screening work can be reduced, thereby improving the search efficiency; in addition, since high-frequency words are usually closely related to the main content of the document, searching for information in the documents where these high-frequency words appear is more likely to find content that is highly relevant to the target topic, and can avoid retrieving a large number of documents that are irrelevant or not closely related to the topic, thereby improving the accuracy of the search results; in addition, since the appearance of high-frequency words often reflects the research hotspots and trends in a certain field, by searching for these high-frequency words, it is easier to obtain the latest research results and cutting-edge trends in the field.
[0096] 208. The target extended document and the input extended information are input into the large language model for information retrieval to obtain response information corresponding to the input information.
[0097] Specifically, in one embodiment of the present invention, if the target extended document specified by the user is determined in the extended document list through the text selection controllable method, then the large language model is controlled to perform response information retrieval in the target extended document based on the input extension information. Since the information retrieval is performed in the document specified by the user, the retrieved response information can better meet the actual needs of the user. In another embodiment of the present invention, if high-frequency subject words appearing in the extended document list are selected through the group controllable response method, and then the response information is retrieved through the group controllable response method of the high-frequency subject words, the search scope can be quickly narrowed, unnecessary information screening work can be reduced, thereby improving the search efficiency, and it is easier to obtain the latest research results and cutting-edge trends in the field.
[0098] In another embodiment of the present invention, Figure 3 As shown, Figure 3 A plurality of methods for outputting response information are shown, and the embodiment of the present invention can select any method for outputting response information according to the requirements. Figure 3 The input question in represents the input information, the model refers to the large language model, and the question asked refers to the input extended information.
[0099] According to another controllable answering method based on a large language model provided by the present invention, compared with the current method of directly outputting answering content according to user questions, the present invention determines the input information indicated by the dialogue instruction and the controllable answering method by responding to the dialogue instruction for the large language model; determines the input extension information corresponding to the input information, and recalls documents in a preset document fragment database based on the input extension information to obtain recalled document fragments; determines at least one search keyword based on the input extension information and the documents to which the recalled document fragments belong; recalls documents in a preset document database based on each of the search keywords to obtain keyword-recalled documents, and forms an extended document list with the keyword-recalled documents and the documents to which the recalled document fragments belong; determines the target extended document indicated by the controllable answering method 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 answering information corresponding to the input information. Therefore, the present invention can obtain input extended information that fully expresses the user's intention by expanding the user's input information, and then perform information retrieval based on the input extended information to output response information, which can make the output response information better meet the user's actual needs, thereby improving the output accuracy of the response information. Then, in the process of performing information retrieval based on the input extended information, the large language model in the present invention introduces a controllable response method to control the retrieval process of the large language model, so as to control the large language model to perform information retrieval in designated documents, thereby making the retrieved response content more personalized and professional, thereby meeting the user's actual needs, and further improving the output accuracy of the response information.
[0100] Further, as Figure 1 The specific implementation of the present invention provides a controllable response device based on a large language model, such as Figure 4 As shown, the device includes: a first determination unit 31, a first recall unit 32, a second determination unit 33, a second recall unit 34, and an information retrieval unit 35.
[0101] The first determining unit 31 may be configured to determine input information and a controllable response mode indicated by a dialogue instruction in response to a dialogue instruction for a large language model.
[0102] The first recall unit 32 may be configured to determine input extension information corresponding to the input information, and perform document recall in a preset document fragment database based on the input extension information to obtain a recalled document fragment.
[0103] The second determining unit 33 may be configured 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 to obtain keyword-recalled documents, and form an extended document list consisting of 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 into the large language model for information retrieval to obtain the response information corresponding to the input information.
[0106] In a specific application scenario, in order to determine the input extension 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 determination module 321 may be configured to determine a preset extended information template based on the field and type to which the input information belongs, wherein the preset extended information template includes a key information filling position.
[0108] The filling module 322 may be used to determine key information in the input information, and fill the key information filling position in the preset extended information template based on the key information to obtain initial input extended information corresponding to the input information.
[0109] The semantic analysis module 323 may 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 may be configured 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 judge whether the initial input extended information meets the extension requirement based on the similarity.
[0111] The first determining module 321 may be specifically configured to determine the initial input extension information as the input extension information corresponding to the input information if the extension requirement is met, and to re-determine the input extension information corresponding to the input information otherwise.
[0112] In a specific application scenario, in order to determine the search keyword, the second determination unit 33 includes a word segmentation module 331 , a second determination 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 segmentation contained in the document to which the recalled document fragment belongs.
[0114] The second determination module 332 may be used to determine the extended feature vector corresponding to the input extended information, and determine the word segmentation feature vector corresponding to each word segmentation.
[0115] The matching module 333 may 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 each of the word segment feature vectors to obtain a similarity matching result.
[0116] The second determination module 332 may be specifically configured to determine at least one search keyword in each of the word segments based on the similarity matching result.
[0117] In a specific application scenario, in order to determine the target extended document 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 determination module 351 may be configured to determine, in the extended document list, a target extended document indicated by the controllable response mode for selected text if the controllable response mode is a controllable response mode for selected text.
[0119] The clustering module 352 can be used to cluster the extended documents in the extended document list according to the target clustering type indicated by the group controllable response mode if the controllable response mode is a group controllable response mode, and obtain the extended documents under different clustering themes corresponding to the target clustering type, wherein the different clustering themes correspond to different keywords.
[0120] The third determination module 351 can also be used to determine the target subject word indicated by the group controllable response method among the different subject words, and to recall documents based on the target subject word to obtain subject recalled documents, and to determine the subject recalled documents as the target extended documents.
[0121] In a specific application scenario, in order to cluster the extended documents in the extended document list, the clustering module 352 can be specifically used to determine the document feature vector corresponding to each of the extended documents; initialize the centroid vectors corresponding to different clusters under the target clustering type; calculate the cosine similarity between each of the document feature vectors and the centroid vectors corresponding to the different clusters, and divide each of the extended documents into the different clusters based on the cosine similarities corresponding to the different clusters; based on the document feature vectors corresponding to the extended documents in the different clusters, obtain the updated centroid vectors corresponding to the different clusters; based on the updated centroid vectors, re-divide each of the extended documents into the different clusters until the updated centroid vector does not change, and determine the extended documents finally divided into the different clusters as extended documents under different clustering themes corresponding to the target clustering type.
[0122] In a specific application scenario, in order to determine the target subject word indicated by the group controllable response method, the third determination module 351 can be specifically used to determine the word frequency of each subject word in each extended document corresponding to the extended document list; based on the word frequency, determine a preset number of high-frequency subject words in each subject word; determine the target subject word indicated by the group controllable response method in each high-frequency subject word.
[0123] In a specific application scenario, in order to perform information retrieval, the information retrieval unit 35 can also be used to input the input extension information and the recalled document fragment into the large language model for information retrieval to obtain response information corresponding to the input information.
[0124] The information retrieval unit 35 can also be used to construct an extended document list based on the document to which the recalled document fragment belongs; determine the extended document indicated by the selected text controllable response method in the extended document list, and input the 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.
[0125] It should be noted that for other corresponding descriptions of the functional modules involved in the controllable response device based on a large language model provided in the embodiment of the present invention, reference can be made to Figure 1 The corresponding description of the method shown will not be repeated here.
[0126] Based on the above Figure 1The method shown, accordingly, an embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps are implemented: in response to a dialogue instruction for a large language model, determining the input information and controllable response method indicated by the dialogue instruction; determining the input extension information corresponding to the input information, and based on the input extension information, performing document recall in a preset document fragment database to obtain a recalled document fragment; determining at least one search keyword based on the input extension information and the document to which the recalled document fragment belongs; based on each of the search keywords, performing document recall in a preset document database to obtain a keyword recalled document, and forming an extended document list with the keyword recalled document and the document to which the recalled document fragment belongs; determining the target extended document indicated by the controllable response method in the extended document list, and inputting the target extended document and the input extension information into the large language model for information retrieval to obtain the response information corresponding to the input information.
[0127] Based on the above Figure 1 The method shown and Figure 4 The embodiment of the device shown in the figure, the embodiment of the present 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, wherein the memory 42 and the processor 41 are both arranged on a bus 43, and when the processor 41 executes the program, the following steps are implemented: in response to a dialogue instruction for a large language model, the input information and the controllable response mode indicated by the dialogue instruction are determined; input extension information corresponding to the input information is determined, and based on the input extension information, a document is recalled in a preset document fragment database to obtain a recalled document fragment; based on the input extension information and the document to which the recalled document fragment belongs, at least one search keyword is determined; based on each of the search keywords, a document is recalled in a preset document database to obtain a keyword recalled document, and an extended document list is formed by the keyword recalled document and the document to which the recalled document fragment belongs; in the extended document list, a target extended document indicated by the controllable response mode is determined, and the target extended document and the input extension information are input into the large language model for information retrieval to obtain the response information corresponding to the input information.
[0128] Through the technical solution of the present invention, the present invention determines the input information and controllable response mode indicated by the dialogue instruction in response to the dialogue instruction for the large language model; determines the input extension information corresponding to the input information, and recalls the document in the preset document fragment database based on the input extension information to obtain the recalled document fragment; determines at least one search keyword based on the input extension information and the document to which the recalled document fragment belongs; based on each of the search keywords, recalls the document in the preset document database to obtain the keyword recalled document, and the extended document list is composed of the keyword recalled document and the document to which the recalled document fragment belongs; 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 the response information corresponding to the input information. Therefore, the present invention can obtain input extended information that fully expresses the user's intention by expanding the user's input information, and then perform information retrieval based on the input extended information to output response information, which can make the output response information better meet the user's actual needs, thereby improving the output accuracy of the response information. Then, in the process of performing information retrieval based on the input extended information, the large language model in the present invention introduces a controllable response method to control the retrieval process of the large language model, so as to control the large language model to perform information retrieval in designated documents, thereby making the retrieved response content more personalized and professional, thereby meeting the user's actual needs, and further improving the output accuracy of the response information.
[0129] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0130] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A controllable response method based on a large language model, characterized in that: include: In response to a dialogue instruction for the large language model, determining input information and a controllable response mode indicated by the dialogue instruction; Determine input extension information corresponding to the input information, and perform document recall in a preset document fragment database based on the input extension information to obtain recalled document fragments; Determining at least one search keyword based on the input extension information and the document to which the recalled document fragment belongs; Based on each of the search keywords, a document is recalled in a preset document database to obtain keyword-recalled documents, and an extended document list is formed by the keyword-recalled documents and the documents to which the recalled document fragments belong; The target extended document indicated by the controllable response mode is determined in the extended document list, and the target extended document and the input extended information are input into the large language model for information retrieval to obtain the response information corresponding to the input information.
2. The method according to claim 1, characterized in that The determining the input extension information corresponding to the input information includes: Determine a preset extended information template based on the field and type to which the input information belongs, wherein the preset extended information template includes a key information filling position; Determine key information in the input information, and fill the key information filling position in the preset extended information template based on the key information to obtain initial input extended information corresponding to the input information; Performing semantic analysis on the initial input extended information to obtain an extended semantic information vector, and performing semantic analysis on the input information to obtain an input semantic information vector; Based on the extended semantic information vector and the input semantic information vector, calculating the similarity between the initial input extended information and the input information, and based on the similarity, determining whether the initial input extended information meets the extended 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 according to claim 1, characterized in that The step of determining at least one search keyword based on the input extended information and the document to which the recalled document fragment belongs includes: Performing word segmentation processing on the document to which the recalled document fragment belongs, to obtain each word segmentation contained in the document to which the recalled document fragment belongs; Determine an extended feature vector corresponding to the input extended information, and determine a word segmentation feature vector corresponding to each word segmentation; Based on the extended feature vector and each of the word segmentation feature vectors, respectively matching the input extended information with each of the word segmentations in terms of semantic similarity to obtain a similarity matching result; Based on the similarity matching results, at least one search keyword is determined in each of the word segments.
4. The method according to claim 1, characterized in that Determining the target extended document indicated by the controllable response mode in the extended document list includes: If the controllable response mode is a text-selection controllable response mode, determining the target extended document indicated by the text-selection controllable response mode in the extended document list; If the controllable response mode is a group controllable response mode, clustering each extended document in the extended document list according to the target cluster type indicated by the group controllable response mode to obtain extended documents under different cluster themes corresponding to the target cluster type, wherein the different cluster themes correspond to different subject words; The target subject word indicated by the group controllable response method is determined among the different subject words, and the document is recalled based on the target subject word to obtain the subject recalled document, and the subject recalled document is determined as the target extended document.
5. The method according to claim 4, characterized in that The step of clustering the extended documents in the extended document list to obtain extended documents under different clustering themes corresponding to the target cluster type includes: Determine the document feature vector corresponding to each of the extended documents; Initialize the centroid vectors corresponding to different clusters under the target clustering type; Calculating the cosine similarity between each of the document feature vectors and the centroid vectors corresponding to the different clusters, and dividing each of the extended documents into the different clusters based on the cosine similarities corresponding to the different clusters; Based on the document feature vectors corresponding to the extended documents in the different clusters, obtaining updated centroid vectors corresponding to the different clusters; Based on the updated centroid vector, each of the extended documents is re-divided into the different clusters until the updated centroid vector does not change, and the extended documents finally divided into the different clusters are determined as extended documents under different clustering themes corresponding to the target clustering type.
6. The method according to claim 4, characterized in that The step of determining the target subject word indicated by the group controllable answering method from among the different subject words comprises: Determine the frequency of each of the subject terms in each of the extended documents corresponding to the extended document list; Based on the word frequency, determining a preset number of high-frequency subject words in each of the subject words; The target subject word indicated by the group controllable response mode is determined in each of the high-frequency subject words.
7. The method according to claim 1, characterized in that The method further comprises: Inputting the input extension information and the recalled document fragment into the large language model for information retrieval to obtain response information corresponding to the input information; or Constructing an extended document list based on the documents to which the recalled document fragments belong; The extended document indicated by the controllable response mode of the selected document is determined in the extended document list, and the extended document and the input extended information are input into the large language model for information retrieval to obtain the response information corresponding to the input information.
8. A controllable response device based on a large language model, characterized in that: include: A first determining unit, configured to determine, in response to a dialogue instruction for a large language model, input information and a controllable response mode indicated by the dialogue instruction; A first recall unit, configured to determine input extension information corresponding to the input information, and perform document recall in a preset document fragment database based on the input extension information to obtain a recalled document fragment; A second determining unit, configured to determine at least one search keyword based on the input extended information and the document to which the recalled document fragment belongs; A second recall unit is used to recall documents in a preset document database based on each of the search keywords to obtain keyword-recalled documents, and to form an extended document list from the keyword-recalled documents and the documents to which the recalled document fragments belong; 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.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Searching method and device and computer equipment
CN112749328A
Text processing method and device, computer equipment and storage medium
CN113704462A
Device and method for translation between Internet protocols
CN114024934A
Category based, extensible and interactive system for document retrieval
WO2003005235A1
