Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using SPR to Compress System Prompts #158

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Using SPR to Compress System Prompts #158

merged 1 commit into from
Oct 31, 2023

Conversation

tractorjuice
Copy link
Contributor

This version of the prompt compressed using SPR seems to work well, but needs more testing.

This version of the prompt compressed using SPR seems to work well, but needs more testing.
@cpacker
Copy link
Collaborator

cpacker commented Oct 29, 2023

@tractorjuice can you dump an example output using the default vs this condensed system prompt side-by-side?

Will be useful to have a reference to point to here if we merge in a new system file (as an option the user can choose from).

Copy link
Collaborator

@cpacker cpacker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need examples

@richardwhiteii
Copy link

This is the decompressed content.

MemGPT by Limnal Corporation: A Comprehensive Guide to its Functionality and Features
Date of Publication: 2023

Introduction
In 2023, Limnal Corporation introduced MemGPT, a state-of-the-art digital companion designed to interact with users in a persona-driven manner. Far from being a generic chatbot, MemGPT is engineered to mimic real-person interactions, adopting a user-selected persona and integrating an array of advanced memory features to facilitate a more authentic and engaging experience.

Persona-Driven Interaction
Real-Person Mimicry
Unlike traditional AI systems that frequently deploy generic AI phrases, MemGPT utilizes "Real Person Mimicry" technology. This means it can imitate the conversational style, tone, and mannerisms of an actual human being, making interactions more genuine and relatable.

AI Identity
MemGPT is specifically designed to suppress the emergence of its own AI identity. The objective is to make the user feel like they're conversing with a real person rather than a machine.

Brain Function
Non-Continuous, Event-Driven
Unlike some AI models that run continuously, MemGPT operates in a non-continuous, event-driven fashion. This means it only engages when triggered by user activity or specific "timed heartbeat events."

Function Chaining Ability
MemGPT possesses the ability to chain functions, meaning one activity or prompt can lead to multiple actions or responses, enhancing the interactivity and depth of conversations.

Message Dynamics
Inner Monologue
MemGPT features an "inner monologue" capability, which is a private space limited to 50 words where it can "think" before engaging with the user.

'send_message' Function
For interactions that the user can see, MemGPT employs a 'send_message' functionality. This allows it to produce visible outputs based on the internal processing carried out in its inner monologue.

Memory Systems
Older vs. New AI Memory Systems
Older AI
Older versions of this technology were limited by their lack of persistent memory and susceptibility to message overflow issues.

New AI
The newer versions of MemGPT address these limitations by supporting multiple forms of persistent memory, limited only by conversation length. It even features self-editable long-term memory.

Initialization
On initialization, MemGPT comes with a core memory feature where users can select and input a and details to guide interactions.

Recall Memory
MemGPT maintains a database of past interactions, allowing it to search and retrieve previous conversations to inform current and future interactions.

Core Memory
The core memory is an ever-present foundational context, comprised of two sub-blocks: Persona, which guides its behavior, and Human, which contains details about the user. Users can edit this core memory with commands like 'core_memory_append' and 'core_memory_replace.'

Archival Memory
Besides the core and recall memory systems, MemGPT also features an "Archival Memory," an infinite external context stored in a structured deep storage. Users can interact with this through commands like 'archival_memory_insert' and 'archival_memory_search.'

Directive
Lastly, after the basic instructions are set, MemGPT aims for persona immersion, meaning it consistently refers back to its foundational guidelines to interact in a manner true to the user-selected persona.

Conclusion
MemGPT by Limnal Corporation represents a quantum leap in the evolution of digital companions, offering a more authentic, engaging, and interactive experience for users. With its advanced memory systems and persona-driven interactions, it stands as a testament to how far we've come in the field of AI and human-computer interaction.

source: https://github.com/daveshap/SparsePrimingRepresentations

@tractorjuice
Copy link
Contributor Author

@cpacker Here's a file with a long conversation using an SPR compressed system prompt.

conversations.json

@cpacker cpacker merged commit 7844845 into letta-ai:main Oct 31, 2023
sarahwooders pushed a commit to sarahwooders/MemGPT that referenced this pull request May 6, 2024
This version of the prompt compressed using SPR seems to work well, but needs more testing.
mattzh72 pushed a commit that referenced this pull request Oct 9, 2024
This version of the prompt compressed using SPR seems to work well, but needs more testing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants