Response generation method and device based on large model, storage medium and system

By adopting a response generation method based on a large model, combined with intent recognition and multi-strategy retrieval, the problem of low accuracy in answering complex questions in intelligent question answering systems is solved, achieving efficient and accurate response generation, which is suitable for financial investment consulting, customer service and product support scenarios in enterprise operations.

CN121919306APending Publication Date: 2026-04-24CSC FINANCIAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CSC FINANCIAL CO LTD
Filing Date
2025-11-20
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing intelligent question-answering systems lack deep semantic analysis capabilities in answering complex questions, resulting in omissions, confusion, or errors in answers, and failing to efficiently meet the operational needs of enterprises.

Method used

A large-model-based response generation method is adopted, which generates response information through intent recognition, multi-strategy retrieval, and fine-tuning of the large model. This includes product inquiries, in-depth business question inquiries, business object relationship inquiries, and real-time data inquiries. Strategies such as vector routing, graph database routing, product keyword routing, and interface routing are used to construct prompt words and generate accurate responses.

Benefits of technology

It improves the accuracy and reliability of question and answer generation, reduces illusions and factual errors in professional fields, lowers business risks and compliance costs, and ensures the professional depth and factual accuracy of responses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121919306A_ABST
    Figure CN121919306A_ABST
Patent Text Reader

Abstract

The invention discloses a reply generation method and device based on a large model, a storage medium and a system, relates to the technical field of intelligent questions and answers, and mainly aims to solve the problem of low accuracy of reply content generation in an intelligent questions and answers scene based on instant messaging software. The method mainly comprises the following steps: generating and sending a question and answer generation request to a business consultation server through an instant messaging software server; responding to the question and answer generation request through the business consultation server side, and obtaining question information to be replied; performing intention recognition on the question information, and determining at least one target retrieval strategy according to an intention recognition result under the condition that the intention recognition result is matched with a target service and represents a compliance intention; constructing cue words according to the question information and the target retrieval strategy; and calling a large model interface, and inputting the cue word into the large model subjected to fine tuning training, so as to generate reply information through the large model subjected to fine tuning training. The method is mainly used for generating reply information through interaction between instant messaging software and a large model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent question-answering technology, and in particular to a method, apparatus, storage medium, and system for generating responses based on a large model. Background Technology

[0002] In business operations, particularly in financial advisory, customer service, and product support, ensuring that account managers or frontline staff can access business knowledge promptly and accurately is crucial for efficient work and service quality. Currently, this support work heavily relies on manual Q&A, leading to significant operational burdens such as repetitive questions and inconsistent response times. Therefore, deploying automated and intelligent Q&A systems to replace some manual Q&A has become a necessary means to improve operational efficiency and service quality.

[0003] In the evolution of natural language processing technology, automated question answering systems have successively gone through the development stages of rule-based templates, retrieval models, and shallow semantic models. These traditional methods typically rely on large-scale labeled data and manually defined feature engineering, using pattern matching or simple statistical models to associate questions with preset answers. This approach lacks the ability to deeply analyze the semantics and deconstruct intent of complex sentences, and cannot decompose complex questions containing multiple independent query points into several sub-questions and provide accurate answers to each, leading to incomplete, confusing, or completely incorrect answers. Summary of the Invention

[0004] In view of this, the present invention provides a response generation method, apparatus, storage medium, and system based on a large model, the main purpose of which is to solve the problem of low accuracy in response content generation in existing intelligent question answering scenarios.

[0005] According to one aspect of the present invention, a response generation method based on a large model is provided, comprising: In response to a question-and-answer generation request, retrieve the question information to be answered; The query information is subjected to intent recognition, and if the intent recognition result matches the target business and represents a compliance intent, at least one target retrieval strategy is determined based on the intent recognition result; Based on the question information and the target retrieval strategy, prompt words are constructed; The prompt words are input into a large model that has undergone fine-tuning training, so that response information can be generated through the large model that has undergone fine-tuning training.

[0006] Furthermore, the intent recognition result includes at least one of product consultation, in-depth business problem consultation, business object relationship consultation, and real-time data consultation, and the target retrieval strategy includes vector routing, graph database routing, product keyword routing, or interface routing. The determination of at least one target retrieval strategy based on the intent recognition result includes: If the intent recognition result includes product inquiries, product keyword routing will be used as the target retrieval strategy. When the intent recognition result includes in-depth business question consultation, vector routing will be used as the target retrieval strategy; If the intent recognition result includes business object relationship consultation, graph database routing will be used as the target retrieval strategy. When the intent recognition result includes real-time data consultation, interface routing is used as the target retrieval strategy.

