NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

From Chat to Checkup: Can Large Language Models Assist in Diabetes Prediction?

Shadman Sakib, Oishy Fatema Akhand, Ajwad AbrararXiv 2025 · OpenReview

TL;DR

This paper investigates the potential of Large Language Models (LLMs) for predicting diabetes using structured numerical data, a task traditionally dominated by ML/DL models. By employing zero-shot, one-shot, and three-shot prompting on the Pima Indian Diabetes Dataset, the study finds that while LLMs show promise, especially proprietary ones like GPT-4o and Gemma-2-27B, they don't yet surpass traditional ML models in accuracy but offer a valuable alternative for low-resource or exploratory scenarios.

What Problem Does This Paper Address?

Diabetes prediction is a critical area in healthcare, with Machine Learning (ML) and Deep Learning (DL) models having achieved high accuracy. However, these models often require extensive labeled data and domain-specific fine-tuning, which can be a barrier in resource-constrained settings or for rapid initial assessments. The paper addresses the gap in understanding how Large Language Models (LLMs), which excel at natural language tasks, can be effectively applied to structured, numerical medical data for prediction without task-specific fine-tuning. The core question is whether LLMs can offer a viable, perhaps more accessible, alternative for tasks like diabetes prediction, especially when leveraging prompt engineering.

Methods

The researchers evaluated six LLMs: four open-source (Gemma-2-27B, Mistral-7B, Llama-3.1-8B, Llama-3.2-2B) and two proprietary (GPT-4o, Gemini Flash 2.0). They compared these LLMs against three traditional ML models: Logistic Regression, Random Forest, and Support Vector Machine (SVM).

The key methodological innovation lies in how LLMs were adapted to structured data. Instead of traditional feature engineering or model training, the study used prompt engineering. Each patient's data was converted into a natural language prompt. Three prompting strategies were tested:

  • Zero-shot: The LLM receives only the patient's data and an instruction to predict diabetes.
  • One-shot: The LLM receives one labeled example of a patient's data and its outcome, along with the new patient's data and instruction.
  • Three-shot: The LLM receives three labeled examples, the new patient's data, and the instruction.

For the traditional ML models, standard 80/20 train-test splits and z-score normalization were used. All LLM evaluations were performed across three independent runs to account for variability, with results averaged.

Datasets

The study exclusively used the Pima Indian Diabetes Database (PIDD). This dataset is a widely recognized benchmark in medical machine learning, containing 768 instances with 9 attributes related to clinical measurements for predicting diabetes. It has a moderate class imbalance, with approximately 65.1% non-diabetic and 34.9% diabetic cases.

Key Insights and Ideas

  • LLMs can process structured data via prompts: The study demonstrates that LLMs, despite being text-based, can effectively interpret and make predictions from structured numerical data when presented through well-crafted natural language prompts.
  • Prompting matters: The performance of LLMs is significantly influenced by the prompting strategy. Generally, three-shot prompting showed improvements over zero-shot and one-shot, suggesting that providing a few examples helps LLMs better understand the task and data format.
  • Proprietary LLMs lead the pack: GPT-4o and Gemma-2-27B (an open-source model that performs comparably to proprietary ones in some aspects) showed the strongest performance among the LLMs, particularly in few-shot settings.
  • LLMs offer a "no-training" alternative: The ability of LLMs to perform reasonably well without any task-specific fine-tuning or traditional training is a significant advantage, especially for rapid prototyping, exploratory analysis, or in environments with limited labeled data.
  • LLMs are not yet a silver bullet: Despite their potential, LLMs still lag behind well-tuned traditional ML models in raw accuracy and F1-score on this specific dataset. Issues like performance variability and the need for careful prompt engineering remain.

Key Results

  • Highest LLM Accuracy: Gemma-2-27B (three-shot) achieved the highest accuracy among LLMs at 74.35%, closely followed by GPT-40 (three-shot) at 74.22%.
  • Traditional ML Baseline: The best-performing traditional model, Random Forest, achieved an accuracy of 75.97%.
  • F1-Score Advantage: Notably, Gemma-2-27B (three-shot) outperformed traditional ML models in terms of F1-score, indicating a better balance between precision and recall.
  • Underperforming LLMs: Mistral-7B and Llama models showed significantly lower performance, suggesting they are less adept at this task without fine-tuning.
  • Gemini Flash 2.0: While achieving high accuracy, Gemini Flash 2.0 exhibited a lower F1-score, potentially due to a tendency to overpredict the majority class in the imbalanced dataset.

Limitations and Future Work

Limitations: * Performance Gap: LLMs, even the best ones, did not surpass the accuracy of traditional ML models like Random Forest on the PIDD dataset. * Prompt Sensitivity: Performance can vary significantly based on the prompting strategy, requiring careful prompt engineering. * Computational Cost: LLMs generally demand more computational resources than traditional ML models. * Interpretability: While LLMs can provide predictions, their internal decision-making process for structured data remains less interpretable than some traditional ML models. * Dataset Specificity: The study focused on a single dataset (PIDD), and results might not generalize to other medical prediction tasks or datasets.

Future Work: * Fine-tuning LLMs: Exploring fine-tuning LLMs on structured medical datasets could significantly boost their performance. * Hybrid Approaches: Investigating hybrid models that combine LLMs with conventional classifiers might leverage the strengths of both. * Prompt Engineering Research: Further research into advanced prompt engineering techniques tailored for structured data is needed. * Domain Adaptation: Developing methods for better domain adaptation of LLMs for medical prediction tasks.

Summary updated

BibTeX
@misc{sakib2025from,
  author = {Shadman Sakib and Oishy Fatema Akhand and Ajwad Abrar},
  title = {{From Chat to Checkup: Can Large Language Models Assist in Diabetes Prediction?}},
  year = {2025},
  eprint = {2506.14949},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.14949},
}
Figure