Skip to content
Open access

An Explainable Collaborative Recommendation Framework Using K-Means Clustering and LLM-Based Explanations

Sep 2026 · Informatics · 0 citations · 26 references

Abstract

In social media contexts, recommendation systems are significant for enhancing the delivery of personalized content. More traditional recommendation systems aim primarily for recommendation accuracy, but do little on the topic related to the explainability and transparency of recommendation decisions. This paper presents an explainable user-based collaborative recommendation framework by leveraging K-Means clustering, similarity-based collaborative filtering, neighbor voting, and generative Large Language Model (LLM) explanations. The framework firstly utilizes K-Means clustering to cluster users with relatively similar behavioral traits. Pearson Similarity and Cosine Similarity are then utilized to select the Top-N similar users for each cluster. To generate personal recommendations for the content themes and content types, we employed similarity-based neighbor voting. Finally, Gemini 2.5 Flash is included as an explainability layer to create brief human-readable explanations of recommendation outputs. The findings presented a high behavioral similarity among adjacent users, which displayed Mean Pearson Similarity = 0.8044, Mean Cosine Similarity = 0.8113, and Mean Combined Similarity = 0.8078. It was found that a content-type recommendation performed better than a preferred-theme recommendation in social media platforms with large amounts of content. In general, this framework enhances interpretability, transparency, and the user understanding of recommendation while still providing efficient collaborative recommendation performance. It identified behaviorally similar users, and generated human-readable explanation suggestions through Gemini 2.5 Flash.

Read PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.