A systematic evaluation of in-context learning in large language models for antibody characterization
Large language models can learn new tasks through in-context learning (ICL), yet this ability remains underexplored for biological sequence classification. We evaluate ICL across 20 large language models on three antibody tasks: species-origin, antibody specificity, and isotype class classification. Few-shot prompting improves over zero-shot performance, but matching the performance of protein language model classifiers requires sequence-similar demonstrations. Building on this observation, we introduce a sequence similarity-based strategy for ICL in antibody sequence classification, Sim-ICL. Using 32-shot prompting, Sim-ICL achieves competitive performance on two of three tasks. Its simplicity makes few-shot ICL promising for antibody characterization, especially for researchers with limited coding expertise.