-
Notifications
You must be signed in to change notification settings - Fork 63
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
I have some questions #8
Comments
Most of your questions come down to a fundamental misunderstanding how all of this works. The workflow of generating a response is as following:
The important thing to understand here is that Claude has no memory outside of each thread. Every time we create a thread and ping Claude it's the first time we have ever done so from Claude's perspective. Claude has no memory if this is the first thread or the thousandth thread and knows nothing about what happened in these threads. The only way Claude would retain anything about your previous prompt is if you went back into one of the Slack threads yourself on the Slack client and manually asked Claude additional questions about the stuff that happened in that thread. So every time we want a new response from Claude we create a thread and then essentially tell him "OK, so this is what we're going to be doing, this is the character you will be roleplaying as, these are some examples for how the character would interact with the user and last is an ongoing conversation between the user and this character, with the last message being from the user. The user is Human in this history and the character is Assistant. Taking all of this information into account, continue this conversation as the character". Since Claude starts at zero every time we create a thread the only thing he "remembers" about the previous conversation is what we send him as part of the prompt. To maybe humanize Claude a bit, imagine Claude is an amnesiac. Every time Claude responds to us, he forgets absolutely everything that just happened. So to continue the conversation we need to remind him every time who he is and what we have talked about so far so he can use this information to formulate his next response before forgetting everything again. Since Claude loses his memory after responding he has no choice but to believe that the chat history we send him is the truth. So let's say Claude just responded with "I like ketchup". In SillyTavern you edit the response to say "I like mayonnaise" and then write "Nice, I like mayonnaise too!". Now in his response Claude will not go "But I said I like ketchup" because he has no memory of just having said that. Instead he sees your prompt, thinks "ah, yes, of course, I just said that I like mayonnaise, thanks for reminding me" and then responds with something like "Well, I'm glad we like the same things!". And to answer at least your first question directly, SillyTavern replaces {{user}} with the name you set in SillyTavern and {{char}} with the character name before sending the prompt. Claude then gets them with the replacement and that's all there is to it. If you decide halfway into the conversation that you would rather the character be called something else, then SillyTavern will replace {{char}} with the new name for the next prompt and since Claude has no internal memory of the conversation he will assume that the character name has just always been the new one. |
Thanks so much for taking some time to reply to me. LLMs are new to me, so yes, I don't know a lot of the basics. This information you provided is extremely helpful. I am sure other people with lack of knowledge, who decided to use Tavern AI and Slaude will find this read useful as well. |
I would like to ask a couple questions since there is almost nothing I can find online on how Claude works with Tavern. An input from a knowledgeable person would be greatly appreciated.
What will happen if I edit {{char}} or {{user}} messages inside Tavern? Would claude somehow receive and edited version and continue replying keeping that in memory or is it a purely cosmetical, local, front end option? What will happen if I delete a reply? I don't think it will be deleted inside Slack chat. Will it be marked as irrelevant and removed from Claude memory, saving tokens? Or is it again, a front end only feature?
How does token limit work? My exchange with Claude is a continuous stream of messages inside the Slack chat. Does all of them contribute to token limit or does it only apply to a single chat with a given character? Like if I start a new chat token limit will be re-set again?
If I start a new chat with char №1, pause it, start a chat with char №2, then return to chat with char №1, how will it even work? It would look like that in slack:
It looks like a total mess. Would Claude "understand" that I want to continue my previous session with char №1, discard tokens of char №2 chat, load tokens of char №1 chat back in its memory to continue the exchange?
Would such a buildup of messages in slack mess with the output? I noticed that after Claude refuses to continue describing an NSFW scene, output a bunch of "I can't continue this roleplay" warnings, then I start a new chat with a different character, start typing something SFW and Claude just enters an "I can't continue this roleplay" stupor, outputting this warning even in a SFW context.
The text was updated successfully, but these errors were encountered: