IP Library Granted Patent US 12,591,751
Granted Patent B2
US 12,591,751 · App. 19/080,472 · Granted Mar 31, 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,591,751
App. No.
19/080,472
Granted
Mar 31, 2026
Kind
B2
Abstract

Techniques are provided for producing an answer to a question regarding a domain. A natural-language textual sequence representing the question is received. From a knowledge graph associated with the domain, first and second textual passages are received using rankings corresponding to the natural-language textual sequence, a first textual summary is received 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 is received. An answer to the question is obtained 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 and second intermediate outputs. An output is provided.

Claims (42)

1 . A computer-implemented method for producing an answer to a question relating to a domain, the method comprising:

receiving, by a computing device, a natural-language textual sequence representing the question;

retrieving, by the computing device, 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 knowledge graph includes a tree corresponding to a document of the textual information, a root of the tree corresponding to a summary of the document, nodes of the tree corresponding to textual summaries of portions of the document, and leaves of the tree corresponding to the textual passages of the document, and wherein the knowledge graph is generated using:

at least a portion of textual information including a plurality of documents relevant to the domain provided to a language model, the textual information is modified into smaller-sized portions using a semantic chunking algorithm to produce modified textual information of a size less than a context window of the language model based on a determination that the textual information exceeds the context window of the language model, the context window corresponds to a limited input size of the language model, the smaller-sized portions of the textual information are tokens,

the tokens are converted into high dimensional input sequence of vectors where an input sequence of vector numerically represents the tokens,

the language model includes one or more layers of encoders and decoders to process the high dimensional input sequence of vectors to generate an output sequence, the output sequence is used to determine probabilities of successive output tokens which are used to determine an output of the language model, and

the language model trained to produce the output of textual passages, descriptions of associations between the textual passages, and textual summaries corresponding to the textual passages using the modified textual information;

obtaining, by the computing device, the answer to the question using the 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, by the computing device, the output to a user on a user interface, based on the answer.

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 first ranking with respect to a relationship of the third textual passage and the natural-language textual sequence and a third textual summary summarizing the textual information in a third vicinity of the third textual passage.

3 . The method of claim 2 , wherein obtaining the answer to the question using the language model further includes encoding a third intermediate output based on the natural-language textual sequence, the third textual passage, and the third textual summary.

4 . The method of claim 3 , 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 fourth textual summary and the natural-language textual sequence, wherein obtaining the answer to the question using the language model further includes encoding a fourth intermediate output based on the natural-language textual sequence and the fourth textual summary.

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

6 . The method of claim 5 , wherein the first textual passage corresponds to a first leaf of the tree and the first textual summary corresponds to a first node of the tree connected to the first leaf, wherein retrieving further includes retrieving, from the knowledge graph associated with the domain, the summary of the document corresponding to the root of the tree and a fifth textual summary summarizing the textual information in a fourth vicinity of the first textual passage, 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 fourth vicinity includes the first set of textual information and a second set of textual information.

7 . A non-transitory computer readable medium including instructions that, when executed by one or more processors, cause the one or more processors to perform a set of actions for producing an answer to a question relating to a domain, the set of actions including:

receiving a natural-language textual sequence representing the question;

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 knowledge graph includes a tree corresponding to a document of the textual information, a root of the tree corresponding to a summary of the document, nodes of the tree corresponding to textual summaries of portions of the document, and leaves of the tree corresponding to the textual passages of the document, and wherein the knowledge graph is generated using:

at least a portion of textual information including a plurality of documents relevant to the domain provided to a language model, the textual information is modified into smaller-sized portions using a semantic chunking algorithm to produce modified textual information of a size less than a context window of the language model based on a determination that the textual information exceeds the context window of the language model, the context window corresponds to a limited input size of the language model, the smaller-sized portions of the textual information are tokens,

the tokens are converted into high dimensional input sequence of vectors where an input sequence of vector numerically represents the tokens,

the language model includes one or more layers of encoders and decoders to process the high dimensional input sequence of vectors to generate an output sequence, the output sequence is used to determine probabilities of successive output tokens which are used to determine an output of the language model, and

the language model trained to produce the output of textual passages, descriptions of associations between the textual passages, and textual summaries corresponding to the textual passages using the modified textual information;

obtaining the answer to the question using the 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 the output to a user on a user interface, based on the answer.

8 . The non-transitory computer readable medium of claim 7 , wherein retrieving further includes retrieving, from the knowledge graph associated with the domain a third textual passage based on a first ranking with respect to a relationship of the third textual passage and the natural-language textual sequence and a third textual summary summarizing the textual information in a third vicinity of the third textual passage.

