journal article·2025-01-24Open access

Context Is King: Large Language Models’ Interpretability in Divergent Knowledge Scenarios

Andrés Piñeiro-Martín, Francisco-Javier Santos-Criado, Carmen García-Mateo, Laura Docío-Fernández, María del Carmen López-Pérez

Applied Sciences· Volume 15· Issue 3

Abstract

Large language models (LLMs) have revolutionized the field of artificial intelligence in both academia and industry, transforming how we communicate, search for information, and create content. However, these models face knowledge cutoffs and costly updates, driving a new ecosystem for LLM-based applications that leverage interaction techniques to extend capabilities and facilitate knowledge updates. As these models grow more complex, understanding their internal workings becomes increasingly challenging, posing significant issues for transparency, interpretability, and explainability. This paper proposes a novel approach to interpretability by shifting the focus to understanding the model’s functionality within specific contexts through interaction techniques. Rather than dissecting the LLM itself, we explore how contextual information and interaction techniques can elucidate the model’s thought processes. To this end, we introduce the Context-Driven Divergent Knowledge Evaluation (CDK-E) methodology, along with the Divergent Knowledge Dataset (DKD), for evaluating the interpretability of LLMs in context-specific scenarios that diverge from the model’s inherent knowledge. The empirical results demonstrate that advanced LLMs achieve high alignment with divergent contexts, validating our hypothesis that contextual information significantly enhances interpretability. Moreover, the strong correlation between LLM-based metrics and semantic metrics confirms the reliability of our evaluation framework.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Explainable Artificial Intelligence (XAI) · Topic Modeling · Machine Learning in Healthcare

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Balidea Consulting & Programming S.L., Witland Building, Camiños da Vida Street, 15701 Santiago de Compostela, Spain

GTM Research Group, AtlanTTic Research Center, University of Vigo, Maxwell Street, 36310 Vigo, Spain

Funding

Galician Innovation Agency (GAIN) · Consellería de Cultura, Educación, Formación profesional e Universidades of the Xunta de Galicia · European Union

References (61)

