LeanContext: Cost-Efficient Domain-Specific Question Answering Using LLMs
Open accessThe DOI matches its DataCite record; 19 of the 21 references it cites were found in a registry or an index.
Abstract
Question-answering (QA) is a significant application of Large Language Models (LLMs), shaping chatbot capabilities across healthcare, education, and customer service. However, widespread LLM integration presents a challenge for small businesses due to the high expenses of LLM API usage. Costs rise rapidly when domain-specific data (context) is used alongside queries for accurate domain-specific LLM responses. One option is to summarize the context by using LLMs and reduce the context. However, this can also filter out useful information that is necessary to answer some domain-specific queries. In this paper, we shift from human-oriented summarizers to AI model-friendly summaries. Our approach, LeanContext, efficiently extracts $k$ key sentences from the context that are closely aligned with the query. The choice of $k$ is neither static nor random; we introduce a reinforcement learning technique that dynamically determines $k$ based on the query and context. The rest of the less important sentences are reduced using a free open source text reduction method. We evaluate LeanContext against several recent query-aware and query-unaware context reduction approaches on prominent datasets (arxiv papers and BBC news articles). Despite cost reductions of $37.29\%$ to $67.81\%$, LeanContext's ROUGE-1 score decreases only by $1.41\%$ to $2.65\%$ compared to a baseline that retains the entire context (no summarization). Additionally, if free pretrained LLM-based summarizers are used to reduce context (into human consumable summaries), LeanContext can further modify the reduced context to enhance the accuracy (ROUGE-1 score) by $13.22\%$ to $24.61\%$.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“It is usually inefficient or prohibitive to update largescale generative AI models such as LLMs with task-oriented external data through model pre-training or supervised fine-tuning (SFT) [81-83].”
From Foundations of GenIR (2025) · cites this paper as [81]
Experimental — accuracy not yet measured
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Language Models are Few-Shot Learners
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. (2020) · arXiv · doi:10.48550/arxiv.2005.14165 · Cited by 23,372 · cited 1×
“For domain-specific tasks, LLMs can be utilized to adapt the domains without modifying their inner parameters via discrete prompting where distinct instructions with contexts can be delivered as an input to generate responses for downstream tasks (Ling et al. 2023; Brown et al. 2020).”
MethodSentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Reimers, N., & Gurevych, I. (2019) · Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) · doi:10.18653/v1/d19-1410 · Cited by 12,778 · cited 1×
“Implementation Details: To implement the document ingestion, we use a cheap all-MiniLM-L6-v2 model (Reimers and Gurevych 2019) as an embedding generator.”
MethodChain-Of-Thought Prompting Elicits Reasoning in Large Language Models
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Ichter, B., Xia, F., Chi, E., Le, Q. V., & Zhou, D. (2022) · Advances in Neural Information Processing Systems 35 · doi:10.52202/068431-1800 · Cited by 4,505
Llama 2: Open Foundation and Fine-Tuned Chat Models
Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., Bhosale, S., et al. (2023) · arXiv · doi:10.48550/arxiv.2307.09288 · Cited by 2,604 · cited 1×
“Utilizing open-source LLM (Touvron et al. 2023; Chung et al. 2022) model either does not perform well on domain data or adds additional deployment cost.”
MethodScaling Instruction-Finetuned Language Models
Chung, H. W., Hou, L., Longpre, S., Zoph, B., Tay, Y., Fedus, W., Li, Y., Wang, X., Dehghani, M., Brahma, S., et al. (2022) · arXiv · doi:10.48550/arxiv.2210.11416 · Cited by 1,441
FrugalGPT: How to Use Large Language Models While Reducing Cost and Improving Performance
Chen, L., Zaharia, M., & Zou, J. (2023) · arXiv · doi:10.48550/arxiv.2305.05176 · Cited by 889
The NarrativeQA Reading Comprehension Challenge
Kočiský, T., Schwarz, J., Blunsom, P., Dyer, C., Hermann, K. M., Melis, G., & Grefenstette, E. (2018) · Transactions of the Association for Computational Linguistics · doi:10.1162/tacl_a_00023 · Cited by 596
TidyBot: personalized robot assistance with large language models
Wu, J., Antonova, R., Kan, A., Lepert, M., Zeng, A., Song, S., Bohg, J., Rusinkiewicz, S., & Funkhouser, T. (2023) · Autonomous Robots · doi:10.1007/s10514-023-10139-z · Cited by 212 · cited 2×
“2023), personalized robot assistance (Wu et al. 2023).”
BackgroundLeveraging BERT for Extractive Text Summarization on Lectures
Miller, D. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1906.04165 · Cited by 188 · cited 3×
“The extractive summarizers (Miller 2019) first identify important sentences from the text, and next summarizes them.”
InfluentialExtractive Summarization via ChatGPT for Faithful Summary Generation
Zhang, H., Liu, X., & Zhang, J. (2023) · Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP) · doi:10.18653/v1/2023.findings-emnlp.214 · Cited by 163
SummIt: Iterative Text Summarization via ChatGPT
Zhang, H., Liu, X., & Zhang, J. (2023) · Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP) · doi:10.18653/v1/2023.findings-emnlp.714 · Cited by 140
López Espejel, J., Ettifouri, E. H., Yahaya Alassan, M. S., Chouham, E. M., & Dahhane, W. (2023) · Natural Language Processing Journal · doi:10.1016/j.nlp.2023.100032 · Cited by 120
An Iterative Optimizing Framework for Radiology Report Summarization With ChatGPT
Ma, C., Wu, Z., Wang, J., Xu, S., Wei, Y., Liu, Z., Zeng, F., Jiang, X., Guo, L., Cai, X., et al. (2024) · IEEE Transactions on Artificial Intelligence · doi:10.1109/tai.2024.3364586 · Cited by 102 · cited 2×
“Usage of Chat-GPT model in the medical domain especially in radiology is explored via prompt-engineering (Ma et al. 2023) to summarize difficult radiology reports.”
BackgroundExploring the Limits of ChatGPT for Query or Aspect-based Text Summarization
Yang, X., Li, Y., Zhang, X., Chen, H., & Cheng, W. D. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2302.08081 · Cited by 84 · cited 2×
“Due to the cost of the OpenAI model and the current usage limit, we follow recent literature (Yang et al. 2023), we generate queries using the QA generation method, and consider random 100 query samples for evaluation.”
BackgroundMethodSemantic Compression with Large Language Models
Gilbert, H., Sandborn, M., Schmidt, D. C., Spencer-Smith, J., & White, J. (2023) · 2023 Tenth International Conference on Social Networks Analysis, Management and Security (SNAMS) · doi:10.1109/snams60348.2023.10375400 · Cited by 42 · cited 5×
“We also observe that the query-unaware LLM using a different hard prompt (Gilbert et al. 2023) even performs worse i.e. ROUGE-1 score 0.4729 with a 41.66% cost overhead.”
BackgroundMethodInfluentialLarge Language Model ProgramsPreprint
Schlag, I., Sukhbaatar, S., Çelikyılmaz, A., Yih, W.-T., Weston, J., Schmidhuber, J., & Li, X. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2305.05364 · Cited by 36 · cited 2×
“Fine-tuning these large models containing billions of parameters is expensive and considered impractical if there is a rapid change of context over time (Schlag et al. 2023) e.g. a domain-specific QA system where the documents shared by users are very recent and from different domains.”
BackgroundTextual entailment as an evaluation metric for abstractive text summarization
Bhuyan, S. S., Mahanta, S. K., Pakray, P., & Favre, B. (2023) · Natural Language Processing Journal · doi:10.1016/j.nlp.2023.100028 · Cited by 23
Laskar, M. T. R., Rahman, M., Jahan, I., Hoque, E., & Huang, J. X. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2305.06147 · Cited by 17 · cited 2×
“Consider a small business to run, we consider using pay-per-use LLMs such as OpenAI LLMs to make the system running at a reasonable cost by reducing the context.”
MethodInfluentialLi, Y. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2304.12102 · Cited by 9 · cited 1×
“In selective context (Li 2023), token, phrase, or sentence-level query-unaware content filtering is proposed using the entropy of GPT-2 model logits for each entity.”
Method
Research works printed but not linked: 5
- Jiao, W.; Wang, W.; Huang, J.-t.; Wang, X.; and Tu, Z. 2023. Is ChatGPT a good translator? A preliminary study. arXiv preprint arXiv:2301.08745 . · arXiv
- Ling, C.; Zhao, X.; Lu, J.; Deng, C.; Zheng, C.; Wang, J.; Chowdhury, T.; Li, Y.; Cui, H.; Zhao, T.; et al. 2023. Beyond One-Model-Fits-All: A Survey of Domain Specialization for Large Language Models. arXiv preprint arXiv:2305.18703 . · arXiv
- Liu, Y.; Han, T.; Ma, S.; Zhang, J.; Yang, Y .; Tian, J.; He, H.; Li, A.; He, M.; Liu, Z.; et al. 2023. Summary of chatgpt/gpt4 research and perspective towards the future of large language models. arXiv preprint arXiv:2304.01852 . · arXiv
- Luo, Z.; Xie, Q.; and Ananiadou, S. 2023. Chatgpt as a factual inconsistency evaluator for abstractive text summarization. arXiv preprint arXiv:2303.15621 . · arXiv
- Tan, Y.; Min, D.; Li, Y.; Li, W.; Hu, N.; Chen, Y.; and Qi, G. 2023. Evaluation of ChatGPT as a question answering system for answering complex questions. arXiv preprint arXiv:2303.07992 . · arXiv
Cited by
A Survey of GPT-3 Family Large Language Models Including ChatGPT and GPT-4
Kalyan, K. S. (2024) · Natural Language Processing Journal · doi:10.1016/j.nlp.2023.100048 · Cited by 335
Retrieval-augmented generation for natural language processing: a survey
Wu, S., Xiong, Y., Cui, Y., Wu, H., Chen, C., Yuan, Y., Huang, L., Liu, X., Kuo, T., Guan, N., et al. (2026) · Artificial Intelligence Review · doi:10.1007/s10462-026-11605-7 · Cited by 276
“Some works [6, 169] aim to improve efficiency when integrating retrievals, while others [10, 163] focus on improving the efficiency when increasing the model input length.”
Aya Dataset: An Open-Access Collection for Multilingual Instruction Tuning
Singh, S., Vargus, F., D’souza, D., Karlsson, B. F., Mahendiran, A., Ko, W.-Y., Shandilya, H., Patel, J., Mataciunas, D., O'Mahony, L., et al. (2024) · Proceedings of the conference - Association for Computational Linguistics. Meeting · doi:10.18653/v1/2024.acl-long.620 · Cited by 254
Large Language Models for Information Retrieval: A Survey
Zhu, Y., Yuan, H., Wang, S., Liu, J., Liu, W., Deng, C., Chen, H., Liu, Z., Dou, Z., & Wen, J.-R. (2026) · ACM Transactions on Information Systems · doi:10.1145/3748304 · Cited by 225
“A more straightforward way is to directly compress the retrieved documents into short input tokens or even dense vectors [191–194].”
Aya Dataset: An Open-Access Collection for Multilingual Instruction Tuning
Singh, S., Vargus, F., D’souza, D., Karlsson, B. F., Mahendiran, A., Ko, W.-Y., Shandilya, H., Patel, J., Mataciunas, D., O'Mahony, L., et al. (2024) · VBN Forskningsportal (Aalborg Universitet) · doi:10.48550/arxiv.2402.06619 · Cited by 180
“…of instruction-style datasets and to convey the variety of tasks in existing datasets, including question answering (Saad-Falcon et al., 2023; Arefeen et al., 2023), summarization (Stiennon et al., 2020; Wu et al., 2021), paraphrasing (Witteveen and Andrews, 2019; Reimers and Gurevych,…”
Background
Metadata
- Authors
- Arefeen, M. A., Debnath, B., & Chakradhar, S.
- Affiliations
- University of Missouri–Kansas City (US)
- Corresponding author
- Arefeen, Md Adnan
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2023
- Volume
- 7
- Pages
- 100065-100065
- ISSN
- 2949-7191 (ISSN-L)
- arXiv
- 2309.00841
- OpenAlex
- W4392919908
- Cited by
- 71
- References
- 21
- Citations by year
- 2026: 18 · 2025: 38 · 2024: 14 · 2023: 1
- FWCI
- 10.31
- Type
- journal article
- Language
- en
- Open access
- gold
- doi.org
- Licence
- Locations
- Natural Language Processing Journal (publishedVersion, cc-by-nc-nd)
- arXiv (Cornell University) (submittedVersion, cc-by-nc-nd)
- arXiv (Cornell University)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Information Systems › Information Retrieval and Search Behavior
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Keywords
- domain-specific question answering, retrieval-augmented generation, context reduction, key sentence extraction
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.