{"paper_id":"199ad2ab-ac30-4cef-8675-496a4180dd6e","body_text":"Exposing the Molecular Reaction Blind Spots of LLMs with PathwayQA \nGowri Nayar,1 Kristy A. Carpenter,1* Delaney A. Smith,2* Betty Xiong,1 and Russ B. Altman†,1,3,4,5 \nDepartments of 1Biomedical Data Science, 2Biochemistry, 3Bioengineering, 4Genetics, and 5Medicine \nStanford University \nStanford, CA 94305, USA \n† Email: russ.altman@stanford.edu \nProteins mediate a large portion of cellular activity, and understanding protein pathways can yield \nnovel biological insights. Large language models (LLMs) have become increasingly adept at \nperforming inference tasks across different fields of science and engineering. These models could \nfacilitate the analysis of protein networks and help generate hypotheses about protein interactions \nin a scalable and accessible manner. However, the performance of LLMs in inferring \nprotein-mediated biochemical reactions remains understudied. Here, we evaluate nine LLMs in \nreasoning over protein pathways included in the curated Reactome database. We find that all nine \nmodels struggle to infer products of a reaction when given reactants and enzymes. GPT-4o mini \nperformed the best with a median recovery score of 0.6667, but no model surpassed the baseline \nstrategy of parroting reactants back as predicted products. Most LLMs also performed poorly when \ninferring whether a protein pathway is associated with a human disease, with an average accuracy \nof 0.5980. DeepSeek 7B Chat performed the best with an accuracy of 0.9100. This study \nhighlights an area where LLMs still struggle to make correct inferences and provides an \nopportunity for further work in developing biological LLMs. We also provide a novel \nquestion-answer dataset, PathwayQA, which is based on the Reactome database. PathwayQA can \nbe used to benchmark and improve model performance on reasoning over protein-interaction \nnetworks. PathwayQA is available at https://github.com/Helix-Research-Lab/PathwayQA.  \nKeywords: Benchmark Datasets; Large language models (LLMs); Chemical reactions; Pathways; \nProtein interactions.  \n© 2023 The Authors. Open Access chapter published by World Scientific Publishing Company and \ndistributed under the terms of the Creative Commons Attribution Non-Commercial (CC BY-NC) 4.0 \nLicense. \n*These authors contributed equally \n \n1 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n \n \n \n1.\n   Introduction \nProtein pathways organize biochemical reactions into coherent processes that underlie cellular \nfunction, with reactions as their granular components. These pathways are key for identifying \ndisease mechanisms and potential drug therapeutic targets. 1  Pathways have been characterized via \nbiological experimentation and catalogued in databases over decades. Databases, such as the \nKyoto Encyclopedia of Genes and Genomes (KEGG), 2 the Search Tool for the Retrieval of \nInteracting Genes/Proteins (STRING), 3 and Reactome, 4 have been curated to collate protein \npathways, which are composed of sequential chemical reactions. Reactome is one of the largest \nand most comprehensive manually curated databases of human protein pathways, providing high \nconfidence in the stored reactions. Pathways are represented as hierarchical, sequential networks \nthat vary in complexity; 4 well-studied pathways (e.g., glycolysis) have abundant literature support, \nwhile others are created from lower-confidence evidence. Because these resources are incomplete \nand biased toward well-characterized entities, inferring novel reaction and pathway relationships \nremains challenging, limiting functional annotation across the full human proteome. 5 Furthermore, \naccessing the data at a full-proteome scale requires technical knowledge to query and structure \neffectively, reducing accessibility for many biologists. Therefore, scalable computational methods \nare necessary to infer new functional relationships. \nLarge language models (LLMs), built on the transformer architecture, efficiently process \nsequential data via self-attention and can often perform well as few-shot learners without \nextensive fine-tuning. 6 These capabilities have enabled their success across many downstream \ntasks in the biomedical domain. Recent advances have improved their performance on complex \nproblems such as summarizing published articles, 7 biomedical question answering, 8 protein \ndesign,9 and passing multiple-choice medical board exams. 10 Yet their capacity to reason over \ncomplex, multi-step biological systems—like protein pathways involving promiscuous entities and \nsequential molecular transformations—varies.11 \nPrior work has begun to tackle the problem of LLM reasoning over protein interactions. \nProLLM12 has made advances by introducing a Protein Chain of Thought framework, where it \ntransforms protein-protein interaction data into natural language prompts. BioMaze 13 has \nintroduced a dataset of 5.1k pathway problems and PathSeeker, an LLM agent that reasons \nthrough interactive subgraphs of biological pathways. However, this prior work does not model \nthe chemical transformations that occur during protein interactions. Specifically, these papers do \nnot address the problem of predicting the products of reactions or pathway disease associations, as \ndocumented in Reactome. 4 These capabilities are fundamental for contextualizing novel findings \nand generating reasonable hypotheses based on biochemical understanding and disease context. \nTo fill this gap, we built PathwayQA, a benchmark question and answer (QA) dataset \nbased on Reactome. PathwayQA consists of two subtasks: predicting reaction outputs and linking \npathways to diseases. The datasets are packaged as easy-to-use prompt-answer pairs and used to \nevaluate both biologically tuned open-weight LLMs  (BioGPT 14 and BioMedLM 8) and \ngeneral-purpose models (Claude 3.5 Haiku, 15,16 GPT-4o mini,17 DeepSeek 7B Chat, 18 Gemma 7B \nInstruct,19 Llama3.1 8B Instruct, 20 Mistral 7B Instruct, 21 and Qwen1.5 7B Chat 22). GPT-4o mini \nachieves the highest recall on reaction output generation, DeepSeek the highest accuracy on \n2 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \ndisease association, and Mistral the best accuracy for disease name generation. Despite that, all \nnine models perform poorly overall: the top average recall for reaction outputs is 0.6667, and the \ntop accuracy for disease name generation is < 0.6. Therefore, this work underscores the need to \nfine-tune models using the proposed benchmarks. PathwayQA is available at \nhttps://github.com/Helix-Research-Lab/PathwayQA. \n2.\n   Methods \nWe systematically curate Reactome into a question-answer dataset, and evaluate current LLMs for \ntheir ability to generate data related to protein pathways (Figure 1). \n \nFig. 1. Pipeline for evaluating LLMs on protein-pathway reaction and disease prediction. (A) We extract reactions, \npathways, and disease associations from Reactome to (B) build two QA benchmarks (reaction outputs and \npathway-disease links). (C) We prompt nine LLMs (general purpose and fine-tuned) on both datasets, and (D) validate \ntheir answers against Reactome ground truth using GPT4.1, with comparison to human annotations. \n2.1.\n   Dataset curation from Reactome \nWe compiled a set of 2,306 pathways, which consist of 15,168 reactions, from Reactome. Each \nreaction involves reactants, enzymes, and products, each of which can be proteins, organic small \nmolecules, ions, gene products, or a complex of multiple entities together. \nWe used the Reactome API to generate a map linking each Reactome entity to its \ncorresponding reference-database ID and name. For proteins, the reference database is UniProt, 23 \nfor chemical compounds it is ChEBI, 24 and for gene products it is Ensembl. 25 We decomposed \neach complex into its sub-entities and stored the mapping between the Reactome entity ID for the \ncomplex and the corresponding reference identifier for each sub-entity.  \nWe applied this mapping to annotate every reactant, product, and enzyme of each reaction with \nits reference-database identifier and name. We consolidated all reactions into a structured JSON \nfile. For each reaction, it includes the Reactome reaction ID, the name of the reaction, and the \nreactant, product, and enzyme entities (each with Reactome IDs, reference database IDs, and \nnames). We maintained the Reactome ID for each element so that future users may use it to query \nthe API for necessary metadata.  \nWe also retrieved Reactome’s pathways, which consist of an ordered sequence of reactions, \nalong with the pathways’ disease annotations. For each pathway, we generated a structured JSON \nfile that denotes the Reactome pathway ID, name of pathway, disease association, pathway context \n \n3 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n \n \n \n(biological relevance of the pathway), disease name (if applicable), and an ordered list of its \nreaction components.  \nWe construct the two benchmark question-answer (QA) datasets that make up PathwayQA \nusing the two files. We used the reaction file to create the reaction subtask of PathwayQA, where \nthe reactants and enzymes are given in the prompt and the LLM is asked to generate the products. \nWe used the pathway file to create the disease subtask of PathwayQA, where the pathway and \npathway context are in the prompt, and the LLM is asked to generate the disease association and \ndisease name, if applicable.  \n2.2.\n   Prompt engineering to create the QA dataset \nWe performed prompt engineering to iteratively develop prompts for both tasks. For the reaction \noutput generation task prompts, we first suggested to the model that it is an expert in biochemistry, \nexplained the structure for providing outputs, and gave two examples of completed reactions \n(reactants, enzymes, products). For each reaction, we generated a query that gave the reactant and \nenzyme entities in the prompt and asked the LLM to generate the outputs. The answers associated \nwith these prompts consisted of the true set of product entities, with both names and reference \nidentifiers. For the disease association task, we generated a prompt that provided the pathway \nidentifier and pathway context extracted from Reactome and asked the LLM to infer whether the \npathway is associated with a disease, and if so, which disease. The answers associated with these \nprompts were a yes/no label of whether the pathway is known to be associated with a disease, \nfollowed by the disease name if available. We also tested prompts with one example (“one-shot”) \nand no examples (“zero-shot”) for the reaction product generation task. For disease association, \nwe only tested one-shot prompts due to the simpler structure of the task. Example question/answer \npairs for both tasks are present in Supplementary Text S1-2. \n2.3.\n   Evaluated Models \nWe evaluated recent state-of-the-art LLMs of comparable size, including general-purpose models \ntrained on broad text corpora, and biomedical models, which are smaller and updated less often. \nWe prioritized small, freely available models due to their accessibility for research and included \ntwo affordable paywalled models to compare performance. \nThe nine LLMs we evaluated were: (1) BioGPT, 14 a model pretrained and fine-tuned on \nbiomedical literature for domain tasks and the smallest model evaluated; (2) BioMedLM, 8 a \nGPT-style model pretrained on biomedical text for question answering; (3) Claude 3.5 Haiku,15,16 a \npaid general-purpose model that is the cheaper and lighter version of the popular Claude Sonnet; \n(4) DeepSeek 7B Chat, 18 a general-purpose, decoder-only model optimized for speed and resource \nuse; (5) Gemma 7B Instruct, 19 a general-purpose, decoder-only model that is the lighter version of \nthe popular Google Gemini; (6) GPT‑4o mini, 17 a paid general-purpose model that is the cheaper \nand lighter version of OpenAI’s popular and versatile GPT-4o; (7) Llama3.1 8B Instruct, 20 a \ngeneral-purpose open source model finetuned for instruction; (8) Mistral 7B Instruct, 21 a \ngeneral-purpose open source model tuned on instruction data (prompt-response, summarization, \nand QA); (9) Qwen1.5 7B Chat, 22 a general-purpose decoder-only model finetuned for instruction \n4 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \nand conversational safety. See Supplementary Table S3 for architectural detail for each model and \nSupplementary Text S4 for details on run-time parameters. \n2.4.\n   Evaluation \n2.4.1.\n   Evaluate reaction output generation with GPT 4.1 and human annotation \nTo perform LLM-as-a-judge, 26 we used a larger, newer, and performance-optimized LLM, \nOpenAI’s GPT4.1,27 to determine if the outputs of the 9 selected models matched the true reaction \nproducts. We prompt GPT4.1 to mark each ground-truth entity (protein, chemical compound, gene \nproduct, complex) as True if it appears in the generated output, and False otherwise. We then \ncompute a ‘reaction score’ as the fraction of ground-truth entities recovered. ‘Pathway scores’ are \nthe average of their constituent reaction scores. \nTo ensure that GPT4.1 evaluations were of satisfactory quality, we manually graded a subset of \nthe generated responses against the answers extracted from Reactome. We selected 10 random \nqueries from each model and had two biosciences PhD students independently evaluate the \nmodel-generated answers. We repeated this process twice for additional depth in coverage (total = \n180 manually-annotated queries). For each query in our manually-annotated set, we determined \nthe fraction of the products listed in the ground-truth answer that are present in the generated \nanswer; a protein complex was counted as a single product entity. Each pair of human graders \ndiscussed their scores to resolve major discrepancies in grading style, although minor differences \nwere preserved to reflect variance in rule interpretation (for a complete set of evaluation criteria, \nsee Supplementary Text S5). After finalizing a consistent rubric, we computed the Spearman \ncorrelation between each pair of graders. \nWe created a validation set from 30% of the manually-annotated queries with which to \nengineer the GPT4.1 evaluation prompt. We iterated on the instruction prompt until GPT4.1 was \nable to replicate human grading on the validation set to a sufficient threshold of similarity (above r \n= 0.8 Spearman correlation). 28 The final prompt is included in Supplementary Text S6. We ran the \nGPT4.1 grading query over the remainder of the manually-annotated queries and again calculated \nthe Spearman correlation between the human annotations and GPT4.1 annotations. Our correlation \nmet the threshold, so we used the GPT4.1 grader to evaluate the unannotated generated data. \nWe measure reaction output generation with recall: the fraction of ground-truth output entities \nin the generated output (0 = none, 1 = all). We compared model performance to a baseline strategy \nof parroting the reactants of the query back as the predicted products. To assess extraneous \ncontent, we compare the length of each generated answer to the ground-truth answer by computing \nthe Spearman correlation between their word counts; a higher correlation indicates the model’s \noutput length better matches the true answer and thus contains fewer extraneous additions. \n2.4.2.\n   Evaluate the impact of proteins’ promiscuity on model scores \nA promiscuous protein can react with different molecules and thus participate in different \nreactions. The number of times the protein appears in the full Reactome dataset, across all \nreactions, can be a metric for promiscuity. More promiscuous proteins are found in more reactions \nand thus are more frequently in the literature and the training data. This can impact an LLM's \nperformance, as it has seen more instances of the promiscuous proteins in training 29. To measure \n \n5 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n \n \n \nthe level of promiscuity for each reaction and pathway, we find the number of times each \ncomponent protein is present in the dataset and normalized by the number of proteins in the \nreaction or pathway, which we define as the average protein occurrence.  \nTo assess the impact of promiscuous and well-studied proteins, we correlate model scores with \nthe average protein occurrence of a reaction’s and pathways’ entities in the full Reactome dataset. \nFor each reaction and pathway, we compute the mean occurrence of its entities, normalized by the \ntotal number of entities, to measure how common they are. We then analyze how this average \ncorrelates to model performance. \n2.4.3.\n   Evaluate disease association generation with GPT 4.1 and regular expressions \nTo evaluate disease-association queries, we first used regular expressions to extract “Yes/No” \nanswers from LLM outputs and compared them to Reactome labels. If they matched, the result \nwas marked ‘True’. We then had GPT-4.1 perform the same task and compared its scoring using \naccuracy, F1, and MCC. Given high agreement between methods (accuracy > 0.95), we used \nGPT-4.1 for final evaluation, as its reasoning better captured edge cases missed by string \nmatching. \nFor disease name generation, we evaluated only disease-associated pathways. We used \napproximate string matching—marking outputs ‘True’ if the correct disease name appeared in the \nresponse—and also asked GPT-4.1 to judge whether the generated name was a fuzzy match to the \nReactome label. GPT-4.1 was used to detect biologically consistent but textually varied responses \n(e.g., “cancer” vs. “multiple myeloma”). Again, high agreement with pattern matching (accuracy > \n0.95) led us to adopt GPT-4.1 scoring for final evaluation. \n3.\n   Results \n3.1.\n   Generated answers from general-purpose models are more accurate than fine-tuned \nmodels \nWe prompted all 9 models with the queries from both datasets and generated the set of answers, \nreaction outputs, and disease annotations. In Table 1, we show the generated outputs for two \narbitrarily selected reactions for one general-purpose model, GPT-4o mini, and one fine-tuned \nmodel, BioGPT. The general-purpose model gets both the name of the product as well as the \nreference ID correct, while the fine-tuned model only gets the name correct. For the first reaction, \nboth models score a 1 (all ground-truth entities are present in the generated output); GPT-4o mini \ncorrectly identifies the name, subcellular localization, and the reference ID, while BioGPT only \ngets the name correct. In the second example, GPT-4o mini scores a 1 and BioGPT scores a 0 \n(Table 1).  \nSupplementary Figure S7 shows that the general-purpose models more consistently score \nhigher than the fine-tuned models, across easy and hard reactions and pathways. Fine-tuned \nmodels only succeed on ‘easy’ queries, where all models were able to produce the correct answer. \n \n \n6 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n \n \n \n \nTable 1. Sample of generated reaction outputs for two randomly selected reactions for GPT-4o mini \n(highest-performing general-purpose model) and BioGPT (highest-performing fine-tuned model). Correct parts of \ngenerated outputs are colored in teal, and incorrect portions are colored in red.  \n \n \nDeepSeek and BioGPT, the general-purpose and fine-tuned models, respectively, had the \nbest performance for disease name generation. In both cases, DeepSeek correctly classified the \npathway while BioGPT was incorrect (Table 2). DeepSeek also correctly generated the disease \nname in the first example. Although it was incorrect in the second example, it still represents a \nrelated phenotype, as DeepSeek generated “antimicrobial resistance” when the ground truth \ndisease is a bacterial infection.  \n \nTable 2. Sample generated reaction outputs for two randomly selected pathways (with disease annotation) for \nDeepSeek (highest-performing general-purpose model) and BioGPT (highest-performing fine-tuned model). Correct \nparts of generated outputs are colored in teal, and incorrect portions are colored in red.  \n \n \n3.2.\n   GPT4.1 grading is scalable and consistent with human grading \nThe Spearman correlation coefficient between each pair of human raters on the two \nmanually-annotated sets of 90 queries was 0.9116 (p = 4.97e-36) and 0.9475 (p = 1.22e-45), \nrespectively. The Spearman correlation coefficient between human scores and GPT4.1 scores was \n0.8069 (p = 8.67e-14) on the validation set (n = 54 queries) and 0.8362 (p = 1.28e-48) on the full \nmanually-annotated set (n = 180 queries). \nFor disease association, the accuracy of GPT4.1 compared with text-based pattern matching \nwas 0.9584 across all models, with an F1 score of 0.9661 and an MCC of 0.9149. The only model \n \n7 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n \n \n \nthat had an accuracy < 0.95 was BioMedLM (accuracy = 0.67887, F1 = 0.4798, MCC = 0.4798). \nThere were 316 pathways associated with disease (positive label), while 1,990 pathways had no \ndisease association (negative label). For disease names, the agreement between text-based pattern \nmatching and GPT4.1 was 0.9866 across all models, with an F1 score of 0.9892 and an MCC of \n0.9791. Of the 316 disease-associated pathways, 312 pathways had a disease name listed in \nReactome. \n3.3.\n   Models did not outperform the baseline strategy for identifying output generations \nThe distributions of recall scores varied across models, with Claude and GPT-4o mini performing \nthe best in the two-shot and one-shot settings, and Llama and Mistral joining GPT-4o mini as the \ntop performers in the zero-shot setting (Figure 2). BioGPT, BioMedLM, DeepSeek, and Qwen had \nmedian recall scores of 0 in all three prompt settings. While the difference in performance between \nthe two-shot and one-shot setting was small and of variable directionality, the zero-shot setting \noften had slightly improved performance. No model achieved excellent performance on this task, \nwith the baseline strategy of parroting the query reactants back as predicted products \noutperforming all methods. The highest median recall score was 0.6667 (tie between GPT-4o mini \nzero-shot, Llama zero-shot, and Mistral zero-shot), and the interquartile ranges of the \nbest-performing models averaged around 0.75 (Figure 2).  \n \n \nFig. 2. LLM performance evaluation for reaction products recall. Each model is denoted by a different color and \ngrouping of boxes; within each grouping, from left to right (and with decreasing opacity), are the results for the \ntwo-shot, one-shot, and zero-shot settings. The teal box on the far right, labeled “Baseline,” is the performance when \nthe reactants of the query reaction are parroted back as the predicted products. Each box spans the first quartile to the \nthird quartile, with whiskers extending to 1.5x the interquartile range from the box. Outliers beyond the whiskers are \nshown as individual dots. The median of each distribution is shown as a black line. \n \n8 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n \nFig. 3. Effect of protein occurrence on model performance for reaction recall scores. Reaction-level recall scores are \nplotted against the average occurrence of the reaction’s proteins in the full Reactome dataset. Across all models, \nscores decline as protein occurrence increases, suggesting that frequently occurring (promiscuous) proteins introduce \nambiguity by participating in multiple reactions. \nFig. 4. Correlation between generated and ground-truth output lengths for reaction prediction. For each model, we plot \nthe number of words in the generated output versus the number of words in the ground-truth output for all reaction \nprompts. Dashed lines indicate linear regression fits, and the Spearman correlation coefficient (r) is reported in the \ntitle of each subplot. BioGPT shows the strongest correlation (r = 0.71). The other models show weak or no \ncorrelation between ground-truth outputs and generated outputs.  \n \n9 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n \n \n \n3.4.\n   Model score decreases when the reaction includes more promiscuous proteins \nModel recall scores decrease with increased protein promiscuity (Figure 3). A more promiscuous \nprotein (interacting with different molecules in different reactions) will occur more frequently in \nthe Reactome dataset; thus, reactions and pathways with promiscuous proteins will have a higher \naverage protein occurrence. Across all models, we see that as the average protein occurrence per \nreaction increases, the models’ recall scores decrease. Per reaction, the models with higher overall \nrecall scores (Claude and GPT-4o mini) exhibit a more significant decrease in recall score with an \nincrease in average protein occurrence. In contrast, models with lower overall recall scores \n(BioGPT and BioMedLM) showed less variance as the average protein occurrence increased. \nSupplement Figure S9 shows the comparison between the model recall score and the average \nprotein occurrence per pathway. The decreasing trend was not reflected in the pathway recall \nscores; across all models, the scores remained relatively constant as the average protein \noccurrence per pathway increased. \n3.5.\n   Models generate a consistent amount of text irrespective of the true answer length \nMost models exhibited weak or no correlation between true answer length and generated answer \nlength (Spearman's r ranging from 0.00 for Gemma to 0.28 for GPT-4o mini), showing that most \nmodels have a standard length of output text regardless of the ground-truth output length (Figure \n4). BioGPT stands out with a high correlation of r = 0.71. BioGPT, BioMedLM, Claude, \nDeepSeek, and Mistral tend to output more text than required to answer correctly (Figure 4). \n \n \nFig. 5. LLM performance evaluation for inferring A: disease-pathway associations and B: disease names. Specifically, \npanel A shows model performance in inferring whether or not a protein pathway in Reactome is associated with a \ndisease. In panel B, the models are asked to generate the name of the associated disease, and a binary score is assigned \nbased on whether the disease names are consistent at the biological level across Reactome and the LLM-generated \nanswer. Accuracy is shown as a solid bar, the F1 score as a hatched bar, and the MCC as a dotted bar. \n10 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n3.6.\n   Models vary in their ability to infer disease-pathway associations and disease names \nThe average accuracy across all models for disease-pathway association was 0.5980 with an F1 \nscore of 0.3230 and an MCC of 0.1972. The best performing model, by all metrics, was DeepSeek \n(accuracy (acc) = 0.9100, F1 = 0.6391, MCC = 0.5912) (Figure 5A). Mistral (acc = 0.8184, F1 = \n0.5333, MCC = 0.4661) and GPT-4o mini (acc = 0.7990, F1 = 0.545, MCC = 0.499) also had an \nF1 score above 0.5. BioGPT had the worst F1 score and MCC (acc = 0.802, F1 = 0.258, MCC = \n-0.0720).  \nFor disease name evaluation, the average accuracy across all models was 0.3512 with an F1 \nscore of 0.5310 and an MCC of 0.0101. The best performing model was Mistral with 0.6041 \naccuracy, an F1 score of  0.7514, and an MCC of 0.024 (Figure 5B). Claude (accuracy = 0.5730, \nF1 = 0.724, MCC = 0.1284) and Llama (accuracy = 0.532, F1 = 0.623, MCC = 0.1180) also had \nan accuracy above 0.50. BioGPT (accuracy = 0.0254, F1 = 0.0491, MCC = -0.570) and \nBioMedLM (accuracy = 0.022, F1 = 0.043, MCC = -0.0596) had accuracies < 0.05 (Figure 5B). \n4.\n   Discussion \nAs LLMs grow in size and capability, so does the potential for these tools to accelerate biological \nresearch. To assess whether their outputs are sufficiently accurate and reliable, domain-specific \nand tractable benchmarks are essential. We address this need with three main contributions: (1) we \nintroduce PathwayQA, a benchmark textual, question-answer dataset derived from the Reactome \ndatabase, (2) we evaluate nine LLMs (general purpose and fine-tuned) on their ability to generate \ncorrect reaction outputs and disease associations, and (3) we demonstrate the need for improved \nmodels specifically for reaction and pathway generation. \nIn our evaluation, the largest and most expensive models performed the best in the one- and \ntwo-shot settings for the reaction product generation task, and the smallest and oldest models \nperformed the worst in all prompt settings. This is likely due to the increase in reasoning \ncapability with more parameters. The disparity is further exacerbated by the potential orders of \nmagnitude difference in parameter count between BioGPT/BioMedLM and GPT-4o mini/Claude, \na discrepancy that OpenAI and Anthropic obscure. Gemma, Llama, and Mistral outperformed \nDeepSeek and Qwen, likely due to their tendency to generate extra reactions. In contrast, \nDeepSeek and Qwen tended to have brief responses that matched the expected output format. We \ndemonstrated that regurgitating the reactants outperformed all models, suggesting significant room \nfor improvement in this task, as models that performed well likely capitalized on the similarity \nbetween products and reactants. Relatedly, the unexpected increase in performance with zero-shot \nprompting may stem from the model more easily repeating reactants instead of copying unrelated \nexamples from the prompt (as is common in the outputs from the two-shot and one-shot prompts). \nParroting back reactants likely did well because in some cases, an entity is both a product and a \nreactant, and in some cases, the subtle changes between the reactant form and the product form \nwere not caught in our grading scheme. We kept our grading scheme lenient because of the \namount of hallucination and poor overall performance of the assessed models. \nThe top-performing model in identifying disease associations was DeepSeek, followed by \nGPT-4o mini and Mistral. While GPT-4o mini also performed well in the product generation tasks, \nDeepSeek only performed well in inferring disease associations (accuracy above 0.9). This version \n \n11 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n \n \n \nof  DeepSeek was tuned for reasoning ability, which may explain its enhanced performance. 18 \nWith disease name generation, no model had an accuracy above 0.8. Due to prompt length \nconstraints, we only provided the pathway ID and pathway context in the query, as opposed to the \nchain of all proteins in the pathway. It is possible that this did not give the model sufficient context \nto identify the pathway.30  \nHowever, evaluating model performance on accuracy alone is not sufficient for handling the \nclass imbalance in the disease-pathway association and disease-name tasks. Most pathways \n(86.3%) have no associated disease, creating a strong bias toward negative labels. As a result, \nmetrics like accuracy and F1 score could overestimate performance. To address this, we used a \ncombination of metrics—including the Matthews Correlation Coefficient (MCC)—to assess each \nmodel’s ability to handle imbalanced data more accurately. Only DeepSeek achieved a strong \ncorrelation (MCC > 0.8) for disease association. In the disease-name task, nearly all \ndisease-associated pathways (except 4) had a specific name. For an LLM's output to be marked \ncorrect, it needed to generate a functionally equivalent disease name—a non-trivial task unlikely \nto be answered correctly by chance. Therefore, in this case, accuracy served as a more meaningful \nmetric than class-sensitive alternatives.  \nWhen evaluating model performance in product generation via manual annotation, we \nobserved that each model had its own idiosyncrasies. In the product prediction task, Claude and \nGPT-4o mini frequently repeated the enzymes and reactants of the queried reaction, which at times \nled to an artificially high recall score due to reactants and products being similar. BioMedLM \nattempted to force the output to conform to text styles found in published articles. The \nhallucinations produced by BioMedLM were so extensive and nonsensical that GPT4.1 struggled \nto evaluate the results in the disease association task. For a human reader, the hallucination and \nregurgitation produced by these models frequently obscured the correct answers in the generated \ntext. Sample outputs of these texts are available in Supplementary Text S8. \nMost of the models maintained a strict format for the generated text and constant length of \noutput (Figure 4). Claude, GPT-4o mini, Llama, Mistral, and Gemma tended to add extra reactions \nin the same pattern at the end of the generated output, decreasing their correlation with \nground-truth output length. BioGPT, DeepSeek, and Qwen did not add extraneous text as \nfrequently, and their output lengths had a higher correlation to the ground-truth answer. Despite \nthis, these three models performed poorly overall in generating correct reaction outputs (Figure 2), \nsuggesting that they had likely learned to approximate output size based on superficial \nfeatures—such as the number of input entities—rather than reasoning over the chemical \ntransformation. In contrast, models such as GPT-4o mini showed more modest correlations but \nachieved higher accuracy, indicating better alignment with actual content rather than just output \nlength.  \nDespite consistent formatting, LLMs showed inconsistent performance in capturing \nbiochemical details. Reactions with a higher average protein occurrence (containing promiscuous \nproteins) had lower recall scores, likely due to the broader range of possible outputs. In contrast, \nreactions with rare proteins (lower occurrence rates in the dataset) scored higher, as there were \nfewer instances in the training data to choose from. The average protein occurrence rates per \npathway did not affect the pathway recall score significantly, likely because the pathway recall \n12 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \nscore is the average of its component reaction scores, and therefore robust to single outliers. \nFurthermore, the models often identified common cofactors like ADP and GTP, likely due to \nrepetition, pattern matching, or their frequent occurrence in reactions. However, they rarely \nrecognized lone phosphates (Pi) as products. We found that the average protein occurrence (used \nas a measure of the proteins’ promiscuity) per reaction was an important parameter for the models’ \nrecall scores. Models also frequently missed complex components and correct chemical identifiers \n(e.g., ChEBI, UniProt). \nDue to these idiosyncrasies and varied outputs, human evaluation of model outputs was \nnon-trivial, even when performed by domain experts. A key consideration was handling \ninconsistent biological nomenclature and representations: differences such as ubiquitinated versus \nnon‑ubiquitinated proteins, complex names versus their constituents, and varying naming \nconventions (e.g., 2‑oxoglutarate vs. 2‑OG, AdoHcy vs. S‑adenosyl‑L‑homocysteine) complicated \nscoring and required domain expertise. Models also produced vague outputs like “peptide \nfragments” or “downstream signaling molecules,” making it unclear whether correct entities were \ninferred. Interrater agreement testing revealed that human graders varied in judgments, with the \nLLM judge (GPT4.1) sometimes showing greater consistency and stricter fairness, underscoring \nboth the difficulty and potential of LLM-as-a-judge evaluation. \nWe also identify broader limitations in this study. We removed prompt repetition from model \noutputs but did not filter out extraneous reactions generated after the target query; a more robust \nevaluation would exclude these. Using an LLM as a judge adds uncertainty, as it may overlook \nerrors a human expert would catch. While we thoroughly validate the LLM’s grading in this work, \nfuture improvements could include querying models multiple times to form consensus outputs and \nrefining prompts further. The prompts for the initial QA tasks could also be refined further; all \nnine models were given the same prompts for consistency, but it is possible that some models \nwould perform better with a modified prompt. Testing high-performance models at scale is \ncomputationally expensive, limiting our ability to fully assess their potential. Finally, the study \nrelies solely on the Reactome database, which, while well-curated, is biased towards well-studied \npathways and diseases. \nOur results suggest that it may be useful to further tune LLMs on PathwayQA to potentially \nimprove performance. Agentic LLMs – such as Biomni 31 or Aviary32 – that are able to search the \nweb and make API calls may be able to access Reactome directly and improve performance on \nthese tasks. In any case, there is a clear need to further develop LLMs in the protein and chemical \nreaction space. We trust that our provided benchmark will assist in these activities. \n5.\n   Appendix \nThe code, data, and supplementary material accompanying this paper is available at \ngithub.com/Helix-Research-Lab/PathwayQA.  \nAcknowledgments \nGN is supported by NIH NLM F31LM014646; KAC is supported by NIH F31GM151783; DAS is \nsupported by the Stanford Biochemistry Department; BX is supported by Australian-American Fulbright \nFuture Scholarship; RBA is supported by NIH R35GM153195 and Chan Zuckerberg Biohub.  \n \n13 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n \n \n \nReferences \n1. Feng, Y ., Wang, Q. & Wang, T. Drug target protein-protein interaction networks: A systematic \nperspective. Biomed Res. Int. 2017, 1289259 (2017). \n2. Kanehisa, M., Furumichi, M., Sato, Y ., Matsuura, Y . & Ishiguro-Watanabe, M. KEGG: biological \nsystems database as a model of the real world. Nucleic Acids Res. 53, D672–D677 (2025). \n3. Szklarczyk, D. et al. The STRING database in 2023: protein-protein association networks and \nfunctional enrichment analyses for any sequenced genome of interest. Nucleic Acids Res. 51, \nD638–D646 (2023). \n4. Milacic, M. et al. The reactome pathway knowledgebase 2024. Nucleic Acids Res. 52, D672–D678 \n(2024). \n5. Milano, M., Agapito, G. & Cannataro, M. Challenges and Limitations of Biological Network \nAnalysis. BioTech (Basel) 11, (2022). \n6. Brown, T. B. et al. Language Models are Few-Shot Learners. arXiv [cs.CL] (2020). \n7. Van Veen, D. et al. Adapted large language models can outperform medical experts in clinical text \nsummarization. Nat. Med. 30, 1134–1142 (2024). \n8. Bolton, E. et al. BioMedLM: A 2.7B parameter language model trained on biomedical text. arXiv \n[cs.CL] (2024) doi:10.48550/ARXIV .2403.18421. \n9. Liu, X., Liu, Y ., Chen, S. & Hu, W. Controllable protein sequence generation with LLM preference \noptimization. National Conference on Artificial Intelligence 505–513 (2025). \n10. Bicknell, B. T. et al. ChatGPT-4 Omni performance in USMLE disciplines and clinical skills: \nComparative analysis. JMIR Med. Educ. 10, e63430 (2024). \n11. Park, G. et al. Comparative performance evaluation of large language models for extracting molecular \ninteractions and pathway knowledge. J. Comput. Biol. 32, 675–695 (2025). \n12. Jin, M. et al. ProLLM: Protein Chain-of-Thoughts Enhanced LLM for Protein-Protein Interaction \n14 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \nPrediction. Bioinformatics (2024). \n13. Zhao, H., Ma, C., Xu, F., Kong, L. & Deng, Z.-H. BioMaze: Benchmarking and enhancing large \nlanguage models for biological pathway reasoning. arXiv [cs.LG] (2025) \ndoi:10.48550/ARXIV .2502.16660. \n14. Luo, R. et al. BioGPT: generative pre-trained transformer for biomedical text generation and mining. \nBrief. Bioinform. 23, (2022). \n15. Anthropic. The Claude 3 Model Family: Opus, Sonnet, Haiku. Preprint at \nhttps://assets.anthropic.com/m/61e7d27f8c8f5919/original/Claude-3-Model-Card.pdf (2024). \n16. Anthropic. Model Card Addendum: Claude 3.5 Haiku and Upgraded Claude 3.5 Sonnet. Preprint at \nhttps://assets.anthropic.com/m/1cd9d098ac3e6467/original/Claude-3-Model-Card-October-Addendum\n.pdf (2024). \n17. OpenAI et al. GPT-4o System Card. arXiv [cs.CL] (2024). \n18. DeepSeek-AI et al. DeepSeek LLM: Scaling open-source language models with longtermism. arXiv \n[cs.CL] (2024). \n19. Gemma Team et al. Gemma: Open models based on Gemini research and technology. arXiv [cs.CL] \n(2024). \n20. Grattafiori, A. et al. The Llama 3 herd of models. arXiv [cs.AI] (2024). \n21. Jiang, A. Q. et al. Mistral 7B. arXiv [cs.CL] (2023). \n22. Bai, J. et al. Qwen Technical Report. arXiv [cs.CL] (2023). \n23. UniProt Consortium. UniProt: The universal protein knowledgebase in 2025. Nucleic Acids Res. 53, \nD609–D617 (2025). \n24. Hastings, J. et al. ChEBI in 2016: Improved services and an expanding collection of metabolites. \nNucleic Acids Res. 44, D1214–9 (2016). \n25. Dyer, S. C. et al. Ensembl 2025. Nucleic Acids Res. 53, D948–D957 (2025). \n26. Gu, J. et al. A Survey on LLM-as-a-Judge. arXiv [cs.CL] (2024). \n \n15 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint \n\n \n \n \n \n27. OpenAI et al. GPT-4 Technical Report. arXiv [cs.CL] (2023). \n28. Akoglu, H. User’s guide to correlation coefficients. Turk. J. Emerg. Med. 18, 91–93 (2018). \n29. Shumailov, I. et al. AI models collapse when trained on recursively generated data. Nature 631, \n755–759 (2024). \n30. Sun, C. et al. How new data permeates LLM knowledge and how to dilute it. arXiv [cs.CL] (2025) \ndoi:10.48550/ARXIV .2504.09522. \n31. Huang, K. et al. Biomni: A general-purpose biomedical AI agent. bioRxivorg (2025) \ndoi:10.1101/2025.05.30.656746. \n32. Narayanan, S. et al. Aviary: training language agents on challenging scientific tasks. arXiv [cs.AI] \n(2024). \n \n16 \n.CC-BY 4.0 International licensemade available under a \n(which was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is \nThe copyright holder for this preprintthis version posted August 15, 2025. ; https://doi.org/10.1101/2025.08.12.669911doi: bioRxiv preprint","source_license":"CC-BY-4.0","license_restricted":false}