IP Library Granted Patent US 12,724,983
Granted Patent B2
US 12,724,983 · App. 19/080,465 · Granted Sep 1, 2026

Natural language generation using knowledge graph incorporating textual summaries

Inventor: Waseem AlShikh (Boca Raton, FL)
Assignee: Writer, Inc.
G06F40/40G06F16/33295G06F16/345G06F40/30G06N5/04
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,724,983
App. No.
19/080,465
Granted
Sep 1, 2026
Kind
B2
Abstract

Some embodiments relate to receiving a natural-language textual sequence representing; retrieving, from a knowledge graph, a first textual passage and a second textual passage based on rankings with respect to the natural-language textual sequence, a first textual summary summarizing textual information in a first vicinity of the first textual passage, and a second textual summary summarizing textual information in a vicinity of the second textual passage; obtaining the textual output in response to the textual input using a language model by encoding a first intermediate output based on the natural-language textual sequence, the first textual passage, and the first textual summary, encoding a second intermediate output based on the natural language textual sequence, the second textual passage, and the second textual summary, and decoding a concatenation of the first intermediate output and the second intermediate output; and providing an output to a user based on the textual output.

Claims (46)

1 . A computer-implemented method for producing a textual output in response to a textual input relating to a domain, the method comprising:

receiving a natural-language textual sequence representing the textual input;

retrieving, from a knowledge graph associated with the domain, a first textual passage and a second textual passage based on rankings with respect to the natural-language textual sequence, a first textual summary summarizing textual information in a first vicinity of the first textual passage, and a second textual summary summarizing textual information in a second vicinity of the second textual passage, wherein:

the first vicinity and the second vicinity are determined based on a number of tokens that are before and/or after the first textual passage and the second textual passage, respectively, and the number of tokens is determined based on a length of a document or a determination of an amount of text that has a relationship with textual passages, wherein tokens represent words, subwords, or characters of the textual passages,

the tokens are converted into high dimensional input sequence of vectors where a high dimensional input sequence of vector numerically represents a token and relationships between the plurality of tokens in a representation that is processed by a language model,

the language model includes one or more encoders and decoders to process the high dimensional input sequence of vectors to generate an output sequence used to determine an output of the language model, wherein each encoder includes plurality of encoder layers and each decoder includes plurality of decoder layers, and

the knowledge graph is generated based on textual passages, descriptions of associations between the textual passages, and textual summaries obtained by providing at least a portion of a corpus of textual information to the language model, the corpus of textual information includes a plurality of documents, wherein the textual passages include text in the document, the corpus of textual information, or variations on the text in the document or the corpus of textual information;

obtaining the textual output in response to the textual input using the language model by encoding a first intermediate outputs based on the natural-language textual sequence, the first textual passage, and the first textual summary, encoding a second intermediate outputs based on the natural-language textual sequence, the second textual passage, and the second textual summary, and ranking the first intermediate outputs and the second intermediate outputs and providing the language model with a subset of the ranked first intermediate outputs and second intermediate outputs for decoding a concatenation of the subset of the first intermediate outputs and the second intermediate outputs; and

providing the output to a user on a user interface based on the textual output.

2 . The method of claim 1 , wherein retrieving further includes retrieving, from the knowledge graph associated with the domain, a third textual passage based on a ranking with respect to its relationship to the natural-language textual sequence and a third textual summary summarizing textual information in a vicinity of the third textual passage.

3 . The method of claim 1 , wherein retrieving further includes retrieving, from the knowledge graph associated with the domain, a fourth textual summary based on a second ranking with respect to the natural-language textual sequence, wherein obtaining the textual output using the language model further includes encoding a fourth intermediate output based on the natural-language textual sequence and the fourth textual summary.

4 . The method of claim 3 , wherein the concatenation of intermediate outputs includes at least one of a third intermediate output and the fourth intermediate output.

