IP Library Granted Patent US 12,461,927
Granted Patent B2
US 12,461,927 · App. 18/800,781 · Granted Nov 4, 2025

Domain-specific question answering with context reduction for decision making

Inventors: Biplob Debnath (Princeton, NJ); Md Adnan Arefeen (Kansas City, MO); Srimat Chakradhar (Manalapan, NJ)
Assignee: NEC Corporation
G06F16/24578G06N3/092
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,461,927
App. No.
18/800,781
Granted
Nov 4, 2025
Kind
B2
Abstract

Methods and systems for context reduction include identifying a context document relating to a query. A number of sentences of the context document to preserve is determined. The sentences of the context document are ranked according to respective similarities between the sentences and the query. A reduced context is generated that preserves the determined number of highest ranked sentences of the context document and eliminates other sentences from the context document. The query is executed with a language model, including the reduced context in a prompt, to generate a response.

Claims (72)

1 . A computer-implemented method for context reduction, comprising:

identifying a context document relating to a query;

training a policy using reinforcement learning to balance a token ratio and an accuracy difference, including a reward function:

R

=

-

(

1

-

α

)

τ

+

α

(

2

r

-

r

*

)

where τ=t/T is a token ratio between a number of tokens t in the reduced context and a number of tokens T in the context document, r is a score representing accuracy of an output generated by the language model using the reduced context, r* is a score representing accuracy of an output generated by the language model using the context document, and α is a weighting parameter;

determining a number of sentences of the context document to preserve, including applying the query and the context document to the policy to select a proportion of the context document to preserve;

ranking the sentences of the context document according to respective similarities between the sentences and the query;

generating a reduced context that preserves the determined number of highest ranked sentences of the context document and eliminates other sentences from the context document; and

executing the query with a language model, including the reduced context in a prompt, to generate a response.

2 . The method of claim 1 , wherein generating the reduced context includes eliminating sentences before a first of the highest ranked sentences and sentences after a last of the highest ranked sentences in the context document.

3 . The method of claim 1 , wherein generating the reduced context further includes performing text reduction on sentences other than the highest ranked sentences that occur after a first of the highest ranked sentences and before a last of the highest ranked sentences in the context document.

4 . The method of claim 1 , wherein generating the reduced context includes preserving an order of the highest-ranked sentences from the context document.

5 . The method of claim 1 , wherein ranking the sentences includes determining a similarity score between the query and each respective sentence.

6 . The method of claim 5 , wherein determining the similarity score includes determining a cosine similarity between embeddings of the query and each respective sentence.

7 . The method of claim 1 , wherein the context document includes subject matter that was not used in training the language model.

8 . A system for context reduction, comprising:

a hardware processor; and

a memory that stores a computer program which, when executed by the hardware processor, causes the hardware processor to:

identify a context document relating to a query;

train a policy using reinforcement learning to balance a token ratio and an accuracy difference, including a reward function:

R

=

-

(

1

-

α

)

τ

+

α

(

2

r

-

r

*

)

where τ=t/T is a token ratio between a number of tokens t in the reduced context and a number of tokens T in the context document, r is a score representing accuracy of an output generated by the language model using the reduced context, r* is a score representing accuracy of an output generated by the language model using the context document, and α is a weighting parameter;

determine a number of sentences of the context document to preserve, including application of the query and the context document to the policy that selects a proportion of the context document to preserve;

rank the sentences of the context document according to respective similarities between the sentences and the query;

generate a reduced context that preserves the determined number of highest ranked sentences of the context document and eliminates other sentences from the context document; and

execute the query with a language model, including the reduced context in a prompt, to generate a response.

9 . The system of claim 8 , wherein the computer program further causes the hardware processor to eliminate sentences before a first of the highest ranked sentences and sentences after a last of the highest ranked sentences in the context document.

10 . The system of claim 8 , wherein the computer program further causes the hardware processor to perform text reduction on sentences other than the highest ranked sentences that occur after a first of the highest ranked sentences and before a last of the highest ranked sentences in the context document.

11 . The system of claim 8 , wherein the computer program further causes the hardware processor to preserve an order of the highest-ranked sentences from the context document in the reduced context.

