A General Retrieval-Augmented Generation Framework for Multimodal Case-Based Reasoning Applications