# A modular and interpretable framework for tabular data analysis using LLaMA 7B: Enhancing preprocessing, modeling, and explainability with local language models

**Authors:** Shahab Ahmad Al Maaytah, Ayman Qahmash

PMC · DOI: 10.1371/journal.pone.0341002 · PLOS One · 2026-02-12

## TL;DR

This paper introduces a system using LLaMA 7B to preprocess medical appointment data, improving prediction accuracy and interpretability for no-show predictions.

## Contribution

A novel pipeline combining local LLMs for preprocessing and classical models for prediction in tabular data analysis.

## Key findings

- LLM-guided preprocessing improved XGBoost accuracy to 80% on the Medical Appointment No-Shows dataset.
- SHAP analysis revealed waiting days, age, and SMS notifications as key predictors of appointment attendance.
- The pipeline achieved a precision–recall AUC of 0.87 despite class imbalance in the dataset.

## Abstract

Predicting whether a patient will attend a scheduled medical appointment is essential for reducing inefficiencies in healthcare systems and optimizing resource allocation. This study introduces a local, LLM-assisted pipeline that uses LLaMA 7B solely to automate semantic preprocessing such as column renaming, datatype inference, and cleaning recommendations while the predictive task is performed by classical machine-learning models. Applied to the Medical Appointment No-Shows dataset, the pipeline spans dataset analysis, feature transformation, classification, SHAP-based explainability, and system profiling. Using LLM-guided preprocessing, the downstream XGBoost classifier achieved an overall accuracy of 80%, with an F1-score of 0.89 for the majority Show class and 0.03 for the minority No-show class, reflecting the strong class imbalance in the dataset. The AUC-ROC reached 0.65 and the precision–recall AUC was 0.87, driven primarily by majority-class performance. SHAP analysis identified waiting days, age, and SMS notifications as the most influential predictors. Overall, the results demonstrate that local large language models can enhance preprocessing and interpretability within an efficient, deployable workflow for tabular prediction tasks, while classical supervised models remain responsible for final prediction.

## Full-text entities

- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12900344/full.md

## Figures

26 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12900344/full.md

## References

39 references — full list in the complete paper: https://tomesphere.com/paper/PMC12900344/full.md

---
Source: https://tomesphere.com/paper/PMC12900344