[0007] Furthermore, the step of constructing prompt words based on the question information and the target retrieval strategy includes: When the target retrieval strategy is vector routing or graph database routing, prompt words are constructed based on the question information; When the target retrieval strategy is product keyword routing, the internal product knowledge base is queried based on the keywords in the question information to obtain product knowledge fragments, and prompt words are constructed based on the question information and the product knowledge fragments; When the target retrieval strategy is interface routing, the real-time data interface that matches the keywords in the question information is invoked to query real-time data through the real-time data interface, and prompt words are constructed based on the real-time data and the question information.

[0008] Furthermore, when the target retrieval strategy is vector routing or graph database routing, the response information is generated through the large model that has completed fine-tuning training, including: Feature embedding is performed on the prompt words to obtain prompt word vectors; Candidate knowledge vectors with a semantic similarity greater than a preset similarity threshold to the prompt word vectors are identified from the knowledge database; The candidate knowledge vectors are predicted for relevance by the large model that has completed fine-tuning training, and the candidate knowledge vectors are reordered according to the relevance, so as to select the target knowledge vectors based on the reordering order. The large model, after undergoing fine-tuning training, performs information fusion and reasoning on the target knowledge vector to generate response information.

[0009] Furthermore, if no candidate knowledge vector with a semantic similarity greater than a preset similarity threshold is found, the method further includes: Select a preset response template that matches the prompt word from the preset response template library, and generate a fallback response based on the preset response template and the prompt word; Before performing intent recognition on the question information, the method further includes: Add the question information as a response task to the task queue; Generate and feed back response information to characterize the response processing.

[0010] Furthermore, the method also includes: If the intent recognition result does not match the target business, the first preset response information representing the deviation of the response from the target business will be returned to the instant messaging software client that triggered the question and answer generation request; If the intent recognition result indicates a violation intent, the second preset reply information used to indicate the abnormality of the question is returned to the instant messaging software client that triggered the question and answer generation request, and the number of abnormal questions asked by the current user is updated, so that when the number of abnormal questions exceeds a preset threshold for the number of abnormal questions, the user is added to the question blacklist.

[0011] Furthermore, the question-and-answer generation request is triggered based on a target prefix input by the instant messaging software client; After generating response information using the large model that has completed fine-tuning training, the method further includes: The reply information is returned to the instant messaging client that triggered the question-and-answer generation request via the instant messaging server.

[0012] According to another aspect of the present invention, a response generation device based on a large model is provided, the device being configured in a business consultation server, comprising: The acquisition module is used to respond to the question-and-answer generation request and obtain the question information to be answered; The retrieval strategy determination module is used to perform intent recognition on the query information, and determine at least one target retrieval strategy based on the intent recognition result if the intent recognition result matches the target business and represents a compliance intent. The construction module is used to construct prompt words based on the question information and the target retrieval strategy; The generation module is used to input the prompt words into a large model that has completed fine-tuning training, so as to generate response information through the large model that has completed fine-tuning training.

[0013] According to another aspect of the present invention, a storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform operations corresponding to the above-described response generation method based on a large model.

[0014] According to another aspect of the present invention, a system is provided, comprising: a business consultation server, a large model interface, an instant messaging software client, and an instant messaging software server; The instant messaging software client is used to receive communication information input by the user and send the communication information to the instant messaging software server. The instant messaging software server is used to generate and send a question-and-answer generation request to the business consultation server when the communication information contains a target prefix. The business consultation server is used to perform the operations corresponding to the above-mentioned response generation method based on the large model; The large model interface is used to call the large model that has completed fine-tuning training, so that the large model generates response information based on the prompt words and returns the response information to the instant messaging software server. The instant messaging software server is also used to return the reply information to the instant messaging software client.

[0015] By employing the above-described technical solutions, the technical solutions provided by the embodiments of the present invention have at least the following advantages: This invention provides a method, apparatus, storage medium, and system for generating responses based on a large model. In response to a question-and-answer generation request, the invention obtains the question information to be answered; performs intent recognition on the question information, and if the intent recognition result matches the target business and represents a compliance intent, determines at least one target retrieval strategy based on the intent recognition result; constructs prompt words based on the question information and the target retrieval strategy; and inputs the prompt words into a fine-tuned large model to generate response information. This significantly reduces the "illusion" phenomenon and factual errors commonly found in general large models in professional fields, lowering the business risks and compliance costs associated with providing inaccurate or non-compliant information. Simultaneously, through the synergy of intent recognition and multi-strategy retrieval, it can accurately match business needs and knowledge sources while ensuring the professional depth and factual accuracy of the generated answer, thereby greatly improving the accuracy and reliability of question-and-answer generation in professional service scenarios.

