Intelligent table filling system and method based on LLM and local knowledge base
The intelligent table filling system based on LLM and local knowledge base solves the problems of low efficiency, poor security and high cost in existing table filling technologies, and achieves efficient, secure and low-cost table filling, meeting compliance requirements and improving user experience.
Patent Information
- Application Number
- CN202511255663.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2025-12-16
AI Technical Summary
Existing table filling technologies suffer from inefficiency, error-proneness, high cost, significant data security risks, poor adaptability, and unpleasant user experience, especially when dealing with large-scale sensitive data, making it difficult to meet compliance requirements.
An intelligent form filling system based on LLM and local knowledge base is adopted. Through LLM provider management module, data security assessment module, intelligent filling module and user interface module, it realizes flexible selection of multiple AI models and local priority processing. Combined with intelligent security strategy and context-aware filling algorithm, it ensures data security and processing efficiency.
It achieves efficient and secure form filling, prevents data leakage, meets compliance requirements, improves filling accuracy by 60%, improves processing efficiency by 80%, reduces costs by 50%, and simplifies user experience by 90%.
Smart Images

Figure CN121145819A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent table filling technology, specifically relating to an intelligent table filling system and method based on LLM and local knowledge base. Background Technology
[0002] With the widespread adoption of information technology in office work, form filling has become an important part of daily office work, existing in various fields such as enterprise management, government offices, and academic research. Traditional form filling mainly relies on manual operation, which suffers from problems such as low efficiency, susceptibility to errors, and repetitive work.
[0003] Existing table processing technologies mainly include the following solutions:
[0004] 1. Traditional manual data entry method: The traditional method relies entirely on manual extraction of information from various documents and manual entry into the table. Although this method has relatively high accuracy, it has the following problems: extremely low efficiency, a large amount of repetitive work consumes human resources; prone to human error, especially when processing large amounts of data; unable to handle complex semantic understanding and reasoning tasks; and high cost, especially for large-scale data processing needs.
[0005] 2. Rule-based autofill: Some existing technologies use predefined rules for autofill, extracting information from structured data sources by setting fixed matching rules. However, this approach has significant limitations: it can only handle formatted structured data and cannot understand natural language content; the rule settings are complex, requiring the writing of a large number of rules for different scenarios; it lacks semantic understanding capabilities and cannot handle language variations such as synonyms and near-synonyms; and it has poor adaptability, making it difficult to cope with new data formats and autofill requirements.
[0006] 3. Single AI Model Filling Solution: In recent years, some solutions have begun to use artificial intelligence technology for form filling, but existing technologies typically suffer from the following problems: Limited Model Selection: These solutions are often tied to specific AI service providers, such as only supporting OpenAI GPT or a specific model, lacking flexibility and selectivity; Serious Data Privacy Risks: Existing solutions generally require uploading user data to the cloud for processing, posing a serious risk of data leakage for documents containing sensitive information such as personal privacy, trade secrets, and financial data; Difficulty in Cost Control: The inability to select an appropriate processing mode based on task complexity and data sensitivity leads to excessively high costs or insufficient processing capacity; Compliance Issues: Difficulty in meeting the requirements for localized data processing under regulations such as GDPR and the Cybersecurity Law.
[0007] 4. Core defects of existing technologies: Analysis of existing technologies reveals the following core technical problems: The contradiction between data security and processing power: High-performance AI models typically require cloud processing, but sensitive data cannot leave the local environment; Limitations in model selection: It is impossible to flexibly select the most suitable AI model according to specific needs; The contradiction between user experience and technical complexity: AI technology has a high threshold, making it difficult for ordinary users to use effectively; The problem of balancing cost and benefit: It is impossible to find the optimal balance between processing quality, data security, and usage cost.
[0008] Therefore, there is an urgent need for an intelligent table filling technology solution that can support the flexible selection of multiple AI models and provide a user-friendly interface while ensuring data security. Summary of the Invention
[0009] The purpose of this invention is to provide an intelligent table filling system based on LLM and a local knowledge base to solve the problems mentioned in the background section. The intelligent table filling system based on LLM and a local knowledge base provided by this invention features enhanced data security, improved processing capabilities, optimized cost-effectiveness, and improved user experience.
[0010] Another objective of this invention is to provide an intelligent table filling method for an intelligent table filling system based on LLM and a local knowledge base.
[0011] To achieve the above objectives, the present invention provides the following technical solution: an intelligent table filling system based on LLM and a local knowledge base, comprising: an LLM provider management module for unified management of local LLM services and cloud-based LLM services; a data security assessment module for detecting the sensitivity level of input data and selecting appropriate processing strategies; an intelligent filling module for intelligently filling empty cells in the table based on the content of knowledge documents; and a user interface module for providing a graphical operation interface and performance optimization guidance.
[0012] In this invention, the LLM provider management module further includes: a provider registration unit for registering and configuring different types of LLM providers; a unified interface unit for providing a unified calling interface for different providers; a load balancing unit for distributing load among multiple providers; and a failover unit for automatically switching to a backup provider when the primary provider is unavailable.
[0013] In this invention, the data security assessment module further includes: a sensitive information identification unit for identifying sensitive content, including but not limited to personal identity information, financial data, or trade secrets; a sensitivity scoring unit for quantifying and scoring the detected sensitive information; a processing strategy selection unit for selecting local processing, cloud processing, or hybrid processing modes according to the sensitivity level; and a security policy execution unit for ensuring that the selected security policy is strictly implemented.
[0014] In this invention, the selection rules for the processing strategy selection unit are as follows: when the sensitivity score is higher than the preset high threshold, the local processing mode is selected; when the sensitivity score is between the preset high threshold and the medium threshold, the local priority processing mode is selected; when the sensitivity score is lower than the preset medium threshold, the cloud processing mode is selected.
[0015] In this invention, the intelligent fill module further includes: a table structure analysis unit for automatically identifying the row and column structure, title information, and data type of the table; a knowledge document processing unit for extracting and preprocessing relevant information from the knowledge document; a semantic matching unit for establishing semantic associations between the knowledge document and the table content; a content generation unit for generating appropriate fill content based on contextual information; and a quality assessment unit for evaluating the confidence and accuracy of the fill result.
[0016] In this invention, the semantic matching unit further employs the following steps for matching: extracting contextual information from empty cells, including existing data in the same row and column; searching for content fragments semantically related to the contextual information in the knowledge document; calculating the semantic similarity between the contextual information and the knowledge document fragments; and selecting the knowledge document fragment with the highest semantic similarity as the basis for filling.
[0017] In this invention, the user interface block further includes: a file selection interface for selecting the form file and knowledge document to be filled; a configuration management interface for managing LLM provider configuration and security settings; a progress monitoring interface for displaying the processing progress and detailed logs in real time; a result display interface for displaying the filling results and quality assessment information; and a performance guidance unit for providing users with document selection and performance optimization suggestions.
[0018] In this invention, the guidance rules of the performance guidance unit include: when the number of selected knowledge documents exceeds a preset number threshold, prompting the user to select the most relevant document; when the total size of the knowledge documents exceeds a preset size threshold, warning the user that the processing time may be long; and estimating the processing time based on the document type and quantity and displaying it to the user.
[0019] Furthermore, this invention also includes a configuration management module for securely storing and managing API keys and configuration parameters of each LLM provider; a log recording module for recording system operation logs and security audit information; and a performance monitoring module for monitoring system resource usage and processing performance metrics.
[0020] In this invention, the configuration management module uses the AES-256 encryption algorithm to encrypt and store the API key, and uses a key derivation function based on user identity to generate an encryption key.
[0021] Furthermore, in this invention, the intelligent table filling system based on LLM and local knowledge base supports the processing of the following file formats: table file formats include: Microsoft Word document (.docx), Microsoft Excel worksheet (.xlsx); knowledge document formats include: Word document (.docx), Excel file (.xlsx), PDF document (.pdf), and plain text file (.txt).
[0022] Furthermore, in this invention, the intelligent table filling method of the intelligent table filling system based on LLM and local knowledge base includes the following steps:
[0023] S1: Receive user-uploaded form files and knowledge documents to be filled;
[0024] S2: Based on the user's settings, select the corresponding LLM and intelligently fill the table;
[0025] S3: Evaluate the quality and confidence level of the filling results;
[0026] S4: Generate the filled-in table and processing report;
[0027] In this invention, in S2, the LLM includes local LLM, cloud LLM and intelligent selection mode; wherein, for complex tables that span multiple rows and columns, the local LLM divides the table into several sub-tables by rows, fills them separately and then merges them to form the total table.
[0028] In this invention, the local LLM further includes a reasoning mode and a retrieval mode: the reasoning mode combines the table file to be filled and the knowledge document to perform contextual reasoning and fill the table as required; the retrieval mode retrieves information from the local knowledge base and fills the table; the intelligent selection mode scans the document content using a predefined sensitive information pattern, assigns a weighted score to the detected sensitive information, and determines the sensitivity level as high, medium, or low based on the total score; when the data sensitivity level is high, local LLM is forcibly selected for processing; when the data sensitivity level is medium, local LLM is preferred, and cloud LLM can be selected when local resources are insufficient; when the data sensitivity level is low, the optimal cloud LLM provider is selected based on task complexity and cost considerations; users are also allowed to anonymize knowledge documents before selecting cloud LLM, and if the local LLM processing time exceeds the user-set threshold, it also switches to cloud LLM.
[0029] Furthermore, this invention includes the following security measures: ensuring that all data processing does not involve network transmission under a local LLM; encrypting and storing sensitive configuration information such as API keys; generating detailed processing logs to support security auditing; and providing a data security report after processing is completed.
[0030] Further in this invention, in S2, the method of local LLM inference mode includes the following steps: parsing the table file to be filled and the knowledge document, identifying the table format, and extracting metadata; dividing the table file to be filled into several sub-tables by rows; performing fuzzy matching of the local knowledge base, generating results using LLM inference, and extracting the results; filling the sub-tables respectively; and merging the sub-tables in order.
[0031] Further, the method for local LLM retrieval mode in this invention includes the following steps: converting the table file to be filled and the knowledge document into HTML format; dividing the table file to be filled into several sub-tables by row; performing local knowledge base retrieval, generating results using LLM reasoning, and extracting them; filling the sub-tables respectively; merging the sub-tables in order; and converting the HTML format into table format.
[0032] Further in this invention, in S2, under the cloud-based LLM, if the local knowledge base content is too large, the RAG enhancement mode can be selected. The RAG enhancement mode includes the following steps: generating query vectors based on the table; performing vector retrieval in the local knowledge base, calculating similarity, filtering candidates, and sorting results; dividing the document into blocks, establishing a vector index, determining the relationship graph based on metadata, and reordering the results; constructing prompt words, using LLM to generate the final results, and populating the table.
[0033] Furthermore, in this invention, the intelligent filling process in S6 includes:
[0034] S21: Build context information for each empty cell, including table title, row title, column title, and content of adjacent cells;
[0035] S22: Search for content fragments in the knowledge document that are relevant to the context information;
[0036] S23: Combine contextual information and relevant knowledge fragments into LLM input prompts;
[0037] S24: Invoke the selected LLM to generate the fill content;
[0038] S25: Format and validate the generated content.
[0039] Furthermore, in this invention, the LLM input prompt construction rule in S23 is as follows: first, describe the overall structure and purpose of the table; then, provide the specific location and context information of the empty cells; next, provide relevant information extracted from the knowledge document; and finally, explicitly request the LLM to generate concise and accurate fill content.
[0040] In this invention, the quality assessment in S3 further includes: confidence assessment, calculating a confidence score based on the certainty and contextual matching degree of the LLM output; consistency check, verifying the logical consistency between the filled content and other data in the table; format verification, ensuring that the filled content meets the data type requirements of the target cell; and source tracing, recording the knowledge document source of the filled content for review.
[0041] The technical solution of the present invention also includes the following innovative features:
[0042] 1. Hybrid LLM architecture;
[0043] This invention innovatively designs a local-first hybrid processing architecture:
[0044] For highly sensitive data, the local LLM model is enforced to ensure that the data does not leave the user's environment;
[0045] For moderately sensitive data, local models should be used first, and cloud processing can be selected when local resources are insufficient;
[0046] For low-sensitivity data, high-performance cloud models can be used to achieve better processing results.
[0047] 2. Intelligent security strategy selection algorithm;
[0048] Algorithm flow:
[0049] Input: Document content
[0050] Output: Security handling strategy
[0051] (1) Initialize sensitivity score Score = 0
[0052] (2) Traverse the predefined sensitive information pattern_List:
[0053] For each Pattern in Pattern_List:
[0054] If Content matches Pattern:
[0055] Score + = Pattern.Weight
[0056] (3) Determine the sensitivity level based on the score:
[0057] If Score >= HIGH_THRESHOLD:
[0058] Level = "HIGH"
[0059] Else If Score>=MEDIUM_THRESHOLD:
[0060] Level = "MEDIUM"
[0061] Else:
[0062] Level = "LOW"
[0063] (4) Select the processing strategy based on the Level:
[0064] If Level == "HIGH":
[0065] Strategy="LOCAL_ONLY"
[0066] Else If Level == "MEDIUM":
[0067] Strategy="LOCAL_PREFERRED"
[0068] Else:
[0069] Strategy="CLOUD_ALLOWED"
[0070] (5) Return to Strategy;
[0071] (6) Context-aware fill algorithm:
[0072] This invention designs an intelligent fill algorithm based on context understanding;
[0073] Analyze the overall structure of the table and understand the logical relationships between rows and columns;
[0074] Extract the context information of each empty cell, including existing data in the same row and column; search for context-related information fragments in the knowledge document;
[0075] Use an LLM model to generate populated content based on context and relevant information;
[0076] The generated results are evaluated for confidence, and only results with high confidence are adopted.
[0077] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an intelligent table filling method for an intelligent table filling system based on LLM and a local knowledge base.
[0078] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements an intelligent table filling method for an intelligent table filling system based on LLM and a local knowledge base.
[0079] Compared with the prior art, the beneficial effects of the present invention are:
[0080] 1. Data security assurance, including zero risk of leakage: Sensitive data can be processed entirely in the local environment without being transmitted over the network, fundamentally eliminating the risk of data leakage; Compliance assurance: Meets the requirements of GDPR and the Cybersecurity Law for localized data processing; Enterprise-level security: Supports application scenarios with strict data security requirements, such as those of government agencies and financial institutions.
[0081] 2. Enhanced processing capabilities, including a 60% increase in fill accuracy: Compared to traditional rule-based methods, AI semantic understanding significantly improves accuracy; an 80% increase in processing efficiency: Compared to purely manual operation, automated processing greatly improves work efficiency; and enhanced adaptability: It can handle unstructured documents of various formats, with adaptability far exceeding that of traditional methods.
[0082] 3. Cost-effectiveness optimization, including a 50% cost reduction: Optimize usage costs while ensuring processing quality through intelligent model selection; Improved resource utilization: Maximize resource utilization efficiency through reasonable allocation of local and cloud resources; Reduced maintenance costs: Reduced complexity of system maintenance through a unified management interface.
[0083] 4. Improved user experience, including 90% simplified operation: from complex technical configuration to intuitive graphical interface operation; reduced learning cost: intelligent operation guidance and performance suggestions lower the learning threshold for users; wide applicability: supports multiple file formats and application scenarios to meet the needs of different users. Attached Figure Description
[0084] Figure 1 This is a block diagram of the method of the present invention.
[0085] Figure 2 This is a block diagram of the method for the local LLM inference mode of the present invention.
[0086] Figure 3 This is a block diagram of the method for the local LLM retrieval mode of the present invention.
[0087] Figure 4 This is a block diagram of the RAG enhancement mode method of the present invention.
[0088] Figure 5 This is a flowchart illustrating the intelligent filling process of the present invention. Detailed Implementation
[0089] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0090] Example 1
[0091] Enterprise human resources data processing scenarios;
[0092] A company's HR department needs to process personnel forms containing sensitive information such as employee names, ID numbers, and salaries.
[0093] Step 1: System Initialization
[0094] When a user starts the TableFiller system, the system automatically loads the configuration file and initializes the various modules:
[0095] #System initialization code example
[0096] class TableFillerSystem:
[0097] def__init__(self):
[0098] self.llm_manager=LLMProviderManager()
[0099] self.security_manager=DataSecurityManager()
[0100] self.filling_engine=IntelligentFillingEngine()
[0101] self.ui_manager=UserInterfaceManager()
[0102] def initialize(self):
[0103] #Load LLM provider configuration
[0104] self.llm_manager.load_providers_config()
[0105] #Initialize security policy
[0106] self.security_manager.load_security_policies()
[0107] #Start User Interface
[0108] self.ui_manager.start_gui()
[0109] Step 2: Document Selection and Security Assessment
[0110] Users select personnel form files and related HR documents to be filled through the GUI interface. The system automatically performs a security assessment of the document content.
[0111]
[0112]
[0113] Step 3: Selecting an LLM Provider
[0114] Based on the security assessment results, the system automatically selects a suitable LLM provider. Due to the detection of highly sensitive data, the system selects the local Ollama model.
[0115] def select_llm_provider(self,security_assessment):
[0116] "Choosing an LLM Provider"
[0117] strategy=security_assessment['processing_strategy']
[0118] if strategy=="LOCAL_ONLY":
[0119] #Force use of local model
[0120] if self.llm_manager.is_local_available():
[0121] return self.llm_manager.get_provider('ollama')
[0122] else:
[0123] Raise an exception ("Local model unavailable; unable to handle highly sensitive data").
[0124] #Local preferred, cloud as backup
[0125] if self.llm_manager.is_local_available():
[0126] return self.llm_manager.get_provider('ollama')
[0127] else:
[0128] return self.llm_manager.get_best_cloud_provider()
[0129] else:#CLOUD_ALLOWED
[0130] #Choose the best cloud provider
[0131] return self.llm_manager.get_best_cloud_provider()
[0132] Step 4: Table Structure Analysis
[0133] The system analyzes the structure of personnel forms and identifies column headers and data types:
[0134]
[0135]
[0136] Step 5: Smart Fill Execution
[0137] For each empty cell, the system intelligently fills it in based on contextual information and knowledge documents:
[0138]
[0139]
[0140] Step 6: Output and Verification of Results
[0141] The system generates a filled table and provides a detailed report:
[0142]
[0143]
[0144] Example 2
[0145] Academic research data processing scenario: Researchers need to extract data from multiple academic papers to fill in research summary tables.
[0146] Step 1: Document Preprocessing
[0147] The system preprocesses academic papers in PDF format to extract text content:
[0148]
[0149]
[0150] Step 2: Cloud Processing Strategy
[0151] Since academic data typically does not involve personal privacy, the system chooses a high-performance model in the cloud:
[0152] def select_academic_processing_strategy(self,documents):
[0153] """Choosing a Processing Strategy for Academic Documents""
[0154] #Academic documents are generally less sensitive
[0155] security_assessment=self.assess_document_security(documents)
[0156] if security_assessment['security_level']=='LOW':
[0157] #Choose the best cloud model for better understanding.
[0158] return self.llm_manager.get_provider('openai') # or other high-performance models
[0159] else:
[0160] return self.llm_manager.get_provider('ollama')
[0161] Example 3
[0162] Offline processing scenarios for government agencies
[0163] Government agencies process forms containing citizens' information in isolated network environments.
[0164] Step 1: Offline Deployment
[0165] The system is deployed in a completely offline environment, with all processing done locally:
[0166] def offline_deployment_setup(self):
[0167] Offline Deployment Settings
[0168] # Ensure that only local models are enabled.
[0169] self.llm_manager.disable_all_remote_providers()
[0170] #Verify local model availability
[0171] if not self.llm_manager.is_local_model_ready():
[0172] Raise an exception ("Local model is not ready; offline processing is not possible")
[0173] #Set strict security policies
[0174] self.security_manager.set_policy("OFFLINE_ONLY")
[0175] #Disable network function
[0176] self.network_manager.disable_all_connections()
[0177] Step 2: Audit Log Recording
[0178] The system records detailed operation logs to meet auditing requirements:
[0179]
[0180]
[0181] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An intelligent table filling system based on LLM and a local knowledge base, characterized in that, include: The LLM provider management module is used to uniformly manage local LLM services and cloud-based LLM services. The data security assessment module is used to detect the sensitivity level of input data and select appropriate processing strategies. The intelligent fill module is used to intelligently fill empty cells in a table based on the content of a knowledge document; The user interface module provides a graphical user interface and performance optimization guidance.
2. The intelligent table filling system based on LLM and local knowledge base according to claim 1, characterized in that: The LLM provider management module includes: The provider registration unit is used to register and configure different types of LLM providers; A unified interface unit is used to provide a unified calling interface for different providers; A load balancing unit is used to distribute load among multiple providers; The failover unit is used to automatically switch to a backup provider when the primary provider is unavailable.
3. The intelligent table filling system based on LLM and local knowledge base according to claim 1, characterized in that: The data security assessment module includes: Sensitive information identification unit, used to identify sensitive content, including but not limited to personal identification information, financial data or trade secrets; Sensitivity scoring unit, used to quantify and score the detected sensitive information; The processing strategy selection unit is used to select local processing, cloud processing, or hybrid processing mode based on the sensitivity level. The security policy enforcement unit is used to ensure that the selected security policy is strictly enforced. The selection rule for the processing strategy selection unit is as follows: When the sensitivity score is higher than the preset high threshold, select the local processing mode only; When the sensitivity score is between the preset high threshold and medium threshold, select the local priority processing mode; When the sensitivity score is lower than the preset threshold, select the cloud processing mode.
4. The intelligent table filling system based on LLM and local knowledge base according to claim 1, characterized in that: The intelligent filling module includes: The table structure analysis unit is used to automatically identify the row and column structure, header information, and data type of a table; The knowledge document processing unit is used to extract and preprocess relevant information from knowledge documents; Semantic matching units are used to establish semantic associations between knowledge documents and table content; The content generation unit is used to generate appropriate fill content based on context information; The quality assessment unit is used to evaluate the confidence and accuracy of the filling results; The semantic matching unit performs matching using the following steps: Extract the context information of empty cells, including existing data in the same row and column; Search for content fragments in knowledge documents that are semantically relevant to the context information; Calculate the semantic similarity between contextual information and knowledge document fragments; The knowledge document fragment with the highest semantic similarity was selected as the basis for filling.
5. The intelligent table filling system based on LLM and local knowledge base according to claim 1, characterized in that: The user interface block includes: The file selection interface is used to select the table file and knowledge document to be filled. The configuration management interface is used to manage LLM provider configurations and security settings; The progress monitoring interface is used to display the processing progress and detailed logs in real time; The results display interface is used to show the fill results and quality assessment information; The performance guidance unit is used to provide users with document selection and performance optimization suggestions; The guidance rules of the performance guidance unit include: When the number of selected knowledge documents exceeds a preset threshold, the user is prompted to select the most relevant document. When the total size of the knowledge documents exceeds the preset size threshold, the user will be warned that the processing time may be long. The processing time is estimated based on the document type and quantity, and then displayed to the user.
6. The intelligent table filling method of an intelligent table filling system based on LLM and local knowledge base according to any one of claims 1-5, characterized in that, Includes the following steps: S1: Receive user-uploaded form files and knowledge documents to be filled; S2: Based on the user's settings, select the corresponding LLM and intelligently fill the table; S3: Evaluate the quality and confidence level of the filling results; S4: Generate the filled-in table and processing report; In S2, LLM includes local LLM, cloud LLM, and smart selection mode; For complex tables that span multiple rows and columns, the local LLM divides the table into several sub-tables by rows, fills each sub-table separately, and then merges them to form the main table. Local LLM includes inference mode and retrieval mode: The reasoning mode combines the table file to be filled and the knowledge document to perform contextual reasoning and fill in the table as required; The search mode searches the local knowledge base and populates the table; The intelligent selection mode scans the document content using a predefined sensitive information pattern, assigns a weighted score to the detected sensitive information, and determines the sensitivity level as one of three levels: high, medium, or low based on the total score. When the data sensitivity level is high, local LLM processing is forced; When the data sensitivity level is medium, local LLM should be preferred; if local resources are insufficient, cloud LLM can be selected. When the data sensitivity level is low, the optimal cloud-based LLM provider should be selected based on the task complexity and cost considerations. It also includes the following security measures: In a local LLM environment, ensure that all data processing does not involve network transmission; Sensitive configuration information such as API keys is stored in encrypted form; Generate detailed processing logs to support security auditing; Provide a data security report after processing is complete.
7. The intelligent table filling method of the intelligent table filling system based on LLM and local knowledge base according to claim 6, characterized in that: The method for the local LLM inference mode in S2 includes the following steps: The system parses the forms and knowledge documents to be filled, identifies the form format, and extracts metadata. Divide the table file to be filled into several sub-tables by row; Perform fuzzy matching on the local knowledge base, generate results using LLM inference, and extract them; Fill in the sub-tables separately; Merge the sub-tables in order; The method for local LLM retrieval patterns includes the following steps: Convert the table file and knowledge document to be filled into HTML format; Divide the table file to be filled into several sub-tables by row; Perform local knowledge base retrieval, generate results using LLM reasoning, and extract them; Fill in the sub-tables separately; Merge the sub-tables in order; Convert HTML format to table format.
8. The intelligent table filling method of the intelligent table filling system based on LLM and local knowledge base according to claim 6, characterized in that: In S2, under the cloud-based LLM, if the local knowledge base content is too large, the RAG enhancement mode can be selected. The RAG enhancement mode includes the following steps: Generate query vectors from the table; Vector retrieval is performed in the local knowledge base, followed by similarity calculation, candidate selection, and result ranking. The document is divided into blocks, a vector index is created, a relationship graph is determined based on metadata, and the results are reordered. Construct prompts, use LLM to generate the final results, and populate the table.
9. The intelligent table filling method of the intelligent table filling system based on LLM and local knowledge base according to claim 6, characterized in that: The intelligent filling process in S2 includes: S21: Build context information for each empty cell, including table title, row title, column title, and content of adjacent cells; S22: Search for content fragments in the knowledge document that are relevant to the context information; S23: Combine contextual information and relevant knowledge fragments into LLM input prompts; S24: Invoke the selected LLM to generate the fill content; S25: Format and validate the generated content; The LLM input prompt construction rule in S23 is as follows: First, describe the overall structure and purpose of the table; Then provide the specific location and context information of the empty cell; Next, relevant information extracted from the knowledge document is provided; Finally, it was explicitly required that LLM generate concise and accurate populated content.
10. The intelligent table filling method of the intelligent table filling system based on LLM and local knowledge base according to claim 6, characterized in that: The quality assessment in S3 includes: Confidence assessment: Confidence scores are calculated based on the certainty and contextual fit of the LLM output. Consistency check verifies the logical consistency between the filled content and other data in the table; Format validation ensures that the filled content conforms to the data type requirements of the target cell; Source tracing: Record the knowledge document sources of the populated content for review purposes.