LLM Content Rewriting With Semantic Graphs for Document Coherence
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current AI chatbots are limited in generating and editing complex, coherent long-form documents due to token size constraints and require extensive user input, leading to inconsistencies and disjointed text flow.
Innovation Solution
A system using a large language model (LLM) generates a semantic graph to populate a template with enterprise data, allowing section-by-section editing and rewriting while maintaining coherence through a bottom-up approach and deep learning analysis to ensure logical, stylistic, and grammatical consistency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If current AI chatbots generate long-form documents using existing techniques, then they can produce text content, but the documents suffer from inconsistencies and disjointed text flow due to token size constraints requiring input to be broken into smaller chunks
Solution Approach 1:
The system segments the long-form document generation process into distinct phases: outline generation, section-by-section content creation, and synthesis. The outline is generated first to establish the overall structure and context, then each section is generated separately while referencing the outline to maintain coherence, avoiding the need to process the entire document in one token batch
Solution Approach 2:
The system performs preliminary action by generating a comprehensive outline and structural framework before generating the actual content. This preliminary structure serves as a reference guide that maintains context and coherence throughout the subsequent section-by-section generation process, eliminating the need to load entire document context into token limits
2Loss of information
If user input is increased to provide more context for long-form document generation, then the document structure and context can be better determined, but the token limit is exceeded causing error messages
Solution Approach 1:
The context is segmented into hierarchical levels: the outline contains high-level context and structure, while individual sections contain detailed context relevant only to that section. This segmentation allows the system to maintain necessary context without exceeding token limits by only loading relevant portions into the LLM at each generation step
Solution Approach 2:
The outline acts as an intermediary between the overall document context and individual section generation. It stores and transmits the essential context and structural information that guides section generation without requiring the entire document context to be present in the token input, thus mediating between context retention needs and token limit constraints
3Ease of operation
If a portion of text is edited by providing new input with instructions, then the specific portion can be modified, but the entire document must be regenerated causing loss of flow and coherence in other portions
Solution Approach 1:
The document is segmented into independent editable sections based on the outline structure. When a user requests editing of a specific section, only that section is regenerated while other sections remain unchanged. The outline serves as a stable framework that maintains overall document coherence even as individual sections are modified, eliminating the need to regenerate the entire document
Solution Approach 2:
The outline is generated as a preliminary structure that remains relatively stable throughout the editing process. This preliminary framework is created once and serves as the anchor for all subsequent section generation and editing operations, allowing sections to be independently modified while maintaining overall document flow and coherence without requiring full document regeneration
4Adaptability or versatility
If the entire document is regenerated to edit a portion, then the edited portion can be updated with new instructions, but time is lost and other portions may no longer be in flow with the edited portion
Solution Approach 1:
The document editing process is segmented to allow localized modifications. Only the specific section requiring editing is regenerated based on new user instructions, while the rest of the document remains intact. This segmentation dramatically reduces the time required for editing compared to full document regeneration, while the stable outline framework ensures continued coherence across the entire document
Data Source
AI summary
Systems and methods for using large language models (LLM) to generate and edit content items are described. The methods generate a template of a content item based on user input and populate the template based on data obtained from querying an LLM generated semantic graph that includes data sources to which a user is authorized access. Once generated, on or more sources provided are used for editing the identified text of the generated content item. If multiple sources are provided, they are weighted based on factors and their priority is determined. Raw data from the provided source(s) is indexed. An LLM using the identified text as an input, queries the index to identify data relevant for editing the identified text. The relevant data is then used to edit, rewrite and/or regenerate the identified text and make the other unedited text in the content item coherent with the edited text.


