Fig. 8: Workflow of the RAG-assisted LLM. | npj Digital Medicine

Fig. 8: Workflow of the RAG-assisted LLM.

From: Evaluating large language model workflows in clinical decision support for triage and referral and diagnosis

Fig. 8

The workflow starts with query decomposition, breaking down patient queries into smaller chunks. These chunks are embedded and undergo a semantic similarity comparison with the embeddings of 30 million PubMed abstracts to extract the most relevant information. The retrieved information is then combined with the query, and the LLM generates responses supported by the source references. An iterative critique-refinement loop further enhances the outputs by identifying gaps, refining responses, and ensuring alignment with the query.

Back to article page