5 . The method of claim 1 , wherein the knowledge graph includes a hierarchical structure corresponding to the document, with a root representing a summary of the document, nodes representing textual summaries of sections, and leaves representing textual passages, wherein retrieving further includes retrieving the summary of the document corresponding to the root and a fifth textual summary summarizing information in a vicinity of the first textual passage.

6 . The method of claim 5 , wherein encoding the first intermediate output is further based on the summary of the document and the fifth textual summary, wherein the first vicinity includes a first set of textual information and the second vicinity includes the first set of textual information and an additional second set of textual information.

7 . The method of claim 1 , wherein the language model is trained to process multiple textual passages and summaries jointly to generate a more contextually relevant textual output.

8 . A computer-program product tangibly embodied in a non-transitory machine-readable storage medium, including instructions configured to cause one or more data processors to perform a set of actions for producing a textual output in response to a textual input relating to a domain, the set of actions comprising:

receiving a natural-language textual sequence representing the textual input;

retrieving, from a knowledge graph associated with the domain, a first textual passage and a second textual passage based on rankings with respect to the natural-language textual sequence, a first textual summary summarizing textual information in a first vicinity of the first textual passage, and a second textual summary summarizing textual information in a second vicinity of the second textual passage, wherein:

the first vicinity and the second vicinity are determined based on a number of tokens that are before and/or after the first textual passage and the second textual passage, respectively, and the number of tokens is determined based on a length of a document or a determination of an amount of text that has a relationship with textual passages, wherein tokens represent words, subwords, or characters of the textual passages,

the tokens are converted into high dimensional input sequence of vectors where a high dimensional input sequence of vector numerically represents a token and relationships between the plurality of tokens in a representation that is processed by a language model,

the language model includes one or more encoders and decoders to process the high dimensional input sequence of vectors to generate an output sequence used to determine an output of the language model, wherein each encoder includes plurality of encoder layers and each decoder includes plurality of decoder layers, and

the knowledge graph is generated based on textual passages, descriptions of associations between the textual passages, and textual summaries obtained by providing at least a portion of a corpus of textual information to the language model, the corpus of textual information includes a plurality of documents, wherein the textual passages include text in the document, the corpus of textual information, or variations on the text in the document or the corpus of textual information;

obtaining the textual output in response to the textual input using the language model by encoding a first intermediate outputs based on the natural-language textual sequence, the first textual passage, and the first textual summary, encoding a second intermediate outputs based on the natural-language textual sequence, the second textual passage, and the second textual summary, and re-ranking the first intermediate outputs and the second intermediate outputs and providing the language model with a subset of the ranked first intermediate outputs and second intermediate outputs for decoding a concatenation of the subset of the first intermediate outputs and the second intermediate outputs; and

providing the output to a user on a user interface based on the textual output.

9 . The computer-program product of claim 8 , wherein retrieving further includes retrieving, from the knowledge graph associated with the domain, a third textual passage based on a ranking with respect to its relationship to the natural-language textual sequence and a third textual summary summarizing textual information in a vicinity of the third textual passage.

10 . The computer-program product of claim 8 , wherein retrieving further includes retrieving, from the knowledge graph associated with the domain, a fourth textual summary based on a second ranking with respect to the natural-language textual sequence, wherein obtaining the textual output using the language model further includes encoding a fourth intermediate output based on the natural-language textual sequence and the fourth textual summary.

11 . The computer-program product of claim 10 , wherein the concatenation of intermediate outputs includes at least one of a third intermediate output and the fourth intermediate output.

12 . The computer-program product of claim 8 , wherein the knowledge graph includes a hierarchical structure corresponding to the document, with a root representing a summary of the document, nodes representing textual summaries of sections, and leaves representing textual passages, wherein retrieving further includes retrieving the summary of the document corresponding to the root and a fifth textual summary summarizing information in a vicinity of the first textual passage.

13 . The computer-program product of claim 12 , wherein encoding the first intermediate output is further based on the summary of the document and the fifth textual summary, wherein the first vicinity includes a first set of textual information and the second vicinity includes the first set of textual information and an additional second set of textual information.

