4. Memory
Last updated
Last updated
Memory is the ability of AI agents to remember past interactions and use this information to inform future responses such as user preferences, past conversations, dislikes, and feedback. It basically allows the agents to learn from experience and adapt to the user's needs over time.
Key Features of Skillful AI’s Memory Solution
Upload Knowledge Sources: Users can upload documents (up to 10MB total for now) to feed the model with specific knowledge.
Memory Privacy Options: After creating an agent, users can choose to make the memory public or private. Public memories allow shared access, while private ones remain exclusive to the creator.
In Skillful AI, memory could be implemented in several ways:
1. Session Memory:
Retains information within a single session.
Example: Continuing a conversation about butterfly migration while addressing unrelated queries without losing context.
2. Long-Term Memory:
Stores preferences and past interactions across sessions, enabling personalized responses.
Example: Remembering favorite news topics to recommend personlized articles.
3. Contextual Memory:
Factors in time, location, or sequence of events for nuanced responses.
Example: Proactively suggesting dinner recipes based on previous evening interactions.
Data Sources: Currently, only file storage is supported as a data source. Future updates will expand options to include Web links and Database connections via APIs or credentials.
Fine-Tuning: Expand memory capabilities to adjust the model's foundational knowledge. This involves updating base weights, allowing the AI to internalize data as facts, instead of contextual input that might be overwritten.
Currently, we are exploring two techniques for this, with the possibility of more emerging in the future:
Integrated Memory: This involves the use of soft prompts, which subtly guide a language model's response by including additional context in the input text. In other words, they enable the model to retain and apply specific patterns or biases in its responses.
Example: A soft prompt could be used to guide the model to write in a specific tone, such as formal or casual, or to focus on a particular subject area, like legal language or medical terminology. Such prompt could bias the model to use legal jargon when summarizing court rulings.
Memory in Encoder-Decoder Models: In this method, the encoder takes the input and turns it into a simplified, compact version, which acts like the model’s memory of the input. The decoder then uses this memory to create the output, making sure the model remembers and considers the whole input while generating each part of the output.
Example: In a machine translation task, the encoder might compress a lengthy sentence from French into a meaningful representation or "memory". This memory captures all the essential details of French sentence without needing the exact words. Then, decoder would use this memory to generate an accurate English translation, ensuring that nuances and context are preserved.
Indexed Memory: Chat histories and uploaded files will eventually be indexed, enabling long-term recall and contextual understanding.
Memory Management Module: Users can package conversation as files so that they can edit stored memory, removing test or junk conversations to optimize space and refine the AI's knowledge base.
To empower developers, Skillful AI provides:
Memory Management APIs: Programmatic tools to add, retrieve, or delete memory data. These APIs could be used to implement various types of memory, such as session memory, long-term memory, and contextual memory.
Memory Design Toolkit: A graphical interface to configure memory settings, privacy controls, and data capacities.