[0016] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the specification. Furthermore, in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1A flowchart of a response generation method based on a large model provided by an embodiment of the present invention is shown; Figure 2 A flowchart of another response generation method based on a large model provided by an embodiment of the present invention is shown; Figure 3 This diagram illustrates a flowchart of a large model internal response generation process provided by an embodiment of the present invention. Figure 4 This illustration shows a schematic diagram of a response information generation method based on multi-terminal interaction provided by an embodiment of the present invention; Figure 5 The diagram shows a block diagram of a response generation device based on a large model provided in an embodiment of the present invention; Figure 6 A structural block diagram of a system provided by an embodiment of the present invention is shown. Detailed Implementation

[0018] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0019] To address the issue of low accuracy in generated responses in existing intelligent question-answering scenarios, this invention provides a response generation method based on a large model, such as... Figure 1 As shown, the method includes: 101. In response to the question-and-answer generation request, obtain the question information to be answered.

[0020] In this embodiment of the invention, an initial question-and-answer generation request is received through an interface, message queue, or user interface, and the core question information is parsed and extracted from the request. For example, a user enters in the chat window of a smart investment advisory app: "The pharmaceutical sector has fallen quite a bit recently, is now a good time to buy? Also, are Company A's bonds risky?" The client will capture this complete text as the question information to be answered. Of course, the input of the question is not limited to text format, and can also be multimodal data such as voice and mind maps; this embodiment of the invention does not impose specific limitations.

[0021] 102. Perform intent recognition on the query information, and if the intent recognition result matches the target business and represents a compliant intent, determine at least one target retrieval strategy based on the intent recognition result.

[0022] In this embodiment of the invention, before generating a response to a question by calling the large model, intent recognition is performed on the question. If the recognition result indicates that the current question intent is not related to the business domain corresponding to the current server—for example, the user inputs an entertainment news query, but the current business server is an intelligent investment advisory service—then it is determined that the intent recognition result does not match the target business. Simultaneously, it is also necessary to confirm whether the question is compliant. Since some special business scenarios may involve sensitive or non-compliant questions that cannot be answered, subsequent question response generation is unnecessary; a pre-set fallback answer can be directly provided. Therefore, performing intent recognition before calling the large model interface can intercept inappropriate questions early in the process, greatly reducing the risk of providing inappropriate advice and causing legal and reputational risks.

[0023] Furthermore, intent recognition is also used to guide retrieval strategies. Since calling the large model essentially involves accessing third-party resources, and some business data is internal information or assets not accessible through the large model, such as product data and upstream / downstream relationships between different companies in the industry, it's necessary to differentiate based on intent whether to first retrieve information from the internal database and then integrate answers based on the large model, or to directly complete data query and answer generation through the large model—that is, to determine the target retrieval strategy. Of course, a single question may involve complex intents, corresponding to more than one target retrieval strategy. When multiple target retrieval strategies exist, they can be implemented in parallel. Dynamically selecting the retrieval strategy based on intent avoids traversing and searching the entire dataset, making the subsequent retrieval process more efficient and targeted.

[0024] 103. Construct prompt words based on the question information and the target retrieval strategy.

[0025] In this embodiment of the invention, the target retrieval strategy can be broadly divided into a pre-retrieval strategy and a post-retrieval tool invocation strategy. The pre-retrieval strategy, which performs retrieval before entering the large model, is used to synchronously obtain highly deterministic static knowledge (such as product parameters and financial data) from a specified business database and embed these retrieval results as known facts into the context of prompt words to construct prompt words. The post-retrieval tool invocation strategy is used to guide retrieval during the large model's response generation process. When the large model identifies knowledge gaps or requires dynamic data during generation, it performs further retrieval through a post-retrieval tool. If only one target retrieval strategy exists, and this target retrieval strategy is a post-retrieval tool invocation strategy, prompt words can be directly constructed based on the question information and the large model can be invoked. If multiple target retrieval strategies exist, including both pre-retrieval and post-retrieval tool invocation strategies, the context can be queried first based on the pre-retrieval strategy, and then prompt words can be constructed based on the context and question information. The prompt words include system role definitions, background knowledge, user questions, and answer format requirements, etc.

[0026] By determining the target retrieval strategy through question intent, and achieving synergy among multiple retrieval strategies, it not only ensures a stable supply of basic information, but also enables the on-demand acquisition of dynamic information through the reasoning capabilities of large models. Ultimately, it significantly improves the accuracy and timeliness of responses while ensuring response efficiency.

[0027] 104. Input the prompt words into the large model that has completed fine-tuning training, so as to generate response information through the large model that has completed fine-tuning training.

