Policy service recommendation method and system based on large language model
By parsing policy documents and constructing a clause mapping tree, the problem of policy text generation in existing technologies ignoring numbering structure and reference path is solved, the closed clause reference chain and logically coherent policy text generation are achieved, and the intelligence and compliance of policy services are improved.
Patent Information
- Application Number
- CN202510807518.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-09-16
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When processing policy documents, existing text generation methods based on large language models ignore the numbering structure and citation path in the policy text, resulting in the generated policy description or summary lacking the necessary clause citation basis, affecting the compliance and credibility of the generated text. It is also difficult to restore the citation relationship between clauses, causing content skipping or logical breaks, and failing to meet the policy declaration needs of corporate users.
By parsing the policy documents, extracting clauses with numbering structure and establishing unique identifiers, building reference paths and mapping trees between clauses, and using structured prompt information to control the large language model to generate policy reports, the closedness of the clause reference chain is ensured, including identifying explicit and implicit reference behaviors, building a directed graph and generating a clause mapping tree, and embedding prompt information into the model to guide the generation process.
It ensures accurate clause citations and logical coherence in policy texts, improves the compliance and applicability of generated content, and can generate high-quality texts that meet policy declarations and recommendations, supporting the intelligence and credibility of policy services.
Smart Images

Figure CN120653843A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of policy information, and more specifically, to a policy service recommendation method and system based on a large language model. Background Art
[0002] With the rapid development of artificial intelligence, particularly natural language processing (NLP) and pre-trained language models (such as GPT, BERT, and other large language models), text generation methods based on large language models have been widely used in fields such as intelligent question-answering, writing assistance, and official document generation. In policy service scenarios, how to use language models to help businesses understand and utilize government support policies has become a key direction in the development of digital government and a smart business environment.
[0003] Government support policy documents are characterized by significant structuring, numbering, and clause citation. These documents are often written in a strict regulatory format, containing numerous numbered clauses, such as "Article 6" and "Chapter 2, Section 3." They also feature explicit or implicit cascading clause citations, such as "In accordance with Article X of a certain document" and "Implemented in accordance with Article Y." These citations not only define the policy's scope of application but also form an important foundation for the policy's logical chain.
[0004] However, the existing general text generation methods based on large language models still have the following prominent problems when processing policy documents: existing generation models often ignore the numbering structure and citation path in the policy text, resulting in a lack of necessary clause citation basis in the generated policy description or summary, seriously affecting the compliance and credibility of the generated text; policy clauses often have complex hierarchical reference relationships, but general models find it difficult to restore the structural path between "target clauses-superior clauses-original basis", resulting in content skipping or logical breaks; existing large language model generation lacks structural prompt input, and cannot insert clause citations, control language style, and reflect structural logic on demand for specific policy tasks; due to problems such as incomplete clause structure and unclosed reference chain, the generated text is difficult to use directly for corporate users' policy declaration, declaration material writing, or policy adaptation recommendation scenarios.
[0005] Therefore, there is an urgent need for a new policy service recommendation method that combines policy clause structured analysis, clause reference chain modeling and large language model generation control. It can not only identify and model the reference structure between policy clauses, but also output policy texts with clause reference chain closure on demand through structural prompt control generator, thereby improving the quality, legality and usability of policy report generation, and providing enterprises with more intelligent and reliable policy services. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide a policy service recommendation method and system based on a large language model to solve the problems mentioned in the background technology.
[0007] In order to achieve the above object, the present invention adopts the following technical solutions: A policy service recommendation method based on a large language model includes the following steps: S1: Parse the content of the policy document, extract the policy clauses with a numbering structure, and establish a unique identifier for each clause to form a clause node set; S2: Identify explicit or implicit reference behaviors in the policy clauses, construct reference paths between clauses, and generate a directed reference graph between clauses; S3: Based on the reference directed graph, taking the target clause involved in the current generation task as the root node, tracing back its reference path upward, and constructing a clause mapping tree with clause numbers as nodes and reference relationships as edges; S4: extracting part or all of the node contents in the clause mapping tree as structured prompt information, inserting it into the input prompt of the large language model or embedding it into its generation control flow; S5: Generate a policy report paragraph using a large language model with controlled prompts, which contains citations of the target clause and its related clauses; S6: Output a structured policy text with a closed clause reference chain to recommend to users.
[0008] Furthermore, S1 specifically includes the following steps: Use text parsing algorithms based on regular expressions or grammar rules to identify clause numbers with legal formats; Bind each clause number to its corresponding clause text to form a clause node; A unique identifier is generated for each clause node. The identifier is composed of the policy document number and the clause number, and is used to track reference relationships across policy documents.
[0009] Furthermore, the clause number includes any one or more of the following formats: "Article X", "Chapter X Section Y", "XYZ".
[0010] Furthermore, S2 specifically includes the following steps: Identify the semantic expressions of citations contained in policy clauses based on a method combining keyword matching and dependency syntax analysis; Use named entity recognition technology to parse and standardize the referenced clause numbers or policy document numbers; Combined with syntactic context, we can identify implicit reference behaviors that are not explicitly numbered but have referential semantics and infer their target clauses; Based on the identified reference relationships, directed edges between the clause nodes are constructed to form a reference relationship graph structure including multiple clause nodes and their reference paths.
[0011] Furthermore, the reference semantic expression includes any one or more of the following explicit reference statements: "See Article X", "Execute according to Article X", "According to Article Y of a certain document".
[0012] Furthermore, step S3 specifically includes: Receive one or more target clause numbers specified by an enterprise requirement or a policy recommendation task; In the reference directed graph, starting from the target clause, traversing its referenced relationships upward along the edge direction, and recursively searching for all upper clauses existing in the reference chain; The traversed clause numbers are used as tree nodes and reference relationships as tree edges to construct an ordered tree structure with the target clause as the root and including all its upper reference paths; The clause mapping tree limits the maximum reference level depth.
[0013] Furthermore, step S4 specifically includes: For each node in the clause mapping tree, extract its clause number, core clause summary and clause reference level information to form a structured clause prompt unit; Sort several clause prompt units by reference level to construct a nested or list prompt structure; The structured prompt information is embedded into the input prompt of the large language model in a natural language prompt format or key-value pair embedding method to guide the generator to accurately reflect the clause reference relationship during the generation process; Alternatively, the structured prompt information is embedded into the decoding control flow of the large language model during the generation process as context information for the dynamic attention control mechanism.
[0014] Furthermore, step S5 specifically includes: Input the company's basic information, target policy topics, and structured prompt information constructed by the clause mapping tree into the pre-trained large language model; Control the large language model to automatically insert the number or clause summary of the target clause and its parenthetical clauses according to the prompt information when generating paragraphs related to policy basis in the policy report; The reference relationship of the clauses is reflected in the generated text in a natural language manner, including explicit expressions including any one or more of the following sentence patterns: "Based on the ×× clause", "Refer to Article × of the ×× document".
[0015] Furthermore, step S6 specifically includes: After the large language model is generated, the integrity of the clause references in the generated text is verified to determine whether all generated references have corresponding clause nodes in the clause mapping tree; If there is a missing clause number, a broken reference chain, or an incorrect reference order, the regeneration or completion process will be automatically triggered until a compliant structure with a closed clause reference chain is formed; The policy texts that have passed the reference chain closure check are packaged in a structured manner, and the content is organized according to the field labels of "Application Conditions", "Policy Basis", and "Applicable Objects"; The structured policy text is pushed to target enterprise users for policy declaration reference or personalized policy recommendation services.
[0016] The present invention also discloses a policy service recommendation system based on a large language model, comprising: The clause parsing module is used to parse the content of the policy document, extract the policy clauses with a numbering structure, and establish a unique identifier for each clause to form a clause node set; a reference relationship identification module, configured to identify explicit or implicit reference behaviors in the policy clauses, construct reference paths between clauses, and generate a directed reference graph between clauses; A clause mapping tree construction module is used to take the target clause involved in the current generation task as the root node, trace back its referenced links based on the reference path, and construct a clause mapping tree with clause numbers as nodes and reference relationships as edges; A prompt information construction module, configured to extract part or all of the node contents in the clause mapping tree as structured prompt information, and insert the prompt information into the input Prompt of the large language model or embed it into its generation control flow; A policy report generation module, configured to control the large language model to generate a policy support report paragraph based on the structured prompt information, and embed references to the target clause and its associated clauses in the generated content; The report output and recommendation module is used to verify the reference chain closure of the generated policy text, complete the structured organization, and recommend the text that meets the requirements to the target enterprise users.
[0017] The advantages of the present invention over the prior art are: This invention uses regular expressions and grammatical rule parsing to automatically identify clauses with numbering structures in policy documents and generate a unique identifier for each clause, supporting subsequent cross-file references and tracking. This solves the problem of inaccurate clause positioning and non-traceability in traditional text processing methods. Based on keyword matching, syntactic analysis, and named entity recognition technologies, this paper identifies explicit and implicit clause references and constructs a directed reference graph between clauses, significantly improving the recognition accuracy of clause associations and providing a foundation for subsequent clause chain generation and reference control. This invention introduces the concept of "clause mapping tree" for the first time. It uses the target clause as the root node to trace the reference path upwards to generate a closed, orderly and clear clause reference tree. This effectively solves the problems of broken reference chains, skipped sections or missed references in traditional generation models. By embedding information extracted from the clause mapping tree into the input prompt or decoding control flow of the large language model, this method allows the clause content and structure to explicitly guide the generation model, ensuring accurate clause citations and logical coherence in the output text, improving the compliance and applicability of the generated content, and more importantly, allowing the large model to better understand the reference context, thereby generating more accurate information. The present invention introduces a clause reference chain integrity check mechanism after generation, which can automatically detect abnormal situations such as missing clauses, incorrect numbering or disordered order, and trigger the regeneration process when necessary to ensure that the final output text has a closed reference chain and meets the standard requirements of policy compliance documents; This invention will output verified high-quality policy texts in a structured form and make recommendations based on the profile information of corporate users. It is widely applicable to scenarios such as policy declaration assistance, government consultation systems, and corporate intelligent recommendation platforms, significantly improving the intelligence level and practical value of policy services. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is the overall flow chart of the method of the present invention; Figure 2 is a flow chart of step S1 of the present invention; Figure 3 is a flow chart of step S2 of the present invention; Figure 4 is a flow chart of step S3 of the present invention; Figure 5 It is a flow chart of step S4 of the present invention. DETAILED DESCRIPTION
[0019] The specific embodiments of the present invention will be described below with reference to the accompanying drawings.
[0020] This paper proposes a policy service recommendation method based on a large language model. Through in-depth analysis and structured processing of policy documents, combined with the powerful generation capabilities of the large language model, it provides users with high-quality, compliant and personalized policy recommendation services.
[0021] As shown in FIG1 , the method of the present invention specifically comprises the following steps: S1: Parse the content of the policy document, extract the policy clauses with a numbering structure, and establish a unique identifier for each clause to form a clause node set; S2: Identify explicit or implicit reference behaviors in the policy clauses, construct reference paths between clauses, and generate a directed reference graph between clauses; S3: Based on the reference directed graph, taking the target clause involved in the current generation task as the root node, tracing back its reference path upward, and constructing a clause mapping tree with clause numbers as nodes and reference relationships as edges; S4: extracting part or all of the node contents in the clause mapping tree as structured prompt information, inserting it into the input prompt of the large language model or embedding it into its generation control flow; S5: Generate a policy report paragraph using a large language model with controlled prompts, which contains citations of the target clause and its related clauses; S6: Output a structured policy text with a closed clause reference chain to recommend to users.
[0022] More specifically, policy documents are usually in the form of complex texts, which contain a large number of clauses with a specific numbering structure, such as "Article 1", "Chapter 2 Section 3" or "1.2.3". Figure 2 As shown, in order to achieve efficient management of these clauses and subsequent reference tracking, it is first necessary to systematically parse the policy document, extract all clauses with a numbering structure, and generate a unique identifier for each clause.
[0023] In specific implementation, text parsing algorithms can be used to complete this task. One feasible method is to design matching rules based on regular expressions to identify clause numbers in different formats. For example, for the common format of "Article X", the regular expression "Article\d+Article" can be used to match, where "\d+" represents one or more numbers; for nested numbers such as "XYZ", "(\d+\.)+\d+" can be used to capture multi-level structures. Suppose a policy document contains the clause "Article 3 Enterprise Support Policy". After matching with regular expressions, "Article 3" can be extracted as the number and bound to the main content of "Enterprise Support Policy" to form a clause node.
[0024] To ensure that clause nodes are unique across the entire system, an identifier must be generated for each node. A simple and effective approach is to concatenate the policy document number with the clause number. For example, if the policy document number is "Finance and Taxation
[2023] No. 10" and the clause number is "Article 3," the unique identifier for the clause could be "Finance and Taxation
[2023] No. 10 - Article 3." The benefit of this design is that even when dealing with multiple policy documents, the identifier allows for quick locating of specific clauses, avoiding confusion.
[0025] After parsing, all extracted clause nodes form a set. This set lays the foundation for subsequent reference relationship identification and structured processing. For example, if a document contains three clauses: "Article 1 General Provisions," "Article 2 Scope of Application," and "Article 3 Enterprise Support Policies," the resulting clause node set will include these three nodes, each with a unique identifier and corresponding text content.
[0026] Policy clauses often have complex reference relationships. For example, a clause might explicitly mention "see Article 5" or "in accordance with Article 2 of Document No. 5 of the Ministry of Finance and Taxation
[2022] ," or it might implicitly mention "implemented in accordance with the aforementioned provisions." As shown in Figure 3, to fully capture these relationships, it is necessary to identify explicit and implicit references within clauses and construct a directed reference graph that reflects the dependencies between clauses.
[0027] Explicit citation identification can be achieved by combining keyword matching and dependency parsing techniques. Common explicit citation phrases include "See Article X," "Execute in accordance with Article X," or "According to Article Y of a certain document." For example, "See Article 5" is first located using the keyword "See," and then dependency parsing is used to extract "Article 5" as the target of the citation. Furthermore, named entity recognition (NER) technology can further standardize these numbers, ensuring that even slightly different citation formats (e.g., "Article 5" versus "Article 5") are correctly parsed as the same clause.
[0028] Implicit references are more challenging because they don't directly provide numbers. For example, a statement like "implemented in accordance with the aforementioned provisions" requires contextual analysis to infer its target clause. One approach is to use reference resolution techniques in natural language processing, combined with syntactic context, to determine that "the aforementioned provisions" likely refers to the closest relevant clause in the preceding text. Assuming that "Article 3" mentions "implemented in accordance with the aforementioned provisions" and "Article 2" describes the scope of application, semantic analysis can infer that "Article 3" implicitly references "Article 2."
[0029] After identifying all reference relationships, a directed graph can be constructed. Each node in the graph represents a clause node, and edges represent reference relationships, pointing from the referencer to the referenced. For example, if "Article 3" references "Article 1" and "Article 2," the graph will have two edges: from "Article 3" to "Article 1" and from "Article 3" to "Article 2." This directed reference graph intuitively demonstrates the dependency structure between clauses and provides data support for the subsequent construction of the clause mapping tree.
[0030] In real-world applications, users often focus on specific target clauses and want to understand the reference chain behind them. To meet this need, we need to start with the target clause and trace its reference path upwards based on the reference directed graph, constructing a clause mapping tree with clause numbers as nodes and reference relationships as edges.
[0031] In specific implementation, as shown in Figure 4, one or more target clause numbers must first be received. These numbers may come from enterprise needs or policy recommendation tasks. For example, if an enterprise is interested in "Finance and Taxation
[2023] No. 10 - Article 3," this is used as the root node, and all superordinate clauses that reference it are searched in the reference directed graph. During the recursive traversal, each encountered clause number is added as a tree node, and the reference relationship is added as a tree edge, ultimately forming an ordered tree structure. If "Article 3" references "Article 1," and "Article 1" references "Finance and Taxation
[2022] No. 5 - Article 2," the clause mapping tree will contain three layers of nodes: the root node "Article 3," its child node "Article 1," and the next layer, "Finance and Taxation
[2022] No. 5 - Article 2."
[0032] To prevent excessively long reference chains from leading to an overly complex tree structure, you can set a maximum reference depth, for example, limiting traversal to no more than five levels. If this depth is exceeded, traversal stops, retaining only the first five levels. This limit can effectively control computational costs while ensuring readability in real applications.
[0033] The clause mapping tree constructed in this way can provide users with a clear view, showing the logical relationship between the target clause and all its higher-level referenced clauses, helping users to deeply understand the background and basis of the policy.
[0034] In order for a large language model to generate accurate policy reports using the term mapping tree, key information needs to be extracted from it and embedded into the model's input or generation process in a structured manner.
[0035] For each node in the clause mapping tree, three types of information can be extracted: the clause number, the core clause summary, and the reference level. For example, for "Cai Shui
[2023] No. 10 - Article 3," the extracted clause summary might be "Enterprise support policies include tax exemptions and reductions," with a reference level of 1 (assuming it is the root node). This information constitutes a structured clause prompt unit. Next, all prompt units are sorted by reference level, forming a nested or list-like structure. For example, a nested prompt might be "Article 3 (Level 1) -> Article 1 (Level 2) -> Cai Shui
[2022] No. 5 - Article 2 (Level 3)."
[0036] As shown in Figure 5, there are two ways to embed this information. The first is to insert the prompt information directly into the input prompt of the large language model, using natural language descriptions or key-value pairs. For example, the input prompt could be "Please generate a policy report based on the following clause relationships: Article 3 (Enterprise Support Policy) references Article 1 (General Provisions), and Article 1 references Article 2 (Tax Policy) of Caishui
[2022] No. 5." The second approach is to use the prompt information as contextual information for dynamic attention control during the generation process, guiding the model to focus on specific clauses. This approach is suitable for scenarios where generated content needs to be adjusted in real time.
[0037] Through this structured embedding, the large language model can accurately understand the reference relationship between clauses and ensure the logic and compliance of the generated content.
[0038] When generating a policy report, basic company information, the target policy topic, and structured prompt information are integrated and fed into a pre-trained large language model. Based on this input, the model generates paragraphs related to the policy rationale and automatically inserts the target clause and its parenthetical references, as well as their numbers or summaries.
[0039] For example, assuming the company information is "A certain technology company, registered capital of 10 million yuan," and the target policy topic is "tax reduction and exemption," the structured prompt information includes "Article 3" and its reference chain. The model might generate the following paragraph: "A certain technology company meets the conditions for tax reduction and exemption. According to Article 3 of Document No. 10 of the Ministry of Finance and Taxation
[2023] , the enterprise support policy includes tax reduction and exemption measures. Referring to Article 1 of the General Provisions, this policy applies to enterprises with registered capital exceeding 5 million yuan. Furthermore, according to Article 2 of Document No. 5 of the Ministry of Finance and Taxation
[2022] , the tax reduction and exemption ratios are further clarified." This text, through natural language sentence structures (such as "according to Article XX" and "referring to Article XX of Document XX"), reflects the reference relationship between the clauses, which is both clear and compliant.
[0040] The architecture of large language models can utilize Transformer-based pre-trained models, such as BERT or GPT variants. The training process typically involves pre-training on a large-scale corpus of policy text, followed by fine-tuning on a specific policy recommendation task. During fine-tuning, annotated datasets containing clause references can be used to optimize the model's accuracy during generation.
[0041] After generation is complete, to ensure text quality, clause references need to be verified for completeness. First, check that all referenced clause numbers have corresponding nodes in the clause mapping tree, for example, verifying that "Clause 3" actually exists. Next, check that the reference chain is closed, meaning there are no interruptions or incorrect sequences. If a problem is found, such as "Clause 1" referencing a non-existent clause, a regeneration process is automatically triggered, adjusting model parameters or prompts until the generated content meets the requirements.
[0042] Verified text can be structured and packaged, organized by fields such as "Application Requirements," "Policy Basis," and "Applicable Targets." For example, "Application Requirements" might describe enterprise size requirements, "Policy Basis" might list all relevant clauses, and "Applicable Targets" might clarify the scope of application. Finally, this structured text is pushed to target enterprise users for policy submission or personalized recommendations.
[0043] As described above, the present invention also discloses a policy service recommendation system based on a large language model, comprising: The clause parsing module is used to parse the content of the policy document, extract the policy clauses with a numbering structure, and establish a unique identifier for each clause to form a clause node set; a reference relationship identification module, configured to identify explicit or implicit reference behaviors in the policy clauses, construct reference paths between clauses, and generate a directed reference graph between clauses; A clause mapping tree construction module is used to take the target clause involved in the current generation task as the root node, trace back its referenced links based on the reference path, and construct a clause mapping tree with clause numbers as nodes and reference relationships as edges; A prompt information construction module, configured to extract part or all of the node contents in the clause mapping tree as structured prompt information, and insert the prompt information into the input Prompt of the large language model or embed it into its generation control flow; A policy report generation module, configured to control the large language model to generate a policy support report paragraph based on the structured prompt information, and embed references to the target clause and its associated clauses in the generated content; The report output and recommendation module is used to verify the reference chain closure of the generated policy text, complete the structured organization, and recommend the text that meets the requirements to the target enterprise users.
[0044] As can be seen from the above, the present invention uses regular expressions and grammatical rules to automatically identify clauses and generate unique identifiers, solving the problem of inaccurate clause positioning in traditional methods. The construction of a reference directed graph and a clause mapping tree significantly improves the recognition accuracy and structural clarity of reference relationships. Embedding structured prompt information and reference chain integrity verification ensures the compliance and practicality of the generated content. These steps together support applications in various scenarios such as policy application assistance, government consultation, and enterprise recommendations.
[0045] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A policy service recommendation method based on a large language model, characterized in that: The steps include: S1: Parse the content of the policy document, extract the policy clauses with a numbering structure, and establish a unique identifier for each clause to form a clause node set; S2: Identify explicit or implicit reference behaviors in the policy clauses, construct reference paths between clauses, and generate a directed reference graph between clauses; S3: Based on the reference directed graph, taking the target clause involved in the current generation task as the root node, tracing back its reference path upward, and constructing a clause mapping tree with clause numbers as nodes and reference relationships as edges; S4: extracting part or all of the node contents in the clause mapping tree as structured prompt information, inserting it into the input prompt of the large language model or embedding it into its generation control flow; S5: Generate a policy report paragraph using a large language model with controlled prompts, which contains citations of the target clause and its related clauses; S6: Output a structured policy text with a closed clause reference chain to recommend to users.
2. The method according to claim 1, characterized in that S1 specifically includes the following steps: Use text parsing algorithms based on regular expressions or grammar rules to identify clause numbers with legal formats; Bind each clause number to its corresponding clause text to form a clause node; A unique identifier is generated for each clause node. The identifier is composed of the policy document number and the clause number, and is used to track reference relationships across policy documents.
3. The method according to claim 2, characterized in that The clause number includes any one or more of the following formats: "Article X", "Chapter X, Section Y", "XYZ".
4. The method according to claim 1, characterized in that S2 specifically includes the following steps: Identify the semantic expressions of citations contained in policy clauses based on a method combining keyword matching and dependency syntax analysis; Use named entity recognition technology to parse and standardize the referenced clause numbers or policy document numbers; Combined with syntactic context, we can identify implicit reference behaviors that are not explicitly numbered but have referential semantics and infer their target clauses; Based on the identified reference relationships, directed edges between the clause nodes are constructed to form a reference relationship graph structure including multiple clause nodes and their reference paths.
5. The method according to claim 4, characterized in that: The reference semantic expression includes any one or more of the following explicit reference statements: "see Article X", "implement according to Article X", "according to Article Y of a certain document".
6. The method according to claim 1, characterized in that Step S3 specifically includes: Receive one or more target clause numbers specified by an enterprise requirement or a policy recommendation task; In the reference directed graph, starting from the target clause, traversing its referenced relationships upward along the edge direction, and recursively searching for all upper clauses existing in the reference chain; The traversed clause numbers are used as tree nodes and reference relationships as tree edges to construct an ordered tree structure with the target clause as the root and including all its upper reference paths; The clause mapping tree limits the maximum reference level depth.
7. The method according to claim 1, characterized in that: Step S4 specifically includes: For each node in the clause mapping tree, extract its clause number, core clause summary and clause reference level information to form a structured clause prompt unit; Sort several clause prompt units by reference level to construct a nested or list prompt structure; The structured prompt information is embedded into the input prompt of the large language model in a natural language prompt format or key-value pair embedding method to guide the generator to accurately reflect the clause reference relationship during the generation process; Alternatively, the structured prompt information is embedded into the decoding control flow of the large language model during the generation process as context information for the dynamic attention control mechanism.
8. The method according to claim 1, characterized in that: Step S5 specifically includes: Input the company's basic information, target policy topics, and structured prompt information constructed by the clause mapping tree into the pre-trained large language model; Control the large language model to automatically insert the number or clause summary of the target clause and its parenthetical clauses according to the prompt information when generating paragraphs related to policy basis in the policy report; The reference relationship of clauses is reflected in the generated text in a natural language manner, including explicit expressions including any one or more of the following sentence patterns: "based on ×× clause", "with reference to Article × of ×× document".
9. The method according to claim 1, characterized in that: Step S6 specifically includes: After the large language model is generated, the integrity of the clause references in the generated text is verified to determine whether all generated references have corresponding clause nodes in the clause mapping tree; If there is a missing clause number, a broken reference chain, or an incorrect reference order, the regeneration or completion process will be automatically triggered until a compliant structure with a closed clause reference chain is formed; Structurally package the policy text that has passed the reference chain closure check, organizing the content according to the field labels of "Application Conditions," "Policy Basis," and "Applicable Targets." The structured policy text is pushed to target enterprise users for policy declaration reference or personalized policy recommendation services.
10. A policy service recommendation system based on a large language model, characterized in that: include: The clause parsing module is used to parse the content of the policy document, extract the policy clauses with a numbering structure, and establish a unique identifier for each clause to form a clause node set; a reference relationship identification module, configured to identify explicit or implicit reference behaviors in the policy clauses, construct reference paths between clauses, and generate a directed reference graph between clauses; A clause mapping tree construction module is used to take the target clause involved in the current generation task as the root node, trace back its referenced links based on the reference path, and construct a clause mapping tree with clause numbers as nodes and reference relationships as edges; A prompt information construction module, configured to extract part or all of the node contents in the clause mapping tree as structured prompt information, and insert the prompt information into the input Prompt of the large language model or embed it into its generation control flow; A policy report generation module, configured to control the large language model to generate a policy support report paragraph based on the structured prompt information, and embed references to the target clause and its associated clauses in the generated content; The report output and recommendation module is used to verify the reference chain closure of the generated policy text, complete the structured organization, and recommend the text that meets the requirements to the target enterprise users.
Citation Information
Cited By
File processing method, device and product
CN120911442A
Method for analyzing minimum device list manual and related device
CN121328534A
Tax policy semantic analysis and automatic adaptation engine for scientific research business
CN121745104A