This research demonstrates how a hybrid memory-retrieval architecture improves accuracy in medical chatbots, highlighting faster response times and better output reliability.
Large language model-based medical chatbots face two major challenges: hallucination, where models generate plausible but incorrect information, and context loss in multi-turn conversations. These issues reduce trust and safety in healthcare applications. This work presents a hybrid memory-retrieval architecture that enhances factual accuracy and conversational continuity. The system combines a dual-retriever pipeline using BM25 and MedCPT with long-term memory retrieval via ChromaDB. Retrieved documents and past interactions are fused using Reciprocal Rank Fusion and passed to a compact language model (Phi-2) for response generation. When relevant context is missing, the model defaults to fallback instructions to avoid hallucinated outputs. Evaluation on the MedQuAD dataset shows strong semantic alignment (BERTScore F1 = 0.8644), improved fluency, and significantly faster response times compared to baseline retrieval-augmented models. This approach demonstrates the effectiveness of integrating structured memory with selective retrieval to build more trustworthy and reliable medical chatbots.
No takes yet. Share an insight, caveat, or question.
Sagarika Singh (2025) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: