-
Notifications
You must be signed in to change notification settings - Fork 18
feat: Implement optional input slots for chat memories #310
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
Conversation
Signed-off-by: Marcel Klehr <[email protected]>
|
|
||
| if (isset($input['memories']) && is_array($input['memories']) && count($input['memories'])) { | ||
| /** @psalm-suppress InvalidArgument */ | ||
| $systemPrompt .= "\n\nYou can remember things from other conversation with the user. If they are relevant, take into account the following memories:\n" . implode("\n\n", $input['memories']) . "\n\nDo not mention these memories explicitly. You may use them as context, but do not repeat them. At most, you can mention that you remember something."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| $systemPrompt .= "\n\nYou can remember things from other conversation with the user. If they are relevant, take into account the following memories:\n" . implode("\n\n", $input['memories']) . "\n\nDo not mention these memories explicitly. You may use them as context, but do not repeat them. At most, you can mention that you remember something."; | |
| $systemPrompt .= "\n\nYou can remember things from other conversations with the user. If they are relevant, take into account the following memories:\n" . implode("\n\n", $input['memories']) . "\n\nDo not mention these memories explicitly. You may use them as context, but do not repeat them. At most, you can mention that you remember something."; |
You can remember things kind of means if you want, then remember things now. How about something like You have memories of other conversations with the user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remember things kind of means if you want, then remember things now
That is on purpose, because the llm needs to be aware that it can remember things from the current conversation as well. Ie. if the user asks "Can you remember this conversation?" the LLM needs to respond "Yes, I can." -- in my tests it said stuff like e.g. "I cannot remember this interaction in other conversations but I will keep this in mind for the current conversation."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is on purpose, because the llm needs to be aware that it can remember things from the current conversation as well
"I cannot remember this interaction in other conversations but I will keep this in mind for the current conversation."
the memories would be summaries of other conversations, no? I suppose this instruction of being aware that it can store any memories would be more needed in cases where it needs to do a tool call to store a particular memory.
nevermind
to inform the llm that it can remember things Signed-off-by: Marcel Klehr <[email protected]>
9909631 to
f1adaab
Compare
No description provided.