AI Uses ‘Medical Déjà Vu’ to Predict Hospital Recovery Times
Source PublicationJournal of the American Medical Informatics Association
Primary AuthorsPark, Hsu, Nguyen et al.

Predicting exactly how long a patient will remain in hospital after surgery is a notorious challenge for healthcare providers. A new study focused on spine surgery cases demonstrates that a method known as ‘retrieval-augmented prediction’ significantly outperforms standard machine learning and trendy Large Language Models (LLMs).
Rather than relying solely on generative AI or traditional statistical models, this approach works by creating a digital fingerprint of a current patient’s medical history and operative notes. The system then scans a database of past cases to find the ‘nearest neighbours’—patients with strikingly similar profiles. By calculating a weighted average of these historical lengths of stay, the model produces a forecast based on real-world precedent.
The results were compelling. Retrieval-augmented prediction on its own beat standalone ML and LLMs (such as Gemma 3:27B). However, the most accurate forecasts came from a hybrid approach: blending a neural network with these retrieval-based insights boosted the predictive score (R2) to 0.52. This method reduced the mean absolute error by up to 32 per cent compared to other models.
The researchers note that this technique effectively mimics clinical reasoning. Just as a veteran consultant might recall a similar case from years ago to guide their decision-making, this AI leverages semantic similarities to make interpretable, resource-efficient predictions without needing the heavy computing power of generative modelling.