14 . The computer-program product of claim 8 , wherein the language model is trained to process multiple textual passages and summaries jointly to generate a more contextually relevant textual output.

15 . A system comprising:

one or more processors;

one or more non-transitory computer-readable media storing instructions, which, when executed by the system, cause the system to perform a set of actions for producing a textual output in response to a textual input relating to a domain, the set of actions comprising:

receiving a natural-language textual sequence representing the textual input;

retrieving, from a knowledge graph associated with the domain, a first textual passage and a second textual passage based on rankings with respect to the natural-language textual sequence, a first textual summary summarizing textual information in a first vicinity of the first textual passage, and a second textual summary summarizing textual information in a second vicinity of the second textual passage, wherein:

the first vicinity and the second vicinity are determined based on a number of tokens that are before and/or after the first textual passage and the second textual passage, respectively, and the number of tokens is determined based on a length of a document or a determination of an amount of text that has a relationship with textual passages, wherein tokens represent words, subwords, or characters of the textual passages,

the tokens are converted into high dimensional input sequence of vectors where a high dimensional input sequence of vector numerically represents a token and relationships between the plurality of tokens in a representation that is processed by a language model,

the language model includes one or more encoders and decoders to process the high dimensional input sequence of vectors to generate an output sequence used to determine an output of the language model, wherein each encoder includes plurality of encoder layers and each decoder includes plurality of decoder layers, and

the knowledge graph is generated based on textual passages, descriptions of associations between the textual passages, and textual summaries obtained by providing at least a portion of a corpus of textual information to the language model, the corpus of textual information includes a plurality of documents, wherein the textual passages include text in the document, the corpus of textual information, or variations on the text in the document or the corpus of textual information;

obtaining the textual output in response to the textual input using the language model by encoding a first intermediate outputs based on the natural-language textual sequence, the first textual passage, and the first textual summary, encoding a second intermediate outputs based on the natural-language textual sequence, the second textual passage, and the second textual summary, and ranking the first intermediate outputs and the second intermediate outputs and providing the language model with a subset of the ranked first intermediate outputs and second intermediate outputs for decoding a concatenation of the subset of the first intermediate outputs and the second intermediate outputs; and

providing the output to a user on a user interface based on the textual output.

16 . The system of claim 15 , wherein retrieving further includes retrieving, from the knowledge graph associated with the domain, a third textual passage based on a ranking with respect to its relationship to the natural-language textual sequence and a third textual summary summarizing textual information in a vicinity of the third textual passage.

17 . The system of claim 15 , wherein retrieving further includes retrieving, from the knowledge graph associated with the domain, a fourth textual summary based on a second ranking with respect to the natural-language textual sequence, wherein obtaining the textual output using the language model further includes encoding a fourth intermediate output based on the natural-language textual sequence and the fourth textual summary.

18 . The system of claim 17 , wherein the concatenation of intermediate outputs includes at least one of a third intermediate output and the fourth intermediate output.

19 . The system of claim 15 , wherein the knowledge graph includes a hierarchical structure corresponding to the document, with a root representing a summary of the document, nodes representing textual summaries of sections, and leaves representing textual passages, wherein retrieving further includes retrieving the summary of the document corresponding to the root and a fifth textual summary summarizing information in a vicinity of the first textual passage.

20 . The system of claim 19 , wherein encoding the first intermediate output is further based on the summary of the document and the fifth textual summary, wherein the first vicinity includes a first set of textual information and the second vicinity includes the first set of textual information and an additional second set of textual information.

