Systems and methods for using large language model(s) to write, edit, and rewrite coherent content items
View Patent ↗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 has authorized access. Once generated, one 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) are 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 unedited text in the content item coherent with the edited text.
1 . A method comprising:
generating, by control circuitry, a long-form textual content item using a first language model based on a user request, wherein the generated long-form textual content item includes a plurality of sections organized in a hierarchical structure;
receiving a request to edit a particular section or a portion of the particular section, comprising identified text from the plurality of sections, wherein the request includes a link to one or more sources to be used for editing the particular section or portion of the particular section;
identifying, by the control circuitry, the particular section or portion of the particular section to be edited based on the received request;
identifying, using a second language model, a subset of relevant data from the received one or more sources, wherein the second language model uses data from the particular section or portion of the particular section to identify the subset of relevant data from the received one or more sources; and
identifying, using a second language model, a subset of relevant data from the one or more sources, wherein identifying the subset comprises: indexing raw data from the one or more sources in a semantic graph that establishes semantic relationships between data items from the sources;
generating, by the second language model, a plurality of targeted search queries to the semantic graph based on analyzing the context and content of the identified text within the particular section;
accessing a narrow set of data from the semantic graph that matches the plurality of targeted search queries;
editing the particular section or portion of the particular section using the narrow set of data; and
automatically determining, by the control circuitry using the second language model, that a second unedited section in the long-form content item has become incoherent relative to the edited particular section by comparing a first coherency value of the long-form content item calculated prior to editing with a second coherency value calculated after editing; and in response to the determination, automatically synchronizing the second unedited section to make it coherent with the edited particular section.
2 . The method of claim 1 , further comprising:
receiving a second request to edit a second section or portion of the second section of the generated long-form content item to make it coherent with the edited particular section or portion of the particular section;
inputting data from the second section or portion of the second section into the second language model; and
editing the second section to make it coherent with the edited particular section based on the second coherency value.
3 . The method of claim 1 , wherein automatically determining that the second unedited section has become incoherent comprises:
applying a coherency operation to synchronize the unedited sections such that the long-form content item reads as a single coherent document.
4 . The method of claim 1 , wherein the request to edit the particular section or the portion of the particular section is received when the particular section or the portion of the particular section is selected on a user interface, hovered upon by a cursor or a mouse, or touched on a touch screen user interface.
5 . The method of claim 1 , wherein identifying the particular section or portion of the particular section to be edited based on the received request comprises visually distinguishing the particular section or portion of the particular section to be edited from other sections in the long-form content item.
6 . The method of claim 5 , wherein visually distinguishing includes highlighting the particular section or portion of the particular section to be edited.
7 . The method of claim 1 , wherein identifying the subset of relevant data from the received one or more sources comprises:
accessing raw data from at least one of the one or more sources;
indexing the raw data from the one or more sources and storing it in a semantic graph index;
generating a plurality of queries to the index, wherein the queries are generated based on analyzing the context of the identified text; and
identifying the narrow set of data relevant for editing the particular section or the portion of the particular section, wherein the narrowed set of data is identified based on results of the querying.
8 . The method of claim 1 , further comprising:
determining a weight of each of the one or more sources that are to be used for editing the particular section or portion of the particular section; and
prioritizing the highest weighted source, from the one or more sources, in editing the particular section or portion of the particular section, wherein the weight is determined based on a plurality of weighting factors.
9 . The method of claim 1 , further comprising:
determining, using deep learning technique, a context of the edited particular section or portion of the particular section; and
determining based on the determined context whether another section or portion of the another section in the long-form content item contextually conflicts with the edited particular section or portion of the particular section.
10 . The method of claim 9 , further comprising, executing conflict resolution measures provided via a user interface if a determination is made that the another section in the long-form content item contextually conflicts with the edited particular section or portion of the particular section.
11 . The method of claim 1 , wherein the first and the second language models are a same language model.
12 . The method of claim 1 , further comprising:
determining a context of the particular section or the portion of the particular section to be edited;
suggesting, based on the determined context, a source authored by an employee of a same enterprise as a user requesting the editing of the particular section or the portion of the particular section; and
using the source authored by the employee of the same enterprise as the user for editing the particular section or the portion of the particular section.
13 . A system comprising:
communication circuitry configured to access a user device; and
control circuitry configured to:
generate, using an AI orchestrator, a long-form textual content item using a first language model based on a user request received from the user device, wherein the generated long-form textual content item includes a plurality of sections organized in a hierarchical structure;
receive a request to edit a particular section or a portion of the particular section, comprising identified text from the plurality of sections, wherein the request includes a link to one or more sources that are to be used for editing the particular section or portion of the particular section;
identify the particular section or portion of the particular section to be edited based on the received request;
identify, using a second language model, a subset of relevant data from the received one or more sources, comprising:
indexing raw data from the one or more sources in a semantic graph; generating a plurality of targeted queries to the semantic graph based on analyzing the context of the identified text; and
identifying a narrow set of data from the semantic graph based on results of the queries;
edit the particular section or portion of the particular section using the identified narrow set of data; and
automatically synchronize unedited sections of the long-form content item by performing a coherency operation that evaluates logical and stylistic flow between the edited particular section and the unedited sections based on comparing coherency values calculated before and after the editing.
14 . The system of claim 13 , further comprising, the control circuitry configured to:
calculate a coherency value of all sections in a template prior to editing; compare the coherency value prior to editing with a coherency value calculated after editing the particular section; and
edit the unedited section to make it coherent if a threshold percentage of coherency change is detected.
15 . The system of claim 13 , further comprising, the control circuitry configured to:
automatically determine that a second section in the content item has become incoherent due to editing of the particular section or portion of the particular section; and
in response to determining that the second section in the content item has become incoherent due to editing of the particular section or portion of the particular section, edit the second section to make it coherent with the edited particular section or portion of the particular section.
16 . The system of claim 13 , wherein identifying the particular section or portion of the particular section to be edited based on the received request comprises the control circuitry configured to visually distinguish the particular section or portion of the particular section to be edited from other sections in the content item.
17 . The system of claim 13 , wherein identifying the subset of relevant data from the received one or more sources comprises, the control circuitry configured to:
access raw data from at least one of the one or more sources;
index the raw data from the one or more sources and storing it in a semantic graph index;
generate a plurality of queries to the index, wherein the queries are generated based on analyzing the context of the identified text; and
identify the narrow set of data relevant for editing the particular section or the portion of the particular section, wherein the narrowed set of data is identified based on results of the querying.
18 . The system of claim 13 , further comprising, the control circuitry configured to:
determine a weight of each of the one or more sources that are to be used for editing the particular section or portion of the particular section; and
prioritize the highest weighted source, from the one or more sources, in editing the particular section or portion of the particular section, wherein the weight is determined based on a plurality of weighting factors.
19 . The system of claim 13 , further comprising, the control circuitry configured to:
determine, using a using deep technique, a context of the edited particular section or portion of the particular section; and
determine based on the determined context whether another section or portion of the another section in the content item contextually conflicts with the edited particular section or portion of the particular section.
20 . The system of claim 19 , further comprising, the control circuitry configured to execute conflict resolution measures if a determination is made that the another section in the content item contextually conflicts with the edited particular section or portion of the particular section.