Large language model man-machine interaction method and system based on memory loop network enhancement
By introducing memory recurring networks into large language models, it enhances its human-computer interaction capabilities, solves the problem of insufficient understanding of the model when dealing with long contexts and complex instructions, realizes continuous learning and memory of user habits and operations, and improves the system processing efficiency and user experience.
Patent Information
- Application Number
- CN202411024621.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-22
AI Technical Summary
Existing large language models have insufficient understanding ability when dealing with long contexts and complex instructions, making it difficult to remember and apply user habits, emotions, and operational characteristics, resulting in inefficiency and poor experience.
Adopt a large language model human-computer interaction method based on memory recurring network enhancement. By encoding user requests into multi-dimensional objects, querying memory warehouses, generating context and inputting models with prompt words, optimizing output results, and adding task request information to memory warehouses In this paper, it realizes continuous learning and memory of user habits and operations.
The intelligent input and output of large language models is realized, which improves the efficiency of handling complex problems, allows the system to flexibly master complex knowledge and operations, overcomes the defect that simple pre-trained models cannot remember personalized information, and improves user experience and system efficiency.
Smart Images

Figure CN119002694A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of computer artificial intelligence and operating system systems, and in particular to a large language model human-computer interaction method and system based on memory recurrent network enhancement. Background Art
[0002] The goal of artificial intelligence is to enable machines to learn users' habits, requirements, operating methods or comprehensive problem-solving capabilities while communicating with users (or user applications), thereby achieving a swarm intelligence system that complements the advantages of humans and machines and interacts with information. This can greatly improve users' operating experience of machines, improve the work and service efficiency of computers or intelligent systems, and apply intelligent services to richer scenarios and fields.
[0003] By expanding the number of parameters and data in the pre-trained language model, the Large Language Model can significantly improve the effect while demonstrating special capabilities such as generalization and reasoning, such as contextual learning, step-by-step reasoning, human-computer dialogue, and task solving. On this basis, the Multimodal Large Model (MLLM) further introduces multimodal information processing, which can receive and reason about multimodal information, making artificial intelligence more in line with the way humans perceive the world, providing a more user-friendly interface, and becoming a more comprehensive task solver.
[0004] However, existing AI technologies, including (MLLM), are still lacking in user-oriented learning and intelligent operation. The main problems include: (1) Limited ability to process long contexts, because large models are usually limited by context size, which results in the intelligent system's ability to understand multiple input materials or information. If the information such as pictures and texts are delivered to the large model in stages and at different times, it is difficult to be comprehensively understood and applied for reasoning. (2) Insufficient ability to obey complex instructions. User instructions usually have a certain context, including accidental information such as emotions and references, and are usually difficult to be fully input to the large model, making it difficult for the large model to accurately understand complex instructions and give solutions according to the true meaning of the instructions. (3) Insufficient ability to correct context and improve thinking chain learning. User instructions are often partially arbitrary and incomplete. Usually, to achieve a satisfactory reasoning or generation operation, the user needs to repeatedly try to correct or improve the instructions in multiple rounds. After a long time interval, it is also difficult for users to reproduce or improve an implemented reasoning, which increases user complexity, resulting in poor experience and low efficiency.
[0005] In essence, large models (large language models) are various knowledge obtained through pre-training. In the process of serving users, they generally only provide reasoning, but cannot re-learn and memorize the user's habits, behaviors, and operating characteristics, which will cause various limitations on their ability to directly serve users. Although large models such as ChatGPT have a conversation memory function from the user interface, they can achieve chat memory. But its so-called memory function is just that the developer stores the conversation records in the cache. When sending a message to the large model, the program will automatically combine the most recent conversation records, that is, the context, and the prompt word into the final submission request (tokens), and send it to ChatGPT for reasoning generation. If the request combination of context and prompt word exceeds the tokens limit, then it will forget the previous conversation and only retain the number of contexts that meet the limit. This is the defect that the current large model cannot overcome in tasks with more complex requirements. In addition, it is difficult for large model dialogues to distinguish and identify users' emotions and conversation styles. Since users are highly subjective, the services or operations they need to perform are not restricted by type or method. They may be imaginative, affected by emotions or already performed operations, or may need to repeat or modify an earlier operation because they remember it. Therefore, the inherent defects of large models are difficult to make up for by their own technological development. They must continuously communicate, collaborate, and integrate with users to absorb the advantages of both artificial intelligence and human intelligence and achieve better capabilities in complex applications.
[0006] At present, artificial intelligence technologies such as large language models still cannot completely break away from human intelligence to obtain very good task automatic execution effects. Therefore, the key to the design of intelligent systems is to be able to integrate and calculate people's individual habits, memories, and even emotions, as well as environmental factors. The key here is the integration of calculation and memory, that is, to integrate various subjective factors of people and objective factors of the environment into reasoning. These can be implemented around the memory system, for example, people's historical behaviors, habits, and environmental attributes are stored in a memory bank, and the intelligent model can obtain corresponding information from the memory bank during reasoning. There are currently two main intelligent memory methods. One is the external memory slot method represented by the memory network with precise memory ability, and the other is the memory neural network method that combines memory and neural network to achieve probabilistic memory. However, neither of these two technical methods provides a solution that can intelligently select memory and combine highly adaptable contexts. Therefore, around the issue of human-machine fusion intelligence, how to implement a new type of memory network loop system based on large language model technology, so that the input, processing stage and output segment of the intelligent system can intelligently select memories that are helpful for reasoning, and collaborate with human intelligence to effectively integrate cognitive information, thereby improving the efficiency of processing and solving complex problems, has become a key technical issue that needs to be solved urgently. Summary of the invention
[0007] Technical problem to be solved by the present invention: In view of the above-mentioned problems in the prior art, a large language model human-computer interaction method and system based on memory recurrent network enhancement is provided. The present invention aims to enable the input end, processing stage and output segment of the large language model to intelligently select memories that are helpful for reasoning, and collaborate with human intelligence to effectively integrate cognitive information, thereby improving the efficiency of processing and solving complex problems.
[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is:
[0009] A large language model human-computer interaction method based on memory recurrent network enhancement includes the following steps:
[0010] S1, converting the task request code initiated by the user or the user program into a single-dimensional or multi-dimensional object that can be used for memory warehouse to query memory items, wherein each dimension of the single-dimensional or multi-dimensional object contains a set of key information, wherein the key information is information of some or all modalities in text, sound, and image, and the multi-dimensional object is part or all of all dimensions, wherein all dimensions include standard memory and other dimensions, wherein the other dimensions include part or all of knowledge, functions, actions, reminders, and records that describe a computer task process;
[0011] S2, querying memory items of a single-dimensional or multi-dimensional object from the memory warehouse, filtering the memory items obtained by the query to generate context, combining the context with the preset prompt words and inputting them into the large language model;
[0012] S3, obtaining the output result obtained by executing the large language model; analyzing and extracting the action or function call interface and its parameters in the output result, executing the action or calling the function call interface in combination with the parameters, obtaining the evaluation result of executing the action or calling the function call interface, and generating a task result including an evaluation report;
[0013] S4, determine whether the task request is completed. If it is completed, generate a memory item for the information during the execution of this task request and add it to the memory warehouse.
[0014] Optionally, step S1 includes:
[0015] S1.1, obtaining the task request content initiated by the user or the user program, wherein the task request content includes one or more of the description, requirements, purpose, and resources required to perform the task;
[0016] S1.2, standardize and convert the task request content into a specified format;
[0017] S1.3, the standardized converted task request content is combined with the prompt words containing all dimensional information and input into the large language model, so as to obtain a single-dimensional or multi-dimensional object that can be used for the memory warehouse to query the memory item.
[0018] Optionally, step S2 includes:
[0019] S2.1, embedding vector values of key information in single-dimensional or multi-dimensional objects;
[0020] S2.2, query the memory items of the corresponding dimension in the memory warehouse for the embedded vector value of each key information, and obtain the IDs and vector distances of the first N memory items that are closest to the vector distance of the key information;
[0021] S2.3, for the first N memory items of all key information, the absolute value of the vector distance with the key information is divided into M distance intervals according to the size, and the M distance intervals correspond to one of the M precision levels, so that the memory items are mapped to one of the M precision levels;
[0022] S2.4, extracting the content of the memory item from the memory warehouse according to the ID of the memory item and its precision level. If the attribute field of the memory item is other dimensions, directly extract the content of the memory item; if the attribute field of the memory item is standard memory, select the content corresponding to its precision level from the contents of multiple precision levels of the memory item, thereby generating a context composed of the contents of each memory item of a single-dimensional or multi-dimensional object;
[0023] S2.5, combine the context and the preset prompt word. If the combined content exceeds the input character length limit of the large language model, reduce the accuracy level of some or all memory items and jump to step S2.4; otherwise, input the combined content into the large language model.
[0024] Optionally, step S3 includes:
[0025] S3.1, obtaining the output result obtained by executing the large language model;
[0026] S3.2, analyzing and extracting the action or function call interface and its parameters in the output result, and executing the action or calling the function call interface in combination with the parameters;
[0027] S3.3, obtaining an evaluation result of executing an action or calling a function call interface, wherein the evaluation result is an evaluation result of whether the execution of the action or the calling of the function call interface directly returns a pass, or an evaluation result of whether the execution of the action or the calling of the function call interface is obtained manually based on the information directly returned by the execution of the action or the calling of the function call interface, or an evaluation result of whether the execution of the action or the calling of the function call interface is obtained by a numerical model or a large language model based on the information directly returned by the execution of the action or the calling of the function call interface;
[0028] S3.4, determine whether the evaluation result is passed. If the evaluation result is passed, jump to step S3.5; otherwise, perform improved context: generate a new context using the large language model according to the output result obtained by executing the large language model and the evaluation result of executing the action or calling the function call interface, add the new context to the context obtained in step S2.4, and jump to step S2.5;
[0029] S3.5, generate task results including evaluation reports.
[0030] Optionally, when executing the improved context in step S3.4, it also includes determining whether the number of times the improved context is executed exceeds a preset threshold. If it has not exceeded the preset threshold, a new context is generated using the large language model according to the output result obtained by executing the large language model and the evaluation result of executing the action or calling the function call interface, and the new context is added to the context obtained in step S2.4, and the process jumps to step S2.5; otherwise, one of the following methods is executed:
[0031] Method 1: Obtain a new task request by asking the user and jump to step S1;
[0032] Method 2: Jump to step S2 and re-execute the query memory item;
[0033] Method 3: Call the online search execution action or call the associated problem of the function call interface, add the execution result of the associated problem to the single-dimensional or multi-dimensional object of the task request using the multi-dimensional key information generated by the large language model, and jump to step S2 to re-execute the query memory item.
[0034] Optionally, the output result obtained by executing the large language model in step S3.1 also includes the memory contribution of each memory item, and the memory contribution is mapped to one of multiple precision levels according to the size of the memory contribution; if the memory contribution of a memory item is greater than a preset threshold and the precision level of the memory item is not the highest precision level among the multiple precision levels, the precision level of the memory item is increased by one precision level; if the memory contribution of a memory item is less than a preset threshold and the precision level of the memory item is not the lowest precision level among the multiple precision levels, the precision level of the memory item is decreased by one precision level; if there are memory items whose precision levels are increased or decreased, jump to step S2.4; otherwise jump to step S3.2.
[0035] Optionally, in step S4, generating a memory item from the information during the execution of the task request and adding it to the memory warehouse includes:
[0036] S4.1, combining the task request content, the single-dimensional or multi-dimensional object, the context, the output result obtained by executing the large language model, and the evaluation result of the task request, and then performing memory summarization using the large language model to generate a memory summary, wherein the memory summary includes the content of the memory items of the standard memory, knowledge, function, action, and reminder or the attribute type;
[0037] S4.2, if the memory summary contains the content of the memory item of the standard memory, the content of the memory item is converted into precision using the large language model to generate the content of the memory item at multiple precision levels;
[0038] S4.3, storing the contents of each memory item in the memory summary into the memory warehouse according to its attribute type and the precision level of the memory item whose attribute type is standard memory.
[0039] In addition, the present invention also provides a large language model human-computer interaction system based on memory recurrent network enhancement, comprising a microprocessor and a memory connected to each other, wherein the microprocessor is programmed or configured to execute the large language model human-computer interaction method based on memory recurrent network enhancement.
[0040] In addition, the present invention also provides a computer-readable storage medium, which stores a computer program or instruction, and the computer program or instruction is programmed or configured to execute the large language model human-computer interaction method based on memory recurrent network enhancement through a processor.
[0041] In addition, the present invention also provides a computer program product, including a computer program or instructions, which are programmed or configured to execute the large language model human-computer interaction method based on memory recurrent network enhancement through a processor.
[0042] Compared with the prior art, the present invention mainly has the following advantages:
[0043] 1. The present invention enables the system to continuously learn knowledge, habits, operations, programming capabilities, etc. through user input requests or prompts, allowing the system to flexibly master complex knowledge and operations, and can overcome the problem that a simple large language model or other pre-trained model system can only remember the knowledge acquired through training, but cannot remember or remember for a long time the personalized information knowledge related to the user.
[0044] 2. The present invention can achieve long-term learning of various types of input information, and can utilize or distinguish the relevance of this information, and make reasonable choices when utilizing them.
[0045] 3. The present invention can automatically generate a context with higher availability based on simple input from the user, making the output of the large model more in line with the requirements.
[0046] 4. The present invention can conveniently copy the memory generated by one user or system to other users or systems, so that experience sharing can be achieved between users or systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 Schematic diagram of the basic flow of the method of the embodiment of the present invention.
[0048] Figure 2 The figure is a schematic diagram of the working principle and module division of the method according to the embodiment of the present invention. DETAILED DESCRIPTION
[0049] The present invention aims to realize an intelligent system that can intelligently generate, execute, evaluate and improve corresponding solutions for interactive input requests from users, and can automatically enter the service process for the request into a memory warehouse. Each time the system provides reasoning services for the user's input request, it can automatically search for relevant memories from the memory warehouse, and automatically use it as a component of the large model dialogue context to optimize the reasoning efficiency. In view of the above-mentioned problems in the prior art, a memory loop network system and device based on a large language model are proposed. By memorizing the request service process that the system has reasoned and implemented, and automatically extracting and combining memories with high relevance, the service capability for user requests is continuously improved. The memory loop network based on the large model proposed in the present invention can, on the one hand, form an ascending cycle process of accumulation, application and development of knowledge and memory, and on the other hand, can also realize context-enhanced retrieval generation (Retrieval-Augmented Generation, RAG) for large models that can automatically distinguish key points with the help of the relevance of memory. The present invention will be further described in detail below in conjunction with the accompanying drawings. As shown in FIG. Figure 1 and Figure 2 As shown, the large language model human-computer interaction method based on memory recurrent network enhancement in this embodiment includes the following steps:
[0050] S1, converting the task request code initiated by the user or the user program into a single-dimensional or multi-dimensional object that can be used for memory warehouse to query memory items, wherein each dimension of the single-dimensional or multi-dimensional object contains a set of key information, wherein the key information is information of some or all modalities in text, sound, and image, and the multi-dimensional object is part or all of all dimensions, wherein all dimensions include standard memory and other dimensions, wherein the other dimensions include part or all of knowledge, functions, actions, reminders, and records that describe a computer task process;
[0051] S2, querying memory items of a single-dimensional or multi-dimensional object from the memory warehouse, filtering the memory items obtained by the query to generate context, combining the context with the preset prompt words and inputting them into the large language model;
[0052] S3, obtaining the output result obtained by executing the large language model; analyzing and extracting the action or function call interface and its parameters in the output result, executing the action or calling the function call interface in combination with the parameters, obtaining the evaluation result of executing the action or calling the function call interface, and generating a task result including an evaluation report;
[0053] S4, determine whether the task request is completed. If it is completed, generate a memory item for the information during the execution of this task request and add it to the memory warehouse.
[0054] like Figure 2As shown, this embodiment is a system that realizes a system in a computer system device, which can continuously accumulate knowledge, user habits, experience, operation methods, etc. through communication with users and learning from user input and environmental input (which may include the Internet, etc.), and convert them into persistent memory, and answer, support, or automatically take desired actions or operations for new problems of the system or users. In order to clarify the function of external memory storage, in this embodiment, the memory storage carrier outside the intelligent model is named memory warehouse, Figure 2 The memory in the memory warehouse ① is an orderly storage of the process of the intelligent system accepting context input requests from people or user programs, reasoning and generating solutions, and implementing and solving problems according to the solutions, and can be matched or retrieved from the memory warehouse ① based on certain information. The means used to perform memory query from the memory warehouse ① is generally an inexact query based on relevance. In the known technical solutions, the large model intelligent system using external storage or knowledge base (such as various enhanced retrieval generation RAG technologies) is independent of the knowledge base from the system behavior, and cannot update the system's past behavior and reasoning to the knowledge base in real time and permanently, and cannot provide experience for the large model reasoning or generation after the completion of this session. This is because the existing intelligent system architecture does not support a two-way loop from reasoning to knowledge base. In addition, the known technical solutions do not consider the impact of the fineness of knowledge on the large model reasoning in terms of obtaining relevant knowledge of the problem from the knowledge base, and do not have the ability to adaptively adjust the knowledge fineness in the RAG process. Finally, the existing solutions do not have an optimized channel for manual feedback, which makes manual feedback time-consuming and labor-intensive, affecting the performance of the system.
[0055] like Figure 2 As shown, the system described in this embodiment is composed of modules such as memory warehouse ①, request encoding unit ②, memory output unit ③, response unit ④, task completion judgment and memory input unit ⑤, and update unit ⑥. Among them, the request encoding unit ②, the response unit ④ and the task completion judgment and memory input unit ⑤ need to call large language models. These large language models are selected according to the needs of each module. They are pre-trained before being applied to the method of this embodiment. In this embodiment, they are only responsible for reasoning, that is, reasoning output based on the given context and prompt words (that is, the normal mode of large model application). Since the application of large language models within each module is not limited in this embodiment, Figure 2Only three large language models are involved, but corresponding operations can also be implemented in other parts with the assistance of large language models. There are two ways to initiate the operation of the method of this embodiment. One is that the user or the user's application sends a request, and the other is that the system described in this embodiment can generate instructions to trigger the system to work. For example, the system automatically sends a request to "organize memories about a certain topic." The system of this embodiment uses the memory warehouse ① as a storage unit for persistent memory, in which the stored memory is a record of the necessary process of the request processing completed by the system and the knowledge and methods involved, including the request processing process and environmental information described in text, the files, tools, action steps used in the process, etc.
[0056] In this embodiment, postgre SQL is specifically used as a memory warehouse① for storing, updating, and querying various types of memories. At the same time, a vector storage and query plug-in PGvector is installed to support distance query of vectors. Figure 2The "postgre SQL with PGvector" in the text refers to the memory warehouse. The data items in the database are also called memory items. The content (value) of the main information (key) in each memory item includes the interactive context implemented for a request made by the user, the inferred plan, operation, etc., the execution result according to the inference, and the files and tools used in the process. In postgre SQL, multiple keys are established to describe the attributes of memory items, including the keys that all memories have: ID, group ID, time of occurrence, and category. There are five types of values corresponding to the category key: standard memory (memories), knowledge (knowledge), functions (functions), actions (actions), and notices (notice). According to the differences of these five types of memory, each memory has some dedicated keys. (1) The dedicated keys of standard memory include: precision 1 (original), precision 2 (precise), precision 3 (distinct), precision 4 (concise), and precision 5 (brief). Among them, original precision records the original record of memory generated by this system, precise precision removes most of the annotations (subsequent processing, actions, etc.) from the original record, distinct precision is a standard restatement of the original record generated by the large model (equivalent to a combing and condensing of multiple cycles in this memory), concise precision is a third-party retelling of the standard restatement (further simplified, also generated by the large model), and brief precision is a high-level summary of the retelling content (only retaining key information such as objects, events, and time). The amount of bytes used for storage at each level of precision will be significantly reduced in turn. The record of each precision of the standard memory is generated using the prompt words shown in the table of the llama3-8B model. (2) The special keys of the action type include: name, type, and version. The value of the name key corresponds to the action to be performed by the subsequent execution module, the value of the type key indicates the category classification of the memory item when it is used, and the value of the version key corresponds to its version number; (3) The special keys of the knowledge type include: name, type, and content. The definitions of the name key and type key are the same as those described in 1.5). The value of the content key corresponds to the exact content of the knowledge. (4) The notice type mainly corresponds to reminders from users. Its unique key settings are the same as the knowledge type, including: name (name), type (type), content (content). (5) The function (functions) type mainly records the memory of API function calls for large models. The unique keys include: name (name), type (type), version (version).The value of the name key corresponds to the function name to be executed by the subsequent execution module, the value of the type key indicates the category classification of the memory item when it is used, and the value of the version key corresponds to its version number. The above five types of memory are automatically generated by the large model llama3 based on the segmented human-computer communication transactions or the automatic arrangement of the original memory. Each memory transaction can be converted into one or more of the above five types of memory. The same memory type may also have multiple memory items corresponding to one communication transaction.
[0057] As an optional implementation, in this embodiment, the user or user program The task request initiated, the task request content enters the request encoding unit ②, as the beginning of the system working cycle described in this embodiment. The task request content can be part or all of the content in various modes such as text, sound, image, and file. For example, text is used as the user's input method, and the text can contain any description, requirement, or purpose, and can also contain descriptions of other information methods, such as a file, a picture, a resource located on a network, etc.
[0058] In this embodiment, step S1 includes:
[0059] S1.1, obtaining the task request content initiated by the user or the user program, wherein the task request content includes one or more of the description, requirements, purpose, and resources required to perform the task;
[0060] S1.2, standardize and convert the task request content into a specified format;
[0061] S1.3, the task request content after the standardization conversion is combined with the prompt words containing all dimensional information and input into the large language model, so as to obtain a single-dimensional or multi-dimensional object that can be used for the memory warehouse① to query the memory item.
[0062] In this embodiment, step S1 is performed by the request encoding unit ②. The request encoding unit ② is responsible for converting the user request (or instruction, the expression can be arbitrary) into a single-dimensional or multi-dimensional object that can be queried by the memory warehouse. Here, the multi-dimensional object refers to the information on the semantics of the request in different dimensions, such as general memory dimension, knowledge dimension, action dimension, file dimension, etc. The specific implementation of the conversion can be handed over to the large model (large language model, abbreviated as LLM). The principle of the conversion is to give the large language model a prompt word in the form of the example in Table 1 and submit the user request to the large model together.
[0063] Table 1: Prompt words for multi-dimensional encoding conversion of user requests
[0064]
[0065]
[0066] If the big model determines that the request input is not a valid request input, no conversion will be performed and the system cycle will end. The following assumes that the system obtains a valid request input and the request encoding unit ② implements multi-dimensional information conversion. This embodiment converts the user's input text into the information to be queried using the big model. For example, the user inputs "merge the column contents of two table files in a folder, and display the test scores of different subjects corresponding to the same name as two columns"; the input encoding unit of the system in this embodiment first converts the user input into a JSON standardization result as shown in Table 2:
[0067] Table 2: Results of JSON normalization transformation
[0068]
[0069] The multi-dimensional encoding module converts the above JSON standardization results into a result, and uses the prompt words shown in Table 3 as input to the large language model llama3-8B to extract keyword encodings of five dimensions, as shown in Table 4.
[0070] Table 3: Prompt words for input into the large language model llama3-8B
[0071]
[0072] Table 4: Examples of encoded five-dimensional objects
[0073]
[0074] In this embodiment, step S2 includes:
[0075] S2.1, embedding vector values of key information in single-dimensional or multi-dimensional objects;
[0076] S2.2, memory query: the embedded vector value of each key information is queried for the memory item of the corresponding dimension in the memory warehouse ①, and the IDs and vector distances of the top N memory items closest to the vector distance of the key information are obtained respectively; in this embodiment, the embedded vector value of each key information is queried for postgre SQL, and the IDs of the top 50 memories closest to its vector distance are queried (that is, 10 are returned for each vector value), so that the user can put forward input in a way closer to daily communication, avoiding the need to include all the information involved in this "communication" in this input, so that the system can extract what is needed from the past information according to the prompts in the input;
[0077] S2.3, memory screening: for the first N memory items of all key information, the absolute value of the vector distance from the key information is divided into M distance intervals according to the size, and the M distance intervals correspond to one of the M precision levels, so that the memory items are mapped to one of the M precision levels; for example, if there are M precision levels in the memory items, M distance values (arranged from large to small by absolute value) can be marked as waterlines corresponding to M precisions. When the distance between a certain memory vector and the keyword vector is just less than or equal to the mth waterline and greater than the m+1th waterline, it is mapped to the mth precision;
[0078] S2.4, extract the content of the memory item from the memory warehouse① according to the ID of the memory item and its precision level. If the attribute field of the memory item is other dimensions, directly extract the content of the memory item; if the attribute field of the memory item is standard memory, select the content corresponding to its precision level from the contents of multiple precision levels of the memory item, thereby generating a context composed of the contents of each memory item of a single-dimensional or multi-dimensional object;
[0079] S2.5, combine the context and the preset prompt word. If the combined content exceeds the input character length limit of the large language model, reduce the accuracy level of some or all memory items and jump to step S2.4; otherwise, input the combined content into the large language model.
[0080] In this embodiment, step S2 is performed by the memory output unit ③. The memory output unit ③ queries the memory items from the memory warehouse according to the following logic, and generates the context for the large model in combination with the user request: First, the multidimensional coding object provided by ② is submitted to the memory warehouse for a query based on correlation (for example, the query is performed according to the distance between the embedded vector of the memory item and the embedded vector of each dimensional object), and the first finite number of memory items with high correlation are obtained from each dimension; then, the context for the large language model is combined according to a certain predefined format and total size limit. Here, the memory items can have different precision expressions, and the high-precision expressions occupy a large storage space, while the low-precision expressions occupy a small storage space. When combining memory items, it is possible to consider determining the precision of the memory items used according to the correlation, so that important (highly correlated) memories can have higher precision expressions, and unimportant memories use low precision to occupy less space. Finally, when the combined context exceeds the limit of the large model, the size of the combined context can be reduced by uniformly reducing the precision, or by removing memory items with low correlation. In this embodiment, various means can be adopted to generate different precision representations of memory items. For example, the original information of the memory item can be put into the context, and then the precision extraction requirements can be added, so as to realize the generation of information of different precisions with the help of the large model. In this embodiment, the context generated by the memory output unit ③ is combined with the prompt words shown in Table 5 as input to the large language model in the response unit ④. The large language model gives the answer to the user's request, planning, implementation steps, generation code, and the contribution of the memory in the input to the output, etc. This is achieved by writing these requirements in the context.
[0081] Table 5: Prompt words that require the large language model to give answers, plans, implementation steps, generate code, and evaluate memory contribution to user requests
[0082]
[0083] In this embodiment, the "memory query" module of the memory output unit ③ will query the IDs of the 50 memories that are closest to the information to be queried, and will also query the distance between these memories and the information to be queried, that is, the correlation value. The "memory screening" module obtains the list of memories and precision after comprehensive calculation based on the weighted first 50 memories of each keyword, corresponding to its precision key in the database. The "memory combination" module will obtain the content value of the corresponding precision from postgre SQL according to all the memory item IDs and corresponding precisions obtained, and output it to the context combination module. The "context combination" module combines the obtained memory items into the context, adds the prompt words shown in Table 6, and submits it to the llama3-405B large model for reasoning.
[0084] Table 6: Prompt words for the llama3-405B large model to reason about user requests
[0085]
[0086]
[0087]
[0088]
[0089] Since the context of llama3-405B is limited to 128K, when the combination of context and prompt words exceeds this limit, the memory output unit will partially or completely reduce the precision content in the memories key by one level of precision and combine the context again. This iteration continues until the context meets the input limit of the llama3-405B large model.
[0090] In this embodiment, step S3 includes:
[0091] S3.1, obtaining the output result obtained by executing the large language model;
[0092] S3.2, analyzing and extracting the action or function call interface and its parameters in the output result, and executing the action or calling the function call interface in combination with the parameters;
[0093] S3.3, obtaining an evaluation result of executing an action or calling a function call interface, wherein the evaluation result is an evaluation result of whether the execution of the action or the calling of the function call interface directly returns a pass, or an evaluation result of whether the execution of the action or the calling of the function call interface is obtained manually based on the information directly returned by the execution of the action or the calling of the function call interface, or an evaluation result of whether the execution of the action or the calling of the function call interface is obtained by a numerical model or a large language model based on the information directly returned by the execution of the action or the calling of the function call interface;
[0094] S3.4, determine whether the evaluation result is passed. If the evaluation result is passed, jump to step S3.5; otherwise, perform improved context: generate a new context using the large language model according to the output result obtained by executing the large language model and the evaluation result of executing the action or calling the function call interface, add the new context to the context obtained in step S2.4, and jump to step S2.5;
[0095] S3.5, generate task results including evaluation reports.
[0096] In this embodiment, step S3 is executed through response unit ④. Response unit ④ is responsible for implementation and verification according to the reasoning results of the large language model. The execution / evaluation module in response unit ④ will make a judgment based on the content of the reasoning results. If it is a planning or implementation step, the corresponding intelligent agent will be called for execution. If it is a script, the interpreter will be called for execution. If it is a program code, it will be compiled or interpreted before execution. If it is a tool call interface, the relevant tool will be called. After the execution is completed, the execution result is verified and the task result (evaluation report) is given. The execution evaluation module can also improve the original context based on the evaluation report and the memory contribution given by the large model and submit it to the large language model again to improve the previous reasoning, such as Figure 2 The "improved context" connection process from the task result to the memory screening module in the example. The improved method is to use the memory contribution to adjust the accuracy of each memory item and attach the evaluation report to the context, so that the large model will give a reasoning that is closer to the needs. The system described in this embodiment can also allow users to add new correction instructions based on the evaluation results of the response module to help the system improve the problems that users do not want as soon as possible, such as Figure 2 In the connection process from task results to users, the system will merge the original user request and the current user instruction into one request and enter the system loop.
[0097] When executing the improved context in step S3.4 of this embodiment, it also includes determining whether the number of times the improved context is executed exceeds a preset threshold. If it does not exceed the preset threshold, a new context is generated using the large language model according to the output result obtained by executing the large language model and the evaluation result of executing the action or calling the function call interface, and the new context is added to the context obtained in step S2.4, and the process jumps to step S2.5; otherwise, one of the following methods is executed:
[0098] Method 1: Obtain a new task request by asking the user and jump to step S1;
[0099] Method 2: Jump to step S2 and re-execute the query memory item;
[0100] Method 3: Call the online search execution action or call the associated problem of the function call interface, add the execution result of the associated problem to the single-dimensional or multi-dimensional object of the task request using the multi-dimensional key information generated by the large language model, and jump to step S2 to re-execute the query memory item.
[0101] The output result obtained by executing the large language model in step S3.1 of this embodiment also includes the memory contribution of each memory item, and the memory contribution is mapped to one of multiple precision levels according to the size of the memory contribution; if the memory contribution of a memory item is greater than a preset threshold and the precision level of the memory item is not the highest precision level among the multiple precision levels, the precision level of the memory item is increased by one precision level; if the memory contribution of a memory item is less than a preset threshold and the precision level of the memory item is not the lowest precision level among the multiple precision levels, the precision level of the memory item is decreased by one precision level; if there are memory items whose precision levels are increased or decreased, jump to step S2.4; otherwise jump to step S3.2.
[0102] The response unit ④ of this embodiment first calls the large language model to generate reasoning, and then executes and evaluates it.
[0103] An example of the inference results output by the llama3-405B large model is shown in Table 7.
[0104] Table 7: Example of inference results output by the llama3-405B large model
[0105]
[0106]
[0107] In the table above, the big model outputs three different aspects of reasoning content. §PONDER§ represents the idea module, which expresses the idea of the task; §OPERATE§ is the operation module, which expresses the decomposition of the task into several sub-operations and the detailed content of the sub-operations.<operate00*> § indicates the content of the sub-operation; §ANNOTATE§ indicates the annotation of the operation. In the reasoning of the operation, @ACTION is used as a label, and the content after it indicates the action and its parameters that the execution module of this embodiment needs to perform; @FUNCTION is used as a label, and the content after it indicates that the execution module of this embodiment needs to re-call the function call interface and its parameters implemented by the large model. In this embodiment, the exact meaning of each output is that the long context model calls the send message Action according to the memory, and calls the read file Function (text information) and view Excel picture Function (layout information) at the same time. The "Execution / Evaluation" module in the operation and result output unit executes the SEND (send message) Action, and executes the READ_FILE (read file) Function and READ_PICTURE (view Excel picture) Function at the same time, and outputs the evaluation result of this operation, which can be manually evaluated by the user, or automatically evaluated with the help of the large model. In this embodiment, the system outputs the execution results and evaluation in the style of Table 8.
[0108] Table 8: Example of system execution results
[0109]
[0110] The evaluation module of response unit ④ merges the results of Table 10 into the received context and submits it to llama3-405B for re-reasoning, and obtains the solution shown in Table 9.
[0111] Table 9: Example of results for improved inference for llama3-405B
[0112]
[0113]
[0114] The execution module of the response unit ④ executes the generated Python code to generate the result example shown in Table 10.
[0115] Table 10: Example of the result of executing Python code in the response unit
[0116]
[0117] The evaluation module of response unit ④ incorporates the results of Table 10 into the context and submits it to llama3-405B for re-reasoning, and obtains the solution shown in Table 11.
[0118] Table 11: Improved solution of llama3-405B large model obtained by response unit ④
[0119]
[0120] If the automatic evaluation fails, the running results are repeatedly merged to generate a new context and returned to the llama3-405B model. The task plan is regenerated or the result file is directly given. This allows iterative improvement. This is the operation and Figure 2 The small loop guided by the "Improve Context" arrow in the figure. If the "Improve Context" iteration fails to pass the evaluation after multiple iterations, the user can be asked, or the memory search can be retriggered, or the online search action can be called to search for related questions. The coding of the action is as follows. Table 12 shows the prompt words used to call the online search action to search for related questions.
[0121] Table 12: Prompt words for online search questions
[0122]
[0123] After the response unit ④ runs the code and the evaluation is successful, the evaluation result will still be merged into the context and handed over to llama3-405B, which will generate an inference result to notify the same user, see Table 13, that is, obtain relevant information and files, and send the files and relevant information to the user by calling the send message Action, which will be executed by the execution module, and then the process will be transferred to the task completion judgment and memory input unit.
[0124] Table 13: Reasoning generated by the large model for successful evaluation results
[0125]
[0126] In step S4 of this embodiment, the information generated during the execution of the task request is stored in the memory warehouse ①, including:
[0127] S4.1, combining the task request content, the single-dimensional or multi-dimensional object, the context, the output result obtained by executing the large language model, and the evaluation result of the task request, and then performing memory summarization using the large language model to generate a memory summary, wherein the memory summary includes the content of the memory items of the standard memory, knowledge, function, action, and reminder or the attribute type;
[0128] S4.2, if the memory summary contains the content of the memory item of the standard memory, the content of the memory item is converted into precision using the large language model to generate the content of the memory item at multiple precision levels;
[0129] S4.3, store the contents of each memory item in the memory summary into the memory warehouse① according to its attribute type and the precision level of the memory item whose attribute type is standard memory.
[0130] In this embodiment, step S4 is performed by the task completion judgment and memory input unit ⑤ and the update unit ⑥. The task completion judgment and memory input unit ⑤ is responsible for judging whether the solution process of a specific problem or the human-computer dialogue process of a user request is completed by relying on the large language model. After the judgment is completed, all necessary information of this process is summarized as prompt words as shown in Table 14 as the main content of a memory item, and different precision information prompt words of the memory are generated as shown in Table 15.
[0131] Table 14: Prompt words that require the large model to perform memory summarization
[0132]
[0133] Table 15: Prompt words for precision generation of memory
[0134]
[0135] The task completion judgment and memory input unit ⑤ first judges whether the task is successful or failed. In this embodiment, the final reasoning output of the large model in the response unit can be referred to. The task completion judgment and memory input unit ⑤ collects the process information of the task, mainly including: user input, decomposed 5-dimensional query object, context generated for the large model of the response unit, reasoning of the large model of the response unit, evaluation results, etc., and then hands it over to the llama3-8B large model of this unit for memory summary. The prompt words are the examples in Table 16.
[0136] Table 16: Memory summary example
[0137]
[0138]
[0139]
[0140]
[0141] The task completion judgment and memory input unit ⑤ converts the generated memory summary into memory information with 5 levels of precision through the llama3-8B large model. The prompt words are shown in Table 17.
[0142] Table 17: Tips for memory information conversion at 5 levels of precision
[0143]
[0144] The output example of the llama3-8B large model for 5 precision memory information is shown in Table 18.
[0145] Table 18: Output example of llama3-8B large model for 5 precision memory information
[0146]
[0147]
[0148] The updating unit ⑥ generates memory items according to the different precisions of the summarized memory and stores them in the memory warehouse ①. Specifically, the updating unit ⑥ in this embodiment calls llama3 to summarize the current session content according to different precisions and different types, calculates embeddings respectively, and then stores the summarized memory and embeddings in the memory warehouse ①, that is, the postgre SQL database.
[0149] The above steps S1 to S4 are a basic loop flow of the memory loop network based on the large model of the method of this embodiment. In addition, it should be noted that in this embodiment, the memory warehouse ① can select a database form such as a vector database to record precise information, or a form such as a memory neural network to record imprecise information through training. If the memory warehouse ① selects the database form, multiple sets of keys can be used to store attribute definitions of multiple aspects of a memory content, or to store information of different dimensions of the same memory content, so that subsequent memory extraction can extract a certain focus of memory or a certain precision expression according to different demand strategies. Here, high precision refers to memory text, images, sounds and other information that retains more information of the original memory; if the memory warehouse ① selects the memory neural network form, then through its network reasoning function, different precision expressions or different emphasis expressions of the memory content can be output as required during the query. For the memory expressions of different precisions of the same memory, it can be selected to be directly saved in the memory warehouse ①, or a certain information extraction strategy can be adopted or the ability of an external AI model can be used to generate real-time from the saved memory content. The system described in this embodiment can simultaneously increase the learning of the user's habits and past activities while working by converting and storing the user's request service process. For example, a user has successfully used the system to realize a request to convert a PDF document into a word document, during which the user may interact with the large model through multiple rounds of memory loop networks, that is, success is achieved through multiple rounds of improvements to the method. When the user submits a request to convert a PDF document into an Excel format document, the system will call out the memory of the PDF document conversion into a word document (including steps, tools used, generated python code, etc.). As a component of the context, the large model will be relatively easier to infer the method required for this request task based on this context, and the correctness is also higher. Therefore, the system described in this embodiment can reduce the workload of manual instructions and improve the service quality of requests by absorbing historical experience. In addition, when the user finds some knowledge or documents in daily work or web browsing that may be helpful for some future work, he can conveniently request the system described in this embodiment to convert and store these knowledge or documents into the memory warehouse①. When a related request is made to the system in the future, the system will also automatically retrieve these knowledge or documents without user specification, thereby improving the user's service experience.
[0150] In summary, the method of this embodiment constructs a large model intelligent system with a loop structure (the closed loop formed by the thick black solid line and the dotted arrow in the figure) of "user request-acquisition of memory experience-reasoning-scheme implementation-update and save memory", which realizes the instant storage of the reasoning or task implementation process based on the large language model LLM in the LLM external memory library; when a new task is needed, the task requirements are first used as the query target, and the relevant query capability of the memory library is used to extract the records with high relevance, and the accurate LLM input context is automatically generated in combination with the query relevance, so that the system has stronger task capabilities and task expansion; after the task is completed, it will be automatically converted into a record and stored in the memory library, thus forming an increasing cycle of enhanced capabilities. The system described in this embodiment can also play the role of human intelligence more efficiently, because it can form its own memory for each interaction with humans, so that it can more specifically grasp the style, idioms, long-term intentions and other information of users (who are also human intelligence participants), so that users can participate more casually and express more concisely and conveniently, thereby improving the participation efficiency of human intelligence. In addition, an innovation of the method of this embodiment is that when acquiring knowledge from the memory warehouse ① to form the context for LLM, the refinement of various knowledge will be adaptively adjusted based on the input restriction (token size) of LLM and the knowledge relevance, thereby optimizing the reasoning effect of LLM. The method of this embodiment focuses on the problem of human-machine fusion intelligence, and realizes a new memory network cycle based on the large language model technology, so that the input end, processing stage and output segment of the intelligent system can intelligently select memories that are helpful for reasoning, and cooperate with human intelligence to effectively integrate cognitive information, so that the input end, processing stage and output segment of the large language model can intelligently select memories that are helpful for reasoning, and cooperate with human intelligence to effectively integrate cognitive information, thereby improving the efficiency of solving complex problems. The method of this embodiment uses a combination of large model technology and memory network technology to realize continuous learning, memory and application of user habits, requirements, operations and capabilities, forming a group intelligent system with complementary advantages of man and machine and information interaction, and can also copy or transfer the learned user habits, requirements, operations and capabilities to other systems or users. The method of this embodiment can be used in a variety of scenarios such as knowledge induction learning, intelligent reasoning, knowledge or media generation, program planning, operation of computer commands or scripts, and calling or generating software tools for task processing, and is not limited to these scenarios.
[0151] In addition, the present embodiment also provides a large language model human-computer interaction system based on memory loop network enhancement, including a microprocessor and a memory connected to each other, and the microprocessor is programmed or configured to execute the large language model human-computer interaction method based on memory loop network enhancement. In addition, the present embodiment also provides a computer-readable storage medium, which stores a computer program or instruction, and the computer program or instruction is programmed or configured to execute the large language model human-computer interaction method based on memory loop network enhancement through a processor. In addition, the present embodiment also provides a computer program product, including a computer program or instruction, which is programmed or configured to execute the large language model human-computer interaction method based on memory loop network enhancement through a processor.
[0152] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.
[0153] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A large language model human-computer interaction method based on memory recurrent network enhancement, characterized in that: The steps include: S1, converting the task request code initiated by the user or the user program into a single-dimensional or multi-dimensional object that can be used for memory warehouse to query memory items, wherein each dimension of the single-dimensional or multi-dimensional object contains a set of key information, wherein the key information is information of some or all modalities in text, sound, and image, and the multi-dimensional object is part or all of all dimensions, wherein all dimensions include standard memory and other dimensions, wherein the other dimensions include part or all of knowledge, functions, actions, reminders, and records that describe a computer task process; S2, querying memory items of a single-dimensional or multi-dimensional object from the memory warehouse, filtering the memory items obtained by the query to generate context, combining the context with the preset prompt words and inputting them into the large language model; S3, obtaining the output result obtained by executing the large language model; analyzing and extracting the action or function call interface and its parameters in the output result, executing the action or calling the function call interface in combination with the parameters, obtaining the evaluation result of executing the action or calling the function call interface, and generating a task result including an evaluation report; S4, determine whether the task request is completed. If it is completed, generate a memory item for the information during the execution of this task request and add it to the memory warehouse.
2. The human-computer interaction method based on large language model enhanced by memory recurrent network according to claim 1 is characterized in that: Step S1 includes: S1.1, obtaining the task request content initiated by the user or the user program, wherein the task request content includes one or more of the description, requirements, purpose, and resources required to perform the task; S1.2, standardize and convert the task request content into a specified format; S1.3, the standardized converted task request content is combined with the prompt words containing all dimensional information and input into the large language model, so as to obtain a single-dimensional or multi-dimensional object that can be used for the memory warehouse to query the memory item.
3. The large language model human-computer interaction method based on memory recurrent network enhancement according to claim 1 is characterized in that: Step S2 includes: S2.1, embedding vector values of key information in single-dimensional or multi-dimensional objects; S2.2, query the memory items of the corresponding dimension in the memory warehouse for the embedded vector value of each key information, and obtain the IDs and vector distances of the first N memory items that are closest to the vector distance of the key information; S2.3, for the first N memory items of all key information, the absolute value of the vector distance with the key information is divided into M distance intervals according to the size, and the M distance intervals correspond to one of the M precision levels, so that the memory items are mapped to one of the M precision levels; S2.4, extracting the content of the memory item from the memory warehouse according to the ID of the memory item and its precision level. If the attribute field of the memory item is other dimensions, directly extract the content of the memory item; if the attribute field of the memory item is standard memory, select the content corresponding to its precision level from the contents of multiple precision levels of the memory item, thereby generating a context composed of the contents of each memory item of a single-dimensional or multi-dimensional object; S2.5, combine the context and the preset prompt word. If the combined content exceeds the input character length limit of the large language model, reduce the accuracy level of some or all memory items and jump to step S2.4; otherwise, input the combined content into the large language model.
4. The large language model human-computer interaction method based on memory recurrent network enhancement according to claim 3 is characterized in that: Step S3 includes: S3.1, obtaining the output result obtained by executing the large language model; S3.2, analyzing and extracting the action or function call interface and its parameters in the output result, and executing the action or calling the function call interface in combination with the parameters; S3.3, obtaining an evaluation result of executing an action or calling a function call interface, wherein the evaluation result is an evaluation result of whether the execution of the action or the calling of the function call interface directly returns a pass, or an evaluation result of whether the execution of the action or the calling of the function call interface is obtained manually based on the information directly returned by the execution of the action or the calling of the function call interface, or an evaluation result of whether the execution of the action or the calling of the function call interface is obtained by a numerical model or a large language model based on the information directly returned by the execution of the action or the calling of the function call interface; S3.4, determine whether the evaluation result is passed. If the evaluation result is passed, jump to step S3.5; otherwise, perform improved context: generate a new context using the large language model according to the output result obtained by executing the large language model and the evaluation result of executing the action or calling the function call interface, add the new context to the context obtained in step S2.4, and jump to step S2.5; S3.5, generate task results including evaluation reports.
5. The large language model human-computer interaction method based on memory recurrent network enhancement according to claim 4 is characterized in that: When executing the improved context in step S3.4, it also includes determining whether the number of times the improved context is executed exceeds a preset threshold. If it has not exceeded the preset threshold, a new context is generated using the large language model according to the output result obtained by executing the large language model and the evaluation result of executing the action or calling the function call interface, and the new context is added to the context obtained in step S2.4, and the process jumps to step S2.5; otherwise, one of the following methods is executed: Method 1: Obtain a new task request by asking the user and jump to step S1; Method 2: Jump to step S2 and re-execute the query memory item; Method 3: Call the online search execution action or call the associated problem of the function call interface, add the execution result of the associated problem to the single-dimensional or multi-dimensional object of the task request using the multi-dimensional key information generated by the large language model, and jump to step S2 to re-execute the query memory item.
6. The large language model human-computer interaction method based on memory recurrent network enhancement according to claim 4 is characterized in that: The output result obtained by executing the large language model in step S3.1 also includes the memory contribution of each memory item, and the memory contribution is mapped to one of multiple precision levels according to the size of the memory contribution; if the memory contribution of a memory item is greater than a preset threshold and the precision level of the memory item is not the highest precision level among the multiple precision levels, the precision level of the memory item is increased by one precision level; if the memory contribution of a memory item is less than a preset threshold and the precision level of the memory item is not the lowest precision level among the multiple precision levels, the precision level of the memory item is decreased by one precision level; if there are memory items whose precision levels are increased or decreased, jump to step S2.4; otherwise jump to step S3.
2.
7. The large language model human-computer interaction method based on memory recurrent network enhancement according to claim 4 is characterized in that: In step S4, the information generated during the execution of the task request is stored in a memory item and added to the memory warehouse, including: S4.1, combining the task request content, the single-dimensional or multi-dimensional object, the context, the output result obtained by executing the large language model, and the evaluation result of the task request, and then performing memory summarization using the large language model to generate a memory summary, wherein the memory summary includes the content of the memory items of the standard memory, knowledge, function, action, and reminder or the attribute type; S4.2, if the memory summary contains the content of the memory item of the standard memory, the content of the memory item is converted into precision using the large language model to generate the content of the memory item at multiple precision levels; S4.3, storing the contents of each memory item in the memory summary into the memory warehouse according to its attribute type and the precision level of the memory item whose attribute type is standard memory.
8. A large language model human-computer interaction system based on memory recurrent network enhancement, comprising a microprocessor and a memory connected to each other, characterized in that: The microprocessor is programmed or configured to execute the large language model human-computer interaction method based on memory recurrent network enhancement as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program or instruction stored therein, characterized in that: The computer program or instruction is programmed or configured to execute the large language model human-computer interaction method based on memory recurrent network enhancement as described in any one of claims 1 to 7 through a processor.
10. A computer program product comprising a computer program or instructions, characterized in that The computer program or instruction is programmed or configured to execute the large language model human-computer interaction method based on memory recurrent network enhancement as described in any one of claims 1 to 7 through a processor.
Citation Information
Cited By
Context management method and device of large language model, medium, equipment and product
CN120337906A
Large model agent interactive question and answer task decision-making method and system
CN121117167A
Method and system for large model agent interactive question and answer task decision-making
CN121117167B
Multi-terminal long-memory multi-mode intelligent personification interaction method and system
CN121436181A
Multi-modal intelligent humanization interaction method and system for multi-end long memory
CN121436181B
