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 164
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
Items 101–139 of 139
Lac, V., & Leschik, D. (2024) · Springer eBooks · doi:10.1007/978-3-658-45132-5_15 · Cited by 1
VisionVerse: Dynamic Video Question Answering Through Retrieval-Augmented GenerationPreprint
Sajeev, A. S., Joseph, A. S., Amal Madhav, T., Varghese, S. M., & Aby Abahai, T. (2024) · Research Square · doi:10.21203/rs.3.rs-4372886/v1 · Cited by 1
Understanding the Impact of Dataset Characteristics on RAG based Multi-hop QA PerformancePreprint
Aksoy, N., Güven, Z. A., & Ünalır, M. O. (2025) · Research Square · doi:10.21203/rs.3.rs-6968562/v1 · Cited by 1
Liagkou, V., Fragiadakis, G., Filiopoulou, E., Νικολαϊδου, Μ., & Michalakelis, C. (2025) · SSRN Electronic Journal · doi:10.2139/ssrn.5406285 · Cited by 1
BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL GenerationPreprint
Ahmed, F., Ahasan, M. M., Monon, J. S., Wahed, M., Amin, M. A., Rahman, A. K. M. M., & Ali, A. A. (2025) · arXiv (Cornell University) · doi:10.48550/arxiv.2511.04153 · Cited by 1
“Prior work has mostly relied on proprietary models such as GPT, Claude, and Gemini via API calls, raising privacy risks from exposing sensitive database information [24] and high cost concerns [2].”
Large Language Models: A ReviewPreprint
Anup, S., Dinh, D.-T., Hauchi, W., Amin, R., Dhungana, A., Amarathunga, D., & Iddir, O. (2026) · SSRN Electronic Journal · doi:10.2139/ssrn.6248018 · Cited by 1
Rajendran, R. K., Debnath, B. K., Sankaradas, M., & Chakradhar, S. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2608.21529 · Cited by 1
“However, it faces two main challenges: (1) LLMs are constrained by context size limitations, restricting the amount of input they can process at any given time, and (2) the cost of using the LLM API can be high [1].”
Self-citationAi, Q., Zhan, J., & Liu, Y. (2025) · arXiv · doi:10.48550/arxiv.2501.02842
“It is usually inefficient or prohibitive to update large-scale generative AI models such as LLMs with task-oriented external data through model pre-training or supervised fine-tuning (SFT) [81–83].”
Design of a Financial Automatic Question Answering Engine Based on Combination of BERT and Seq2Seq
Yang, Q., & Meng, H. (2025) · Journal of Circuits Systems and Computers · doi:10.1142/s0218126625502366
A Novel Assistant for Question-Answering from Training Video Sessions Using RAG
Kembellec, Q., Boutalbi, K., & Van, O. L. (2025) · IEEE Annual International Computer Software and Applications Conference (COMPSAC) · doi:10.1109/compsac65507.2025.00091
“However, they often struggle when dealing with highly specialized or domain-specific queries [3], [15], particularly when the model has not been trained to describe a company’s custom software or internal sensitive data.”
Smart AI Applications: Integrating Raspberry Pi 3 with NLP for Edge Computing
Mittal, A., Kedawat, K., Gupta, E., & Gupta, V. (2025) · International Conference on Energy, Power and Environment (ICEPE) · doi:10.1109/icepe65965.2025.11139558
“Question-answering with LLMs is costly for small businesses due to the need for domain-specific context in queries [3].”
Multi-Agent Knowledge Graph Question Answering Framework Based on Lightweight Large Language Model
Zhang, D., Yang, S., Fu, B., & Chen, S. (2024) · International Conference on Universal Village (UV) · doi:10.1109/uv63228.2024.11189149
“On one hand, training LLMs requires a significant amount of computational resources, leading to high training costs [27], [28].”
Hardware Security Enhancement with Generative Artificial Intelligence
Lim, P. P., Yeap, K. H., Dakulagi, V., & Lee, Y. J. (2025) · BENTHAM SCIENCE PUBLISHERS eBooks · doi:10.2174/9798898810870125010007
Advancing Retrieval-Augmented Generation for Financial Question Answering
Jasmin, A. A., Perera, I., Mohamed, M., & Mushraf, M. (2025) · Moratuwa Engineering Research Conference (MERCon) · doi:10.1109/mercon67903.2025.11217080
Structured Knowledge for Multi-hop QA: A Comparative Study of GraphRAG and RAGPreprint
Aksoy, N., & Ünalır, M. O. (2025) · Research Square · doi:10.21203/rs.3.rs-8283065/v1
Understanding the Impact of Dataset Characteristics on RAG-based Multi-hop QA PerformancePreprint
Aksoy, N., Güven, Z. A., & Ünalır, M. O. (2025) · Research Square · doi:10.21203/rs.3.rs-6968562/v2
Efficient Inference in Open Retrieval Question Answering Systems
Rashid, M. S. (2024) · eScholarship (California Digital Library)
Chaudhary, V., Soni, N., Singh, N., & Kapoor, A. (2025) · arXiv (Cornell University) · doi:10.48550/arxiv.2509.09272
“Building on RAG’s ability to bridge parametric and non‑parametric knowledge, many modern QA pipelines introduce a lightweight re‑ranking step [25] to sift through the retrieved contexts and promote passages that are most relevant to the query.”
AI in CT-beeldvorming van nieren: van proof-of-concept naar dagelijkse radiologiediensten
Koukoutegos, K. (2025) · Lirias
SAPDQA: Parameter-Efficient Domain Adaptation for Context-Aware ERP Question AnsweringPreprint
Bouressace, K., Arafat, M. E., Saha, S., Orosz, T., & Bouressace, H. (2025) · SSRN Electronic Journal · doi:10.2139/ssrn.5928872
LVDCS: Minimising Doubts in Distance Learning
Gupta, A. A., Patil, A., Achar, S. D., Vasudha, M., & Agarwal, P. R. (2026) · Lecture notes in networks and systems · doi:10.1007/978-981-95-0378-0_8
ElHussieni, M., Sailunaz, K., Elgammal, Z., AbuShaar, S., Özdemir, M. K., Rokne, J. G., & Alhajj, R. (2025) · International Conference on Systems and Informatics (ICSAI) · doi:10.1109/icsai68704.2025.11345826
“Arefeen, Debnath and Chakradhar [2] developed Leancontext as a cost-efficient domain-specific question answering using LLMs. Jia,et al. [13] evaluated the zero-shot model for text summarization with foundation language model.”
Cabezas, A. M. R., Navarrete, D., & Farfan, S. M. (2024) · Repositorio Institucional FULL
Chapter 8 Reform, Challenges, and Future Research on AI for K-12 Education
Chiu, T. K. F. (2024) · Directory of Open access Books (OAPEN Foundation)
LLMOps in Action: A Framework for Designing, Deploying, and Governing Advanced Chatbots
Raghavan, P., Tamburri, D. A., Fossati, S., & van den Heuvel, W. (2026) · IEEE Transactions on Knowledge and Data Engineering · doi:10.1109/tkde.2026.3682862
“Similarly, LeanContext, proposed by Arefeen et al. [4], dynamically reduces context size based on query relevance, using methods such as query-aware top-k sentence selection and context summarization.”
InfluentialTSCG Empirical Findings: 20,000+ API Call Tool-Schema Compression BenchmarkPreprint
Sakizli, F. (2026) · arXiv (Cornell University) · doi:10.5281/zenodo.19795759
Dhar, S., Murad, H., & Dhruba, A. R. (2025) · International Conference on Computer and Information Technology (ICCIT) · doi:10.1109/iccit68739.2025.11490197
“Most pretrained models, built for resource-rich languages [18], [19], textbook QA [20], do not perform well on Bangla without targeted finetuning. domain-specific training is necessary for models to properly handle the complexity of Bangla, especially when the knowledge required for answering is…”
Arefeen, M. A., Debnath, B. K., Rajendran, R. K., Sankaradas, M., & Chakradhar, S. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2605.05344
“With the advancement of Retrieval-Augmented Generation (RAG) systems [2–4], LLMs can now effectively respond to user queries across vast corpora of documents and videos.”
Self-citationDistildoc: Deep Reinforcement Learning for Token-Efficient Multimodal Document Question Answering
Asritha, P. G., Sai, S. K. M., Sai, S. B., & Sreelatha, M. (2026) · International Research Journal on Advanced Engineering Hub (IRJAEH) · doi:10.47392/irjaeh.2026.0496
“Unlike LeanContext, which discretizes states using clustering, DistilDoc directly uses the continuous representation, preserving semantic detail and enabling better generalization shown in Figure 2.”
InfluentialMamidi, V. P. R., & Sudeep, K. S. (2026) · Evolutionary Intelligence · doi:10.1007/s12065-026-01200-8
“In this field, ChartGPT applies LLMs to create charts from natural language inputs, improving data visualization, while Lean-Context applies LLMs for cost-effective domain-specific question answering, improving the efficiency and accuracy of specialized information retrieval [33, 34].”
AI News Experiences at Scale: Semantic Enrichment, RAG Based Interaction, and Multimodal Delivery
Pellegrini, D., & Ragazzi, D. (2026) · Lecture notes in business information processing · doi:10.1007/978-3-032-28160-9_13
Context-Embedding in Natural Language for Keener Chatbot Responses
Arun Kumar, S., Manimozhi, I., Kulkarni, B., Aparna, H. D., Kak, S. M., & Mohammad, A. (2025) · International Conference on Emerging Engineering Technologies and Applications (IC-EETA) · doi:10.1109/ic-eeta66496.2025.11548050
Evaluating Hallucinations in Domain-Adapted Large Language ModelsPreprint
Porwal, S., Sai Prasath, S., Bi, X., & Scandlen, M. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2606.07521
Corpus of Kannada Vachanas: Compilation, Annotation, and Potential Applications
Basavanna, C., Manjunath, S., Swarnalatha, K., & Guru, D. S. (2026) · Procedia Computer Science · doi:10.1016/j.procs.2026.06.515
Fidelity Assessment of Large Language Models Across Cross-Domain Benchmarks
Yu, S., Ryu, H., Lee, S., & Kim, Y. (2026) · Lecture notes in computer science · doi:10.1007/978-981-92-2014-4_5
Gupta, A., & Pirzada, U. S. M. (2026) · Algorithms for intelligent systems · doi:10.1007/978-3-032-32423-8_3
MITRE-SAGE: A Multi-Agent Cybersecurity Question-Answering ModelPreprint
Habibzadeh, A., Feyzi, F., & Atani, R. E. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2608.16921
“Key contributing factors include over-reliance on static pre-training data, hallucination, lack of access to up-to-date information, and insufficient comprehension of highly specialized terminology [12, 13].”
DSPP: Dataset-Specific Progressive Pruning for Efficient and Generalizable LLM Deployment
万里川, Jiang, H., Liu, W., & Yang, H. (2026) · Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP) · doi:10.18653/2026.findings-emnlp.2391
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.