IP Library Granted Patent US 12,505,299
Granted Patent B2
US 12,505,299 · App. 18/450,776 · Granted Dec 23, 2025

Hallucination detection and remediation in text generation interface systems

Inventor: Alan deLevie (Washington, DC)
Assignee: Casetext, Inc.
G06F40/30G06F16/3329G06F16/3344G06F16/345G06F40/194
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,505,299
App. No.
18/450,776
Granted
Dec 23, 2025
Kind
B2
Abstract

Enumerated source text passages may be determined based on one or more source text documents. The enumerated source text passages may include source text passage identifiers uniquely identifying the passages. A novel text passage including novel text portions may be determined based on a query and the enumerated source text passages. One or more of the novel text portions may be verified by a large language model to produce text verification information. A novel text generation message including novel text generated by the large language model may be determined based on the text verification information and sent to a client machine.

Claims (39)

1 . A method comprising:

determining a plurality of enumerated source text passages based on one or more source text documents, each of the plurality of enumerated source text passages being included in one or more of the one or more source text documents, each enumerated source text passage of the plurality of enumerated source text passages including a respective source text passage identifier that uniquely identifies the enumerated source text passage;

determining a novel text passage based on a query and the plurality of enumerated source text passages, the novel text passage including a plurality of novel text portions, one or more text portions of the plurality of novel text portions including a respective one or more cited source text passage identifiers;

transmitting a text verification prompt to a large language model, the text verification prompt including a designated novel text portion of the plurality of novel text portions, the text verification prompt including a designated one or more enumerated source text passages identified in the designated novel text portion, the text verification prompt including a natural language instruction to evaluate whether the designated novel text portion is supported by the designated one or more enumerated source text passages;

receiving from the large language model a text verification response message including text verification information indicating that the designated novel text portion is insufficiently supported by the designated one or more enumerated source text passages; and

transmitting to a client machine a novel text generation message determined based on the text verification information and including novel text generated by the large language model.

2 . The method recited in claim 1 , the method further comprising:

selecting a subset of the plurality of enumerated source text passages based on their relevance to the query, wherein the novel text passage is determined based on the selected subset of the plurality of enumerated source text passages.

3 . The method recited in claim 2 , wherein the subset of the plurality of enumerated source text passages is selected based on a completed relevance prompt received from a large language model, the completed relevance prompt being determined based on an input relevance prompt that includes one or more natural language instructions executed by the large language model to select the subset of the plurality of enumerated source text passages.

4 . The method recited in claim 1 , wherein the novel text passage is generated by the large language model based on a text generation prompt sent to the large language model, the text generation prompt including one or more of the plurality of enumerated source text passages and one or more natural language instructions to generate the novel text passage based on the one or more of the plurality of enumerated source text passages.

5 . The method recited in claim 1 , wherein the query includes a request to summarize the one or more source text documents.

6 . The method recited in claim 1 , wherein the query includes a request to answer one or more questions based on the one or more source text documents.

7 . The method recited in claim 1 , wherein the query includes a request to generate an argument based on the one or more source text documents.

8 . One or more non-transitory computer readable media having instructions stored thereon for performing a method, the method comprising:

determining a plurality of enumerated source text passages based on one or more source text documents, each of the plurality of enumerated source text passages being included in one or more of the one or more source text documents, each enumerated source text passage of the plurality of enumerated source text passages including a respective source text passage identifier that uniquely identifies the enumerated source text passage;

determining a novel text passage based on a query and the plurality of enumerated source text passages, the novel text passage including a plurality of novel text portions, one or more text portions of the plurality of novel text portions including a respective one or more cited source text passage identifiers;

transmitting a text verification prompt to a large language model, the text verification prompt including a designated novel text portion of the plurality of novel text portions, the text verification prompt including a designated one or more enumerated source text passages identified in the designated novel text portion, the text verification prompt including a natural language instruction to evaluate whether the designated novel text portion is supported by the designated one or more enumerated source text passages;

receiving from the large language model a text verification response message including text verification information indicating that the designated novel text portion is insufficiently supported by the designated one or more enumerated source text passages; and

transmitting to a client machine a novel text generation message determined based on the text verification information and including novel text generated by the large language model.

9 . The one or more non-transitory computer readable media recited in claim 8 , the method further comprising:

selecting a subset of the plurality of enumerated source text passages based on their relevance to the query, wherein the novel text passage is determined based on the selected subset of the plurality of enumerated source text passages.

10 . The one or more non-transitory computer readable media recited in claim 9 , wherein the subset of the plurality of enumerated source text passages is selected based on a completed relevance prompt received from the large language model, the completed relevance prompt being determined based on an input relevance prompt that includes one or more natural language instructions executed by the large language model to select the subset of the plurality of enumerated source text passages.

11 . The one or more non-transitory computer readable media recited in claim 8 , wherein the novel text passage is generated by the large language model based on a text generation prompt sent to the large language model, the text generation prompt including one or more of the plurality of enumerated source text passages and one or more natural language instructions to generate the novel text passage based on the one or more of the plurality of enumerated source text passages.

12 . The one or more non-transitory computer readable media recited in claim 8 , wherein the query includes a request to summarize the one or more source text documents.

13 . The one or more non-transitory computer readable media recited in claim 8 , wherein the query includes a request to answer one or more questions based on the one or more source text documents.

14 . The one or more non-transitory computer readable media recited in claim 8 , wherein the query includes a request to generate an argument based on the one or more source text documents.

15 . A system comprising:

one or more processors configured to perform a method, the method comprising:

determining a plurality of enumerated source text passages based on one or more source text documents, each of the plurality of enumerated source text passages being included in one or more of the one or more source text documents, each enumerated source text passage of the plurality of enumerated source text passages including a respective source text passage identifier that uniquely identifies the enumerated source text passage;

determining a novel text passage based on a query and the plurality of enumerated source text passages, the novel text passage including a plurality of novel text portions, one or more text portions of the plurality of novel text portions including a respective one or more cited source text passage identifiers;

transmitting a text verification prompt to a large language model, the text verification prompt including a designated novel text portion of the plurality of novel text portions, the text verification prompt including a designated one or more enumerated source text passages identified in the designated novel text portion, the text verification prompt including a natural language instruction to evaluate whether the designated novel text portion is supported by the designated one or more enumerated source text passages;

receiving from the large language model a text verification response message including text verification information indicating that the designated novel text portion is insufficiently supported by the designated one or more enumerated source text passages; and

transmitting to a client machine a novel text generation message determined based on the text verification information and including novel text generated by the large language model.

16 . The system recited in claim 15 , the method further comprising:

selecting a subset of the plurality of enumerated source text passages based on their relevance to the query, wherein the novel text passage is determined based on the selected subset of the plurality of enumerated source text passages.

17 . The system recited in claim 16 , wherein the subset of the plurality of enumerated source text passages is selected based on a completed relevance prompt received from the large language model, the completed relevance prompt being determined based on an input relevance prompt that includes one or more natural language instructions executed by the large language model to select the subset of the plurality of enumerated source text passages.

18 . The system recited in claim 15 , wherein the novel text passage is generated by the large language model based on a text generation prompt sent to the large language model, the text generation prompt including one or more of the plurality of enumerated source text passages and one or more natural language instructions to generate the novel text passage based on the one or more of the plurality of enumerated source text passages.

19 . The system recited in claim 15 , wherein the query includes a request to summarize the one or more source text documents.

20 . The system recited in claim 15 , wherein the query includes a request to answer one or more questions based on the one or more source text documents.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 16, 2023
From: DELEVIE, ALAN
To: CASETEXT, INC.
Reel/Frame 064614/0080 →
Continuity (1)
Related Publication 20250061279A1 · Feb 20, 2025
References Cited (60)
US 7257766B1 · Koppel et al. · 2007 [cited by applicant]
US 7293012B1 · Solaro et al. · 2007 [cited by applicant]
US 8380710B1 · Finne et al. · 2013 [cited by applicant]
US 8812291B2 · Brants et al. · 2014 [cited by applicant]
US 10565639B1 · Ghamsari et al. · 2020 [cited by applicant]
US 11232161B1 · Qu · 2022 [cited by examiner]
US 11281976B2 · Dua et al. · 2022 [cited by applicant]
US 11481416B2 · Dua et al. · 2022 [cited by applicant]
US 20050108219A1 · Huerga · 2005 [cited by applicant]
US 20050278623A1 · Dehlinger · 2005 [cited by examiner]
US 20070022109A1 · Imielinski et al. · 2007 [cited by applicant]
US 20070266331A1 · Bicker et al. · 2007 [cited by applicant]
US 20090083248A1 · Liu et al. · 2009 [cited by applicant]
US 20100145673A1 · Cancedda · 2010 [cited by applicant]
US 20110125734A1 · Duboue et al. · 2011 [cited by applicant]
US 20120030201A1 · Pickering et al. · 2012 [cited by applicant]
US 20140358889A1 · Shmiel et al. · 2014 [cited by applicant]
US 20180075011A1 · Allen et al. · 2018 [cited by applicant]
US 20180322110A1 · Rhodes et al. · 2018 [cited by applicant]
US 20190042551A1 · Hwang · 2019 [cited by applicant]
US 20200019642A1 · Dua et al. · 2020 [cited by applicant]
US 20200159783A1 · Shlyunkin et al. · 2020 [cited by applicant]
US 20200243076A1 · Kim · 2020 [cited by applicant]
US 20200342862A1 · Gao et al. · 2020 [cited by applicant]
US 20200364403A1 · Choi et al. · 2020 [cited by applicant]
US 20210124876A1 · Kryscinski et al. · 2021 [cited by applicant]
US 20210326428A1 · Edwards et al. · 2021 [cited by applicant]
US 20210374341A1 · Krause et al. · 2021 [cited by applicant]
US 20220027553A1 · Xu · 2022 [cited by examiner]
US 20220051479A1 · Agarwal et al. · 2022 [cited by applicant]
US 20220164397A1 · Escalona et al. · 2022 [cited by applicant]
US 20220180051A1 · Lillemo et al. · 2022 [cited by applicant]
US 20220197958A1 · Volynets et al. · 2022 [cited by applicant]
US 20220253447A1 · Boytsov et al. · 2022 [cited by applicant]
US 20220261429A1 · Refaeli et al. · 2022 [cited by applicant]
US 20220284174A1 · Galitsky · 2022 [cited by applicant]
US 20220300718A1 · Chen et al. · 2022 [cited by applicant]
US 20220382975A1 · Gu et al. · 2022 [cited by applicant]
US 20230034011A1 · Sarkar et al. · 2023 [cited by applicant]
US 20230080674A1 · Attali et al. · 2023 [cited by applicant]
US 20230092702A1 · Mao et al. · 2023 [cited by applicant]
US 20230108863A1 · Gunasekara et al. · 2023 [cited by applicant]
US 20230121711A1 · Chhaya et al. · 2023 [cited by applicant]
US 20230245051A1 · Vuyyuri et al. · 2023 [cited by applicant]
US 20230409298A1 · Ciminelli · 2023 [cited by examiner]
US 20240111960A1 · Earle · 2024 [cited by examiner]
US 20240160838A1 · Anoun · 2024 [cited by examiner]
US 20240256764A1 · Maschmeyer · 2024 [cited by examiner]
US 20240296279A1 · Gardner · 2024 [cited by examiner]
US 20240296295A1 · Russell · 2024 [cited by examiner]
CN 109213870A · 2019 [cited by applicant]
U.S. Appl. No. 18/154,175, Final Office Action mailed Jun. 29, 2023, 22 pgs. [cited by applicant]
U.S. Appl. No. 18/154,175, Non Final Office Action mailed Apr. 21, 2023, 20 pgs. [cited by applicant]
U.S. Appl. No. 18/169,701, Final Office Action mailed Jun. 29, 2023, 42 pgs. [cited by applicant]
U.S. Appl. No. 18/169,701, Non Final Office Action mailed May 3, 2023, 38 pgs. [cited by applicant]
U.S. Appl. No. 18/169,707, Non Final Office Action mailed May 10, 2023, 33 pgs. [cited by applicant]
U.S. Appl. No. 18/333,320, Non Final Office Action mailed Aug. 7, 2023, 13 pgs. [cited by applicant]
Lewis, Patrick et al. Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. Facebook AI Research, University College London; New York University; Apr. 12, 2021. [cited by applicant]
Liu, Jiongnan et al., “RETA-LLM: A Retrieval-Augmented Large Language Model Toolkit”, 1Gaoling School of Artificial Intelligence, Renmin University of China, University of Science and Technology of China, Jun. 8, 2023. [cited by applicant]
Liu, Nelson F. et al., “Evaluating Verifiability in Generative Search Engines”, Department of Computer Science, Stanford University, Apr. 19, 2023. [cited by applicant]