Device and method for configuring question and answer process of knowledge base in combination with large model and knowledge base question and answer system
Through the combination of the component management module, the process configuration module and the process policy execution module, the flexibility and configurability issues of the RAG configuration process are solved, the efficient and accurate configuration of the knowledge base Q&A system is realized, and it adapts to the needs of different fields and provides more Accurate Q&A service.
Patent Information
- Application Number
- CN202410767076.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2024-09-27
AI Technical Summary
The RAG configuration process in the existing knowledge base Q&A system lacks flexibility and configurability, resulting in complex and error-prone configuration, which cannot meet the needs of different fields and application scenarios.
Provide a device and method that combines large models, including component management module, process configuration module and process policy execution module, allowing flexible configuration of RAG processes and improving configuration efficiency and accuracy through basic configuration, custom configuration and dynamic policy configuration. .
It realizes the flexible configuration of RAG process, adapts to the needs of different knowledge bases, simplifies the configuration process, improves the efficiency and accuracy of configuration, and provides more accurate and reliable question and answer services.
Smart Images

Figure CN118708686A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of knowledge question and answer technology, and in particular to a device, method and knowledge base question and answer system for configuring a question and answer process for a knowledge base in combination with a large model. Background Art
[0002] The knowledge-based question-answering system is a technology that combines a large language model (LLM) and a knowledge base to improve the quality and accuracy of the answer of the question-answering system. Currently, the knowledge-based question-answering system uses an artificial intelligence technology framework called RAG (Retrieval-Augmented Generation), which combines neural information retrieval with neural text generation, allowing LLM to obtain factual information from external knowledge bases and improve the accuracy and reliability of answers.
[0003] In the prior art, although RAG has been applied to knowledge base question and answer systems, the process of configuring RAG in the prior art is relatively fixed and lacks flexibility and configurability. Specifically, each step of RAG is usually predefined and cannot be customized and adjusted according to specific needs, which limits the applicability of RAG in different fields and application scenarios; and there is a certain complexity in the configuration of RAG in the knowledge base question and answer system. RAG involves multiple steps, including indexing, retrieval, and content generation, etc. These steps need to be reasonably configured and coordinated to ensure efficient operation and accurate response of the system. The prior art lacks clear process guidance and automated configuration means in the process of RAG configuration, which makes the configuration process cumbersome and error-prone. Therefore, there is a need for a device that simplifies the RAG configuration process to improve the efficiency and accuracy of the configuration. Summary of the invention
[0004] In view of this, the present invention provides a device, method and knowledge base question and answer system for configuring the question and answer process of the knowledge base in combination with a large model. The present invention can flexibly configure the RAG process to meet the needs of different knowledge bases, and provide simplified configuration process guidance and automated configuration means to improve the efficiency and accuracy of the configuration; through the present invention, the knowledge base question and answer system can better utilize the RAG technical framework, provide more accurate and reliable answers, and meet the needs of users.
[0005] A device for configuring a question-answering process for a knowledge base in combination with a large model, comprising a component management module, a process configuration module and a process strategy execution module. The component management module is used to define, store and manage RAG process components. The RAG process includes the steps of data loading, text segmentation, data storage, retrieval and generation, and each step corresponds to multiple components; The process configuration module is used to perform component configuration for each step of the RAG process. The component configuration includes basic configuration, custom configuration and dynamic policy configuration. The basic configuration refers to the default policy to be executed by each step of the RAG process when facing various domain knowledge bases. The custom configuration refers to the custom policy to be executed by each step of the RAG process when facing a specific knowledge base. The dynamic policy configuration refers to the dynamic policy to be executed by each step flexibly selected according to the RAG process parameters. The process strategy execution module is used to retrieve and execute corresponding components from the component management module according to the execution components of each step configured by the process configuration module when executing each step of the RAG process.
[0006] Preferably, the priority of the basic configuration, the custom configuration and the dynamic policy configuration is: custom configuration>dynamic policy configuration>basic configuration.
[0007] Preferably, in the basic configuration, each step of the RAG process is configured with an execution component by default.
[0008] Preferably, in the custom configuration, each step of the RAG process is manually configured with an execution component according to the characteristics of the specific knowledge base.
[0009] Preferably, in the dynamic policy configuration, one or more steps of the RAG process are defined with their policy selection functions, and the execution components required for the execution of the corresponding steps are determined according to the policy selection functions.
[0010] Preferably, in the component management module, the data loading step corresponds to a pdf loading component, a word loading component, an xlsx loading component, a csv loading component, and a json loading component according to the file or document type; The text segmentation steps correspond to the character segmentation component, word segmentation component, sentence segmentation component, paragraph segmentation component, and article chapter segmentation component according to the document format; The data storage step includes components for storing Elasticsearch database, storing MySQL database, and storing vector database according to the data storage type; The retrieval step corresponds to a cosine similarity recall component according to the retrieval method; The generation steps correspond to the Caozhi big model answer generation component, openai big model answer generation component, chaglm3 big model answer generation component, and Baichuan big model answer generation component according to the big model type.
[0011] Preferably, the component management module can also add, modify and delete the components stored therein.
[0012] A method for configuring a question-answering process for a knowledge base in combination with a large model specifically comprises the following steps: S1, define RAG process components and store them in the component management module, which can add, modify or delete components; S2, configure the components of each step of the RAG process respectively. The component configuration includes basic configuration, custom configuration and dynamic policy configuration. The basic configuration refers to the default policy that each step of the RAG process needs to execute when facing various domain knowledge bases. The custom configuration refers to the custom policy that each step of the RAG process needs to execute when facing a specific knowledge base. The dynamic policy configuration refers to the dynamic policy that each step needs to execute flexibly according to the RAG process parameters. S3, execute each step of the RAG process in sequence, and when executing each step, retrieve and execute the corresponding component from the component management module according to the execution component of each step configured by the process configuration module.
[0013] A knowledge base question-answering system uses the method to perform question-answering.
[0014] The beneficial effects of the present invention are: The present invention can flexibly configure the RAG process to adapt to the needs of different knowledge bases, and provide simplified configuration process guidance and automated configuration methods to improve configuration efficiency and accuracy; through the present invention, the knowledge base question and answer system can better utilize the RAG technical framework, provide more accurate and reliable answers, and meet user needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 It is a schematic diagram of RAG process.
[0017] Figure 2 This is a diagram of the question-and-answer process configuration. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is described below by the specific embodiments shown in the accompanying drawings. However, it should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.
[0019] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0020] In order to better understand the technical solution of the present invention, the present invention is described in detail below with reference to the accompanying drawings.
[0021] The present invention provides a device and method for configuring the question-and-answer process of a knowledge base in combination with a large model. The present invention can flexibly configure the RAG process to meet the needs of different knowledge bases, and provide simplified configuration process guidance and automated configuration means to improve the efficiency and accuracy of the configuration. Through the device and method of the present invention, the knowledge base question-and-answer system can better utilize the RAG technical framework, provide more accurate and reliable answers, and meet the needs of users.
[0022] Knowledge base: The RAG process runs on a knowledge base, including knowledge base construction and retrieval.
[0023] A knowledge base is an organized and stored information repository used to collect, organize and manage knowledge and information in a specific field or subject.
[0024] A knowledge base can contain various different types of information, such as text documents, database records, images, audio and video files, etc. This information can be organized according to a specific structure for efficient storage and retrieval.
[0025] The purpose of a knowledge base is to facilitate users to obtain the information they need and to support decision-making and problem solving in specific tasks or fields.
[0026] A large model refers to a deep learning or machine learning model with a large number of parameters that can be automatically adjusted through the training process to capture complex relationships in the input data. Such models usually have a deeper network structure and more neurons to increase the model's representation and learning capabilities.
[0027] RAG — Retrieval Augmented Generation. RAG operates through a series of well-defined steps: first, receiving and processing user input; then analyzing user input to understand its meaning and intent; using a retrieval-based approach to access external knowledge sources, using the retrieved external knowledge to enhance understanding and enrich the understanding of user queries; using generation capabilities to formulate responses to ensure that the replies are accurate, contextually relevant, and coherent; finally, combining all the information collected to effectively convert user queries into responses. Therefore, the RAG process includes five steps, namely data loading, text segmentation, data storage, retrieval, and generation.
[0028] The present invention provides a device for configuring a question-answering process for a knowledge base in combination with a large model, comprising a component management module, a process configuration module and a process strategy execution module.
[0029] The component management module is used to define, store and manage RAG process components. Users can define, store, add, modify and delete RAG process components through the component management module. RAG process components include data loading components, text segmentation components, data storage components, retrieval components and generation components. There are multiple types of data loading components, text segmentation components, data storage components, retrieval components and generation components, that is, each step of the RAG process corresponds to multiple components.
[0030] Specifically, the components corresponding to the "data loading" step include, but are not limited to, pdf loading component, word loading component, xlsx loading component, csv loading component, and json loading component according to the file or document type; The components corresponding to the "text segmentation" step include, but are not limited to, character segmentation components, word segmentation components, sentence segmentation components, paragraph segmentation components, and article chapter segmentation components according to the document format; The components corresponding to the "Data Storage" step include but are not limited to components for storing Elasticsearch databases, storing MySQL databases, and storing vector databases according to the data storage type; The components corresponding to the “retrieval” step include, but are not limited to, cosine similarity recall components according to the retrieval method; The components corresponding to the "Generate" step include but are not limited to the Caozhi big model answer generation component, the openai big model answer generation component, the chaglm3 big model answer generation component, and the Baichuan big model answer generation component according to the big model type.
[0031] All of the above components are stored in the component management module, and users can add, modify, delete, and other operations on these components through the component management module.
[0032] The process configuration module is used to perform component configuration for each step of the RAG process, that is, to configure the execution components required for the execution of each step for each step of the RAG process.
[0033] The process configuration module has three component configuration modes, namely basic configuration, custom configuration and dynamic policy configuration. The priority of basic configuration, custom configuration and dynamic policy configuration is: custom configuration > dynamic policy configuration > basic configuration.
[0034] The scope of application of basic configuration is general scenarios and is suitable for most open fields. Basic configuration refers to the default strategy that each step of the RAG process needs to execute when facing each field knowledge base, that is, a set of default RAG process components are built-in (generally not modified or modified less). Each process step of RAG corresponds to its own default execution component. The default execution component corresponding to each process step is one of all the corresponding components stored in the component management module. Administrators can modify one or more default execution components according to actual needs and configure component parameters according to specific needs.
[0035] For example, the data loading component can be set to PDF loading by default, the text segmentation component can be set to segment by word count by default, the data storage component can be set to use BERT to encode text blocks and store them in the milvus vector database by default, the retrieval component can be set to use cosine similarity to recall the list of related text blocks by default, and the generation component can be set to use the Cao Zhi model to generate answers by default. Administrators can also change these default execution components to other components according to actual needs.
[0036] The scope of application of custom configuration is specific scenarios, specific fields or specific data, and has certain limitations. Custom configuration refers to the custom strategy that each step of the RAG process needs to execute when facing a specific knowledge base. Custom configuration is manually configured and is affected by people, so it has the highest priority. Users can manually customize the various execution components of the RAG process according to the characteristics of a specific knowledge base.
[0037] A specific knowledge base refers to a certain field or a certain type of data with obvious characteristics, such as institutional field data. The vast majority of data in this field are PDF documents, and the document content structure is mostly "chapter, item, and paragraph". Therefore, for this type of data, the data loading component can be set to PDF loading, and the text segmentation component can be set to segment according to "chapter, item, and paragraph", such as [Chapter 1 xxx Section 1 xxx Article 1 xxxxxxxxx], [Chapter 1 xxx Section 1 xxx Article 2 xxxxxxxxx].
[0038] Users can choose to configure appropriate data loading components and text segmentation components to replace the original execution components configured in the module, and configure component parameters according to specific needs. This provides users with flexible control over the RAG process, so that the knowledge base question-answering system can better adapt to the needs of different knowledge bases. The custom execution component corresponding to each process step is one of all the corresponding components stored in the component management module.
[0039] Dynamic policy configuration refers to the flexible selection of dynamic policies to be executed at each step according to RAG process parameters. Dynamic policy configuration dynamically selects the execution components required for each step according to RAG process parameters. The execution component dynamically configured for each process step is one of all the corresponding components stored in the component management module.
[0040] Since dynamic policy configuration dynamically selects execution components based on RAG process parameters, the execution components it selects are more accurate than basic configuration. Basic configuration is the basic configuration for RAG operation, so it has the lowest priority.
[0041] There are many RAG process parameters. The following are the more important parameters and their corresponding descriptions: user_id (user id), warehouse_id (knowledge base id), warehouse_name (knowledge base name), file_id (file id), file_path (file path), file_type (file type), encode_name (encoding model), use_small_chunk (whether to split and open small fragments), use_summary (whether to generate summaries), use_hypothetical_question (whether to generate questions based on paragraphs), use_keyword (whether to extract keywords), chunk_size (maximum length of text slices), chunk_overlap (the number of characters overlapping between slice fragments). )、embedding_batch_size(request encoding batch size), recall_num(recall number), match_threshold(matching threshold), llm_model(big model name), prompt(prompt for the big model), is_sensitive_word_detection_enabled(whether to turn on sensitive word detection), temperature(temperature parameter), max_retries(maximum number of retries during generation), max_tokens(maximum number of words generated), max_input_size(maximum number of input words), repetition_penalty(penalty for repeated tokens), etc.
[0042] Dynamic policy configuration is applicable to more complex scenarios. It is necessary to dynamically select what policy to execute for a certain process based on the RAG process parameters, such as loading files of various formats, segmenting documents of different formats (segmentation by word count, segmentation by article chapters), selecting middleware for storage of different data types (images can be stored in vector databases, texts can be stored in Elasticsearch, MySQL, or vector databases), and other situations that require dynamic selection.
[0043] In the dynamic policy configuration, a policy selection function is defined for one or more steps of the RAG process. The execution components required for the execution of the corresponding steps are determined according to the policy selection function, so that the RAG process can adapt to complex knowledge base situations and improve the applicability and flexibility of the system. For example, when loading data, pdf, word, xlsx, csv, json and other files are often encountered. Each file has a different reading method. The policy selection function of the dynamic policy configuration is configured. The policy selection function can select the appropriate data loading component according to the input file type.
[0044] The specific implementation process of dynamic policy configuration to dynamically select execution components based on RAG process parameters is: First, define a strategy selection function for one or more steps of the RAG process. For example, if there are many and complex document types in a general field, define a data loading strategy selection function that can select data loading components based on file suffixes to load different types of files; when segmenting text, define a segmentation strategy selection function to select text segmentation components based on document type or document content; for example, table documents need to be segmented into many sub-tables with the same header, and documents with clear content structure need to be segmented based on document content structure, etc. Then, the strategy selection function defined in the relevant process configuration of the process configuration module, such as the "segmentation strategy selection function", needs to be configured in the process step of "text segmentation"; Finally, the process strategy execution module takes out the policy selection function configured for each process step, passes the context parameters generated during the execution of the process step to the corresponding policy selection function, and then the policy selection function selects the appropriate execution component and informs the process strategy execution module of the selected execution component.
[0045] Since the above-mentioned process configuration module can perform three component configurations (basic configuration, custom configuration and dynamic policy configuration), in actual use, one, two or three component configuration methods can be selected according to the actual situation. When executing each step of the RAG process, each step will call the corresponding component according to its corresponding component configuration method. For example, if the user only performs basic configuration in the process configuration module, the default execution component corresponding to each step will be called when executing each step of the RAG process; if the user only performs custom configuration in the process configuration module, the custom execution component corresponding to each step will be called when executing each step of the RAG process; if the user only performs dynamic policy configuration in the process configuration module, the corresponding execution component will be called according to the dynamic policy selection function corresponding to each step when executing each step of the RAG process; but if the user performs basic configuration and custom configuration in the process configuration module, then when executing each step of the RAG process, the corresponding component will be called according to the configuration method and configuration content configured for each step. For example, if a custom execution component is configured for the "data loading" step, and basic configuration is performed for the other steps, then the custom execution component will be called when executing the "data loading" step, and the default execution component will be called when executing other steps.
[0046] The process strategy execution module is used to retrieve and execute corresponding components from the component management module according to the execution components of each step configured by the process configuration module when executing each step of the RAG process.
[0047] The process strategy execution module is responsible for executing the RAG process, which is divided into the construction phase and the question-answering phase. The construction phase is responsible for initializing the knowledge base, including data loading, text segmentation, data storage and other steps. The question-answering phase is responsible for performing the retrieval and generation operations of the RAG process based on user queries. Both phases use the configuration information in the configuration management module to build the components in the RAG process and execute the corresponding components to achieve the results of the process nodes.
[0048] The present invention also provides a method for configuring a question-answering process for a knowledge base in combination with a large model, which specifically includes the following steps: S1, define RAG process components and store them in the component management module, which can add, modify or delete components; S2, configure the components of each step of the RAG process respectively. The component configuration includes basic configuration, custom configuration and dynamic policy configuration. The basic configuration refers to the default policy that each step of the RAG process needs to execute when facing various domain knowledge bases. The custom configuration refers to the custom policy that each step of the RAG process needs to execute when facing a specific knowledge base. The dynamic policy configuration refers to the dynamic policy that each step needs to execute flexibly according to the RAG process parameters. S3, execute each step of the RAG process in sequence, and when executing each step, retrieve and execute the corresponding component from the component management module according to the execution component of each step configured by the process configuration module.
[0049] The following takes the question-and-answer scenario of the rules and regulations knowledge base as an example to specifically illustrate the specific implementation mode of the present invention.
[0050] In the question-and-answer scenario of the rules and regulations knowledge base, most of the rules and regulations documents are in PDF format.
[0051] Embodiment 1: In this embodiment, the specific process of configuring the question-answering process for the knowledge base in combination with the large model is as follows: First, create and store all the components mentioned above in the component management module, such as data loading components such as pdf, word, xlsx, csv, json, segmentation components such as characters, words, sentences, paragraphs, and article chapters, Elasticsearch, MySQL database, vector database components, cosine similarity recall components, Caozhi big model, openai big model, chaglm3 big model, Baichuan big model and other answer generation components; Then, use the basic configuration to assign default execution components to each step of the RAG process, namely: data loading component, which defaults to pdf loader; Text segmentation component, the default is word segmentation component; The data storage component is encoded and stored in the milvus vector database by default, and the encoding is bert; Retrieval component, by default, uses cosine similarity to recall a list of related text blocks; Generate components, the default is to use Cao Zhi's large model question and answer; Finally, the steps of the RAG process are executed in sequence. When loading files, since the data loading component configured by the process configuration module is the PDF loader, the process strategy execution module calls the PDF loader from the component management module and executes it to read the loaded file. Then, the loaded file is segmented. The process strategy execution module calls the word segmentation component from the component management module. By default, the document is segmented by the number of words (such as a document segmentation strategy in which the maximum length of the segmented text block is 500 and each block directly allows 100 overlapping characters). Bert is used to encode the segmented text blocks and store them in the default milvus vector database. Then, according to the questions raised by the user, the input questions are encoded and retrieved from the vector database. For example, BERT is used to encode questions by default, and the cosine similarity is used by default to recall the list of related text blocks. The parameter recalls 30, and the filter similarity is less than 0.85, and the top 5 text blocks are selected. Finally, the question and the recalled text block list are input to the Cao Zhi model, and the Cao Zhi model gives the final answer.
[0052] Embodiment 2: In this embodiment, the specific process of configuring the question-answering process for the knowledge base in combination with the large model is as follows: First, all the above-mentioned components are established and stored in the component management module (same as in the first embodiment); Then, use the basic configuration + dynamic strategy configuration method to assign execution components to each step of the RAG process. Perform dynamic strategy configuration for the "data loading" step and perform basic configuration for other steps. For the data loading component, use the configuration file to read the strategy selection function, and read the data loading strategy (pdf, word or txt, etc.) given by the strategy selection function; Text segmentation component, the default is word segmentation component; The data storage component is encoded and stored in the milvus vector database by default, and the encoding is bert; Retrieval component, by default, uses cosine similarity to recall a list of related text blocks; Generate components, the default is to use Cao Zhi's large model question and answer; Finally, the steps of the RAG process are executed in sequence. When loading a file, the process strategy execution module retrieves the data loading component given by the strategy selection function from the component management module and executes it to read the loaded file. Then, the loaded file is segmented. The process strategy execution module retrieves the word segmentation component from the component management module. By default, the document is segmented by the number of words (such as a document segmentation strategy in which the maximum length of the segmented text block is 500 and each block directly allows 100 overlapping characters). Bert is used to encode the segmented text blocks and store them in the default milvus vector database. Then, according to the question raised by the user, the input question is encoded and retrieved from the vector database. For example, BERT is used to encode the question by default, and the cosine similarity is used by default to recall the list of related text blocks. The parameter recalls 30, and the filter similarity is less than 0.85, and the top 5 text blocks are selected. Finally, the question and the recalled text block list are input to the Cao Zhi model, and the Cao Zhi model gives the final answer.
[0053] Embodiment 3: In this embodiment, the specific process of configuring the question-answering process for the knowledge base in combination with the large model is as follows: First, all the above-mentioned components are established and stored in the component management module (same as in the first embodiment); Then, use the hybrid configuration method to assign execution components to each step of the RAG process. The "data loading" step is configured with dynamic strategies, the "text segmentation" step is configured with custom configuration, and the other steps are configured with basic configuration. For the data loading component, use the configuration file to read the strategy selection function, and read the data loading strategy (pdf, word or txt, etc.) given by the strategy selection function; Text segmentation component, using the customized "chapter, paragraph" segmentation component; The data storage component is encoded and stored in the milvus vector database by default, and the encoding is bert; Retrieval component, by default, uses cosine similarity to recall a list of related text blocks; Generate components, the default is to use Cao Zhi's large model question and answer; Finally, execute each step of the RAG process in sequence. When loading a file, the process strategy execution module calls the data loading component given by the strategy selection function from the component management module and executes it to read the loaded file; then, segment the loaded file, and the process strategy execution module calls the custom "chapter, strip, and paragraph" segmentation component from the component management module to segment the document according to chapters and paragraphs; use BERT to encode the segmented text blocks and store them in the default milvus vector database; then, according to the question raised by the user, encode the input question and retrieve it from the vector database, such as using BERT to encode the question by default, and using cosine similarity to recall the list of related text blocks by default, with a parameter recall of 30, filtering similarity less than 0.85, and selecting the top 5 text blocks; finally, input the question and the recalled text block list into the Cao Zhi model, and the Cao Zhi model gives the final answer.
[0054] It should be clear that the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
Claims
1. A device for configuring a question-answering process for a knowledge base in combination with a large model, It is characterized in that Including component management module, process configuration module and process strategy execution module, The component management module is used to define, store and manage RAG process components. The RAG process includes the steps of data loading, text segmentation, data storage, retrieval and generation, and each step corresponds to multiple components; The process configuration module is used to perform component configuration for each step of the RAG process. The component configuration includes basic configuration, custom configuration and dynamic policy configuration. The basic configuration refers to the default policy to be executed by each step of the RAG process when facing various domain knowledge bases. The custom configuration refers to the custom policy to be executed by each step of the RAG process when facing a specific knowledge base. The dynamic policy configuration refers to the dynamic policy to be executed by each step flexibly selected according to the RAG process parameters. The process strategy execution module is used to retrieve and execute corresponding components from the component management module according to the execution components of each step configured by the process configuration module when executing each step of the RAG process.
2. The device for configuring a question-answering process for a knowledge base in combination with a large model according to claim 1, It is characterized in that The priority of the basic configuration, custom configuration and dynamic policy configuration is: custom configuration>dynamic policy configuration>basic configuration.
3. The device for configuring a question-answering process for a knowledge base in combination with a large model according to claim 1, It is characterized in that In the basic configuration, each step of the RAG process is configured with an execution component by default.
4. The device for configuring a question-answering process for a knowledge base in combination with a large model according to claim 1, It is characterized in that In the custom configuration, each step of the RAG process is manually configured with an execution component according to the characteristics of the specific knowledge base.
5. The device for configuring a question-answering process for a knowledge base in combination with a large model according to claim 1, It is characterized in that In the dynamic policy configuration, one or more steps of the RAG process are defined with their policy selection functions, and the execution components required for the execution of the corresponding steps are determined according to the policy selection functions.
6. The device for configuring a question-answering process for a knowledge base in combination with a large model according to claim 1, It is characterized in that In the component management module, the data loading step corresponds to a pdf loading component, a word loading component, an xlsx loading component, a csv loading component, and a json loading component according to the file or document type; The text segmentation steps correspond to the character segmentation component, word segmentation component, sentence segmentation component, paragraph segmentation component, and article chapter segmentation component according to the document format; The data storage step includes components for storing Elasticsearch database, storing MySQL database, and storing vector database according to the data storage type; The retrieval step corresponds to a cosine similarity recall component according to the retrieval method; The generation steps correspond to the Caozhi big model answer generation component, openai big model answer generation component, chaglm3 big model answer generation component, and Baichuan big model answer generation component according to the big model type.
7. The device for configuring a question-answering process for a knowledge base in combination with a large model according to claim 1, It is characterized in that The component management module can also add, modify, and delete the components stored therein.
8. A method for configuring a question-answering process for a knowledge base in combination with a large model. It is characterized in that The specific steps include: S1, define RAG process components and store them in the component management module, which can add, modify or delete components; S2, configure the components of each step of the RAG process respectively. The component configuration includes basic configuration, custom configuration and dynamic policy configuration. The basic configuration refers to the default policy that each step of the RAG process needs to execute when facing various domain knowledge bases. The custom configuration refers to the custom policy that each step of the RAG process needs to execute when facing a specific knowledge base. The dynamic policy configuration refers to the dynamic policy that each step needs to execute flexibly according to the RAG process parameters. S3, execute each step of the RAG process in sequence, and when executing each step, retrieve and execute the corresponding component from the component management module according to the execution component of each step configured by the process configuration module.
9. A knowledge base question answering system, It is characterized in that Question and answer are conducted using the method described in claim 8.
Citation Information
Patent Citations
Water conservancy knowledge base question and answer method, system and device
CN117609473A
Search question-answering system and method based on large model and electronic equipment
CN117708274A
Large language model reasoning method and system based on multi-level knowledge retrieval enhancement
CN118036753A
Multi-source hybrid question answering method and system thereof
KR101662450B1
Conversational knowledge base
US20240070434A1
Cited By
Knowledge retrieval method and device based on large model middleware and medium
CN119577114A
Agentic workflow-based scientific research team information question and answer agent construction method
CN121766450A
Methods and apparatus for document parsing for retrieval-augmented generation
WO2026157013A1