[0028] In this embodiment of the invention, the large-scale model that has undergone fine-tuning training is obtained based on high-quality dialogue data and knowledge from the corresponding business domain. This model is better able to grasp financial terminology, reasoning logic, and compliant expressions. Upon receiving prompts, the large-scale model understands the roles, background, questions, and requirements, and generates a fluent, professional, and compliant natural language response. For example, in an investment advisory scenario, the large-scale model that has undergone fine-tuning training needs to be trained based on high-quality dialogue data and investment analysis knowledge data from the investment advisory domain. By further training the pre-trained large-scale model on domain-specific data, its output becomes more professional and more in line with domain conventions. Simultaneously, leveraging the powerful natural language understanding and generation capabilities of the large-scale language model, structured prompts are transformed into a final answer that is easily understood by the user.

[0029] In one embodiment of the present invention, for further illustration and limitation, such as Figure 2 As shown, the step of determining at least one target retrieval strategy based on the intent recognition result includes: 201. If the intent recognition result includes product consultation, product keyword routing shall be used as the target retrieval strategy.

[0030] 202. If the intent recognition result includes in-depth business question consultation, vector routing shall be used as the target retrieval strategy.

[0031] 203. If the intent recognition result includes business object relationship consultation, graph database routing shall be used as the target retrieval strategy.

[0032] 204. If the intent recognition result includes real-time data consultation, the interface routing shall be used as the target retrieval strategy.

[0033] In this embodiment of the invention, the intent recognition result includes at least one of product consultation, in-depth business problem consultation, business object relationship consultation, and real-time data consultation. The target retrieval strategy includes vector routing, graph database routing, product keyword routing, or interface routing. When a product consultation intent is recognized (such as a user inquiring about fund details), product keyword routing is activated. By accurately matching product names or codes, standardized information is quickly located from a structured product library, ensuring the accuracy and efficiency of basic data queries. When an in-depth business problem consultation intent is recognized (such as analyzing market trends or interpreting policy impacts), vector routing is activated. The user's question is converted into a semantic vector, and the most relevant unstructured documents (such as research reports and announcements) are retrieved from the vector database to capture deep semantic relationships and improve the breadth of knowledge in answering complex questions. When a business object relationship consultation intent is recognized (such as querying corporate equity chains or interpersonal relationships), the system calls graph database routing. Graph query language is used to traverse the paths and network structures between entities, intuitively presenting complex relationship topologies and solving the problem of association reasoning that is difficult to handle by traditional databases. When a real-time data inquiry intent is detected (such as querying stock prices or exchange rates), the interface routing is directly triggered to retrieve the latest values ​​by calling internal or external real-time data APIs, ensuring the timeliness of dynamic information. This strategy mapping system, by assigning appropriate data sources and retrieval methods to different intents, achieves multi-dimensional information coverage from "exact matching" to "semantic expansion," and from "relationship mining" to "real-time acquisition." It not only ensures the response speed of simple queries but also meets the in-depth needs of complex analyses, significantly improving the accuracy of knowledge retrieval and the overall system efficiency.

[0034] In one embodiment of the present invention, for further explanation and limitation, the step of constructing prompt words based on the question information and the target retrieval strategy includes: When the target retrieval strategy is vector routing or graph database routing, prompt words are constructed based on the question information; When the target retrieval strategy is product keyword routing, the internal product knowledge base is queried based on the keywords in the question information to obtain product knowledge fragments, and prompt words are constructed based on the question information and the product knowledge fragments; When the target retrieval strategy is interface routing, the real-time data interface that matches the keywords in the question information is invoked to query real-time data through the real-time data interface, and prompt words are constructed based on the real-time data and the question information.

[0035] In this embodiment of the invention, vector routing or graph database routing is a post-retrieval strategy that can directly generate prompt words based on the question information to perform knowledge retrieval through a large model. When the target strategy is product keyword routing, key identifiers such as product names and codes are directly extracted from the question information, and these identifiers are used to accurately query the internal product knowledge base to quickly obtain corresponding, structured product knowledge fragments (such as rates, rules, and terms). Subsequently, this product knowledge fragment is used as solid factual evidence and combined with the user's original question to jointly construct prompt words. When the target strategy is interface routing, the question information needs to be parsed to locate key entities (such as stock codes and currency pairs), and the matching real-time data interface (such as market data API) needs to be called to query the latest dynamic data. After a successful query, the system uses the returned real-time data as key facts and integrates it into the prompt words along with the question information to ensure that the large model can answer based on the latest situation. Through this differentiated construction mechanism, the system ensures that no matter what type of information demand is faced, the prompt words input to the large model can contain the most relevant, accurate, and timely information, thereby providing a data foundation for generating high-quality and highly reliable responses.