9 . The non-transitory computer readable medium of claim 8 , wherein obtaining the answer to the question using the language model further includes encoding a third intermediate output based on the natural-language textual sequence, the third textual passage, and the third textual summary.

10 . The non-transitory computer readable medium of claim 9 , 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 fourth textual summary and the natural-language textual sequence, wherein obtaining the answer to the question 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 non-transitory computer readable medium of claim 10 , wherein the concatenation includes at least one of the third intermediate output and the fourth intermediate output.

12 . The non-transitory computer readable medium of claim 11 , wherein the first textual passage corresponds to a first leaf of the tree and the first textual summary corresponds to a first node of the tree connected to the first leaf, wherein retrieving further includes retrieving, from the knowledge graph associated with the domain, the summary of the document corresponding to the root of the tree and a fifth textual summary summarizing the textual information in a fourth vicinity of the first textual passage, 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 fourth vicinity includes the first set of textual information and a second set of textual information.

13 . A system including at least one processor and at least one computer readable medium including instructions that, when executed by the at least one processor, cause the at least one processor to perform a set of actions for producing an answer to a question relating to a domain, the set of actions including:

receiving a natural-language textual sequence representing the question;

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 knowledge graph includes a tree corresponding to a document of the textual information, a root of the tree corresponding to a summary of the document, nodes of the tree corresponding to textual summaries of portions of the document, and leaves of the tree corresponding to the textual passages of the document, and wherein the knowledge graph is generated using:

at least a portion of textual information including a plurality of documents relevant to the domain provided to a language model, the textual information is modified into smaller-sized portions using a semantic chunking algorithm to produce modified textual information of a size less than a context window of the language model based on a determination that the textual information exceeds the context window of the language model, the context window corresponds to a limited input size of the language model, the smaller-sized portions of the textual information are tokens,

the tokens are converted into high dimensional input sequence of vectors where an input sequence f vector numerically represents the tokens,

the language model includes one or more layers of encoders and decoders to process the high dimensional input sequence of vectors to generate an output sequence, the output sequence is used to determine probabilities of successive output tokens which are used to determine an output of the language model, and

the language model trained to produce the output of textual passages, descriptions of associations between the textual passages, and textual summaries corresponding to the textual passages using the modified textual information;

obtaining the answer to the question using the 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 the output to a user based on a user interface, the answer.

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

15 . The system of claim 14 , wherein obtaining the answer to the question using the language model further includes encoding a third intermediate output based on the natural-language textual sequence, the third textual passage, and the third textual summary.

16 . 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 fourth textual summary and the natural-language textual sequence, wherein obtaining the answer to the question using the language model further includes encoding a fourth intermediate output based on the natural-language textual sequence and the fourth textual summary.

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

18 . The system of claim 17 , wherein the first textual passage corresponds to a first leaf of the tree and the first textual summary corresponds to a first node of the tree connected to the first leaf, wherein retrieving further includes retrieving, from the knowledge graph associated with the domain, the summary of the document corresponding to the root of the tree and a fifth textual summary summarizing the textual information in a fourth vicinity of the first textual passage, 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 fourth vicinity includes the first set of textual information and a 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/0168 →
Continuity (2)
Provisional Application 63654558 · May 31, 2024
Related Publication 20250371048A1 · Dec 4, 2025
References Cited (42)
US 5857198A · Schmidt · 1999 [cited by applicant]
US 9940367B1 · Baker et al. · 2018 [cited by applicant]
US 10019513B1 · Koren · 2018 [cited by examiner]
US 10180964B1 · Baker et al. · 2019 [cited by applicant]
US 10572516B2 · Walia · 2020 [cited by examiner]
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 et al. · 2018 [cited by applicant]
US 20190005024A1 · Somech · 2019 [cited by examiner]
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 · 2022 [cited by examiner]
US 20230267275A1 · Au · 2023 [cited by examiner]
US 20230420146A1 · Jegannathan · 2023 [cited by examiner]
US 20240095460A1 · Xu et al. · 2024 [cited by applicant]
US 20240168984A1 · Kim et al. · 2024 [cited by applicant]
US 20250061291A1 · Gardner · 2025 [cited by examiner]
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]
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,465, dated May 23, 2025. [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 applicant]
Final Office Action for U.S. Appl. No. 19/080,464 notified Nov. 18, 2025. [cited by applicant]
Final Office Action notified Oct. 10, 2025 for U.S. Appl. No. 19/080,465. [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,459 notified Jan. 30, 2026. [cited by applicant]
Notice of Allowance for U.S. Appl. No. 19/080,452 notified Nov. 28, 2025. [cited by applicant]