Assignments (2)
SECURITY INTEREST Recorded May 21, 2026
From: WRITER, INC.
To: JPMORGAN CHASE BANK, N.A.
Reel/Frame 074728/0276 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 21, 2025
From: ALSHIKH, WASEEM
To: WRITER, INC.
Reel/Frame 070593/0121 →
Continuity (2)
Provisional Application 63654558 · May 31, 2024
Related Publication 20250371386A1 · Dec 4, 2025
References Cited (43)
US 5857198A · Schmidt · 1999 [cited by applicant]
US 9940367B1 · Baker et al. · 2018 [cited by applicant]
US 10019513B1 · Koren et al. · 2018 [cited by applicant]
US 10180964B1 · Baker et al. · 2019 [cited by applicant]
US 10572516B2 · Walia et al. · 2020 [cited by applicant]
US 10678821B2 · Carmeli et al. · 2020 [cited by applicant]
US 10817576B1 · Davidovich et al. · 2020 [cited by applicant]
US 10909157B2 · Paulus et al. · 2021 [cited by applicant]
US 12259914B1 · Gao et al. · 2025 [cited by applicant]
US 20070179944A1 · Van Dyke Parunak et al. · 2007 [cited by applicant]
US 20160267117A1 · Guggilla et al. · 2016 [cited by applicant]
US 20180307776A1 · Ferradini et al. · 2018 [cited by applicant]
US 20180336183A1 · Lee · 2018 [cited by examiner]
US 20190005024A1 · Somech et al. · 2019 [cited by applicant]
US 20190206517A1 · Devarakonda et al. · 2019 [cited by applicant]
US 20200074322A1 · Chungapalli et al. · 2020 [cited by applicant]
US 20210191937A1 · Jia et al. · 2021 [cited by applicant]
US 20210192126A1 · Gehrmann et al. · 2021 [cited by applicant]
US 20210295822A1 · Tomkins et al. · 2021 [cited by applicant]
US 20220277135A1 · Kryscinski et al. · 2022 [cited by applicant]
US 20230267275A1 · Au · 2023 [cited by applicant]
US 20230420146A1 · Jegannathan et al. · 2023 [cited by applicant]
US 20240095460A1 · Xu · 2024 [cited by examiner]
US 20240168984A1 · Kim · 2024 [cited by examiner]
US 20250061291A1 · Gardner et al. · 2025 [cited by applicant]
US 20250272276A1 · Ban et al. · 2025 [cited by applicant]
US 20250272508A1 · Russell · 2025 [cited by applicant]
US 20250308120A1 · Dai et al. · 2025 [cited by applicant]
KR 20200087977A · 2020 [cited by applicant]
KR 102775064B1 · 2025 [cited by applicant]
WO 2019226474A1 · 2019 [cited by applicant]
Zhu, Tianyu, et al. “Summarizing long-form document with rich discourse information.” Proceedings of the 30th ACM international conference on information & knowledge management. 2021. (Year: 2021). [cited by examiner]
1 Final Office Action notified Jul. 22, 2025 for U.S. Appl. No. 19/080,452. [cited by applicant]
Non-Final Office Action for U.S. Appl. No. 19/080,452, dated Apr. 28, 2025. [cited by applicant]
Non-Final Office Action for U.S. Appl. No. 19/080,459, dated May 8, 2025. [cited by applicant]
Non-Final Office Action for U.S. Appl. No. 19/080,464, dated May 28, 2025. [cited by applicant]
Non-Final Office Action for U.S. Appl. No. 19/080,472, dated May 16, 2025. [cited by applicant]
Final Office Action for U.S. Appl. No. 19/080,464 notified Nov. 18, 2025. [cited by applicant]
Non-Final Office Action for U.S. Appl. No. 19/080,459 notified Sep. 11, 2025. [cited by applicant]
Notice of Allowance for U.S. Appl. No. 19/080,452 notified Nov. 28, 2025. [cited by applicant]
Notice of Allowance for U.S. Appl. No. 19/080,459 notified Jan. 30, 2026. [cited by applicant]
Notice of Allowance for U.S. Appl. No. 19/080,472 notified Jan. 13, 2026. [cited by applicant]
Final Office Action for U.S. Appl. No. 19/080,472 notified Sep. 5, 2025. [cited by applicant]