[0036] In one embodiment of the present invention, for further explanation and limitation, when the target retrieval strategy is vector routing or graph database routing, the generation of response information through the large model that has completed fine-tuning training includes: Feature embedding is performed on the prompt words to obtain prompt word vectors; Candidate knowledge vectors with a semantic similarity greater than a preset similarity threshold to the prompt word vectors are identified from the knowledge database; The candidate knowledge vectors are predicted for relevance by the large model that has completed fine-tuning training, and the candidate knowledge vectors are reordered according to the relevance, so as to select the target knowledge vectors based on the reordering order. The large model, after undergoing fine-tuning training, performs information fusion and reasoning on the target knowledge vector to generate response information.

[0037] In this embodiment of the invention, when the target retrieval strategy involves semantic retrieval (vector routing) or relational retrieval (graph database routing), generating a response is a multi-stage refinement and reasoning process. First, the constructed prompt words are input into a large model for feature embedding, converting them into high-dimensional prompt word vectors. Then, similarity matching is performed in a knowledge database (such as a vector library or a vectorized index of a graph database) to obtain candidate knowledge vectors and their corresponding text fragments whose semantic similarity to the prompt word vectors exceeds a preset threshold.

[0038] Since the initial search results may contain some information with low relevance, a further reordering process is performed. A large-scale model, after fine-tuning, performs deep relevance prediction on the candidate knowledge vectors. Based on its deep understanding of the business problem, the large model evaluates the true relevance of each candidate knowledge fragment to the question and reorders the candidate list accordingly, selecting the most relevant target knowledge vectors based on the new order (e.g., Top-K). Finally, the large model deeply integrates and logically reasons with the text content corresponding to these refined target knowledge vectors and the original question to generate a natural, accurate, and complete answer. Reordering effectively filters out noise that may exist in the initial search, ensuring that the generated answer is based on the most relevant information and avoiding information redundancy or deviation from the topic. This two-stage retrieval mechanism of coarse screening + reordering significantly improves the accuracy and depth of answers to complex questions.

[0039] In investment advisory applications, the internal response generation process of a large model can be as follows: Figure 3 As shown, the entire process begins with a user asking a question. First, the investment advisor's intent understanding agent (an intelligent agent based on the KGPT large model) performs in-depth analysis and optimization of the original question, generating a more accurate optimized question (removing questions that violate regulations or are mismatched with business requirements). Then, this optimized question enters the RAG (Retrieval Augmented Generation) module: it is first vectorized using an embedding model service to retrieve relevant knowledge, and then the search results are reordered and filtered by a dedicated reranking large language model (LLM) to ensure the core relevance of the acquired knowledge. Finally, the optimized query and the refined knowledge are sent together to the investment client case summary agent (again calling the KGPT large model), which performs information fusion and professional summarization to generate the final answer and display it to the user. This design, by combining intent understanding with a two-stage (embedding + reranking) retrieval process, ensures accuracy and professionalism throughout the entire process from question understanding to knowledge acquisition and answer generation.

[0040] In one embodiment of the present invention, for further explanation and limitation, when no candidate knowledge vector with a semantic similarity greater than a preset similarity threshold is matched, the method further includes: Select a preset response template that matches the prompt word from the preset response template library, and generate a fallback response based on the preset response template and the prompt word; Before performing intent recognition on the question information, the method further includes: Add the question information as a response task to the task queue; Generate and feed back response information to characterize the response processing.

[0041] In this embodiment of the invention, during the execution of vector routing or graph database routing strategies, if the system finds that no candidate knowledge vector in the knowledge database has a semantic similarity greater than a preset similarity threshold with the prompt word vector, meaning that the current retrieval has failed to obtain valid information, the system will automatically trigger a fallback response process. At this time, the system will select a general template from a pre-configured preset response template library that best matches the current prompt word or user intent, and generate a fallback response message based on the template's structure and content, combined with the original question in the prompt word. For example, "Your question is beyond my current knowledge; I will continue to learn," or "Regarding the XX type of business you inquired about, we suggest you verify it through the official channel XXX." This fallback response prevents large models from fabricating information without a data foundation, ensuring the security of the response.

[0042] To improve user experience, upon receiving a question request, the system immediately encapsulates the received question information into a response task and adds it to the background task queue. After the task is successfully added to the queue, the system immediately generates and sends a response message to the front-end user to indicate that the response is in progress (e.g., "I have received your question and am processing it. Please wait...").

[0043] In one embodiment of the present invention, for further explanation and limitation, the method further includes: If the intent recognition result does not match the target business, the first preset response information representing the deviation of the response from the target business will be returned to the instant messaging software client that triggered the question and answer generation request; If the intent recognition result indicates a violation intent, the second preset reply information used to indicate the abnormality of the question is returned to the instant messaging software client that triggered the question and answer generation request, and the number of abnormal questions asked by the current user is updated, so that when the number of abnormal questions exceeds a preset threshold for the number of abnormal questions, the user is added to the question blacklist.

