Context-Aware Large Language Model for Customer Support Chatbots
Article Information
Abstract
Despite their high conversational fluency, large language models (LLMs) tend to produce responses that are either contrived or factually inaccurate, a phenomenon known as hallucination. This constrains their dependability in areas where accuracy is crucial, like customer service. This study leverages a context-aware chatbot built on a Retrieval-Augmented Generation (RAG) pipeline to solve the problem. The system retrieves semantically relevant text from an external knowledge base by integrating neural information retrieval with LLMs to ensure factual correctness and enhanced contextual relevance. These externally retrieved documents are given as a reference during response generation. The LLM-as-a-judge approach is used to evaluate the system by comparing responses to a qualitative performance matrix using GPT-4o. Results show that the RAG-based chatbot increases context precision by a factor of 7.5, decreases hallucinations (measured through Faithfulness) by 73.20% and improves answer relevance by 6.97% when compared to a random retrieval baseline system. This study advances conversational AI by demonstrating how the retrieval method significantly enhances the usefulness and reliability of LLMs for enterprise-level customer service. The results show that the RAG architecture provides a scalable alternative for creating precise, contextually grounded conversational agents, thereby mitigating some of the main drawbacks of LLMs.
Graphical Abstract
Keywords
Data Availability Statement
Funding
Conflicts of Interest
AI Use Statement
Ethical Approval and Consent to Participate
References
- Li, C. H., Chen, K., & Chang, Y. J. (2019, October). When there is no progress with a task-oriented chatbot: A conversation analysis. In Proceedings of the 21st International Conference on Human-Computer Interaction with Mobile Devices and Services (pp. 1-6).
[CrossRef] [Google Scholar] - Mitsuda, K., Higashinaka, R., Li, T., & Yoshida, S. (2022, May). Investigating person-specific errors in chat-oriented dialogue systems. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers) (pp. 464-469).
[CrossRef] [Google Scholar] - Reshmi, S., & Balakrishnan, K. (2018). Empowering chatbots with business intelligence by big data integration. International Journal of Advanced Research in Computer Science, 9, 627-631. http://doi.org/10.26483/ijarcs.v9i1.5398
[Google Scholar] - Weizenbaum, J. (1983). ELIZA—a computer program for the study of natural language communication between man and machine. Communications of the ACM, 26(1), 23-28.
[CrossRef] [Google Scholar] - Colby, K. M., Weber, S., & Hilf, F. D. (1971). Artificial paranoia. Artificial Intelligence, 2(1), 1-25.
[CrossRef] [Google Scholar] - Yao, Y., Duan, J., Xu, K., Cai, Y., Sun, Z., & Zhang, Y. (2024). A survey on large language model (LLM) security and privacy: The good, the bad, and the ugly. High-Confidence Computing, 4(2), 100211.
[CrossRef] [Google Scholar] - Shareef, F. (2024, October). Enhancing conversational AI with LLMs for customer support automation. In 2024 2nd international conference on self sustainable artificial intelligence systems (ICSSAS) (pp. 239-244). IEEE.
[CrossRef] [Google Scholar] - Gokul, A. (2023). LLMs and AI: Understanding its reach and impact. Preprints.
[CrossRef] [Google Scholar] - Lovtsov, V. A., & Skvortsova, M. A. (2025, April). Automated mobile operator customer service using large language models combined with RAG system. In 2025 7th International Youth Conference on Radio Electronics, Electrical and Power Engineering (REEPE) (pp. 1-6). IEEE.
[CrossRef] [Google Scholar] - Tsai, H. C., Jhang, J. W., & Wang, J. F. (2024, December). Constructing a Shopping Mall Customer Service Center Robot Based on the LLAMA-7B Language Model. In 2024 International Conference on Orange Technology (ICOT) (pp. 1-4). IEEE.
[CrossRef] [Google Scholar] - Praneeth, B., Nattem, E. C., Jetti, K., Kavyashree, B. K., Rakshitha, D., Kumar, P. R., & Sreelakshmi, K. (2025). Optimization of customer feedback summarization using large language models (llm) and advanced retrieval-augmented generation. IEEE Access, 13, 124319-124332.
[CrossRef] [Google Scholar] - Mohandoss, R. (2024, June). Context-based semantic caching for llm applications. In 2024 IEEE Conference on Artificial Intelligence (CAI) (pp. 371-376). IEEE.
[CrossRef] [Google Scholar] - Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F. L., ... & McGrew, B. (2023). Gpt-4 technical report. arXiv preprint arXiv:2303.08774.
[CrossRef] [Google Scholar] - Ji, Z., Lee, N., Frieske, R., Yu, T., Su, D., Xu, Y., ... & Fung, P. (2023). Survey of hallucination in natural language generation. ACM computing surveys, 55(12), 1-38.
[CrossRef] [Google Scholar] - Zheng, Z., Liao, L., Deng, Y., & Nie, L. (2023). Building emotional support chatbots in the era of llms. arXiv preprint arXiv:2308.11584.
[CrossRef] [Google Scholar] - Topsakal, O., & Akinci, T. C. (2023, July). Creating large language model applications utilizing langchain: A primer on developing llm apps fast. In International conference on applied engineering and natural sciences (Vol. 1, No. 1, pp. 1050-1056).
[CrossRef] [Google Scholar] - Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., ... & Kiela, D. (2020). Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in neural information processing systems, 33, 9459-9474.
[Google Scholar] - Pandya, K., & Holia, M. (2023). Automating Customer Service using LangChain: Building custom open-source GPT Chatbot for organizations. arXiv preprint arXiv:2310.05421.
[CrossRef] [Google Scholar] - Chen, J., Lin, H., Han, X., & Sun, L. (2024, March). Benchmarking large language models in retrieval-augmented generation. In Proceedings of the AAAI conference on artificial intelligence (Vol. 38, No. 16, pp. 17754-17762).
[CrossRef] [Google Scholar] - Es, S., James, J., Anke, L. E., & Schockaert, S. (2024, March). Ragas: Automated evaluation of retrieval augmented generation. In Proceedings of the 18th conference of the european chapter of the association for computational linguistics: system demonstrations (pp. 150-158).
[CrossRef] [Google Scholar] - Kim, B., Kim, H., Lee, S. W., Lee, G., Kwak, D., Hyeon, J. D., ... & Sung, N. (2021, November). What changes can large-scale language models bring? intensive study on hyperclova: Billions-scale korean generative pretrained transformers. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing (pp. 3405-3424).
[CrossRef] [Google Scholar] - Zhang, C., Datla, V. V., Shrivastava, A., Samuel, A., Huang, Z., Kumar, A., & Liu, D. (2025, January). An automatic method to estimate correctness of RAG. In Proceedings of the 31st International Conference on Computational Linguistics: Industry Track (pp. 603-611). https://aclanthology.org/2025.coling-industry.52/
[Google Scholar] - Yu, H., Gan, A., Zhang, K., Tong, S., Liu, Q., & Liu, Z. (2024, August). Evaluation of retrieval-augmented generation: A survey. In CCF Conference on Big Data (pp. 102-120). Singapore: Springer Nature Singapore.
[CrossRef] [Google Scholar] - Dou, C., Jin, Z., Jiao, W., Zhao, H., Zhao, Y., & Tao, Z. (2023, December). Plugmed: Improving specificity in patient-centered medical dialogue generation using in-context learning. In Findings of the Association for Computational Linguistics: EMNLP 2023 (pp. 5050-5066).
[CrossRef] [Google Scholar] - Siriwardhana, S., Weerasekera, R., Wen, E., Kaluarachchi, T., Rana, R., & Nanayakkara, S. (2023). Improving the domain adaptation of retrieval augmented generation (RAG) models for open domain question answering. Transactions of the Association for Computational Linguistics, 11, 1-17.
[CrossRef] [Google Scholar] - Liu, S., Zheng, C., Demasi, O., Sabour, S., Li, Y., Yu, Z., ... & Huang, M. (2021, August). Towards emotional support dialog systems. In Proceedings of the 59th annual meeting of the association for computational linguistics and the 11th international joint conference on natural language processing (volume 1: Long papers) (pp. 3469-3483).
[CrossRef] [Google Scholar] - Adiwardana, D., Luong, M. T., So, D. R., Hall, J., Fiedel, N., Thoppilan, R., ... & Le, Q. V. (2020). Towards a human-like open-domain chatbot. arXiv preprint arXiv:2001.09977.
[CrossRef] [Google Scholar] - Roller, S., Dinan, E., Goyal, N., Ju, D., Williamson, M., Liu, Y., ... & Weston, J. (2021, April). Recipes for building an open-domain chatbot. In Proceedings of the 16th conference of the european chapter of the association for computational linguistics: Main volume (pp. 300-325).
[CrossRef] [Google Scholar] - Kasahara, T., Kawahara, D., Tung, N., Li, S., Shinzato, K., & Sato, T. (2022, July). Building a personalized dialogue system with prompt-tuning. In Proceedings of the 2022 conference of the North American chapter of the association for computational linguistics: human language technologies: student research workshop (pp. 96-105).
[CrossRef] [Google Scholar] - Ngai, E. W., Lee, M. C., Luo, M., Chan, P. S., & Liang, T. (2021). An intelligent knowledge-based chatbot for customer service. Electronic Commerce Research and Applications, 50, 101098.
[CrossRef] [Google Scholar] - Mikolov, T., Chen, K., Corrado, G., & Dean, J. (2013). Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781.
[CrossRef] [Google Scholar] - Reimers, N., & Gurevych, I. (2019, November). Sentence-bert: Sentence embeddings using siamese bert-networks. In Proceedings of the 2019 conference on empirical methods in natural language processing and the 9th international joint conference on natural language processing (EMNLP-IJCNLP) (pp. 3982-3992).
[CrossRef] [Google Scholar]
Cite This Article
TY - JOUR AU - Shabbir, Rabia AU - Talpur, Kashif AU - Ahmad, Shakeel PY - 2026 DA - 2026/08/26 TI - Context-Aware Large Language Model for Customer Support Chatbots JO - ICCK Transactions on Machine Intelligence T2 - ICCK Transactions on Machine Intelligence JF - ICCK Transactions on Machine Intelligence VL - 2 IS - 4 SP - 190 EP - 199 DO - 10.62762/TMI.2026.469770 UR - https://www.icck.org/article/abs/TMI.2026.469770 KW - embedding, large language model KW - retrieval-augmented generation KW - LLM-as-a-judge KW - natural information retrieval AB - Despite their high conversational fluency, large language models (LLMs) tend to produce responses that are either contrived or factually inaccurate, a phenomenon known as hallucination. This constrains their dependability in areas where accuracy is crucial, like customer service. This study leverages a context-aware chatbot built on a Retrieval-Augmented Generation (RAG) pipeline to solve the problem. The system retrieves semantically relevant text from an external knowledge base by integrating neural information retrieval with LLMs to ensure factual correctness and enhanced contextual relevance. These externally retrieved documents are given as a reference during response generation. The LLM-as-a-judge approach is used to evaluate the system by comparing responses to a qualitative performance matrix using GPT-4o. Results show that the RAG-based chatbot increases context precision by a factor of 7.5, decreases hallucinations (measured through Faithfulness) by 73.20% and improves answer relevance by 6.97% when compared to a random retrieval baseline system. This study advances conversational AI by demonstrating how the retrieval method significantly enhances the usefulness and reliability of LLMs for enterprise-level customer service. The results show that the RAG architecture provides a scalable alternative for creating precise, contextually grounded conversational agents, thereby mitigating some of the main drawbacks of LLMs. SN - 3068-7403 PB - Institute of Central Computation and Knowledge LA - English ER -
@article{Shabbir2026ContextAwa,
author = {Rabia Shabbir and Kashif Talpur and Shakeel Ahmad},
title = {Context-Aware Large Language Model for Customer Support Chatbots},
journal = {ICCK Transactions on Machine Intelligence},
year = {2026},
volume = {2},
number = {4},
pages = {190-199},
doi = {10.62762/TMI.2026.469770},
url = {https://www.icck.org/article/abs/TMI.2026.469770},
abstract = {Despite their high conversational fluency, large language models (LLMs) tend to produce responses that are either contrived or factually inaccurate, a phenomenon known as hallucination. This constrains their dependability in areas where accuracy is crucial, like customer service. This study leverages a context-aware chatbot built on a Retrieval-Augmented Generation (RAG) pipeline to solve the problem. The system retrieves semantically relevant text from an external knowledge base by integrating neural information retrieval with LLMs to ensure factual correctness and enhanced contextual relevance. These externally retrieved documents are given as a reference during response generation. The LLM-as-a-judge approach is used to evaluate the system by comparing responses to a qualitative performance matrix using GPT-4o. Results show that the RAG-based chatbot increases context precision by a factor of 7.5, decreases hallucinations (measured through Faithfulness) by 73.20\% and improves answer relevance by 6.97\% when compared to a random retrieval baseline system. This study advances conversational AI by demonstrating how the retrieval method significantly enhances the usefulness and reliability of LLMs for enterprise-level customer service. The results show that the RAG architecture provides a scalable alternative for creating precise, contextually grounded conversational agents, thereby mitigating some of the main drawbacks of LLMs.},
keywords = {embedding, large language model, retrieval-augmented generation, LLM-as-a-judge, natural information retrieval},
issn = {3068-7403},
publisher = {Institute of Central Computation and Knowledge}
}
Article Metrics
Publisher's Note
ICCK stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and Permissions
Portico