mlsanityData to 14 Oct 2026

Test It Before You Trust It: Applying Software Testing for Trustworthy In-context Learning

arXiv 2504.18827 ↗First posted 26 Apr 2025cs.SE cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

In-context learning (ICL) has emerged as a powerful capability of large language models (LLMs), enabling them to perform new tasks based on a few provided examples without explicit fine-tuning. Despite their impressive adaptability, these models remain vulnerable to subtle adversarial perturbations and exhibit unpredictable behavior when faced with linguistic variations. Inspired by software testing principles, we introduce a software testing-inspired framework, called MMT4NL, for evaluating the trustworthiness of in-context learning by utilizing adversarial perturbations and software testing techniques. It includes diverse evaluation aspects of linguistic capabilities for testing the ICL capabilities of LLMs. MMT4NL is built around the idea of crafting metamorphic adversarial examples from a test set in order to quantify and pinpoint bugs in the designed prompts of ICL. Our philosophy is to treat any LLM as software and validate its functionalities just like testing the software. Finally, we demonstrate applications of MMT4NL on the sentiment analysis and question-answering tasks. Our experiments could reveal various linguistic bugs in state-of-the-art LLMs.

Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 6 of its 17 references that are in the map. First posted on arXiv 26 Apr 2025.

Builds on

6 of 17 references.

References · 6

  1. 2022Large Language Models are Zero-Shot Reasonerscited by 4,374
  2. 2020Beyond Accuracy: Behavioral Testing of NLP models with CheckListcited by 1,006
  3. 2023Ragas: Automated Evaluation of Retrieval Augmented Generationcited by 418
  4. 2021Evaluating the Robustness of Neural Language Models to Input Perturbationscited by 87
  5. 2020Metamorphic Testing: A New Approach for Generating Next Test Casescited by 75
  6. 2023PromptBench: A Unified Library for Evaluation of Large Language Modelscited by 44

Built on by

Cited by year

Citing papers per year: 2025: 2.

2 papers.