[0044] In this embodiment of the invention, after the system performs intent recognition on the query information, if it determines that the intent recognition result does not match the preset target business scope—for example, in a smart investment advisory scenario, if a user asks for a weather forecast or food recommendations—then the subsequent retrieval and large model generation process will not be executed. Instead, a predefined first preset response will be directly returned to the user to indicate the service boundary, such as, "Sorry, I am currently focused on providing you with investment and financial management related consultations and cannot handle other types of questions at the moment." Filtering intent early in the process ensures that system resources are only used to handle tasks within its design goals. For non-business questions, no complex processing is required for an immediate response, reducing resource consumption and shortening user waiting time.

[0045] In one embodiment of the present invention, for further explanation and limitation, after generating response information through the large model that has completed fine-tuning training, the method further includes: The reply information is returned to the instant messaging client that triggered the question-and-answer generation request via the instant messaging server.

[0046] In this embodiment of the invention, the entire response generation process begins with a specific input action by the user in the instant messaging software client. When the content entered by the user in the chat input box begins with a predefined target prefix, such as a special symbol "@" or a trigger word "helper," the client immediately encapsulates the complete content with the prefix into a question-and-answer generation request and automatically sends it to the server, thereby activating a series of subsequent intent recognition, retrieval, and intelligent generation processes. In other words, the question-and-answer generation request is triggered based on the target prefix entered by the instant messaging software client.

[0047] After the large model returns the response, the instant messaging software server acts as a bridge, proactively sending this structurally complete and compliant response to the instant messaging software client that triggered the initial question-and-answer generation request via the corresponding message push interface. This completes a full interaction from "user asking a question" to "system replying" within the user's chat interface. The instant messaging software server can be a backend such as WeChat Work, DingTalk, or a custom IM system; this embodiment of the invention does not impose specific limitations.

[0048] The above method is implemented through a system comprising a business consultation server, a large model interface, an instant messaging client, and an instant messaging server, with the business consultation server acting as the execution end. The instant messaging client receives user input and, when the information representation requires an intelligent response, sends the question to the business consultation server via the instant messaging server. The business consultation server processes the question and invokes the large model interface to generate a response using a large model fine-tuned based on relevant business data. For example, ... Figure 4 The diagram illustrates multi-terminal interaction. In the application scenario of investment advisors, account managers can ask questions by mentioning the investment advisor or Q&A robot in an instant messaging client group. After receiving the message, the instant messaging server forwards the question to the intelligent investment advisor server (business consultation server). The intelligent investment advisor server then converts the question into prompts and calls the large model interface to request the answer.

[0049] By connecting the instant messaging client, instant messaging server, and business consultation server, and by calling the large model interface through the business consultation server, it is possible to integrate the large model while retaining the original work habits (communication through the instant messaging client). This reduces response time while ensuring the accuracy of question answers, thereby improving the efficiency of question and answer generation.

[0050] This invention provides a response generation method based on a large model. In this embodiment, in response to a question-and-answer generation request, the method acquires the question information to be answered; performs intent recognition on the question information, and if the intent recognition result matches the target business and represents a compliance intent, determines at least one target retrieval strategy based on the intent recognition result; constructs prompt words based on the question information and the target retrieval strategy; and inputs the prompt words into a fine-tuned large model to generate response information. This significantly reduces the "illusion" phenomenon and factual errors commonly found in general large models in professional fields, lowering the business risks and compliance costs associated with providing inaccurate or non-compliant information. Simultaneously, through the synergy of intent recognition and multi-strategy retrieval, it can accurately match business needs and knowledge sources while ensuring the professional depth and factual accuracy of the generated answer, thereby greatly improving the accuracy and reliability of question-and-answer generation in professional service scenarios.

[0051] Furthermore, as a response to the above Figure 1 The implementation of the method shown in this invention provides a response generation device based on a large model, such as... Figure 5 As shown, the device includes: The acquisition module 31 is used to obtain the question information to be answered in response to the question and answer generation request; The retrieval strategy determination module 32 is used to perform intent recognition on the query information, and determine at least one target retrieval strategy based on the intent recognition result if the intent recognition result matches the target business and represents a compliance intent. Construction module 33 is used to construct prompt words based on the question information and the target retrieval strategy; The generation module 34 is used to input the prompt words into a large model that has completed fine-tuning training, so as to generate response information through the large model that has completed fine-tuning training.

[0052] Furthermore, the intent recognition result includes at least one of product consultation, in-depth business problem consultation, business object relationship consultation, and real-time data consultation, and the target retrieval strategy includes vector routing, graph database routing, product keyword routing, or interface routing. The retrieval strategy determination module 32 includes: The first determining unit is used to use product keyword routing as a target retrieval strategy when the intent recognition result includes product consultation. The second determining unit is used to use vector routing as a target retrieval strategy when the intent recognition result includes in-depth business question consultation. The third determining unit is used to use graph database routing as the target retrieval strategy when the intent recognition result includes business object relationship consultation. The fourth determining unit is used to use interface routing as a target retrieval strategy when the intent recognition result includes real-time data consultation.

