Hierarchical Semantic Memory System
A hierarchical memory system for conversational AI that classifies conversations by meaning, stores them in a tree structure, and retrieves relevant memories using BFS.

Hierarchical Semantic Memory System (HSMS)
- One-line description: A hierarchical memory system for conversational AI that classifies conversations by meaning, stores them in a tree structure, and retrieves relevant memories using BFS.
- Duration: 2025.06~2025.08
- Role: Personal Project (Planning, Development)
- Tech Stack: Python, Google Gemini API
Reason for Creation / Problem
I wanted to address the problem of AI losing previous context as conversations become longer. I created this to experiment with a structure that classifies conversations into semantic units, stores them like a tree, and efficiently retrieves only relevant memories when needed.
Key Features
- Hierarchical Memory: Classifies conversations by meaning and stores them as a tree.
- BFS-based Search: Explores from the root level by level, adjusting branching and exploration with a similarity threshold.
- Dynamic Clustering: Groups similar conversations to create new parent nodes.
- Parallel AI Processing: Rotates multiple API keys to increase response speed.
My Own Considerations
I designed a search algorithm that determines which node to attach memories to and how deep to explore, based on similarity thresholds (add 0.7, search 0.5). However, calling AI multiple times for each conversation led to significant cost and speed issues. After confirming these limitations, I moved the idea to Conversation-Tree and further developed it.
The project was suspended due to cost and optimization issues.