Dynamic prompt word generation method, device and equipment for complex business document and medium
Patent Information
- Application Number
- CN202611141633.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2046-07-30
AI Technical Summary
[0005]本申请的主要目的在于提供一种复杂业务文档的动态提示词生成方法、装置、设备及介质,旨在解决如何根据复杂业务文档的个性化特征动态生成适配提示词的技术问题
[0016]This application obtains and classifies the core features of complex business documents to generate feature classification labels. It then matches basic prompt word templates from a pre-defined three-level classification prompt word template library. Based on dynamic adjustment rules across four dimensions—language, layout, fields, and business—it performs multi-dimensional personalized adjustments to obtain personalized prompt words. These personalized prompt words are then output to a large language model for information extraction. Based on error samples in the extraction results, it performs reverse optimization of the template library and adjustment rules to obtain an optimized prompt word generation strategy. This strategy is then used to generate target prompt words and iteratively optimize the prompt word generation and information extraction processes in a closed-loop manner. This achieves automatic generation and continuous optimization of personalized prompt words for complex business documents, improves the accuracy of information extraction from the large language model, reduces the time required for prompt word generation, and significantly reduces the cost of manual review.
Smart Images

Figure CN122654231B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and natural language processing, and in particular to a method, apparatus, device, and medium for generating dynamic prompt words for complex business documents. Background Technology
[0002] Current prompt word generation solutions for large-scale document extraction primarily rely on fixed templates, reusing a unified prompt word template across all business documents. A few optimization solutions only support simple adjustments in a single dimension, allowing modification of the prompt word's language type without establishing a systematic generation chain. Existing technologies merely build a simple prompt word template library based on general office documents, lacking a hierarchical and categorized storage mechanism. Furthermore, they lack the logic to adjust prompt words in conjunction with multi-dimensional features such as document layout, tables, seals, and business fields, and have not established a reverse optimization loop based on extracted error samples, making it impossible to automatically iterate and update templates and adjustment rules. In business implementation, prompt words must be manually modified according to industry business rules, and there are no automated correction methods for issues such as missing fields, format errors, and non-compliance in the extraction results.
[0003] The existing practices described above have the following drawbacks: First, the fixed, uniform prompt word templates have extremely poor adaptability, failing to match the diverse layout and text features of complex business documents, such as mixed English and Chinese text, cross-page tables, and stamp obscuring text. This results in a high error rate in large-scale model field extraction, making it difficult to meet industrial-grade standards. Second, there is a lack of a hierarchical, categorized dedicated prompt word template library. There is no multi-feature matching logic for documents, allowing only single-dimensional fine-tuning and failing to achieve accurate correspondence between document features and prompt words, leading to low prompt word generation efficiency. Third, a multi-dimensional linkage adjustment mechanism has not been built, making it impossible to simultaneously adapt documents from four dimensions: language, layout, fields, and business rules. This results in problems such as missing fields, incorrect formatting, and violations of industry standards in the extraction results. Fourth, there is no closed-loop reverse optimization mechanism. Extraction errors cannot be automatically fed back to optimize prompt word templates and adjustment rules, preventing continuous improvement in prompt word generation accuracy and creating a persistent extraction bottleneck. Fifth, vertical domain business rules are not embedded in the prompt word generation process. The output content of large-scale models does not meet the compliance requirements of finance and foreign trade, still requiring extensive manual secondary proofreading, resulting in high labor costs.
[0004] Therefore, how to dynamically generate appropriate prompts based on the personalized characteristics of complex business documents, and how to continuously iterate and optimize the prompt generation strategy based on the feedback of information extraction results, so as to guide the large language model to accurately complete information extraction, has become an urgent problem to be solved. Summary of the Invention
[0005] The main objective of this application is to provide a method, apparatus, device, and medium for generating dynamic prompts for complex business documents, aiming to solve the technical problem of how to dynamically generate adaptive prompts based on the personalized characteristics of complex business documents.
[0006] To achieve the above objectives, this application proposes a method for generating dynamic prompts for complex business documents, including: Obtain the core feature set of complex documents, wherein the core feature set includes document business type, page structure, language type, table format, seal location and core field type; The core feature set of the document is identified and classified to generate feature classification labels; Based on the feature classification labels, the corresponding basic prompt word templates are matched from the preset prompt word template library, wherein the preset prompt word template library is constructed according to a three-level classification method of vertical domain, business type and document features; The basic prompt word template is adjusted in multiple dimensions according to the preset multi-dimensional dynamic adjustment rules to obtain personalized prompt words. The preset multi-dimensional dynamic adjustment rules include language dimension adjustment rules, layout dimension adjustment rules, field dimension adjustment rules and business dimension adjustment rules. The personalized prompt words are output to the large language model, so that the large language model can extract information from complex business documents based on the personalized prompt words and obtain information extraction results. Based on the erroneous samples in the information extraction results, the preset prompt word template library and the preset multi-dimensional dynamic adjustment rules are reverse-optimized to obtain the optimized prompt word generation strategy. Based on the optimized prompt word generation strategy, target prompt words are generated, and these target prompt words are used cyclically for prompt word generation and information extraction in complex business documents to achieve closed-loop iterative optimization.
[0007] In one embodiment, the step of identifying and classifying the core feature set of the document and generating feature classification labels includes: Confidence assessment is performed on each feature item in the core feature set of the complex business document to obtain the confidence value corresponding to each feature item; For feature items whose confidence values are lower than the first preset confidence threshold, feature completion is performed to obtain a complete set of core features of the document. The feature completion includes inferring the layout structure based on the document business type, inferring the table form based on the language type, and inferring the seal position based on the core field type. Multi-feature cross-validation is performed on the completed document core feature set to determine whether there is a logical conflict between each feature item. When a logical conflict exists, the conflicting feature items are prioritized according to a preset feature priority rule to obtain the sorted conflicting feature items. The logical conflicts are resolved by invoking a preset conflict resolution strategy based on the sorted conflict feature items, resulting in a resolved set of core document features. The resolved core feature set of the document is vectorized and encoded to obtain the feature encoding vector; The feature encoding vector is input into a preset classification mapping network to generate feature classification labels.
[0008] In one embodiment, the step of matching the corresponding basic prompt word template from a preset prompt word template library based on the feature classification label includes: The feature classification label is evaluated for label confidence to obtain a label confidence value. When the label confidence value is lower than a second preset confidence threshold, the feature classification label is used as a fuzzy classification label. When the feature classification label is a fuzzy classification label, a document fingerprint feature sequence is generated based on the core field type and seal position in the core feature set of the complex business document; The document fingerprint feature sequence is compared with the historical template matching records in the preset prompt word template library to obtain the similarity ranking result; Based on the similarity ranking results, a preset number of candidate basic prompt word templates are selected from the preset prompt word template library; The candidate basic prompt word templates are evaluated for template applicability to obtain a comprehensive score for each candidate basic prompt word template. The template applicability score includes field coverage score, business rule fit score, and historical extraction accuracy score. The candidate basic prompt word templates are sorted according to the comprehensive score, and the candidate basic prompt word template ranked first is used as the basic prompt word template.
[0009] In one embodiment, the step of performing multi-dimensional personalized adjustments on the basic prompt word template according to preset multi-dimensional dynamic adjustment rules to obtain personalized prompt words includes: The basic prompt word template is parsed to obtain the scene prompt module, field prompt module and business rule prompt module, and the placeholder markers in each module are extracted to obtain the set of placeholders to be filled; Based on the language type and layout structure in the core feature set, an adjustment constraint matrix is constructed, wherein the adjustment constraint matrix is used to constrain the dependency and mutual exclusion relationships between each adjustment dimension; Based on the adjustment constraint matrix and the preset multi-dimensional dynamic adjustment rules, conflict detection is performed. When a conflict in the adjustment rules is detected, conflict processing is performed according to the preset rule priority and the document business type in the core feature set to obtain a set of conflict-free adjustment rules. The placeholder set to be filled is filled one by one according to the set of conflict-free adjustment rules to obtain the filled prompt word template. The one-by-one filling includes filling language style description according to language type, filling layout association prompts according to layout structure, filling field format forced annotation according to core field type, and filling business rule verification logic according to document business type. Perform cross-module consistency verification on the filled prompt word template. When the verification passes, use the filled prompt word template as the personalized prompt word.
[0010] In one embodiment, the step of outputting the personalized prompt words to a large language model, so that the large language model can extract information from complex business documents based on the personalized prompt words and obtain information extraction results, includes: The personalized prompt words are evaluated for compression rate. When the number of characters in the personalized prompt words exceeds a preset character limit threshold, the importance of the fields is graded according to the core field types in the core feature set of the complex business document, and the field importance grading results are obtained. Based on the importance ranking results of the fields, the non-key prompt content in the personalized prompt words is hierarchically trimmed to obtain the trimmed prompt words, wherein the non-key prompt content includes example description paragraphs and redundant scenario descriptions; The cropped prompt words are adapted to the context window of the complex business document to obtain an adapted prompt word input package, wherein the prompt word input package includes a prompt word header, a document content segment, and a prompt word tail. The prompt word input packet is sent to the large language model so that the large language model can extract information from the complex business document based on the prompt word input packet and obtain the initial extraction result; The initial extraction results are then subjected to structured post-processing to obtain the information extraction results.
[0011] In one embodiment, the step of reverse-optimizing the preset prompt word template library and the preset multi-dimensional dynamic adjustment rules based on error samples in the information extraction results to obtain an optimized prompt word generation strategy includes: Error pattern mining is performed on the information extraction results to identify high-frequency error patterns in the error samples, resulting in a set of high-frequency error patterns. The high-frequency error patterns include cross-page table field breakage pattern, mixed Chinese and English field misalignment pattern, stamp obscuring field missing pattern, and business rule violation pattern. Root cause analysis is performed on the set of high-frequency error patterns to determine the root cause of each high-frequency error pattern and obtain the root cause analysis results. The root cause analysis results include the attribution of prompt word template defects, the attribution of adjustment rule deviations, and the attribution of inherent limitations of the large language model. Based on the root cause analysis results, the target high-frequency error patterns that are classified as either prompt word template defects or adjustment rule deviations are selected as the root causes of errors. The error impact of the target high-frequency error pattern is quantitatively evaluated to obtain the error impact value; When the error impact value exceeds the preset impact threshold and the cumulative number of error samples corresponding to the target high-frequency error pattern reaches the preset number of samples, a targeted optimization process is triggered to obtain candidate optimization strategies. The targeted optimization process includes updating the template patch of the corresponding basic prompt word template in the preset prompt word template library according to the error pattern type, and performing gradient fine-tuning of the adjustment parameters of the corresponding dimension in the preset multi-dimensional dynamic adjustment rules. The candidate optimization strategy was backtracked and verified to obtain the improvement value of re-extraction accuracy; When the improvement value of the re-extraction accuracy reaches the preset improvement threshold, the candidate optimization strategy is used as the optimized prompt word generation strategy.
[0012] In one embodiment, the step of generating target prompts based on the optimized prompt generation strategy and cyclically using the target prompts for prompt generation and information extraction in complex business documents to achieve closed-loop iterative optimization includes: The optimized prompt word generation strategy is identified by a strategy version number, and the strategy version number is associated with and stored with the corresponding optimization trigger condition, optimization content summary and optimization timestamp to obtain a strategy version file; Based on the strategy version file, a strategy effect tracking link is constructed to obtain strategy effect tracking data, wherein the strategy effect tracking link is used to record the trend of the extraction accuracy of the same feature classification label under different strategy versions. When the current strategy version in the strategy effect tracking data triggers the strategy rollback condition, the prompt word generation strategy is rolled back to the previous stable version to obtain the rolled-back prompt word generation strategy. The strategy rollback condition includes a continuous preset number of extraction accuracy drops or a single extraction accuracy drop exceeding a preset threshold. When the current strategy version in the strategy effect tracking data does not trigger the strategy rollback condition, a target prompt word is generated based on the current strategy version, and the target prompt word is injected into the prompt word generation pipeline to obtain the pipeline processing result. The pipeline processing results are fed back to the reverse optimization stage to drive the continuous evolution of the strategy and achieve closed-loop iterative optimization.
[0013] Furthermore, to achieve the above objectives, this application also proposes a dynamic prompt word generation device for complex business documents, the dynamic prompt word generation device for complex business documents comprising: The feature acquisition module is used to acquire a set of core features of complex documents, wherein the set of core features includes document business type, page structure, language type, table format, seal location and core field type; The feature recognition module is used to identify and classify the core feature set of the document and generate feature classification labels; The template matching module is used to match the corresponding basic prompt word template from the preset prompt word template library according to the feature classification label, wherein the preset prompt word template library is constructed according to a three-level classification method of vertical domain, business type and document features; The dynamic adjustment module is used to perform multi-dimensional personalized adjustments on the basic prompt word template according to preset multi-dimensional dynamic adjustment rules to obtain personalized prompt words. The preset multi-dimensional dynamic adjustment rules include language dimension adjustment rules, layout dimension adjustment rules, field dimension adjustment rules and business dimension adjustment rules. The prompt word output module is used to output the personalized prompt words to the large language model, so that the large language model can extract information from complex business documents based on the personalized prompt words and obtain information extraction results. The reverse optimization module is used to perform reverse optimization on the preset prompt word template library and the preset multi-dimensional dynamic adjustment rules based on the error samples in the information extraction results, so as to obtain the optimized prompt word generation strategy. The result generation module is used to generate target prompt words based on the optimized prompt word generation strategy, and to repeatedly use the target prompt words for prompt word generation and information extraction of complex business documents to achieve closed-loop iterative optimization.
[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the dynamic prompt word generation method for complex business documents as described above.
[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the dynamic prompt word generation method for complex business documents as described above.
[0016] This application obtains and classifies the core features of complex business documents to generate feature classification labels. It then matches basic prompt word templates from a pre-defined three-level classification prompt word template library. Based on dynamic adjustment rules across four dimensions—language, layout, fields, and business—it performs multi-dimensional personalized adjustments to obtain personalized prompt words. These personalized prompt words are then output to a large language model for information extraction. Based on error samples in the extraction results, it performs reverse optimization of the template library and adjustment rules to obtain an optimized prompt word generation strategy. This strategy is then used to generate target prompt words and iteratively optimize the prompt word generation and information extraction processes in a closed-loop manner. This achieves automatic generation and continuous optimization of personalized prompt words for complex business documents, improves the accuracy of information extraction from the large language model, reduces the time required for prompt word generation, and significantly reduces the cost of manual review. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the first embodiment of the dynamic prompt word generation method for complex business documents in this application; Figure 2 This is a flowchart illustrating the second embodiment of the dynamic prompt word generation method for complex business documents in this application; Figure 3 This is a schematic diagram of the module structure of the dynamic prompt word generation device for complex business documents in this application; Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the dynamic prompt word generation method for complex business documents in this application embodiment.
[0019] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0020] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0021] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0022] In the trade and finance sectors, there are numerous complex business documents containing multi-page tables, mixed Chinese and English text, and obscured seals. The industry relies on large models to extract document information, and the suitability of prompt words directly impacts extraction results. Existing technologies mostly use fixed prompt word templates, supporting only simple single-dimensional modifications. They lack a three-level classification template library and multi-dimensional linkage adjustment logic, and also lack error feedback optimization loops. Such solutions have weak adaptability to various differentiated documents, high extraction error rates, and cannot automatically iterate and optimize prompt words. Extraction results often do not conform to industry business standards, and manual correction costs are high.
[0023] Based on the above, this application also provides a method for generating dynamic prompt words for complex business documents, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the method for generating dynamic prompts for complex business documents according to this application.
[0024] In this embodiment, the method for generating dynamic prompt words for complex business documents includes steps S10 to S70: Step S10: Obtain the set of core features of complex documents.
[0025] It should be noted that complex business documents refer to unstructured or semi-structured documents in fields such as international trade, finance, and government affairs that contain features such as multi-page tables, borderless tables, obscured seals, mixed Chinese and English text, and diverse core fields. Examples include foreign trade contracts, letters of credit, and bank documents. The core feature set of a document refers to the set of feature data used to characterize the personalized attributes of complex business documents, including six features: document business type, layout structure, language type, table format, seal location, and core field type. Document business type refers to the business category to which the complex business document belongs, such as foreign trade contracts, letters of credit, and bank documents. Layout structure refers to the page layout of the complex business document, including single-page tables, multi-page tables, borderless tables, and multi-column layouts. Language type refers to the language used in the complex business document, including purely Chinese, purely English, and mixed Chinese and English text. Table format refers to the structural features of tables in the complex business document, including bordered tables, borderless tables, and multi-page tables. Seal location refers to the distribution area of the seal on the page in the complex business document, including single-page single seal, single-page multiple seals, and multi-page seal. Core field types refer to the categories of key information that need to be extracted from complex business documents, such as total contract price and bank account number.
[0026] Further, step S10 includes: First, sending a feature extraction instruction to the basic document parsing module, so that the basic document parsing module can parse the complex business document and obtain initial document feature data. It should be understood that the basic document parsing module refers to the functional module that parses the complex business document and outputs document feature data, which can be an optical character recognition engine, a layout analysis engine, or a document understanding model. Specifically, the feature extraction instruction contains document identification information and parsing parameter configuration. After receiving the instruction, the basic document parsing module performs layout analysis, text recognition, and structural parsing on the complex business document, outputting initial document feature data containing six core features. The system communicates with the basic document parsing module through an interface protocol, which can be a RESTful API or a message queue.
[0027] Secondly, it receives the initial document feature data returned by the basic document parsing module. Specifically, it listens for interface callbacks or polls the message queue to obtain the initial document feature data returned by the basic document parsing module, performs format validation on the data, and ensures that the data packet structure conforms to the preset interface specifications. The validation includes field integrity, data type matching, and value range rationality.
[0028] Then, feature filtering is performed on the initial document feature data to remove invalid feature items, resulting in a candidate document feature set. It's important to understand that invalid feature items include those missing core field types and those with contradictory feature values. Specifically, feature filtering includes two checks: first, checking if the core field type is null; if so, it's marked as an invalid feature item; second, checking for logical contradictions between feature values, such as a layout structure of "single-page table" but a table format of "split-page table," which is marked as an invalid feature item. After removing invalid feature items, the remaining feature items form the candidate document feature set.
[0029] Finally, the integrity of the candidate document feature set is verified. If the verification passes, the candidate document feature set is output as the core feature set of the complex business document. If the verification fails, a re-extraction instruction is sent to the basic document parsing module, causing the basic document parsing module to re-output the core feature set of the complex business document. Specifically, the integrity verification includes checking whether the candidate document feature set contains all six features and whether each feature value is within the preset value range. After successful verification, the candidate document feature set is output as the core feature set of the complex business document for subsequent feature recognition and classification stages. If the verification fails, a re-extraction instruction is sent to the basic document parsing module. The re-extraction instruction includes a reason identifier for the previous parsing failure. The basic document parsing module adjusts the parsing parameters according to the reason identifier and re-executes the parsing, outputting a new core feature set of the complex business document.
[0030] Step S20: Identify and classify the core feature set of the document, and generate feature classification labels.
[0031] It should be noted that feature classification labels are identifiers generated by combining and mapping multiple features from the document's core feature set based on feature association rules. These labels are used for indexing and locating during subsequent template matching. Feature association rules are a set of rules that establish mapping relationships between feature items in the document's core feature set and template categories in the prompt word template library.
[0032] Further, step S20 includes: First, evaluating the confidence level of each feature item in the core feature set of the complex business document to obtain the confidence level value corresponding to each feature item. Specifically, the confidence level evaluation comprehensively considers three indicators: the first indicator is the original confidence score output by the basic document parsing module, with a value ranging from 0 to 1; the second indicator is the frequency of occurrence of the feature value in the training data, with higher frequencies indicating higher confidence; the third indicator is the logical consistency between the feature item and known high-confidence feature items, with stronger consistency indicating higher confidence. The three indicators are weighted and summed to obtain the confidence level value of each feature item.
[0033] Secondly, feature items with confidence values lower than the first preset confidence threshold are augmented to obtain the augmented core feature set of the document. Specifically, feature augmentation includes three inference rules: the first rule infers the layout structure based on the document's business type, for example, if the document's business type is "letter of credit," the layout structure is inferred to be a "single-page table"; the second rule infers the table format based on the language type, for example, if the language type is "mixed Chinese and English," the table format is inferred to be a "framed table"; the third rule infers the seal location based on the core field type, for example, if the core field type includes "total contract price," the seal location is inferred to be a "single-page single-seal." The augmented feature items are marked as inference source identifiers to distinguish them from the original parsed feature items.
[0034] Next, multi-feature cross-validation is performed on the completed core feature set of the document to determine whether there are logical conflicts between the feature items. When logical conflicts exist, the conflicting feature items are prioritized according to a preset feature priority rule to obtain the sorted conflicting feature items. Specifically, the cross-validation includes two checks: the first check is whether the layout structure and table format match. For example, if the layout structure is a "single-page table" but the table format is a "split-page table," it is considered a logical conflict. The second check is whether the language type matches the core field type. For example, if the language type is "pure English" but the core field type contains pure Chinese fields, it is considered a logical conflict. When logical conflicts exist, the conflicting feature items are prioritized according to a preset feature priority rule to obtain the sorted conflicting feature items. The preset feature priority rule, from high to low, is: document business type, core field type, language type, layout structure, table format, and seal position.
[0035] Next, based on the sorted conflicting features, a preset conflict resolution strategy is invoked to resolve the logical conflicts, resulting in a resolved set of core document features. Specifically, the preset conflict resolution strategy includes two operations: the first operation retains the original values of features with higher priority and discards the original values of features with lower priority; the second operation re-infers and fills in the discarded features using feature completion rules. For example, when there is a conflict between page layout and table format, the original value of the page layout is retained, and the table format is re-inferred based on the page layout.
[0036] Then, the resolved core feature set of the document is vectorized and encoded to obtain the feature encoding vector. Specifically, the feature vectorization encoding adopts a one-hot encoding method, converting the six discrete feature values into numerical vectors and concatenating them to obtain the complete feature encoding vector. The encoding dimension of each of the six features is determined according to the preset value range: the document business type encoding dimension is 10 dimensions, the page layout structure is 5 dimensions, the language type is 4 dimensions, the table format is 4 dimensions, the seal position is 4 dimensions, and the core field type is 20 dimensions. The total dimension of the concatenated feature encoding vector is 47 dimensions.
[0037] Finally, the feature encoding vector is input into a pre-defined classification mapping network to generate feature classification labels. It's important to understand that the pre-defined classification mapping network is a classification model that maps the feature encoding vector to feature classification labels. In this example, it can be a fully connected neural network with an input layer (47 dimensions), hidden layers (128 dimensions, ReLU activation function), and an output layer (the number of classification labels, Softmax activation function). After the feature encoding vector propagates forward through the network, the predicted probabilities of each node in the output layer for each classification label are calculated. The classification label corresponding to the node with the highest probability is then taken as the generated feature classification label.
[0038] Step S30: Match the corresponding basic prompt word template from the preset prompt word template library according to the feature classification label.
[0039] It should be noted that the preset prompt word template library is constructed according to a three-level classification method: vertical domain, business type, and document characteristics. The basic prompt word template refers to a pre-designed basic framework for prompt words, including scenario prompt modules, field prompt modules, and business rule prompt modules, tailored to specific combinations of document characteristics. The scenario prompt module refers to prompt word content units used to clarify the document type and extraction scenario, guiding the large language model to understand the business background. The field prompt module refers to prompt word content units used to clarify the core fields to be extracted, labeling field attributes and format requirements. The business rule prompt module refers to prompt word content units used to integrate vertical domain business rules, ensuring that the extraction results conform to business specifications.
[0040] Further, step S30 includes: First, evaluating the label confidence of the feature classification label to obtain a label confidence value. When the label confidence value is lower than a second preset confidence threshold, the feature classification label is designated as a fuzzy classification label. Specifically, the label confidence evaluation uses three indicators: the first indicator is the maximum predicted probability value in the output layer of the classification mapping network, ranging from 0 to 1; the second indicator is the cosine similarity between the feature encoding vector and the classification center vector, ranging from -1 to 1, which is normalized to 0 to 1; the third indicator is the distribution density of the classification label in the training samples, with higher density indicating higher confidence. The three indicators are weighted and summed to obtain the label confidence value, with the weights configured as maximum predicted probability 0.6, cosine similarity 0.3, and distribution density 0.1. When the label confidence value is lower than 0.9, it indicates that the classification mapping network's prediction reliability for the classification label is insufficient, and there is a situation of fuzzy classification boundaries or sparse training samples. In this case, the feature classification label is marked as a fuzzy classification label.
[0041] Secondly, when the feature classification label is a fuzzy classification label, a document fingerprint feature sequence is generated based on the core field types and seal positions in the core feature set of the complex business document. Specifically, the generation of the document fingerprint feature sequence includes two operations: the first operation performs a hash operation on the core field types, using the MD5 hash algorithm to generate a 32-bit hash value; the second operation encodes the seal position, with a single seal on a single page encoded as "01", multiple seals on a single page encoded as "02", and seals spanning multiple pages encoded as "03". The 32-bit hash value is concatenated with the 2-bit seal position code to obtain a 34-bit document fingerprint feature sequence.
[0042] Next, the document fingerprint feature sequence is compared with historical template matching records in the preset prompt word template library to obtain a similarity ranking result. Specifically, the similarity comparison uses the Jaccard similarity coefficient to calculate the similarity between the document fingerprint feature sequence and the fingerprint sequences stored in the historical template matching records. The Jaccard similarity coefficient ranges from 0 to 1, with a higher value indicating a higher similarity. After calculating the similarity for all historical template matching records, they are sorted from high to low similarity to obtain the similarity ranking result.
[0043] Next, a predetermined number of candidate basic prompt word templates are selected from the preset prompt word template library based on the similarity ranking results. Specifically, the selection rule is to take the basic prompt word templates corresponding to the top 3 historical template matching records in the similarity ranking results in turn. If there are fewer than 3 historical template matching records, then the basic prompt word templates corresponding to all available records are taken as candidate basic prompt word templates.
[0044] Then, the candidate basic prompt word templates are evaluated for their applicability, resulting in a comprehensive score for each template. The template applicability score includes field coverage, business rule fit, and historical extraction accuracy. Specifically, the template applicability score comprises three sub-scores: the first is the field coverage score, which calculates the proportion of the field prompt modules in the candidate basic prompt word templates that cover the core field types of the current document; a higher coverage proportion results in a higher score, with a maximum score of 100. The second is the business rule fit score, which matches the business types of the business rule prompt modules in the candidate basic prompt word templates with the business types of the current document; a perfect match scores 100 points, a partial match scores 50 points, and no match scores 0 points. The third is the historical extraction accuracy score, which is the average accuracy of the candidate basic prompt word templates in extracting information from similar documents in the past, ranging from 0 to 100 points. The three sub-scores are weighted and summed to obtain the comprehensive score.
[0045] Finally, the candidate basic prompt word templates are ranked according to their comprehensive scores, and the candidate basic prompt word template ranked first is selected as the basic prompt word template. Specifically, when multiple candidate basic prompt word templates have the same comprehensive score, the template with the higher historical extraction accuracy score is selected first; when the historical extraction accuracy scores are also the same, the template with the higher field coverage score is selected first.
[0046] Step S40: Adjust the basic prompt word template in multiple dimensions according to the preset multi-dimensional dynamic adjustment rules to obtain personalized prompt words.
[0047] It should be noted that the preset multi-dimensional dynamic adjustment rules refer to a set of rules for personalized adjustments to the basic prompt word template based on different feature dimensions in the document's core feature set. These rules include language dimension adjustment rules, layout dimension adjustment rules, field dimension adjustment rules, and business dimension adjustment rules. Language dimension adjustment rules adjust the language style and expression of the basic prompt word template according to the document's language type; for example, using a mix of Chinese and English in a document with mixed Chinese and English text. Layout dimension adjustment rules adjust the layout prompt logic of the basic prompt word template according to the document's layout structure; for example, adding cross-page content association prompts to a cross-page table document. Field dimension adjustment rules adjust the field prompt details of the basic prompt word template according to the document's core field types; for example, labeling bank account numbers as retaining all numbers and amount fields as specifying the currency. Business dimension adjustment rules adjust the business rule prompt content of the basic prompt word template according to the document's business type; for example, adding SWIFT clause extraction specification prompts to a letter of credit document.
[0048] Further, step S40 includes: First, parsing the basic prompt word template to obtain the scene prompt module, field prompt module, and business rule prompt module, and extracting placeholder markers from each module to obtain a set of placeholders to be filled. Specifically, the template structure parsing uses regular expression matching to identify placeholder markers enclosed by "{{" and "}}", and categorizes each placeholder marker according to its module to obtain a set of placeholders to be filled.
[0049] Secondly, based on the language type and layout structure in the core feature set, an adjustment constraint matrix is constructed. It's important to understand that the adjustment constraint matrix is used to constrain the dependencies and mutual exclusions between the various adjustment dimensions. The adjustment constraint matrix is a 4×4 matrix, with rows and columns corresponding to the language dimension, layout dimension, field dimension, and business dimension, respectively. Matrix elements take three values: -1, 0, and 1: -1 indicates a mutual exclusion relationship, 0 indicates no relationship, and 1 indicates a dependency relationship. In this example, when the language type is "mixed Chinese and English" and the layout structure is a "split-page table," the matrix element between the language dimension and the layout dimension is 1 (dependency relationship; layout association prompts must use mixed Chinese and English expressions), the matrix element between the language dimension and the business dimension is 0 (no direct relationship), and the matrix element between the layout dimension and the field dimension is 0 (no direct relationship).
[0050] Next, conflict detection is performed based on the adjustment constraint matrix and preset multi-dimensional dynamic adjustment rules. When a conflict is detected, conflict resolution is performed according to the preset rule priority and the document business type in the core feature set, resulting in a conflict-free set of adjustment rules. Specifically, conflict detection includes two checks: First, it checks whether the content filled in each adjustment dimension violates mutual exclusion relationships. For example, if the language type is "pure English" but the business rule prompt module contains Chinese business rule content, it is considered a conflict. Second, it checks whether the filling order of each adjustment dimension satisfies dependency relationships. For example, if the layout dimension is filled before the language dimension, it is considered an order conflict. When a conflict is detected, the adjustment rules of the higher-priority dimensions are retained according to the preset rule priority (business dimension > field dimension > layout dimension > language dimension), and the adjustment rules of the lower-priority dimensions are corrected or postponed, resulting in a conflict-free set of adjustment rules. In this example, when the document business type is "letter of credit," the adjustment rules of the business dimension have the highest priority, and the adjustment rules of the language dimension must adapt to the content requirements of the business dimension.
[0051] Then, the placeholder set to be filled is filled position by position according to the set of conflict-free adjustment rules to obtain the filled prompt word template. Specifically, position-by-position filling includes four operations: The first operation fills in the language style description according to the language type, for example, when the language type is "mixed Chinese and English", the prompt is "Please use a mixed Chinese and English expression to identify the following document content"; The second operation fills in the layout association prompt according to the layout structure, for example, when the layout structure is "split-page table", the prompt is "Pay attention to the association of the content of the split-page table to avoid omissions in extraction"; The third operation fills in the field format mandatory annotation according to the core field type, for example, when the core field type includes "bank account", the prompt is "The bank account field must retain all numbers and must not omit leading zeros"; The fourth operation fills in the business rule validation logic according to the document business type, for example, when the document business type is "letter of credit", the prompt is "SWIFT clause extraction must comply with the MT700 message specification". The four operations are executed in the order determined by the set of conflict-free adjustment rules, and the filling results of the previous operations can be referenced by the subsequent operations.
[0052] Finally, a cross-module consistency check is performed on the filled prompt template. If the check passes, the filled prompt template is used as the personalized prompt. Specifically, the cross-module consistency check includes two checks: first, whether the language style description in the scenario prompt module and the field format annotation in the field prompt module use the same language; second, whether the validation logic in the business rule prompt module references the field types in the field prompt module. If both checks pass, the filled prompt template is output as the personalized prompt. If either check fails, the process returns to the conflict handling stage to readjust the set of conflict-free adjustment rules.
[0053] Step S50: Output personalized prompts to the large language model so that the large language model can extract information from complex business documents based on the personalized prompts and obtain information extraction results.
[0054] It should be noted that a large language model refers to a large-scale pre-trained language model with natural language understanding and generation capabilities, used to extract information from complex business documents based on personalized prompts. The information extraction result refers to the structured information extracted from the complex business document by the large language model based on personalized prompts, including field names, field values, and field positions.
[0055] Further, step S50 includes: First, evaluating the compression rate of personalized prompts. When the number of characters in a personalized prompt exceeds a preset character limit threshold, classifying the importance of fields based on the core field types in the core feature set of the complex business document to obtain the field importance classification result. Specifically, the preset character limit threshold is set based on the input window length limit of the large language model, with a value range of 2048 to 8192. In this example, it is set to 4096 to balance information integrity and model processing capacity. The field importance classification uses two indicators: the first indicator is the mandatory attribute of the field in the business rules, and mandatory fields are classified as key fields; the second indicator is the usage frequency of the field in the extraction results, and fields with a frequency higher than a preset frequency threshold (80%) are classified as important fields, while the remaining fields are classified as general fields. For example, when the core field types include "total contract price", "bank account number", and "shipping date", "total contract price" and "bank account number" are mandatory fields in the business rules and are classified as key fields, while "shipping date" has a usage frequency higher than 80% and is classified as an important field.
[0056] Secondly, based on the field importance classification results, non-critical prompts in the personalized prompts are hierarchically trimmed to obtain the trimmed prompts. Specifically, the hierarchical trimming includes two operations: the first operation is example description paragraph trimming, which removes example description paragraphs corresponding to general fields from the field prompt module, retaining example descriptions for key and important fields; the second operation is redundant scenario description trimming, which removes redundant scenario descriptions from the scenario prompt module whose relevance to the current document's business type is lower than the preset relevance threshold (0.3), retaining the core scenario background description. The number of characters in the trimmed prompts is controlled within 90% of the preset character upper limit threshold (4096), reserving a 10% margin for document content segmentation.
[0057] Next, the cropped prompts are adapted to the context window of the complex business document to obtain the adapted prompt input package. Specifically, the context window adaptation includes three operations: The first operation splits the cropped prompts into a prompt header and a prompt tail. The prompt header contains the first half of the scenario prompt module and the field prompt module, and the prompt tail contains the second half of the field prompt module and the business rule prompt module. The second operation segments the complex business document into content pieces. The piece length is calculated based on the remaining window length of the prompt header and the prompt tail to ensure that the total number of characters in the prompt input package does not exceed the preset character limit threshold (4096). The third operation combines the prompt header, document content pieces, and prompt tail in sequence to obtain the adapted prompt input package. When the content of the complex business document exceeds the capacity of a single package, multiple prompt input packages are generated for batch processing.
[0058] Then, the prompt input packet is sent to the large language model, enabling the large language model to extract information from the complex business document based on the prompt input packet and obtain initial extraction results. Specifically, after receiving the prompt input packet, the large language model parses the extraction scenario and field requirements in the prompt header, performs field recognition and value extraction on the text content in the document content segments, applies result constraints to the business rule validation logic in the prompt tail, and outputs initial extraction results containing field names, field values, and field positions.
[0059] Finally, the initial extraction results undergo structured post-processing to obtain the information extraction results. Specifically, the structured post-processing includes three operations: The first operation is field position alignment verification, which compares the field positions in the initial extraction results with their actual positions in the complex business document, correcting field positions whose offsets exceed a preset offset threshold (2 characters); the second operation is extraction value format standardization, which converts the field values in the initial extraction results into a preset standard format, such as converting monetary fields into a numeric format with two decimal places and date fields into the "YYYY-MM-DD" format; the third operation is initial screening for business rule compliance, which compares the field values in the initial extraction results with the business rule verification logic at the end of the prompt words, marking abnormal field values that do not conform to the business rules, thus obtaining the information extraction results.
[0060] Step S60: Based on the error samples in the information extraction results, perform reverse optimization on the preset prompt word template library and the preset multi-dimensional dynamic adjustment rules to obtain the optimized prompt word generation strategy.
[0061] It should be noted that error samples refer to sample data with errors extracted from the information extraction results, including types such as missing fields, formatting errors, and non-compliance with business rules. Reverse optimization refers to analyzing the shortcomings of prompt word generation based on the errors in the information extraction results, and adjusting the preset prompt word template library and preset multi-dimensional dynamic adjustment rules to achieve a continuous improvement in the accuracy of prompt word generation. The optimized prompt word generation strategy refers to the generation strategy obtained after reverse optimization, which includes updated prompt word templates and adjustment rules.
[0062] Specifically, step S60 includes: First, performing error pattern mining on the information extraction results to identify high-frequency error patterns in the error samples, thus obtaining a high-frequency error pattern set. It should be understood that high-frequency error patterns include cross-page table field breakage patterns, mixed Chinese and English field misalignment patterns, stamp-obscured field missing patterns, and business rule violation patterns. Specifically, error pattern mining employs a rule-based pattern matching method to extract features from the error type, error location, and error context in the error samples, statistically analyzing the frequency of each error pattern in the error samples, and including error patterns with a frequency exceeding a preset frequency threshold (5%) in the high-frequency error pattern set. For example, the cross-page table field breakage pattern has a frequency of 12% in the error samples, exceeding the 5% threshold, and is therefore included in the high-frequency error pattern set.
[0063] Secondly, root cause analysis is performed on the set of high-frequency error patterns to determine the root cause of each pattern and obtain the results. Specifically, the root cause analysis includes three judgments: First, whether the error pattern is caused by the lack of corresponding scenario or field prompts in the prompt word template; if so, it is classified as a prompt word template defect. Second, whether the error pattern is caused by improper parameter settings or rule conflicts in the dynamic adjustment rules; if so, it is classified as an adjustment rule deviation. Third, whether the error pattern is caused by the limitations of the large language model's understanding of specific languages or layouts; if so, it is classified as an inherent limitation of the large language model. For example, the cross-page table field breakage pattern is analyzed as the prompt word template not containing cross-page content association extraction prompts, classified as a prompt word template defect; the Chinese-English mixed-format field misalignment pattern is analyzed as insufficient bilingual switching prompt strength in the language dimension adjustment rules, classified as an adjustment rule deviation.
[0064] Next, based on the root cause analysis results, high-frequency error patterns attributable to either prompt word template defects or adjustment rule deviations are selected. Specifically, high-frequency error patterns attributable to inherent limitations of the large language model are excluded from the optimization scope, and only high-frequency error patterns that can be resolved through prompt word optimization are retained.
[0065] Next, the impact of high-frequency error patterns is quantitatively assessed to obtain an error impact value. Specifically, the error impact quantification assessment uses two indicators: the first indicator is the frequency of occurrence of the error pattern, with higher frequency indicating greater impact; the second indicator is the importance level of the fields involved in the error pattern, with errors involving critical fields having a higher impact than those involving general fields. The two indicators are weighted and summed to obtain the error impact value.
[0066] Then, when the error impact value exceeds the preset impact threshold and the cumulative number of error samples corresponding to the target high-frequency error pattern reaches the preset sample number, the targeted optimization process is triggered to obtain candidate optimization strategies. Specifically, the preset impact threshold is set according to the degree of influence of the error pattern on the overall extraction accuracy, with a value range of 0.1 to 0.5. In this example, it is set to 0.3 to filter low-impact error patterns. The preset sample number is set according to the statistical significance requirements, with a value range of 30 to 100. In this example, it is set to 50 to ensure sufficient sample support for the optimization strategy. The targeted optimization process includes two operations: the first operation is template patching and updating, which locally modifies the basic prompt word templates in the prompt word template library according to the error pattern type. For example, for the cross-page table field breakage pattern, a prompt "cross-page table content association extraction" is added to the scene prompt module; the second operation is gradient fine-tuning, which iteratively adjusts the adjustment parameters of the corresponding dimension in the dynamic adjustment rules. For example, for the Chinese-English mixed field misalignment pattern, the weight coefficient of the bilingual switching prompt in the language dimension adjustment rule is increased, with an adjustment step size of 0.05.
[0067] The candidate optimization strategy is then backtracked and validated to obtain the improvement in re-extraction accuracy. Specifically, the backtracking validation applies the candidate optimization strategy to historical erroneous samples for re-extraction testing, and the ratio of the number of correct samples after re-extraction to the total number of historical erroneous samples is calculated to obtain the re-extraction accuracy. The difference between the re-extraction accuracy and the original extraction accuracy is taken as the improvement in re-extraction accuracy.
[0068] Finally, when the improvement in re-extraction accuracy reaches a preset threshold, the candidate optimization strategy is adopted as the optimized prompt word generation strategy. Specifically, the preset threshold is set based on the effectiveness threshold of the optimization strategy, ranging from 1% to 5%, and is set to 3% in this example to exclude candidate strategies with insignificant optimization effects. When the improvement in re-extraction accuracy does not reach 3%, the process returns to the targeted optimization workflow to readjust the template patch content or the gradient fine-tuning step size.
[0069] Step S70: Generate target prompts based on the optimized prompt generation strategy, and use the target prompts cyclically for prompt generation and information extraction of complex business documents to achieve closed-loop iterative optimization.
[0070] It should be noted that target prompt words refer to prompt words generated based on the optimized prompt word generation strategy, used for subsequent extraction of complex business document information. Closed-loop iterative optimization refers to a loop mechanism that applies the optimized prompt word generation strategy to subsequent document processing and continuously performs reverse optimization based on the new extraction results.
[0071] Specifically, the optimized prompt word generation strategy is version-identified, recording the strategy version number, optimization trigger conditions, and optimization timestamp to construct a strategy version archive. Based on the strategy version archive, the extraction performance of the same feature classification label under different strategy versions is tracked to determine whether a strategy rollback condition has been triggered. Rollback conditions include three consecutive drops in extraction accuracy or a single drop exceeding 5%. If triggered, the strategy rolls back to the previous stable version; otherwise, target prompt words are generated based on the current version. The target prompt words are injected into the prompt word generation pipeline, which receives new complex business documents and performs full-process processing. Based on the distribution of error samples in the processing results, it determines whether to initiate a new round of reverse optimization. If necessary, error samples are fed back to the reverse optimization stage, forming a closed-loop iteration of "generation-use-feedback-optimization-regeneration".
[0072] This embodiment sequentially enhances document image preprocessing, refines the partitioning of various layout types, and achieves differentiated character recognition across regions. Based on the recognized data, it performs topological parsing on various tables, reconstructs global content, and associates business fields. It adaptively adjusts all process parameters according to document characteristics, outputting standardized structured data. It can repair image interference such as stamps and stains, resolve parsing errors in multi-column layouts and borderless / page-crossing tables, adapt to multilingual documents, automatically verify data and label field credibility, eliminating the need for manual parameter adjustment and reducing the labor costs of document digitization. It also supports high-concurrency batch processing of industrial procurement documents.
[0073] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 The method for generating dynamic prompts for complex business documents, step S70, further includes steps S201 to S205: Step S201: Identify the optimized prompt word generation strategy by generating a strategy version number, and associate the strategy version number with the corresponding optimization trigger condition, optimization content summary and optimization timestamp to obtain the strategy version file.
[0074] It should be noted that the strategy version number is a unique identifier assigned to the optimized prompt word generation strategy. In this example, it adopts a three-part format of "major version number.minor version number.revision number", such as "1.2.3". The optimization trigger condition refers to the condition record that triggers this reverse optimization, including the error impact value exceeding the preset impact threshold and the cumulative number of error samples reaching the preset number of samples. The optimization content summary is a brief description of the modifications to the basic prompt word template and adjustment rules involved in this optimization. The strategy version file is a data record formed by associating and storing the strategy version number with the optimization trigger condition, optimization content summary, and optimization timestamp.
[0075] Specifically, the optimized prompt word generation strategy is version-identified, generating a strategy version number. The version number generation rules are as follows: the major version number increments when a new adjustment dimension or template library structure is added; the minor version number increments when a new adjustment rule is added within an existing dimension; and the revision number increments when parameters are fine-tuned or template patches are updated. For example, the version number is "1.0.0" during the initial optimization, updates to "1.1.0" when a bilingual switching prompt rule is added in the language dimension, and updates to "1.1.1" when only cross-page table templates are patched. The strategy version number is then associated with and stored with the corresponding optimization trigger condition, optimization content summary, and optimization timestamp to obtain a strategy version archive. The optimization trigger condition record includes two values: error impact value and cumulative number of error samples. The optimization content summary record includes the modified template name, adjustment rule dimension, and parameter change range. The optimization timestamp record is the date and time the strategy took effect. The strategy version archive is stored in key-value pair format, with the strategy version number as the key and structured data containing the optimization trigger condition, optimization content summary, and optimization timestamp as the value.
[0076] Step S202: Construct a strategy effect tracking link based on the strategy version file and obtain strategy effect tracking data.
[0077] It should be noted that the strategy effect tracking link refers to a data structure that links strategy version files with corresponding information extraction results, forming a traceable chain of strategy effect evolution. The strategy effect tracking link is used to record the trend of extraction accuracy for the same feature classification label under different strategy versions. The trend of extraction accuracy refers to the change in the ratio of the number of correct samples to the total number of samples in the information extraction results for the same feature classification label under different strategy versions.
[0078] Specifically, using feature classification labels as index keys, the strategy version number, optimization timestamp, and corresponding information extraction results for the same feature classification label under different strategy versions are associated and stored, forming a version effect sequence arranged in chronological order. The information extraction results include four indicators: the number of correct samples, the number of incorrect samples, the distribution of error patterns, and the completeness of field coverage. Then, the extraction accuracy of the same feature classification label under different strategy versions is extracted from the strategy effect tracking link to obtain strategy effect tracking data. The extraction accuracy is calculated by dividing the number of correct samples by the total number of samples. The extraction accuracy corresponding to each strategy version is sorted by the version's effective time to obtain the trend of extraction accuracy changes. For example, the extraction accuracy of the feature classification label "Foreign Trade Contract_Split-Page Table_Chinese-English Mixed Layout" is 85% in version "1.0.0", 88% in version "1.1.0", and 87% in version "1.1.1", so the trend of extraction accuracy changes is "85%→88%→87%".
[0079] Step S203: When the current strategy version in the strategy effect tracking data triggers the strategy rollback condition, the prompt word generation strategy is rolled back to the previous stable version to obtain the rolled-back prompt word generation strategy.
[0080] It should be noted that the strategy rollback condition refers to the set of conditions that trigger the reversion of the current suggestion word generation strategy to the previous stable version. In this example, it includes two items: the first is a continuous preset number of consecutive decreases in extraction accuracy, and the second is a single extraction accuracy decrease exceeding a preset threshold. The stable version refers to the strategy version where the extraction accuracy trend is at a local peak and the rollback condition has not been triggered.
[0081] Specifically, the extraction accuracy of the current strategy version and its predecessor versions are extracted from the strategy performance tracking data to determine whether a strategy rollback condition is triggered. The determination includes two checks: The first check is a consecutive preset number of drops in extraction accuracy, meaning the extraction accuracy of the current version and the two versions preceding it are all lower than their respective predecessors. For example, in this example, if version "1.1.1" has an accuracy of 87%, which is lower than version "1.1.0"'s 88%, and version "1.1.0" has an accuracy of 88%, which is lower than version "1.0.0"'s 85%, then no rollback is triggered (because "1.1.0" is higher than "1.0.0"). If version "1.2.0" has an accuracy of 86%, which is lower than "1.1.1"'s 87%, and version "1.2.1" has an accuracy of 84%, which is lower than "1.2.0"'s 86%, then a rollback is triggered after three consecutive drops. The second check is a single drop in extraction accuracy exceeding a preset threshold. The value indicates that the accuracy of the current version has decreased by more than 5% compared to the previous version. For example, if version "1.3.0" has an accuracy of 81% and decreases by 3.57% from version "1.2.1" (84%), it will not trigger. Similarly, if version "1.3.1" has an accuracy of 78% and decreases by 3.7% from version "1.3.0" (81%), it will also not trigger. However, if version "1.4.0" has an accuracy of 75% and decreases by 3.85% from version "1.3.1" (78%), it will still not trigger. Here, a single decrease in absolute value must exceed 5% to trigger. For example, if version "2.0.0" has an accuracy of 72% and decreases by 4% from version "1.4.0" (75%), it will not trigger. If the accuracy of a version suddenly drops from 85% to 78% (a decrease of 7.06%), it will trigger. The preset number of times is set based on statistical stability requirements, ranging from 2 to 5. In this example, it is set to 3 to avoid erroneous rollbacks caused by occasional fluctuations. The preset amplitude threshold is set based on the acceptable fluctuation range of the optimization strategy, ranging from 3% to 10%. In this example, it is set to 5% to distinguish between normal fluctuations and significant degradation. Then, when the strategy rollback condition is triggered, the previous stable version is retrieved from the strategy version archive, and the prompt generation strategy is rolled back to that stable version. The rollback operation includes: restoring the state of the basic prompt template library corresponding to the stable version, restoring the dynamic adjustment rule parameters corresponding to the stable version, marking the stable version as the currently effective version, and marking the rolled-back version as an unstable version. The rolled-back prompt generation strategy inherits all the configurations of the stable version and is used for subsequent target prompt generation. When the strategy rollback condition is not triggered, the current strategy version remains effective, and target prompts are generated based on the current version.
[0082] Step S204: When the current strategy version in the strategy effect tracking data does not trigger the strategy rollback condition, generate a target prompt word based on the current strategy version, and inject the target prompt word into the prompt word generation pipeline to obtain the pipeline processing result.
[0083] Specifically, when the current strategy version in the strategy effect tracking data does not trigger the strategy rollback condition, a target prompt word is generated based on the current strategy version. The target prompt word is generated as follows: a basic prompt word template is retrieved from the prompt word template library corresponding to the current strategy version, and multi-dimensional personalized adjustments are made according to the dynamic adjustment rules corresponding to the current strategy version to obtain a target prompt word that conforms to the current strategy configuration.
[0084] Then, the target prompt words are injected into the prompt generation pipeline. The injection method involves combining the target prompt words with the complex business document to be processed, forming a pipeline input data packet. This input data packet contains three items: document identifier, a set of core features of the complex business document, and the target prompt words. After receiving the pipeline input data packet, the prompt generation pipeline sequentially performs seven processing steps: feature acquisition, feature recognition, template matching, dynamic adjustment, prompt word output, information extraction, and reverse optimization, yielding the pipeline processing result. The pipeline processing result includes three outputs: information extraction results, error sample distribution, and strategy effect data.
[0085] Step S205: Feedback the pipeline processing results to the reverse optimization stage to drive the continuous evolution of the strategy and achieve closed-loop iterative optimization.
[0086] Specifically, the error sample distribution is extracted from the pipeline processing results to determine whether new high-frequency error patterns have appeared in the error samples or whether the cumulative number of existing high-frequency error patterns has reached a preset sample size. This determination includes two checks: first, whether there are new error types outside the preset error pattern set in the error samples, and whether the frequency of these new error types exceeds a preset frequency threshold (5%); second, whether the cumulative number of error samples corresponding to existing high-frequency error patterns has reached a preset sample size. The preset sample size is set based on statistical significance requirements, ranging from 30 to 100; in this example, it is set to 50 to ensure sufficient sample support for reverse optimization. Then, when either of the above conditions is met, the error samples in the pipeline processing results are fed back to the reverse optimization stage. The feedback includes the original document content of the error sample, error type labeling, error cause analysis, and the corresponding target prompt word version identifier. After receiving the feedback, the reverse optimization stage executes error pattern mining, root cause analysis, error impact assessment, and targeted optimization processes to obtain candidate optimization strategies. After backtracking verification, a new optimized version prompt word generation strategy is generated. The new optimized prompt generation strategy is then reinjected into the prompt generation pipeline for processing subsequent complex business documents, forming a closed-loop iterative optimization cycle of "generation-use-feedback-optimization-regeneration". After each closed-loop iteration, the strategy version number increments according to rules, the strategy version file is updated synchronously, and the strategy effect tracking link continues to be recorded.
[0087] This embodiment achieves complete recording and traceability of prompt word generation strategy changes through strategy version identification and associated storage. By constructing a strategy effect tracking link, it establishes a correlation between strategy versions and extraction results, facilitating the analysis of the actual impact of different optimization strategies on specific document types. Through a dual-check mechanism for strategy rollback conditions, it can promptly identify and restore a stable version when an optimization strategy experiences continuous or significant single-time degradation, reducing the risk of extraction quality decline due to optimization strategy failure. By seamlessly integrating the optimized strategy version into actual business processes, it enables rapid application of strategy optimization results. Through error sample feedback and a closed-loop iteration mechanism, it builds the self-evolution capability of the prompt word generation strategy, allowing the system to continuously learn and improve during operation.
[0088] Based on the first embodiment of this application, this application also provides a dynamic prompt word generation device for complex business documents. Please refer to... Figure 3 The device includes: The feature acquisition module 10 is used to acquire the core feature set of complex documents, which includes document business type, page structure, language type, table form, seal position and core field type.
[0089] The feature recognition module 20 is used to identify and classify the core feature set of the document and generate feature classification labels.
[0090] The template matching module 30 is used to match the corresponding basic prompt word template from the preset prompt word template library according to the feature classification label. The preset prompt word template library is constructed according to a three-level classification method of vertical domain, business type and document features.
[0091] The dynamic adjustment module 40 is used to perform multi-dimensional personalized adjustments on the basic prompt word template according to preset multi-dimensional dynamic adjustment rules to obtain personalized prompt words. The preset multi-dimensional dynamic adjustment rules include language dimension adjustment rules, layout dimension adjustment rules, field dimension adjustment rules and business dimension adjustment rules.
[0092] The prompt word output module 50 is used to output personalized prompt words to the large language model, so that the large language model can extract information from complex business documents based on the personalized prompt words and obtain information extraction results.
[0093] The reverse optimization module 60 is used to perform reverse optimization on the preset prompt word template library and preset multi-dimensional dynamic adjustment rules based on the error samples in the information extraction results, so as to obtain the optimized prompt word generation strategy.
[0094] The result generation module 70 is used to generate target prompts based on the optimized prompt generation strategy, and to repeatedly use the target prompts for prompt generation and information extraction of complex business documents to achieve closed-loop iterative optimization.
[0095] The dynamic prompt word generation device for complex business documents provided in this application adopts the dynamic prompt word generation method for complex business documents in the above embodiments, and can solve the technical problem of how to dynamically generate adaptive prompt words based on the personalized characteristics of complex business documents. Compared with the prior art, the beneficial effects of the dynamic prompt word generation device for complex business documents provided in this application are the same as the beneficial effects of the dynamic prompt word generation method for complex business documents provided in the above embodiments, and other technical features in the dynamic prompt word generation device for complex business documents are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.
[0096] This application provides a dynamic prompt word generation device for complex business documents. The dynamic prompt word generation device for complex business documents includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the dynamic prompt word generation method for complex business documents in the above embodiment 1.
[0097] The following is for reference. Figure 4 This document illustrates a structural schematic diagram of a dynamic prompt word generation device suitable for implementing complex business documents according to embodiments of this application. The dynamic prompt word generation device for complex business documents in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The dynamic prompt word generation device for complex business documents shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0098] like Figure 4As shown, the dynamic prompt word generation device for complex business documents may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1002 or a program loaded from storage device 1003 into random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the dynamic prompt word generation device for complex business documents. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the dynamic prompt generation device for complex business documents to communicate wirelessly or wiredly with other devices to exchange data. Although dynamic prompt generation devices with various complex business documents are shown in the figures, it should be understood that it is not required to implement or possess all of those shown. More or fewer may be implemented alternatively.
[0099] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0100] The dynamic prompt word generation device for complex business documents provided in this application, employing the dynamic prompt word generation method for complex business documents in the above embodiments, can solve the technical problem of how to dynamically generate adaptive prompt words based on the personalized characteristics of complex business documents. Compared with the prior art, the beneficial effects of the dynamic prompt word generation device for complex business documents provided in this application are the same as the beneficial effects of the dynamic prompt word generation method for complex business documents provided in the above embodiments, and other technical features in the dynamic prompt word generation device for complex business documents are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0101] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0102] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0103] This application provides a computer-readable medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the dynamic prompt word generation method for complex business documents in the above embodiments.
[0104] The computer-readable medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, or any combination thereof. More specific examples of computer-readable media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable medium may be any tangible medium containing or storing a program that can be executed by instructions, used by a device, or used in conjunction with it. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0105] The aforementioned computer-readable medium may be included in the dynamic prompt word generation device for complex business documents; or it may exist independently and not be assembled into the dynamic prompt word generation device for complex business documents.
[0106] The aforementioned computer-readable medium carries one or more programs that, when executed by a dynamic prompt word generation device for complex business documents, enable the device to write computer program code for performing the operations of this application in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0107] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, all blocks in the flowcharts or block diagrams may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that all blocks in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using dedicated hardware-based implementations that perform the specified functions or operations, or using a combination of dedicated hardware and computer instructions.
[0108] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0109] The readable medium provided in this application is a computer-readable medium, which stores computer-readable program instructions (i.e., a computer program) for executing the dynamic prompt word generation method for complex business documents described above. This solves the technical problem of how to dynamically generate adaptive prompt words based on the personalized characteristics of complex business documents. Compared with the prior art, the beneficial effects of the computer-readable medium provided in this application are the same as those of the dynamic prompt word generation method for complex business documents provided in the above embodiments, and will not be elaborated upon here.
[0110] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the dynamic prompt word generation method for complex business documents as described above.
[0111] The computer program product provided in this application can solve the technical problem of how to dynamically generate adaptive prompts based on the personalized characteristics of complex business documents. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the dynamic prompt generation method for complex business documents provided in the above embodiments, and will not be repeated here.
[0112] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for generating dynamic prompt words for complex business documents, characterized in that, The method includes: Obtain the core feature set of complex documents, wherein the core feature set includes document business type, page structure, language type, table format, seal location and core field type; The core feature set of the document is identified and classified to generate feature classification labels; Based on the feature classification labels, the corresponding basic prompt word templates are matched from the preset prompt word template library, wherein the preset prompt word template library is constructed according to a three-level classification method of vertical domain, business type and document features; The basic prompt word template is personalized by performing multi-dimensional adjustments according to preset multi-dimensional dynamic adjustment rules to obtain personalized prompt words. The preset multi-dimensional dynamic adjustment rules include language dimension adjustment rules, layout dimension adjustment rules, field dimension adjustment rules and business dimension adjustment rules. The personalized prompt words are output to the large language model, so that the large language model can extract information from complex business documents based on the personalized prompt words and obtain information extraction results. Based on the erroneous samples in the information extraction results, the preset prompt word template library and the preset multi-dimensional dynamic adjustment rules are reverse-optimized to obtain the optimized prompt word generation strategy. Based on the optimized prompt word generation strategy, target prompt words are generated, and the target prompt words are used cyclically for prompt word generation and information extraction in complex business documents to achieve closed-loop iterative optimization. The step of identifying and classifying the core feature set of the document and generating feature classification labels includes: Confidence assessment is performed on each feature item in the core feature set of the complex business document to obtain the confidence value corresponding to each feature item; For feature items whose confidence values are lower than the first preset confidence threshold, feature completion is performed to obtain a complete set of core features of the document. The feature completion includes inferring the layout structure based on the document business type, inferring the table form based on the language type, and inferring the seal position based on the core field type. Multi-feature cross-validation is performed on the completed document core feature set to determine whether there is a logical conflict between each feature item. When a logical conflict exists, the conflicting feature items are prioritized according to a preset feature priority rule to obtain the sorted conflicting feature items. The logical conflicts are resolved by invoking a preset conflict resolution strategy based on the sorted conflict feature items, resulting in a resolved set of core document features. The resolved core feature set of the document is vectorized and encoded to obtain the feature encoding vector; The feature encoding vector is input into a preset classification mapping network to generate feature classification labels; The step of performing multi-dimensional personalized adjustments on the basic prompt word template according to preset multi-dimensional dynamic adjustment rules to obtain personalized prompt words includes: The basic prompt word template is parsed to obtain the scene prompt module, field prompt module and business rule prompt module, and the placeholder markers in each module are extracted to obtain the set of placeholders to be filled; Based on the language type and layout structure in the core feature set, an adjustment constraint matrix is constructed, wherein the adjustment constraint matrix is used to constrain the dependency and mutual exclusion relationships between each adjustment dimension; Based on the adjustment constraint matrix and the preset multi-dimensional dynamic adjustment rules, conflict detection is performed. When a conflict in the adjustment rules is detected, conflict processing is performed according to the preset rule priority and the document business type in the core feature set to obtain a set of conflict-free adjustment rules. The placeholder set to be filled is filled one by one according to the set of conflict-free adjustment rules to obtain the filled prompt word template. The one-by-one filling includes filling language style description according to language type, filling layout association prompts according to layout structure, filling field format forced annotation according to core field type, and filling business rule verification logic according to document business type. Perform cross-module consistency verification on the filled prompt word template. When the verification passes, the filled prompt word template is used as the personalized prompt word.
2. The method as described in claim 1, characterized in that, The step of matching the corresponding basic prompt word template from the preset prompt word template library based on the feature classification label includes: The feature classification label is evaluated for label confidence to obtain a label confidence value. When the label confidence value is lower than a second preset confidence threshold, the feature classification label is used as a fuzzy classification label. When the feature classification label is a fuzzy classification label, a document fingerprint feature sequence is generated based on the core field type and seal position in the core feature set of the complex business document; The document fingerprint feature sequence is compared with the historical template matching records in the preset prompt word template library to obtain the similarity ranking result; Based on the similarity ranking results, a preset number of candidate basic prompt word templates are selected from the preset prompt word template library; The candidate basic prompt word templates are evaluated for template applicability to obtain a comprehensive score for each candidate basic prompt word template. The template applicability score includes field coverage score, business rule fit score, and historical extraction accuracy score. The candidate basic prompt word templates are sorted according to the comprehensive score, and the candidate basic prompt word template ranked first is used as the basic prompt word template.
3. The method as described in claim 1, characterized in that, The step of outputting the personalized prompt words to a large language model, so that the large language model can extract information from complex business documents based on the personalized prompt words and obtain the information extraction results, includes: The personalized prompt words are evaluated for compression rate. When the number of characters in the personalized prompt words exceeds a preset character limit threshold, the importance of the fields is graded according to the core field types in the core feature set of the complex business document, and the field importance grading results are obtained. Based on the importance ranking results of the fields, the non-key prompt content in the personalized prompt words is hierarchically trimmed to obtain the trimmed prompt words, wherein the non-key prompt content includes example description paragraphs and redundant scenario descriptions; The cropped prompt words are adapted to the context window of the complex business document to obtain an adapted prompt word input package, wherein the prompt word input package includes a prompt word header, a document content segment, and a prompt word tail. The prompt word input packet is sent to the large language model, so that the large language model can extract information from the complex business document based on the prompt word input packet and obtain the initial extraction result. The initial extraction results are then subjected to structured post-processing to obtain the information extraction results.
4. The method as described in claim 1, characterized in that, The step of reverse-optimizing the preset prompt word template library and the preset multi-dimensional dynamic adjustment rules based on the error samples in the information extraction results to obtain the optimized prompt word generation strategy includes: Error pattern mining is performed on the information extraction results to identify high-frequency error patterns in the error samples, resulting in a set of high-frequency error patterns. The high-frequency error patterns include cross-page table field breakage pattern, mixed Chinese and English field misalignment pattern, stamp obscuring field missing pattern, and business rule violation pattern. Root cause analysis is performed on the set of high-frequency error patterns to determine the root cause of each high-frequency error pattern and obtain the root cause analysis results. The root cause analysis results include the attribution of prompt word template defects, the attribution of adjustment rule deviations, and the attribution of inherent limitations of the large language model. Based on the root cause analysis results, the target high-frequency error patterns that are classified as either prompt word template defects or adjustment rule deviations are selected as the root causes of errors. The error impact of the target high-frequency error pattern is quantitatively evaluated to obtain the error impact value; When the error impact value exceeds the preset impact threshold and the cumulative number of error samples corresponding to the target high-frequency error pattern reaches the preset number of samples, a targeted optimization process is triggered to obtain candidate optimization strategies. The targeted optimization process includes updating the template patch of the corresponding basic prompt word template in the preset prompt word template library according to the error pattern type, and performing gradient fine-tuning of the adjustment parameters of the corresponding dimension in the preset multi-dimensional dynamic adjustment rules. The candidate optimization strategy was backtracked and verified to obtain the improvement value of re-extraction accuracy; When the improvement value of the re-extraction accuracy reaches the preset improvement threshold, the candidate optimization strategy is used as the optimized prompt word generation strategy.
5. The method as described in claim 1, characterized in that, The step of generating target prompts based on the optimized prompt generation strategy, and cyclically using the target prompts for prompt generation and information extraction in complex business documents to achieve closed-loop iterative optimization, includes: The optimized prompt word generation strategy is identified by a strategy version number, and the strategy version number is associated with and stored with the corresponding optimization trigger condition, optimization content summary and optimization timestamp to obtain a strategy version file; Based on the strategy version file, a strategy effect tracking link is constructed to obtain strategy effect tracking data, wherein the strategy effect tracking link is used to record the trend of the extraction accuracy of the same feature classification label under different strategy versions. When the current strategy version in the strategy effect tracking data triggers the strategy rollback condition, the prompt word generation strategy is rolled back to the previous stable version to obtain the rolled-back prompt word generation strategy. The strategy rollback condition includes a continuous preset number of extraction accuracy drops or a single extraction accuracy drop exceeding a preset threshold. When the current strategy version in the strategy effect tracking data does not trigger the strategy rollback condition, a target prompt word is generated based on the current strategy version, and the target prompt word is injected into the prompt word generation pipeline to obtain the pipeline processing result. The pipeline processing results are fed back to the reverse optimization stage to drive the continuous evolution of the strategy and achieve closed-loop iterative optimization.
6. A device for generating dynamic prompt words for complex business documents, characterized in that, The apparatus is applied to the dynamic prompt word generation method for complex business documents as described in any one of claims 1 to 5, the apparatus comprising: The feature acquisition module is used to acquire a set of core features of complex documents, wherein the set of core features includes document business type, page structure, language type, table format, seal location and core field type; The feature recognition module is used to identify and classify the core feature set of the document and generate feature classification labels; The template matching module is used to match the corresponding basic prompt word template from the preset prompt word template library according to the feature classification label, wherein the preset prompt word template library is constructed according to a three-level classification method of vertical domain, business type and document features; The dynamic adjustment module is used to perform multi-dimensional personalized adjustments on the basic prompt word template according to preset multi-dimensional dynamic adjustment rules to obtain personalized prompt words. The preset multi-dimensional dynamic adjustment rules include language dimension adjustment rules, layout dimension adjustment rules, field dimension adjustment rules and business dimension adjustment rules. The prompt word output module is used to output the personalized prompt words to the large language model, so that the large language model can extract information from complex business documents based on the personalized prompt words and obtain information extraction results. The reverse optimization module is used to perform reverse optimization on the preset prompt word template library and the preset multi-dimensional dynamic adjustment rules based on the error samples in the information extraction results, so as to obtain the optimized prompt word generation strategy. The result generation module is used to generate target prompt words based on the optimized prompt word generation strategy, and to repeatedly use the target prompt words for prompt word generation and information extraction of complex business documents to achieve closed-loop iterative optimization.
7. A device for generating dynamic prompt words for complex business documents, characterized in that, The device includes: a memory, a processor, and a dynamic prompt word generation program for complex business documents stored in the memory and running on the processor, the dynamic prompt word generation program for complex business documents being configured to implement the steps of the dynamic prompt word generation method for complex business documents as described in any one of claims 1-5.
8. A storage medium, characterized in that, The storage medium stores a dynamic prompt word generation program for complex business documents. When the processor executes the dynamic prompt word generation program for complex business documents, it implements the steps of the dynamic prompt word generation method for complex business documents as described in any one of claims 1-5.
Citation Information
Patent Citations
Multi-model cue word optimization and feedback tuning system fusing context semantics
CN121636691A
Intelligent agent optimization method based on cue word engineering and test set management
CN122242503A