[0053] Furthermore, the building module 33 includes: The first construction unit is used to construct prompt words based on the question information when the target retrieval strategy is vector routing or graph database routing. The second construction unit is used to query the internal product knowledge base based on the keywords in the question information when the target retrieval strategy is product keyword routing, obtain product knowledge fragments, and construct prompt words based on the question information and the product knowledge fragments. The third construction unit is used to, when the target retrieval strategy is interface routing, call the real-time data interface that matches the keywords in the question information, query real-time data through the real-time data interface, and construct prompt words based on the real-time data and the question information.

[0054] Furthermore, the generation module 34 includes: The feature embedding unit is used to embed features into the prompt words to obtain prompt word vectors; The identification unit is used to identify candidate knowledge vectors from the knowledge database whose semantic similarity to the prompt word vector is greater than a preset similarity threshold. The filtering unit is used to predict the relevance of the candidate knowledge vectors through the large model that has completed fine-tuning training, and to reorder the candidate knowledge vectors according to the relevance, so as to filter out the target knowledge vectors according to the reordering order. The generation unit is used to perform information fusion and reasoning on the target knowledge vector through the large model that has completed fine-tuning training, and generate response information.

[0055] Furthermore, in the event that no candidate knowledge vector with a semantic similarity greater than a preset similarity threshold is matched, the device further includes: The fallback response generation module is used to select a preset response template that matches the prompt word from a preset response template library, and generate fallback response information based on the preset response template and the prompt word; The device further includes: The response module is used to add the question-and-answer generation request to the task queue, and at the same time, generate and feed back response information to characterize the response processing.

[0056] Furthermore, the device also includes: The first feedback module is used to return a first preset response information indicating that the response deviates from the target business to the instant messaging software client that triggered the question and answer generation request when the intent recognition result does not match the target business. The anomaly identification module is used to return a second preset reply message to the instant messaging software client that triggered the question-and-answer generation request when the intent identification result indicates a violation intent, and to update the number of abnormal questions asked by the current user, so as to add the user to the question blacklist when the number of abnormal questions exceeds a preset threshold.

[0057] Furthermore, the device also includes: The second feedback module is used to return the reply information to the instant messaging software client that triggered the question-and-answer generation request via the instant messaging software server.

[0058] This invention provides a response generation device based on a large model. In response to a question-and-answer generation request, the device acquires the question information to be answered; performs intent recognition on the question information, and if the intent recognition result matches the target business and represents a compliance intent, determines at least one target retrieval strategy based on the intent recognition result; constructs prompt words based on the question information and the target retrieval strategy; and inputs the prompt words into a fine-tuned large model to generate response information. This significantly reduces the "illusion" phenomenon and factual errors commonly found in general large models in professional fields, lowering the business risks and compliance costs associated with providing inaccurate or non-compliant information. Simultaneously, through the synergy of intent recognition and multi-strategy retrieval, it can accurately match business needs and knowledge sources while ensuring the professional depth and factual accuracy of the generated answer, thereby greatly improving the accuracy and reliability of question-and-answer generation in professional service scenarios.

[0059] According to one embodiment of the present invention, a storage medium is provided, the storage medium storing at least one executable instruction that can execute the response generation method based on a large model in any of the above method embodiments.

[0060] Figure 6 The diagram illustrates the structural composition of a system according to an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the system.

[0061] like Figure 6 As shown, the system may include: a business consultation server 401, a large model interface 402, an instant messaging software client 403, and an instant messaging software server 404. The instant messaging software client 403 is used to receive communication information input by the user and send the communication information to the instant messaging software server 404. The instant messaging software server 404 is used to generate and send a question-and-answer generation request to the business consultation server 401 when the communication information contains a target prefix. The business consultation server 401 is used to perform the operations corresponding to the above-mentioned response generation method based on the large model; The large model interface 402 is used to call the large model that has completed fine-tuning training, so that the large model generates response information based on the prompt words and returns the response information to the instant messaging software server. The instant messaging software server is also used to return the reply information to the instant messaging software client.

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

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

Claims

1. A response generation method based on a large model, characterized in that, The method includes: In response to a question-and-answer generation request, retrieve the question information to be answered; The query information is subjected to intent recognition, and if the intent recognition result matches the target business and represents a compliance intent, at least one target retrieval strategy is determined based on the intent recognition result; Based on the question information and the target retrieval strategy, prompt words are constructed; The prompt words are input into a large model that has undergone fine-tuning training, so that response information can be generated through the large model that has undergone fine-tuning training.

