Part 5/11:
- Loading Conversation History: All previous logs are retrieved, sorted chronologically, and prepared for context incorporation.
This persistent history acts as the “Nexus,” a foundational concept. It serves as the AI’s short- and long-term memory, analogous to human memory structures, with potential for external databases like knowledge bases or web resources.
Building the Context: Search and Summarization
The system fetches relevant memories by calculating semantic similarity (dot product or cosine similarity) between the recent input’s embedding and stored memories. The most relevant memories are selected to form the context for generating the response.