Show source-provided references
1. Burstein, J., Doran, C., and Solorio, T. (2019). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), Minneapolis, MN, USA, 2–7 June 2019, Association for Computational Linguistics.
2. Language models are few-shot learners
3. Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., and Azhar, F. (2023). Llama: Open and efficient foundation language models. arXiv.
4. Touvron, H., Martin, L., Stone, K., Albert, P., Almahairi, A., Babaei, Y., Bashlykov, N., Batra, S., Bhargava, P., and Bhosale, S. (2023). Llama 2: Open foundation and fine-tuned chat models. arXiv.
5. Anil, R., Borgeaud, S., Wu, Y., Alayrac, J.B., Yu, J., Soricut, R., Schalkwyk, J., Dai, A.M., Hauth, A., and Millican, K. (2023). Gemini: A family of highly capable multimodal models. arXiv.
6. Jiang, A.Q., Sablayrolles, A., Mensch, A., Bamford, C., Chaplot, D.S., Casas, D.d.l., Bressand, F., Lengyel, G., Lample, G., and Saulnier, L. (2023). Mistral 7B. arXiv.
7. Abdin, M., Jacobs, S.A., Awan, A.A., Aneja, J., Awadallah, A., Awadalla, H., Bach, N., Bahree, A., Bakhtiari, A., and Behl, H. (2024). Phi-3 technical report: A highly capable language model locally on your phone. arXiv.
8. Improving customer service quality in MSMEs through the use of ChatGPT10.33395/jmp.v12i1.12407 ↗
9. Bao, K., Zhang, J., Zhang, Y., Wang, W., Feng, F., and He, X. (2023, January 18–22). Tallrec: An effective and efficient tuning framework to align large language model with recommendation. Proceedings of the 17th ACM Conference on Recommender Systems, Singapore.10.1145/3604915.3608857 ↗
10. Zhang, B., Haddow, B., and Birch, A. (2023, January 23–29). Prompting large language model for machine translation: A case study. Proceedings of the International Conference on Machine Learning. PMLR, Honolulu, HI, USA.
11. Benchmarking large language models for news summarization10.1162/tacl_a_00632 ↗
12. Ostendorff, M., Rethmeier, N., Augenstein, I., Gipp, B., and Rehm, G. (2022, January 7–11). Neighborhood Contrastive Learning for Scientific Document Representations with Citation Embeddings. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Abu Dhabi, United Arab Emirates.10.18653/v1/2022.emnlp-main.802 ↗
13. Piñeiro-Martín, A., García-Mateo, C., Docío-Fernández, L., and López-Pérez, M.d.C. (2023). Ethical Challenges in the Development of Virtual Assistants Powered by Large Language Models. Electronics, 12.10.20944/preprints202306.0196.v1 ↗
14. Singh, C., Inala, J.P., Galley, M., Caruana, R., and Gao, J. (2024). Rethinking Interpretability in the Era of Large Language Models. arXiv.
15. Weidinger, L., Mellor, J., Rauh, M., Griffin, C., Uesato, J., Huang, P.S., Cheng, M., Glaese, M., Balle, B., and Kasirzadeh, A. (2021). Ethical and social risks of harm from language models. arXiv.
16. Ferrara, E. (2023). Should chatgpt be biased? challenges and risks of bias in large language models. arXiv.10.2139/ssrn.4627814 ↗
17. Abid, A., Farooqi, M., and Zou, J. (2021, January 19–21). Persistent anti-muslim bias in large language models. Proceedings of the 2021 AAAI/ACM Conference on AI, Ethics, and Society, Virtual.10.1145/3461702.3462624 ↗
18. Large language models associate Muslims with violence10.1038/s42256-021-00359-2 ↗
19. Kaddour, J., Harris, J., Mozes, M., Bradley, H., Raileanu, R., and McHardy, R. (2023). Challenges and applications of large language models. arXiv.
20. Harrer, S. (2023). Attention is not all you need: The complicated case of ethically using large language models in healthcare and medicine. EBioMedicine, 90.10.1016/j.ebiom.2023.104512 ↗
21. Perlman, A.M. (2022). The implications of ChatGPT for legal services and society. SSRN, 4294197.10.2139/ssrn.4294197 ↗
22. Sok, S., and Heng, K. (2023). ChatGPT for education and research: A review of benefits and risks. SSRN, 4378735.10.2139/ssrn.4378735 ↗
23. Fu, D., Li, X., Wen, L., Dou, M., Cai, P., Shi, B., and Qiao, Y. (2024, January 3–8). Drive like a human: Rethinking autonomous driving with large language models. Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, Waikoloa, HI, USA.10.1109/WACVW60836.2024.00102 ↗
24. Techniques for interpretable machine learning10.1145/3359786 ↗
25. Explainable Artificial Intelligence (XAI): Concepts, taxonomies, opportunities and challenges toward responsible AI10.1016/j.inffus.2019.12.012 ↗
26. Došilović, F.K., Brčić, M., and Hlupić, N. (2018, January 21–25). Explainable artificial intelligence: A survey. Proceedings of the 2018 41st International convention on information and communication technology, electronics and microelectronics (MIPRO), Opatija, Croatia.10.23919/MIPRO.2018.8400040 ↗
27. Shuster, K., Poff, S., Chen, M., Kiela, D., and Weston, J. (2021, January 16–20). Retrieval Augmentation Reduces Hallucination in Conversation. Proceedings of the Findings of the Association for Computational Linguistics: EMNLP 2021, Punta Cana, Dominican Republic.10.18653/v1/2021.findings-emnlp.320 ↗
28. Hadi, M.U., Qureshi, R., Shah, A., Irfan, M., Zafar, A., Shaikh, M.B., Akhtar, N., Wu, J., Mirjalili, S., and Shah, M. (2023). Large language models: A comprehensive survey of its applications, challenges, limitations, and future prospects. Authorea Preprints.10.36227/techrxiv.23589741.v3 ↗
29. Exploring the Synergy of Prompt Engineering and Reinforcement Learning for Enhanced Control and Responsiveness in Chat GPT
30. Large language models are zero-shot reasoners
31. Min, S., Lyu, X., Holtzman, A., Artetxe, M., Lewis, M., Hajishirzi, H., and Zettlemoyer, L. (2022, January 7–11). Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Abu Dhabi, United Arab Emirates.10.18653/v1/2022.emnlp-main.759 ↗
32. Chain-of-thought prompting elicits reasoning in large language models
33. Retrieval-augmented generation for knowledge-intensive nlp tasks
34. Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., and Cao, Y. (2023, January 1–5). ReAct: Synergizing Reasoning and Acting in Language Models. Proceedings of the International Conference on Learning Representations (ICLR), Kigali, Rwanda.
35. Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E., Narang, S., Chowdhery, A., and Zhou, D. (2022). Self-consistency improves chain of thought reasoning in language models. arXiv.
36. Diao, S., Wang, P., Lin, Y., and Zhang, T. (2023). Active prompting with chain-of-thought for large language models. arXiv.
37. Guiding large language models via directional stimulus prompting
38. Reflexion: Language agents with verbal reinforcement learning
39. Liu, Z., Yu, X., Fang, Y., and Zhang, X. (May, January 30). Graphprompt: Unifying pre-training and downstream tasks for graph neural networks. Proceedings of the ACM Web Conference 2023, Austin, TX, USA.10.1145/3543507.3583386 ↗
40. Zhang, Z., Zhang, A., Li, M., Zhao, H., Karypis, G., and Smola, A. (2023). Multimodal chain-of-thought reasoning in language models. arXiv.
41. Shi, F., Chen, X., Misra, K., Scales, N., Dohan, D., Chi, E.H., Schärli, N., and Zhou, D. (July, January 30). Large language models can be easily distracted by irrelevant context. Proceedings of the International Conference on Machine Learning. PMLR, Edmonton, AB, Canada.
42. Yoo, K.M., Kim, J., Kim, H.J., Cho, H., Jo, H., Lee, S.W., Lee, S.g., and Kim, T. (2022, January 7–11). Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrations. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Abu Dhabi, United Arab Emirates.10.18653/v1/2022.emnlp-main.155 ↗
43. Zhao, H., Yang, F., Lakkaraju, H., and Du, M. (2024). Opening the black box of large language models: Two views on holistic interpretability. arXiv.
44. Attention is all you need
45. Explainability for large language models: A survey
46. Ribeiro, M.T., Singh, S., and Guestrin, C. (2016, January 13–17). “Why should i trust you?” Explaining the predictions of any classifier. Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA.10.1145/2939672.2939778 ↗
47. Algorithms to estimate Shapley value feature attributions10.1038/s42256-023-00657-x ↗
48. A novel method using explainable artificial intelligence (XAI)-based Shapley Additive Explanations for spatial landslide prediction using Time-Series SAR dataset10.1016/j.gr.2022.08.004 ↗
49. Ross, A., Marasović, A., and Peters, M.E. (2021, January 1–6). Explaining NLP Models via Minimal Contrastive Editing (MiCE). Proceedings of the Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, Online.10.18653/v1/2021.findings-acl.336 ↗
50. Wu, X., Zhao, H., Zhu, Y., Shi, Y., Yang, F., Liu, T., Zhai, X., Yao, W., Li, J., and Du, M. (2024). Usable XAI: 10 strategies towards exploiting explainability in the LLM era. arXiv.
51. Duh, K., Gomez, H., and Bethard, S. (2024). How Interpretable are Reasoning Explanations from Prompting Large Language Models?. Proceedings of the Findings of the Association for Computational Linguistics: NAACL 2024, Mexico City, Mexico, 16–21 June 2024, Association for Computational Linguistics.
52. Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing
53. Chen, J., Lin, H., Han, X., and Sun, L. (2024, January 20–27). Benchmarking large language models in retrieval-augmented generation. Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada.
54. In-context retrieval-augmented language models10.1162/tacl_a_00605 ↗
55. Aletras, N., and De Clercq, O. (2024, January 21–22). RAGAs: Automated Evaluation of Retrieval Augmented Generation. Proceedings of the 18th Conference of the European Chapter of the Association for Computational Linguistics: System Demonstrations, St. Julian’s, Malta.
56. OpenAI (2024, October 31). GPT-4o: A Model That Can Reason Across Audio, Vision, and Text in Real Time. Available online: https://openai.com/index/hello-gpt-4o/.
57. Meta (2025, January 23). Introducing Meta Llama 3: The Most Capable Openly Available LLM to Date. Meta, 18 April 2024. Available online: https://ai.meta.com/blog/meta-llama-3/.
58. Mistral AI (2025, January 23). Mixtral of Experts: A High Quality Sparse Mixture-of-Experts. Available online: https://mistral.ai/news/mixtral-8x22b/.
59. Achiam, J., Adler, S., Agarwal, S., Ahmad, L., Akkaya, I., Aleman, F.L., Almeida, D., Altenschmidt, J., Altman, S., and Anadkat, S. (2023). Gpt-4 technical report. arXiv.
60. Anthropic (2024, October 31). The Claude 3 Model Family: Opus, Sonnet, Haiku. Available online: https://www-cdn.anthropic.com/de8ba9b01c9ab7cbabf5c33b80b7bbc618857627/Model_Card_Claude_3.pdf.
61. (2025, January 23). Industrial PhD information by Galician Innovation Agency. Available online: https://www.xunta.gal/dog/Publicados/2021/20211005/AnuncioG0596-270921-0001_gl.html.