2. The response generation method based on a large model according to claim 1, characterized in that, The intent recognition result includes at least one of product consultation, in-depth business question consultation, business object relationship consultation, and real-time data consultation; the target retrieval strategy includes vector routing, graph database routing, product keyword routing, or interface routing. The determination of at least one target retrieval strategy based on the intent recognition result includes: If the intent recognition result includes product inquiries, product keyword routing will be used as the target retrieval strategy. When the intent recognition result includes in-depth business question consultation, vector routing will be used as the target retrieval strategy; If the intent recognition result includes business object relationship consultation, graph database routing will be used as the target retrieval strategy. When the intent recognition result includes real-time data consultation, interface routing is used as the target retrieval strategy.

3. The response generation method based on a large model according to claim 2, characterized in that, The step of constructing prompt words based on the question information and the target retrieval strategy includes: When the target retrieval strategy is vector routing or graph database routing, prompt words are constructed based on the question information; When the target retrieval strategy is product keyword routing, the internal product knowledge base is queried based on the keywords in the question information to obtain product knowledge fragments, and prompt words are constructed based on the question information and the product knowledge fragments; When the target retrieval strategy is interface routing, the real-time data interface that matches the keywords in the question information is invoked to query real-time data through the real-time data interface, and prompt words are constructed based on the real-time data and the question information.

4. The response generation method based on a large model according to claim 2, characterized in that, When the target retrieval strategy is vector routing or graph database routing, the response information is generated through the large model that has completed fine-tuning training, including: Feature embedding is performed on the prompt words to obtain prompt word vectors; Candidate knowledge vectors with a semantic similarity greater than a preset similarity threshold to the prompt word vectors are identified from the knowledge database; The candidate knowledge vectors are predicted for relevance by the large model that has completed fine-tuning training, and the candidate knowledge vectors are reordered according to the relevance, so as to select the target knowledge vectors based on the reordering order. The large model, after undergoing fine-tuning training, performs information fusion and reasoning on the target knowledge vector to generate response information.

5. The response generation method based on a large model according to claim 1, characterized in that, If no candidate knowledge vector with a semantic similarity greater than a preset similarity threshold is found, the method further includes: Select a preset response template that matches the prompt word from the preset response template library, and generate a fallback response based on the preset response template and the prompt word; Before performing intent recognition on the question information, the method further includes: The question-and-answer generation request is added to the task queue, and at the same time, response information is generated and fed back to characterize the response processing.

6. The response generation method based on a large model according to claim 1, characterized in that, The method further includes: If the intent recognition result does not match the target business, the first preset response information representing the deviation of the response from the target business will be returned to the instant messaging software client that triggered the question and answer generation request; If the intent recognition result indicates a violation intent, the second preset reply information used to indicate the abnormality of the question is returned to the instant messaging software client that triggered the question and answer generation request, and the number of abnormal questions asked by the current user is updated, so that when the number of abnormal questions exceeds a preset threshold for the number of abnormal questions, the user is added to the question blacklist.

7. The response generation method based on a large model according to claim 1, characterized in that, The question-and-answer generation request is triggered based on the target prefix input by the instant messaging software client; After generating response information using the large model that has completed fine-tuning training, the method further includes: The reply information is returned to the instant messaging client that triggered the question-and-answer generation request via the instant messaging server.

8. A response generation device based on a large model, characterized in that, The device is configured in the business consultation service terminal and includes: The acquisition module is used to respond to the question-and-answer generation request and obtain the question information to be answered; The retrieval strategy determination module is used to perform intent recognition on the query information, and determine at least one target retrieval strategy based on the intent recognition result if the intent recognition result matches the target business and represents a compliance intent. The construction module is used to construct prompt words based on the question information and the target retrieval strategy; The generation module is used to input the prompt words into a large model that has completed fine-tuning training, so as to generate response information through the large model that has completed fine-tuning training.

9. A storage medium, characterized in that, The storage medium stores at least one executable instruction that causes the processor to perform the operation corresponding to the response generation method based on the large model as described in any one of claims 1-7.

10. A system, characterized in that, include: Business consulting server, large model interface, instant messaging software client and instant messaging software server; The instant messaging software client is used to receive communication information input by the user and send the communication information to the instant messaging software server. The instant messaging software server is used to generate and send a question-and-answer generation request to the business consultation server when the communication information contains a target prefix. The business consultation service is used to perform the operations corresponding to the response generation method based on the large model as described in any one of claims 1-7; The large model interface is used to call the large model that has completed fine-tuning training, so that the large model generates response information based on the prompt words and returns the response information to the instant messaging software server. The instant messaging software server is also used to return the reply information to the instant messaging software client.