Repository navigation
I want to expand on this idea and build it a bit differently #30
Replies: 4 comments 5 replies
|
I took the code as well from LTM and just took the core of the code that adds the memory into the database and then queries it based on the distance. this are some of the other things I am looking/exploring for combining pruning memories as well as possible LLM that will handle just the memory: |
|
I came here to suggest something like this only, my idea was to use the model to parse down the conversion to make more concise memories. Have you ever seen West World? Sometimes they service a Host by running a sort of conversational diagnostic on them. I find that after around 50-70 messages bots just forget what we were talking about. Would there be a way to add a button that opened up a side terminal, copy large segments of the previous conversation, recontextualized the bot to parse memory in to more discrete data to query from the database? Edit: This extension (LTM) could be a way to make a bottom up LoRA eventually; a literal personality builder! Exciting! |
|
I think that and will see once will actually start implementing this ideas and getting results but few things to consider for this (experiment) I am using the 6B Pygmalion model.. I think context model is good because then can feed it the relevant information, however (I have not experimented with it) I feel like to much context and the model becomes lost.. Because its trying to answer the last prompt by using the previous information. I think surgical memory approach is a lot better because were injecting very specific information with enough context and prompt. At this point this is just hypothesis, I am still putting together to do this but essentially as we are discussing its how to construct and manages this memories in a way that makes sense. Another idea is on TOP of all the other Ideas such as clustering them.. summarizing pruning and combining. Say you have multiple memories they are similar but distinct you have secondary system that will take the top 5.. for example and then choose which one has the lowest distance between those so after we've already done everything else.. were then cherry picking the best one and also were also preforming so many tasks if we say over spend of 8 hour conversation how much we like ice cream we won't keep adding it into memory because its just repetitive so we also measure the similarity between new prompt existing memories and if the new prompt is already in the memory we won't try to add it to the memory. even if its rephrased differently but similarly. and this is just the tip of the ice berg lol I have so many ideas and implementations BUT im also thinking optimization.. You don't want to wait 5 mins for a response while the code handles memories and then anything else semantic.. so then have to think of like breaking it down into multi processes and smaller fragments then recombine them and feed it to the like in aysncio type way where were doing all this things concurrently and putting them together at the same time all this things will make the AI REAL! ALIVEEEE! |
Uh oh!
There was an error while loading. Please reload this page.
I love the concept and idea behind this, and I want to try and build upon this.
this is my idea and I am going to make a fork and work on this:
What I am thinking of trying is.. I like tavern AI so I want to put the memory functionality in the API when we get the JSONL file..
and I want to feed (relevant) information into the memory.. and then do specific memory prompt injections. So here is my thought flow.
I sent prompt through Tavern AI.. the oobabooga gets the whole JSONL dump. before we send it to generate_reply we take the last prompt.. see if its relevant add to memory then feed everything else back to generate_reply.. get response, grab response add to memory send it back.
So then lets say for example I tell the AI: I got dentist appointment tomorrow at 9 am!.. We add to the memory! then hours later I ask the AI what time is my appointment tomorrow?
by saying appointment or dentist.. we find the relevant memory! We Inject the Memory! with the Prompt and the context so it would be like..
Prompt: What time was my dentist appointment tomorrow?
this triggers a memory:
[this is a memory: I got dentist appointment tomorrow at 9 am!.]
then the full context of the conversation.
So we inject the memory with the prompt by telling the AI this is a Memory! so it can generate a specific response based on that.
then after response is generated we remove the memory injection from the context! Like that were not bogging it down were injecting/removing memories.
So the idea is just to trigger specific responses based on memories without feeding it anything unnecessary.
This could generate if it picks up wrong memory some weird, but i think overall can use that as building block and see how it goes.
I'm going to start coding that and will see how it goes!
All reactions