12 . The system of claim 8 , wherein the computer program further causes the hardware processor to determine a similarity score between the query and each respective sentence.

13 . The system of claim 12 , wherein the computer program further causes the hardware processor to determine a cosine similarity between embeddings of the query and each respective sentence as the similarity score.

14 . The system of claim 8 , wherein the context document includes subject matter that was not used in training the language model.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 30, 2025
From: NEC LABORATORIES AMERICA, INC.
To: NEC CORPORATION
Reel/Frame 072420/0343 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 12, 2024
From: DEBNATH, BIPLOB; AREFEEN, MD ADNAN; CHAKRADHAR, SRIMAT
To: NEC LABORATORIES AMERICA, INC.
Reel/Frame 068252/0443 →
Continuity (4)
Provisional Application 63608492 · Dec 11, 2023
Provisional Application 63605658 · Dec 4, 2023
Provisional Application 63532639 · Aug 14, 2023
Related Publication 20250061118A1 · Feb 20, 2025
References Cited (37)
US 10713519B2 · Bui · 2020 [cited by examiner]
US 20090158138A1 · Ruvini · 2009 [cited by examiner]
US 20150089373A1 · Dwivedi · 2015 [cited by examiner]
US 20180373952A1 · Bui · 2018 [cited by examiner]
US 20210342399A1 · Sisto · 2021 [cited by examiner]
US 20210374168A1 · Srinivasan · 2021 [cited by examiner]
Miller, D. (Jun. 7, 2019). Leveraging BERT for extractive text summarization on lectures. arXiv preprint arXiv:1906.04165. [cited by applicant]
Chung, H. W., Hou, L., Longpre, S., Zoph, B., Tay, Y., Fedus, W., . . . & Wei, J. (Feb. 18, 2024). Scaling instruction-finetuned language models. Journal of Machine Learning Research, 25(70), 1-53. [cited by applicant]
Yang, X., Li, Y., Zhang, X., Chen, H., & Cheng, W. (Feb. 16, 2023). Exploring the limits of chatgpt for query or aspect-based text summarization. arXiv preprint arXiv:2302.08081. [cited by applicant]
Zhang, H., Liu, X., & Zhang, J. (Apr. 9, 2023). Extractive summarization via chatgpt for faithful summary generation. arXiv preprint arXiv:2304.04193. [cited by applicant]
Ma, C., Wu, Z., Wang, J., Xu, S., Wei, Y., Liu, Z., . . . & Zhang, S. (May 3, 2023). ImpressionGPT: An Iterative Optimizing Framework for Radiology Report Summarization with ChatGPT. arXiv 2023. arXiv preprint arXiv:230… [cited by applicant]
Li, Y. (Apr. 24, 2023). Unlocking context constraints of Ilms: Enhancing context efficiency of Ilms with self-information-based content filtering. arXiv preprint arXiv:2304.12102. [cited by applicant]
Gilbert, H., Sandborn, M., Schmidt, D. C., Spencer-Smith, J., & White, J. (Nov. 21, 2023). Semantic compression with large language models. In 2023 Tenth International Conference on Social Networks Analysis, Management … [cited by applicant]
Chen, L., Zaharia, M., & Zou, J. (May 9, 2023). Frugalgpt: How to use large language models while reducing cost and improving performance. arXiv preprint arXiv:2305.05176. [cited by applicant]
Schlag, I., Sukhbaatar, S., Celikyilmaz, A., Yih, W. T., Weston, J., Schmidhuber, J., & Li, X. (May 9, 2023). Large language model programs. arXiv preprint arXiv:2305.05364. [cited by applicant]
Laskar, M. T. R., Rahman, M., Jahan, I., Hoque, E., & Huang, J. (Mar. 31, 2023). CQSumDP: a ChatGPT-annotated resource for query-focused abstractive summarization based on debatepedia. arXiv preprint arXiv:2305.06147. [cited by applicant]
Zhang, H., Liu, X., & Zhang, J. (May 24, 2023). Summit: Iterative text summarization via chatgpt. arXiv preprint arXiv:2305.14835. [cited by applicant]
Ling, C., Zhao, X., Lu, J., Deng, C., Zheng, C., Wang, J., . . . & Zhao, L. (May 30, 2023). Domain specialization as the key to make large language models disruptive: A comprehensive survey. arXiv preprint arXiv:2305.18… [cited by applicant]
Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., . . . & Scialom, T. (Jul. 19, 2023). Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288. [cited by applicant]
ChromaDB. (Accessed Jun. 20, 2023). ChromaDB. https://www.trychroma.com/. [cited by applicant]
Chase, H., (Oct. 17, 2022). LangChain. https://github.com/hwchase17/langchain. [cited by applicant]
Slowik, C., Kaiser, F. (Feb. 16, 2023) How Much Does It Cost to Use GPT Models? GPT-3 Pricing Explained. https://neoteric.eu/blog/how-much-does-it-cost-to-use-gpt-models-gpt-3-pricing-explained/. [cited by applicant]
Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., . . . & Amodei, D. (Dec. 6, 2020). Language models are few-shot learners. Advances in neural information processing systems, 33, 1877-1901. [cited by applicant]
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Xia, F., Chi, E., . . . & Zhou, D. (Dec. 6, 2022). Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, … [cited by applicant]
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., . . . & Kiela, D. (Dec. 6, 2020). Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Syst… [cited by applicant]
Reimers, N., & Gurevych, I. (Aug. 27, 2019). Sentence-bert: Sentence embeddings using siamese bert-networks. arXiv preprint arXiv:1908.10084. [cited by applicant]
Lin, C. Y. (Jul. 2004). Rouge: A package for automatic evaluation of summaries. In Text summarization branches out (pp. 74-81). [cited by applicant]
Bhuyan, S. S., Mahanta, S. K., Pakray, P., & Favre, B. (Sep. 1, 2023). Textual entailment as an evaluation metric for abstractive text summarization. Natural Language Processing Journal, 4, 100028. [cited by applicant]
Espejel, J. L., Ettifouri, E. H., Alassan, M. S. Y., Chouham, E. M., & Dahhane, W. (Dec. 1, 2023). GPT-3.5, GPT-4, or BARD? Evaluating LLMs reasoning ability in zero-shot setting and performance boosting through prompts… [cited by applicant]
Jiao, W., Wang, W., Huang, J. T., Wang, X., Shi, S., & Tu, Z. (Jan. 20, 2023). Is ChatGPT a good translator? Yes with GPT-4 as the engine. arXiv preprint arXiv:2301.08745. [cited by applicant]
Kočiský, T., Schwarz, J., Blunsom, P., Dyer, C., Hermann, K. M., Melis, G., & Grefenstette, E. (May 1, 2018). The narrativeqa reading comprehension challenge. Transactions of the Association for Computational Linguistic… [cited by applicant]
Liu, Y., Han, T., Ma, S., Zhang, J., Yang, Y., Tian, J., . . . & Ge, B. (Aug. 18, 2023). Summary of chatgpt-related research and perspective towards the future of large language models. Meta-Radiology, 100017. [cited by applicant]
Luo, Z., Xie, Q., & Ananiadou, S. (Mar. 27, 2023). Chatgpt as a factual inconsistency evaluator for text summarization. arXiv preprint arXiv:2303.15621. [cited by applicant]
OpenAI-Policy, 2023. OpenAI API data usage policy. https://openai.com/policies/apidata-usage-policies. (Accessed: Jul. 12, 2023). [cited by applicant]
Schwaber-Cohen, R. (May 3, 2023). Pinecone. Vector database. https://www.pinecone.io/learn/vector-database/. [cited by applicant]
Tan, Y., Min, D., Li, Y., Li, W., Hu, N., Chen, Y., & Qi, G. (Oct. 27, 2023). Can ChatGPT replace traditional KBQA models? An in-depth analysis of the question answering performance of the GPT LLM family. In Internation… [cited by applicant]
Wu, J., Antonova, R., Kan, A., Lepert, M., Zeng, A., Song, S., . . . & Funkhouser, T. (Oct. 11, 2023). Tidybot: Personalized robot assistance with large language models. Autonomous Robots, 47(8), 1087-1102. [cited by applicant]