A method and system for replying to enterprise group chat messages
By using large language models and vectorization technology to extract and manage key information in enterprise group chats, the problems of information dispersion and topic interference in group chats are solved, automatic and accurate message replies are achieved, and user experience and work efficiency are improved.
Patent Information
- Application Number
- CN202510578668.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-05-07
AI Technical Summary
In corporate group chats, the group is huge in scale and highly active. Important information and decisions are often scattered in massive chat records. It is time-consuming and labor-intensive to find and is easy to miss key content. The mutual interference of discussions on multiple topics leads to unclear orientation of speech content, which reduces the efficiency of reply.
By obtaining the historical chat records of corporate group chats, using a large language model to extract and store key information, and combining vectorization technology for data management, automatic and accurate message replies are achieved.
It realizes automatic and accurate reply to corporate group chat messages, improves user experience and work efficiency, updates information dynamically, and ensures that group chat members always keep up with the latest updates.
Smart Images

Figure CN120104764B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method and system for replying to enterprise group chat messages. Background Art
[0002] In enterprise group chats, which are large and highly active, important information and decisions are often scattered across vast amounts of chat logs, making them time-consuming and laborious to search for, and prone to missing key content. Furthermore, group chats often involve multiple simultaneous discussions, much like multiple meetings taking place in a single conference room. These intertwined discussions lead to unclear communication content, forcing users to scroll through multiple chat logs to accurately determine which question a particular statement is addressing. This significantly reduces response efficiency and severely impacts the user experience.
[0003] Therefore, how to achieve automatic and accurate reply to enterprise group chat messages is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention
[0004] To solve the above technical problems, this application provides a method for replying to enterprise group chat messages, which can automatically and accurately reply to enterprise group chat messages. This application also provides a system for replying to enterprise group chat messages, which has the same technical effect.
[0005] The first purpose of this application is to provide a method for replying to enterprise group chat messages.
[0006] The above-mentioned application objective 1 of this application is achieved through the following technical solutions:
[0007] A method for replying to an enterprise group chat message, comprising:
[0008] Obtain historical chat records within a preset historical period in the enterprise group chat, and process the historical chat records to obtain a first text;
[0009] Using a preset large language model, extract information from the first text to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information;
[0010] The first data is stored in a first storage space, and the second data and the first text are vectorized respectively and stored in a second storage space;
[0011] Obtaining a question text in the enterprise group chat, and vectorizing the question text to obtain a first vector;
[0012] Performing vector retrieval in the second storage space according to the first vector to obtain a second vector;
[0013] A reply message is outputted using a preset large language model according to the data stored in the first storage space, the first vector, and the second vector, and the reply message is sent to the enterprise group chat.
[0014] Preferably, in the enterprise group chat message reply method, the step of extracting information from the first text using a preset large language model to obtain first data and second data includes:
[0015] A pre-constructed first prompt word template is obtained, a first prompt word is generated according to the first text and the first prompt word template, and the first prompt word is input into a preset large language model so that the large language model extracts the first data and the second data from the first text.
[0016] Preferably, in the enterprise group chat message reply method, performing vector retrieval in the second storage space according to the first vector to obtain the second vector includes:
[0017] Calculating the similarity between the first vector and each vector stored in the second storage space;
[0018] According to the calculated similarity and a preset rule, a second vector having a similar relationship with the first vector is screened out from the second storage space.
[0019] Preferably, in the enterprise group chat message reply method, the step of using a preset large language model to output a reply message based on the data stored in the first storage space, the first vector, and the second vector includes:
[0020] Obtaining a pre-built second prompt word template, and generating a second prompt word according to the data stored in the first storage space, the first vector, the second vector, and the second prompt word template;
[0021] The second prompt word is input into a preset large language model to obtain a reply message output by the large language model.
[0022] Preferably, the method for replying to the enterprise group chat message further includes:
[0023] Determine whether the storage space size of the first storage space is greater than a preset storage upper limit,
[0024] If yes, extract the corresponding excess data from the first storage space according to the difference between the stored space size and the preset storage upper limit, so that the stored space size of the first storage space after extraction is less than or equal to the preset storage upper limit;
[0025] After vectorizing the excess data, the data is stored in the second storage space.
[0026] The second purpose of this application is to provide a reply system for enterprise group chat messages.
[0027] The second object of the present application is achieved through the following technical solutions:
[0028] A reply system for enterprise group chat messages, comprising:
[0029] A first acquiring unit is configured to acquire historical chat records within a preset historical period in the enterprise group chat, and process the historical chat records to obtain a first text;
[0030] an extraction unit, configured to extract information from the first text using a preset large language model to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information;
[0031] a storage unit, configured to store the first data in a first storage space, and vectorize the second data and the first text respectively, and then store them in a second storage space;
[0032] A second acquisition unit is used to acquire a question text in the enterprise group chat and vectorize the question text to obtain a first vector;
[0033] a retrieval unit, configured to perform a vector search in the second storage space according to the first vector to obtain a second vector;
[0034] A reply unit is configured to use a preset large language model to output a reply message based on the data stored in the first storage space, the first vector, and the second vector, and to send the reply message to the group chat.
[0035] Preferably, in the enterprise group chat message reply system, the extraction unit, when performing the information extraction based on the first text using the preset large language model to obtain the first data and the second data, is specifically configured to:
[0036] A pre-constructed first prompt word template is obtained, a first prompt word is generated according to the first text and the first prompt word template, and the first prompt word is input into a preset large language model so that the large language model extracts the first data and the second data from the first text.
[0037] Preferably, in the enterprise group chat message reply system, the retrieval unit, when performing the vector retrieval in the second storage space according to the first vector to obtain the second vector, is specifically configured to:
[0038] Calculating the similarity between the first vector and each vector stored in the second storage space;
[0039] According to the calculated similarity and a preset rule, a second vector having a similar relationship with the first vector is screened out from the second storage space.
[0040] Preferably, in the enterprise group chat message reply system, the reply unit, when executing the method of outputting the reply message using the preset large language model based on the data stored in the first storage space, the first vector, and the second vector, is specifically configured to:
[0041] Obtaining a pre-built second prompt word template, and generating a second prompt word according to the data stored in the first storage space, the first vector, the second vector, and the second prompt word template;
[0042] The second prompt word is input into a preset large language model to obtain a reply message output by the large language model.
[0043] Preferably, in the enterprise group chat message reply system, the storage unit is further used to:
[0044] Determine whether the storage space size of the first storage space is greater than a preset storage upper limit,
[0045] If yes, extract the corresponding excess data from the first storage space according to the difference between the stored space size and the preset storage upper limit, so that the stored space size of the first storage space after extraction is less than or equal to the preset storage upper limit;
[0046] After vectorizing the excess data, the data is stored in the second storage space.
[0047] The above technical solution first obtains historical chat records within a preset historical length in the enterprise group chat, and processes the historical chat records to obtain a first text; uses a preset large language model to extract information based on the first text to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information and financial information, and the second data includes one or more of feedback and suggestion information, news information and conclusion information; stores the first data in a first storage space, and vectorizes the second data and the first text respectively, and stores them in a second storage space; thereby storing the group chat conversation process to facilitate context association, and at the same time extracting key information that the enterprise group chat members are concerned about and frequently ask about, to facilitate the subsequent call of the large language model;
[0048] The question text in the group chat is then obtained and vectorized to obtain a first vector. Based on the first vector, a vector search is performed in the second storage space to obtain a second vector. Using a preset large language model, a reply message is output based on the data stored in the first storage space, the first vector, and the second vector, and the reply message is sent to the group chat. The data stored in the first storage space can be directly input into the large language model for rapid access and use. The first vector is obtained based on the question text, and a vector search is performed in the second storage space to retrieve a second vector that matches the first vector. The data stored in the first storage space and the first vector are then combined and input into the large language model. The large language model then performs a comprehensive analysis of the input data and outputs a reply message corresponding to the question text.
[0049] In summary, the above technical solution can realize automatic and accurate reply to enterprise group chat messages. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0051] Figure 1 This is a flowchart of a method for replying to an enterprise group chat message in an embodiment of the present application;
[0052] Figure 2 This is a structural diagram of a system for replying to enterprise group chat messages in an embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to help those skilled in the art better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of this application.
[0054] In the embodiments provided in this application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described below are merely schematic. For example, the division of units and modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or modules can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0055] In addition, all functional units in the embodiments of the present application may be integrated into one processor, or each unit may be a separate device, or two or more units may be integrated into one device; each functional unit in the embodiments of the present application may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0056] Those skilled in the art will understand that all or part of the steps of the following method embodiments can be implemented by program instructions and related hardware. The aforementioned program instructions can be stored in a computer-readable storage medium. When the program instructions are executed, the steps of the following method embodiments are executed; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROMs), magnetic disks, optical disks, and other media that can store program codes.
[0057] It should be understood that the use of "system," "device," "unit," and / or "module" in this application is merely a method for distinguishing different components, elements, parts, portions, or assemblies at different levels. However, if other terms can achieve the same purpose, the terms may be replaced by other expressions.
[0058] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be understood to indicate or imply relative importance or implicitly specify the number of technical features indicated. Thus, a feature specified as "first" or "second" may explicitly or implicitly include one or more of such features. Throughout the description of this application, "plurality" or "several" means two or more, unless otherwise specifically defined.
[0059] If a flow chart is used in this application, the flow chart is used to illustrate the operations performed by the system according to the embodiments of the application. It should be understood that the previous or subsequent operations are not necessarily performed in exact order. Instead, the steps can be processed in reverse order or simultaneously. At the same time, other operations can be added to these processes, or one or more operations can be removed from these processes.
[0060] It should also be noted that, in this document, terms such as "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that an article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such article or device. In the absence of further limitations, elements defined by the phrase "comprises a ..." do not exclude the presence of other identical elements in the article or device comprising the above elements.
[0061] The embodiments of the present application are written in a progressive manner.
[0062] like Figure 1 As shown, the embodiment of the present application provides a method for replying to an enterprise group chat message, including:
[0063] S101 obtains historical chat records within a preset historical period in the enterprise group chat, and processes the historical chat records to obtain a first text;
[0064] Specifically, in S101, an enterprise group chat includes multiple members, each corresponding to a user. Each user can send messages to the enterprise group chat via a human-computer interface on a user terminal (such as a mobile phone, computer, tablet, etc.) to engage in a group chat. Messages sent can be of any type or combination of text, images, voice, video, documents, and links. Messages sent within a chat room can be directed to no member, or can be targeted to all members, some members, or a specific member via a preset method (such as the @ method). Chat records within a preset historical duration can be retrieved within the enterprise group chat. The preset historical duration can be a default historical duration or a user-modified duration, which is not specifically limited in this application. Text information can then be extracted from the historical group chat records to obtain a first text using existing optical character recognition (OCR) technology, automatic speech recognition (ASR) technology, document and web page format conversion and extraction technology, etc., which is not specifically limited in this application.
[0065] S102. Using a preset large language model, extract information from the first text to obtain first data and second data;
[0066] Specifically, in S102, a large language model (LLM) is an artificial intelligence model based on deep learning. It is trained on large amounts of text data to learn the grammar, semantics, and context of a language, thereby enabling it to understand and generate natural language text. In this embodiment, an existing pre-trained large language model can be used in conjunction with prompt engineering to extract information from the first text to obtain first data and second data. Prompt engineering involves optimizing prompts by structuring the text and selecting appropriate vocabulary, grammar, and context, thereby guiding the LLM to output the desired result. This allows the model to complete different types of tasks without updating the model weights.
[0067] Specifically, the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information;
[0068] Among them, the first data is the key information in the enterprise group chat that is important, real-time, and highly relevant. User information can include information of members participating in the group chat, such as name, position, contact information, responsibilities, preferences, personality, etc.; task information can include specific work task information, such as task assignment, progress update, deadline reminder, etc., to ensure that group chat members understand their respective responsibilities and task status; schedule information can include meeting arrangements, activity plans and other information to help group chat members arrange their time reasonably; financial information can include financial expenditure and income matters, such as budget allocation, expense reimbursement, income records, etc., to ensure the transparency and accuracy of financial information.
[0069] Among them, the second data is the information frequently asked by members in the enterprise group chat. Feedback and suggestion information can include feedback and suggestions from group chat members on projects, tasks or other matters to promote improvement and optimization; information information can include company announcements, industry news, market trends, etc., to help group chat members understand the latest corporate and industry information; conclusive information can include conclusions or decisions reached by group chat members in the discussion, and specific descriptions of the plans or matters involved to help group chat members clarify the direction and next steps.
[0070] In some embodiments, one implementation method of this step specifically includes: obtaining a pre-constructed first prompt word template, generating a first prompt word based on the first text and the first prompt word template, and inputting the first prompt word into a preset large language model so that the large language model extracts the first data and the second data from the first text.
[0071] Specifically, the prompt template is a structured framework for designing and optimizing prompts. It provides a common format to help users more efficiently construct prompts, thereby guiding the LLM model to produce the desired output. A prompt template typically includes the following components: 1. Task: This specifies the specific task the model needs to complete, such as information extraction or question answering. 2. Context: This provides sufficient background information to help the model understand the context and requirements of the task. 3. Examples: This provides a small number of examples to help the model better understand the format and requirements of the task. 4. Role: This defines the model's role, such as "Information Extraction Assistant" or "AI Secretary Assistant," to influence its generation style. 5. Format: This specifies the output format, such as JSON, HTML, or plain text. 6. Tone: This sets the tone of the output, such as formal, humorous, or concise. Based on the pre-built first prompt template and first text, you can quickly construct the first prompt to guide the large language model in extracting the first and second data.
[0072] In a specific embodiment, a specific example of the first prompt word template is as follows:
[0073] # Character Settings
[0074] You are an efficient information extraction assistant, specializing in extracting and updating key information from group chat messages. Please strictly follow the following rules when processing:
[0075] # Time: {current time}
[0076] # Input format
[0077] {
[0078] "User Information": {
[0079] "username": "",
[0080] "message": "Current user's chat messages"
[0081] },
[0082] "Instant Message": {
[0083] "User Information": "Includes information about group chat members, such as name, position, contact information, responsibilities, preferences, personality, etc.",
[0084] "Task Information": "Involves specific work tasks, such as task assignments, progress updates, deadline reminders, etc., to ensure that group chat members understand their respective responsibilities and task status."
[0085] "Schedule": "Information such as meeting schedules and event plans helps group chat members plan their time effectively."
[0086] "Financial Information": "Matters involving financial expenditures and income, such as budget allocation, expense reimbursement, and income records, ensuring transparency and accuracy of financial information."
[0087] }
[0088] }
[0089] # Output format
[0090] {
[0091] "Instant Message": "Update the instant message based on the user's input, keeping it consistent with the input format.",
[0092] "Potential information": {
[0093] "Feedback and Suggestions": "Group chat members provide feedback and suggestions on projects, tasks, or other matters to promote improvement and optimization."
[0094] "News": "Includes company announcements, industry news, market trends, etc., helping group chat members understand the latest corporate and industry information."
[0095] "Concluding Information": "The conclusions or decisions reached by group chat members during the discussion, specifically describing the plans or matters involved, to help group chat members clarify the direction and next steps."
[0096] }
[0097] }
[0098] # Processing rules
[0099] Information extraction: Extract relevant information from user messages and update instant messages.
[0100] Information Updates: Ensure that the information in instant messages is up to date and make adjustments as needed.
[0101] Specific time conversion: Convert a relative time (such as "next Wednesday") to a specific date (such as "March 5, 2025").
[0102] Financial information update: Dynamically update financial information, including records of expenditures and income, to ensure the accuracy of financial information.
[0103] Potential information identification: Identify and extract potential information, such as feedback, suggestions, information and conclusive information, for further analysis and utilization.
[0104] In a specific embodiment, the specific implementation example of the first prompt word template is as follows:
[0105] # Input example
[0106] {
[0107] "User Information": {
[0108] "Username": "Zhang San",
[0109] "Message": "We need to complete the market analysis report by next Wednesday. Li Si will be responsible for data collection, and Wang Wu will be responsible for writing the first draft. The project budget is 5,000 yuan, and 2,000 yuan has been spent on data procurement."
[0110] },
[0111] "Instant Message": {
[0112] "User Information": "Zhang San: Project Manager; Li Si: Data Analyst; Wang Wu: Copywriter.",
[0113] "Task Information": "The task of market analysis report is in progress.",
[0114] "Schedule": "There is a project progress meeting on March 5, 2025.",
[0115] "Financial Information": "The project budget is 5,000 yuan, and 2,000 yuan has been spent on data purchase."
[0116] }
[0117] }
[0118] # Output example
[0119] {
[0120] "Instant Message": {
[0121] "User Information": "Zhang San: Project Manager; Li Si: Data Analyst; Wang Wu: Copywriter.",
[0122] "Task Information": "The market analysis report task is in progress. Li Si is responsible for data collection, and Wang Wu is responsible for writing the first draft. The deadline is March 5, 2025."
[0123] "Schedule": "There is a project progress meeting on March 5, 2025.",
[0124] "Financial Information": "The project budget is 5,000 yuan. 2,000 yuan has been spent on data purchases, leaving a remaining budget of 3,000 yuan."
[0125] },
[0126] "Potential information": {
[0127] "Feedback and Suggestions": "None",
[0128] "News Information": "None",
[0129] "Concluding Information": "Zhang San believes the market analysis report plan is feasible. Li Si is responsible for data collection, and Wang Wu is responsible for writing the first draft. The deadline is March 5, 2025."
[0130] }
[0131] }
[0132] It should be noted that the "instant message" in the above-mentioned first prompt word template may correspond to the above-mentioned first data, and the "potential information" in the above-mentioned first prompt word template may correspond to the above-mentioned second data. The above-mentioned first prompt word template is only an example, and this application is not limited to this.
[0133] S103. Storing the first data in the first storage space, and vectorizing the second data and the first text respectively, and storing them in the second storage space;
[0134] In S103, specifically, the first data and second data can be extracted and stored via a preset data interface. The first data is used for subsequent direct invocation of the large language model and is stored separately in a preset first storage space in text form. The first storage space can utilize existing computer memory, and the size of the first storage space can be determined based on the architecture and computing resources of the large language model, which is not specifically limited in this application. The second data and first text are used for subsequent vector retrieval of the large language model and can be vectorized using an existing vectorization model (such as an open-source embedding model like text2vec) and permanently stored in a preset second storage space. The vectorization model maps text to a specific location in the vector space based on its original semantics, minimizing its relative distance to semantically similar vectors. The second storage space can utilize an existing vector database, and the size of the second storage space can be determined based on actual application requirements, which is not specifically limited in this application. Through the above steps, the group chat conversation process is stored to facilitate contextual association. Key information that enterprise group chat members are interested in and frequently ask about is also extracted, facilitating subsequent invocation of the large language model.
[0135] S104. Obtain the question text in the enterprise group chat and vectorize the question text to obtain a first vector;
[0136] Specifically, in S104, a question text sent by a group chat member in the enterprise group chat can be obtained and then vectorized using the same vectorization model described above to obtain a first vector. The question text can be questions asked by group chat members during daily conversations within the enterprise group chat. For example, the content of the question may include: "Do we have a meeting next Wednesday?" "Project budget?" etc., but the present application is not limited to these.
[0137] S105. Perform vector retrieval in the second storage space based on the first vector to obtain a second vector;
[0138] In S105 , specifically, the second storage space may use an existing vector database. Vector retrieval is one of the core functions of a vector database, which calculates the similarity between vectors and returns a vector (ie, a second vector) that has a similar relationship with the query vector (ie, the first vector).
[0139] In some embodiments, one implementation of this step specifically includes: calculating the similarity between the first vector and each vector stored in the second storage space; and selecting, from the second storage space, a second vector having a similar relationship with the first vector based on the calculated similarity and a preset rule.
[0140] Specifically, an existing similarity calculation method, such as a cosine similarity algorithm, can be used to calculate the similarity between the first vector and each vector stored in the second storage space, and then based on a preset rule, a second vector having a similar relationship with the first vector can be screened out. The preset rule can specifically be: sorting the vectors in the second storage space according to the calculated similarity, screening out vectors with a similarity higher than a preset threshold, or screening out a preset number of vectors with the highest similarity as the second vector, but the present application is not limited thereto.
[0141] In this step, by performing vector retrieval in the second storage space, the previous context and key information related to the first vector obtained by vectorizing the current question text are extracted, which preserves the semantic coherence between the contexts and can effectively filter out irrelevant information in the context, which is conducive to improving the accuracy of subsequent large language model responses.
[0142] S106. Utilize the preset large language model, output a reply message based on the data stored in the first storage space, the first vector, and the second vector, and send the reply message to the enterprise group chat.
[0143] In S106, specifically, the existing pre-trained large language model can be used, combined with the prompt word project, to comprehensively analyze all the data, the first vector and the second vector stored in the first storage space, output a reply message corresponding to the question text, and send the reply message to the enterprise group chat, so as to realize automatic and accurate reply to the enterprise group chat message.
[0144] In some embodiments, one implementation method of the step of outputting a reply message based on the data, the first vector, and the second vector stored in the first storage space using a preset large language model specifically includes: obtaining a pre-built second prompt word template, generating a second prompt word based on the data, the first vector, the second vector, and the second prompt word template stored in the first storage space; and inputting the second prompt word into the preset large language model to obtain a reply message output by the large language model.
[0145] Specifically, based on the pre-built second prompt word template, as well as all the data, first vectors, and second vectors stored in the first storage space, a second prompt word can be quickly constructed to guide the large language model to integrate all input data for automatic reply.
[0146] In a specific embodiment, a specific example of the second prompt word template is as follows:
[0147] # Role
[0148] You are an efficient AI secretary assistant, specifically designed for group chat scenarios. Your task is to learn and interpret the collected summary information from group chats, and provide answers or relevant suggestions to users based on the input context. Please strictly follow the following rules when handling this:
[0149] # Time: {current time}
[0150] # Input format
[0151] {
[0152] "Question content": {
[0153] "username": "",
[0154] "message": "The current user's question message"
[0155] },
[0156] "Instant Message": {
[0157] "User Information": "Includes information about group chat members, such as name, position, contact information, responsibilities, preferences, personality, etc.",
[0158] "Task Information": "Involves specific work tasks, such as task assignments, progress updates, deadline reminders, etc., to ensure that group chat members understand their respective responsibilities and task status."
[0159] "Schedule": "Information such as meeting schedules and event plans helps group chat members plan their time effectively."
[0160] "Financial Information": "Matters involving financial expenditures and income, such as budget allocation, expense reimbursement, and income records, ensuring transparency and accuracy of financial information."
[0161] },
[0162] "Potential information": {
[0163] "Feedback and Suggestions": "Group chat members provide feedback and suggestions on projects, tasks, or other matters to promote improvement and optimization."
[0164] "News": "Includes company announcements, industry news, market trends, etc., helping group chat members understand the latest corporate and industry information."
[0165] "Concluding Information": "The conclusions or decisions reached by group chat members during the discussion, specifically describing the plans or matters involved, to help group chat members clarify the direction and next steps."
[0166] },
[0167] "User conversation context": [
[0168] {"role": "user", "username": "", "question": ""},
[0169] {"Role": "AI Secretary", "Answer": ""} ]
[0171] }
[0172] # Output requirements
[0173] Accuracy: Ensure responses are accurate and based on the context provided.
[0174] Specific time conversion: Convert a relative time (such as "next Wednesday") to a specific date (such as "March 5, 2025").
[0175] Clarity: Be specific in your answers and avoid ambiguity.
[0176] Conciseness: Answers should be brief and to the point, avoiding lengthy responses.
[0177] Relevance: Answers should be highly relevant to the user's question and provide useful advice or information.
[0178] Politeness: Maintain a professional and polite tone.
[0179] Actionable: Provide specific recommendations or steps for action, if possible.
[0180] Personalization: Based on user information and preferences, personalized answers are provided to improve user experience.
[0181] In a specific embodiment, the specific implementation example of the second prompt word template is as follows:
[0182] # Input:
[0183] {
[0184] "Question content": {
[0185] "Username": "Zhang Wei",
[0186] "Message": "Do we have a meeting next Wednesday?"
[0187] },
[0188] "Instant Message": {
[0189] "User Information": "Zhang Wei, Project Manager, Contact: 123456789, Preference: Prefers concise and clear information.",
[0190] "Task Information": "The progress update for Project A needs to be completed by next Wednesday.",
[0191] "Schedule": "There will be a progress meeting for Project A at 10:00 AM next Wednesday (March 5, 2025).",
[0192] "Financial Information": "No relevant information."
[0193] },
[0194] "Potential information": {
[0195] "Feedback and Suggestions": "The team recommends discussing risk management for Project A in the meeting.",
[0196] "News": "The company will release a new marketing strategy next week.",
[0197] "Concluding Information": "The progress meeting for Project A will determine resource allocation for the next phase."
[0198] },
[0199] "User conversation context": [
[0200] {"role": "user", "username": "Zhang Wei", "question": "Do we have a meeting next Wednesday?"},
[0201] {"Role": "AI Secretary", "Answer": ""} ]
[0203] }
[0204] # Output:
[0205] "Hello, Zhang Wei! According to your schedule, you have a progress meeting regarding Project A next Wednesday (March 5, 2025) at 10:00 AM. We recommend that you prepare relevant progress updates and discuss project risk management, taking into account the team's suggestions. If you need further assistance, please let me know."
[0206] It should be noted that the "question content" in the above-mentioned second prompt word template may correspond to the above-mentioned question text, the "instant message" in the above-mentioned second prompt word template may correspond to the above-mentioned first data, the "potential information" in the above-mentioned second prompt word template may correspond to the above-mentioned second data, and the "user conversation context" in the above-mentioned second prompt word template may correspond to the above-mentioned first text. The above-mentioned second prompt word template is only an example, and this application is not limited to this.
[0207] Currently, in enterprise group chats, which are large and highly active, important information and decisions are often scattered across vast amounts of chat logs, making them time-consuming and laborious to search for, and prone to missing key content. Furthermore, group chats often involve multiple simultaneous discussions, much like multiple meetings taking place in a single conference room. These intertwined discussions lead to unclear communication content, forcing users to scroll through multiple chat logs to accurately determine which question a particular statement is addressing. This significantly reduces response efficiency and severely impacts the user experience.
[0208] In the above embodiment, historical chat records within a preset historical length in the enterprise group chat are first obtained, and the historical chat records are processed to obtain a first text; using a preset large language model, information is extracted based on the first text to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information and financial information, and the second data includes one or more of feedback and suggestion information, news information and conclusion information; the first data is stored in a first storage space, and the second data and the first text are vectorized respectively and then stored in a second storage space; in this way, the group chat conversation process is stored to facilitate context association, and at the same time, key information that enterprise group chat members are concerned about and frequently ask is extracted from it to facilitate subsequent calling of the large language model; then the question text in the group chat is obtained and vectorized to obtain a first vector; based on the first vector, a vector search is performed in the second storage space to obtain a second vector; using the preset large language model, a reply message is output based on the data stored in the first storage space, the first vector and the second vector, and the reply message is sent to the group chat. The data stored in the first storage space can be directly input into the large language model for quick access and use by the large language model. A first vector is obtained based on the question text, and a vector search is performed in the second storage space to retrieve a second vector that matches the first vector. The data stored in the first storage space and the first vector are then combined and input into the large language model. The large language model is used to perform a comprehensive analysis of the input data and output a reply message corresponding to the question text. In summary, the above embodiment can achieve automatic and accurate replies to enterprise group chat messages.
[0209] In addition, the above embodiment can automatically and intelligently identify small talk and work content without changing existing communication habits, ensuring that work efficiency is not disturbed; it can dynamically update the latest information through group chat records, intelligently extract and integrate message content, and ensure that group chat members always have the latest developments; it can provide automatic and accurate replies based on the historical messages of group chat members, thereby improving user experience and satisfaction.
[0210] In other embodiments of the present application, the above-mentioned method for replying to an enterprise group chat message further includes:
[0211] S201 determines whether the storage space size of the first storage space is greater than the preset storage limit, if so, execute S202;
[0212] Specifically, in S201, a token is the basic unit used to represent natural language text in a large language model. Large language models typically have upper limits on the number of tokens they can input or output. When the number of tokens input or output exceeds this limit, the "token limit exceeded" problem occurs. For example, if the input text is too long, exceeding the context length limit of the large language model, the large language model will be unable to process it. The data in the first storage space is fully input into the large language model. Based on this, an appropriate preset storage limit for the first storage space can be pre-determined based on the upper limit of the number of tokens input by the large language model to minimize the "token limit exceeded" problem. The amount of available space in the first storage space is detected in real time, and a determination is made as to whether the amount is greater than the preset storage limit. If the amount is greater than the preset storage limit, S202 is executed to retrieve some data from the first storage space. If the amount is less than or equal to the preset storage limit, the first storage space can continue to store data.
[0213] S202. According to the difference between the storage space size and the preset storage limit, the corresponding excess data is extracted from the first storage space so that the storage space size of the first storage space after extraction is less than or equal to the preset storage limit;
[0214] Specifically, in S202, when the size of the stored space is greater than the preset storage limit, the preset storage limit is subtracted from the size of the stored space to obtain a difference. Excess data equal to or greater than the difference is then extracted from the first storage space, such that the size of the stored space in the first storage space after extraction is less than or equal to the preset storage limit. When extracting excess data, data stored earlier in the first storage space may be extracted first, based on the order in which the data was stored in the first storage space. This is not specifically limited in this application.
[0215] S203. Vectorize the excess data and store it in the second storage space.
[0216] In S203 , specifically, an existing vectorization model may be used to vectorize the excess data, and the vectorized data may be permanently stored in a preset second storage space, so that the data can be subsequently called upon when the large language model performs vector retrieval.
[0217] In this embodiment, to minimize the "token limit" issue, excess data in the first storage space is removed, vectorized, and stored in the second storage space, allowing the large language model to access it at any time. Furthermore, the data in both the first and second storage spaces can be dynamically updated. This design overcomes contextual limitations and helps the large language model consistently provide high-quality, effective responses.
[0218] like Figure 2 As shown, in another embodiment of the present application, a system for replying to enterprise group chat messages is also provided, including:
[0219] A first acquisition unit 10 is configured to acquire historical chat records within a preset historical period in the enterprise group chat and process the historical chat records to obtain a first text;
[0220] An extraction unit 11 is configured to extract information from the first text using a preset large language model to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information;
[0221] The storage unit 12 is configured to store the first data in a first storage space, and vectorize the second data and the first text respectively and store them in a second storage space;
[0222] A second acquisition unit 13 is used to acquire a question text in the enterprise group chat and vectorize the question text to obtain a first vector;
[0223] A retrieval unit 14 is configured to perform a vector search in the second storage space according to the first vector to obtain a second vector;
[0224] The reply unit 15 is configured to use a preset large language model to output a reply message based on the data stored in the first storage space, the first vector, and the second vector, and send the reply message to the group chat.
[0225] In other embodiments of the present application, in the above-mentioned enterprise group chat message reply system, the extraction unit 11, when performing information extraction based on the first text using a preset large language model to obtain the first data and the second data, is specifically configured to:
[0226] A pre-built first prompt word template is obtained, a first prompt word is generated according to the first text and the first prompt word template, and the first prompt word is input into a preset large language model so that the large language model extracts the first data and the second data from the first text.
[0227] In other embodiments of the present application, in the above-mentioned enterprise group chat message reply system, the retrieval unit 14, when performing a vector search in the second storage space based on the first vector to obtain the second vector, is specifically configured to:
[0228] Calculating similarities between the first vector and each vector stored in the second storage space;
[0229] According to the calculated similarity and a preset rule, a second vector having a similar relationship with the first vector is screened out from the second storage space.
[0230] In other embodiments of the present application, in the above-mentioned enterprise group chat message reply system, the reply unit 15, when outputting a reply message using a preset large language model based on the data stored in the first storage space, the first vector, and the second vector, is specifically configured to:
[0231] Obtaining a pre-built second prompt word template, and generating a second prompt word according to the data stored in the first storage space, the first vector, the second vector, and the second prompt word template;
[0232] The second prompt word is input into the preset large language model to obtain a reply message output by the large language model.
[0233] In other embodiments of the present application, in the above-mentioned enterprise group chat message reply system, the storage unit 12 is further configured to:
[0234] Determine whether the storage space of the first storage space is greater than the preset storage limit,
[0235] If so, extract the corresponding excess data from the first storage space according to the difference between the stored space size and the preset storage upper limit, so that the stored space size of the first storage space after extraction is less than or equal to the preset storage upper limit;
[0236] After the excess data is vectorized, it is stored in the second storage space.
[0237] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for replying to an enterprise group chat message, characterized in that: include: Obtain historical chat records within a preset historical period in the enterprise group chat, and process the historical chat records to obtain a first text; Using a preset large language model, extract information from the first text to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information; The first data is stored in a first storage space, and the second data and the first text are vectorized respectively and stored in a second storage space; Obtaining a question text in the enterprise group chat, and vectorizing the question text to obtain a first vector; Performing vector retrieval in the second storage space according to the first vector to obtain a second vector; Outputting a reply message using a preset large language model based on the data stored in the first storage space, the first vector, and the second vector, and sending the reply message to the enterprise group chat; Determine whether the storage space size of the first storage space is greater than a preset storage upper limit, If yes, extract the corresponding excess data from the first storage space according to the difference between the stored space size and the preset storage upper limit, so that the stored space size of the first storage space after extraction is less than or equal to the preset storage upper limit; After vectorizing the excess data, the data is stored in the second storage space.
2. The method according to claim 1, wherein The method of extracting information from the first text using a preset large language model to obtain first data and second data includes: A pre-constructed first prompt word template is obtained, a first prompt word is generated according to the first text and the first prompt word template, and the first prompt word is input into a preset large language model so that the large language model extracts the first data and the second data from the first text.
3. The method according to claim 1, wherein The second vector obtained by performing vector retrieval in the second storage space according to the first vector includes: Calculating the similarity between the first vector and each vector stored in the second storage space; According to the calculated similarity and a preset rule, a second vector having a similar relationship with the first vector is screened out from the second storage space.
4. The method according to claim 1, wherein The step of using a preset large language model to output a reply message based on the data stored in the first storage space, the first vector, and the second vector includes: Obtaining a pre-built second prompt word template, and generating a second prompt word according to the data stored in the first storage space, the first vector, the second vector, and the second prompt word template; The second prompt word is input into a preset large language model to obtain a reply message output by the large language model.
5. A reply system for enterprise group chat messages, characterized in that: include: A first acquiring unit is configured to acquire historical chat records within a preset historical period in the enterprise group chat, and process the historical chat records to obtain a first text; an extraction unit, configured to extract information from the first text using a preset large language model to obtain first data and second data, wherein the first data includes one or more of user information, task information, schedule information, and financial information, and the second data includes one or more of feedback and suggestion information, news information, and conclusion information; a storage unit, configured to store the first data in a first storage space, and vectorize the second data and the first text respectively, and then store them in a second storage space; A second acquisition unit is used to acquire a question text in the enterprise group chat and vectorize the question text to obtain a first vector; a retrieval unit, configured to perform a vector search in the second storage space according to the first vector to obtain a second vector; a reply unit, configured to use a preset large language model to output a reply message based on the data stored in the first storage space, the first vector, and the second vector, and send the reply message to the group chat; The storage unit is further used for: Determine whether the storage space size of the first storage space is greater than a preset storage upper limit, If yes, extract the corresponding excess data from the first storage space according to the difference between the stored space size and the preset storage upper limit, so that the stored space size of the first storage space after extraction is less than or equal to the preset storage upper limit; After vectorizing the excess data, the data is stored in the second storage space.
6. The system as claimed in claim 5, characterized in that The extraction unit, when performing the information extraction based on the first text using the preset large language model to obtain the first data and the second data, is specifically configured to: A pre-constructed first prompt word template is obtained, a first prompt word is generated according to the first text and the first prompt word template, and the first prompt word is input into a preset large language model so that the large language model extracts the first data and the second data from the first text.
7. The system as claimed in claim 5, characterized in that The retrieval unit, when performing the vector retrieval in the second storage space according to the first vector to obtain the second vector, is specifically configured to: Calculating the similarity between the first vector and each vector stored in the second storage space; According to the calculated similarity and a preset rule, a second vector having a similar relationship with the first vector is screened out from the second storage space.
8. The system as claimed in claim 5, characterized in that The reply unit, when executing the step of outputting a reply message using the preset large language model and based on the data stored in the first storage space, the first vector, and the second vector, is specifically configured to: Obtaining a pre-built second prompt word template, and generating a second prompt word according to the data stored in the first storage space, the first vector, the second vector, and the second prompt word template; The second prompt word is input into a preset large language model to obtain a reply message output by the large language model.
Citation Information
Patent Citations
Automatic reply method of group chat message and related equipment
CN118233420A
Context-based big language model dialogue processing method and apparatus, and electronic device
CN119831045A