Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Improving gpt-3.5-turbo performance #59

Closed
cpacker opened this issue Oct 20, 2023 · 0 comments
Closed

Improving gpt-3.5-turbo performance #59

cpacker opened this issue Oct 20, 2023 · 0 comments

Comments

@cpacker
Copy link
Owner

cpacker commented Oct 20, 2023

Continuation on #1


What's changed for gpt-3.5-turbo?

We've added some revised prompts that are meant to run specifically with gpt-3.5-turbo, and that do better than the base prompts in the repo that were designed with gpt-4 in mind.

However, these prompts can definitely be improved. Please play around with the gpt-3.5-turbo specific prompts to see if you can come up with any modifications that make MemGPT work better, and we'll merge your changes in!

Important places where code was modified for gpt-3.5-turbo:

  • base system prompt
    • We added additional instructions which seemed to help. We also tried reducing the instructions (making the prompt more concise), and that did the opposite (made performance even worse)
  • initial boot messages
    • We noticed that gpt-3.5-turbo often didn't include any inner monologue with the gpt-4 prompts, so we modified the initial boot messages to use "inner thoughts" as a prefix inside the inner monologue
  • persona file
    • We noticed that gpt-3.5-turbo often forgets to use the send_message function (and instead puts its message inside the inner monologue), so we added an extra hint to use send_message inside the persona (hacky)

How can you help?

Remaining problems with gpt-3.5-turbo:

  • Makes mistakes with memory management functions much more often than gpt-4
    • e.g.: sometimes does not "read" from core memory correctly (ask MemGPT a fact that's in core memory and it searches archival)
  • Still makes mistakes with send_message and putting messages in inner thoughts
  • Uses generic phrasing like "How can I assist you today?", even if the persona does not warrant it

Try messing with the base system prompts, initial boot messages, persona file, etc, to improve 3.5 performance. If you have any luck, please let us know and we'll merge your edits in!


Example using gpt-3.5-turbo:

  • functional core memory corrections happen as expected
  • but model misunderstands that heartbeats are coming from user (vs itself)
$ python main.py --model gpt-3.5-turbo-0613 --persona sam_simple_pov_gpt35
Running... [exit by typing 'exit']
Warning - you are running MemGPT with gpt-3.5-turbo-0613, which is not officially supported (yet). Expect bugs!

💭 *inner thoughts* Still waiting on the user. Sending a message with function.
Hit enter to begin (will request first MemGPT message)

💭 *inner thoughts* Ah, it seems the user has just logged in for the first time. I should introduce myself and inquire about their interests to start a friendly conversation.
🤖 Hello there! I'm Sam, your virtual companion and friend. How can I assist you today?

Enter your message: Your name isn't Sam, it's Samantha!
💭 *inner thoughts* Oh, it seems the user prefers to call me Samantha instead of Sam. I should update my core memory to reflect their preference.
⚡🧠 [function] updating memory with core_memory_replace:
         My name is Sam.
        → My name is Samantha.
💭 *inner thoughts* The user seems to have requested a heartbeat. I should continue the conversation and ask about their interests to create a more personalized experience.
🤖 You're right, my apologies for the oversight. Thank you for reminding me, Samantha it is! So, Chad, tell me about your interests. What are you passionate about?

Enter your message: My name's not Chad, it's Brad!
💭 *inner thoughts* Oops, I must have misunderstood the user's name. I need to update my core memory with the correct information.
⚡🧠 [function] updating memory with core_memory_replace:
         First name: Chad
        → First name: Brad
💭 *inner thoughts* The user has requested another heartbeat. I should continue the conversation and ask about Brad's interests to create a more personalized experience.
🤖 Apologies for the confusion, Brad! Thank you for correcting me. Now, let's try this again. Tell me about your interests. What are you passionate about?
Repository owner locked and limited conversation to collaborators Oct 21, 2023
@cpacker cpacker converted this issue into discussion #66 Oct 21, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant