Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
Review
. 2025 Apr 21:17:1759720X251331529.
doi: 10.1177/1759720X251331529. eCollection 2025.

RAGing ahead in rheumatology: new language model architectures to tame artificial intelligence

Affiliations
Review

RAGing ahead in rheumatology: new language model architectures to tame artificial intelligence

Diego Benavent et al. Ther Adv Musculoskelet Dis. .

Abstract

Artificial intelligence (AI) is increasingly transforming rheumatology with research on disease detection, monitoring, and outcome prediction through the analysis of large datasets. The advent of generative models and large language models (LLMs) has expanded AI's capabilities, particularly in natural language processing (NLP) tasks such as question-answering and medical literature synthesis. While NLP has shown promise in identifying rheumatic diseases from electronic health records with high accuracy, LLMs face significant challenges, including hallucinations and a lack of domain-specific knowledge, which limit their reliability in specialized medical fields like rheumatology. Retrieval-augmented generation (RAG) emerges as a solution to these limitations by integrating LLMs with real-time access to external, domain-specific databases. RAG enhances the accuracy and relevance of AI-generated responses by retrieving pertinent information during the generation process, reducing hallucinations, and improving the trustworthiness of AI applications. This architecture allows for precise, context-aware outputs and can handle unstructured data effectively. Despite its success in other industries, the application of RAG in medicine, and specifically in rheumatology, remains underexplored. Potential applications in rheumatology include retrieving up-to-date clinical guidelines, summarizing complex patient histories from unstructured data, aiding in patient identification for clinical trials, enhancing pharmacovigilance efforts, and supporting personalized patient education. RAG also offers advantages in data privacy by enabling local data handling and reducing reliance on large, general-purpose models. Future directions involve integrating RAG with fine-tuned, smaller LLMs and exploring multimodal models that can process diverse data types. Challenges such as infrastructure costs, data privacy concerns, and the need for specialized evaluation metrics must be addressed. Nevertheless, RAG presents a promising opportunity to improve AI applications in rheumatology, offering a more precise, accountable, and sustainable approach to integrating advanced language models into clinical practice and research.

Keywords: clinical decision support; large language models; retrieval-augmented generation; rheumatology.

PubMed Disclaimer

Conflict of interest statement

Dr D.B. received grants/speaker/research support from Abbvie, Lilly, Novartis, Pfizer, and UCB. He works as a part-time advisor at Savana, a company focused on natural language processing in medicine. Dr V.V. and Dr X.M. declare no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Figures

Figure 1.
Figure 1.
Vector representations of Rheumatology Keywords and similarity search. For simplicity and ease of understanding, the vector representations of rheumatological disease entities have been reduced to two dimensions. As shown in the image, the angle between “Axial spondyloarthritis” and “Systemic Lupus Erythematosus” is larger than the angle between “Axial spondyloarthritis” and “Ankylosing spondylitis,” illustrating the cosine similarity technique employed during the retrieval stage.
Figure 2.
Figure 2.
Outline of a RAG ecosystem to extract knowledge from clinical notes. This figure illustrates a system for extracting bDMARDs from clinical notes. In the indexing phase, clinical notes are broken into smaller chunks, transformed into embeddings, and stored in a vector database. During retrieval, the system uses similarity-based methods to find the most relevant notes in response to user input (e.g., “What bDMARDs has this patient received?”). The retrieved notes are combined with the user query and passed to an LLM to generate a structured JSON listing the treatments, which can be utilized in further applications. bDMARDs, biologic disease-modifying anti-rheumatic drugs; JSON, JavaScript Object Notation; LLM, large language models; RAG, retrieval-augmented generation.

Similar articles

References

    1. Yu K-H, Beam AL, Kohane IS. Artificial intelligence in healthcare. Nat Biomed Eng 2018; 2(10): 719–731. - PubMed
    1. Kothari S, Gionfrida L, Bharath AA, et al.. Artificial intelligence (AI) and rheumatology: a potential partnership. Rheumatology (Oxford) 2019; 58(11): 1894–1895. - PubMed
    1. Venerito V, Bilgin E, Iannone F, et al.. AI am a rheumatologist: a practical primer to large language models for rheumatologists. Rheumatology (Oxford) 2023; 62(10): 3256–3260. - PMC - PubMed
    1. Chary M, Parikh S, Manini AF, et al.. A review of natural language processing in medical education. West J Emerg Med 2019; 20(1): 78–86. - PMC - PubMed
    1. Demner-Fushman D, Chapman WW, McDonald CJ. What can natural language processing do for clinical decision support? J Biomed Inform 2009; 42(5): 760–772. - PMC - PubMed