Facebook pixel tracking

The Science and Information (SAI) Organization publishes open-access peer-reviewed journals in computer science and artificial intelligence.

Contact Info
Website thesai.org
Follow Us
Contact Info
Follow Us
Research Article | Open Access |

Nearest-Neighbor Case Retrieval for Emergency Department Urgency Prediction with a Large Language Model

Author 1: Ismail Bouajaja Author 2: Omar Bouattane Author 3: Oussama Barakat Author 4: Abdelaziz Daaif
International Journal of Advanced Computer Science and Applications (IJACSA) · Vol. 17, No. 10 · Published 2026

DOI: 10.14569/IJACSA.2026.0171064

Abstract

This study evaluates whether prior emergency department visits improve a large language model’s (LLM) prediction of recorded urgency. Four methods were compared: an always-urgent baseline, conventional k-nearest-neighbor (kNN) voting, an LLM without retrieved cases, and the same LLM with 30 kNN-retrieved labeled cases. The 2022 National Hospital Ambulatory Medical Care Survey yielded 10,207 eligible visits: 7,167 for training, 1,522 for validation, and 1,518 for testing. The final case library combined the 8,689 training and validation visits. On the commonly held-out test set, the kNN-search LLM achieved 74.70% accuracy and 66.86% balanced accuracy, compared with 68.97% and 65.68% for the no-search LLM and 62.52% and 64.30% for conventional kNN. Relative to no-search prompting, retrieved cases increased urgent sensitivity from 73.87% to 86.37% but reduced nonurgent specificity from 57.49% to 47.36%. A paired 95% interval excluded zero for the accuracy difference but included zero for balanced accuracy. API-reported model-call charges were USD 0.0786 without cases and USD 0.8577 with cases. The results demonstrate a change in the balance of errors, not established clinical utility or uniformly better discrimination.

Keywords

How to Cite this Article

Bouajaja, I., Bouattane, O., Barakat, O., & Daaif, A. (2026). Nearest-Neighbor Case Retrieval for Emergency Department Urgency Prediction with a Large Language Model. International Journal of Advanced Computer Science and Applications, 17(10). https://doi.org/10.14569/IJACSA.2026.0171064

Bouajaja, Ismail, et al.. "Nearest-Neighbor Case Retrieval for Emergency Department Urgency Prediction with a Large Language Model." International Journal of Advanced Computer Science and Applications, vol. 17, no. 10, 2026, https://doi.org/10.14569/IJACSA.2026.0171064.

@article{Bouajaja2026,
  title     = {Nearest-Neighbor Case Retrieval for Emergency Department Urgency Prediction with a Large Language Model},
  journal   = {International Journal of Advanced Computer Science and Applications},
  volume    = {17},
  number    = {10},
  year      = {2026},
  publisher = {The Science and Information Organization},
  author    = {Ismail Bouajaja and Omar Bouattane and Oussama Barakat and Abdelaziz Daaif},
  doi       = {10.14569/IJACSA.2026.0171064},
  url       = {https://doi.org/10.14569/IJACSA.2026.0171064}
}

Open Access — licensed under a Creative Commons Attribution 4.0 International License. Unrestricted use, distribution, and reproduction in any medium, even commercially, as long as the original work is properly cited.

Call for Papers - Important Dates

Volume 17 No. 12, December 2026
Paper Submission Due November 25, 2026
Review Notification December 15, 2026
Publication Date December 31, 2026