Skip to content

TeachableAgent#278

Merged
sonichi merged 66 commits into
mainfrom
ricky
Oct 21, 2023
Merged

TeachableAgent#278
sonichi merged 66 commits into
mainfrom
ricky

Conversation

@rickyloynd-microsoft

@rickyloynd-microsoft rickyloynd-microsoft commented Oct 18, 2023

Copy link
Copy Markdown
Contributor

Why are these changes needed?

TeachableAgent allows users to teach their assistant facts, preferences, and tasks unrelated to code generation.

Conversational assistants based on LLMs can remember the current chat with the user, and can even demonstrate in-context learning of things that the user teaches the assistant during the chat. But these memories and learnings are lost once the chat is over, or when a single chat grows too long. In subsequent chats, the user is forced to repeat any necessary instructions over and over.

TeachableAgent addresses these limitations by persisting user teachings across chat boundaries in long-term memory (a vector database). Memory is saved to disk at the end of each chat, then loaded from disk at the start of the next. Instead of copying all of memory into the context window, which would eat up valuable space, individual memories (called memos) are retrieved into context as needed. This allows the user to teach frequently used facts, preferences and skills to the agent just once, and have the agent remember them in later chats.

Related issue number

None

Checks

@gagb

gagb commented Oct 21, 2023

Copy link
Copy Markdown
Collaborator

@rickyloynd-microsoft, minor comments that could be addressed in a different PR.

  • learn_from_user_feedback can be a long running job-- makes many API calls. Some notion of logging/progress bar would be helpful
  • learn_from_user_feedback could return/yield diff in learning from that call

What do you think?

@rickyloynd-microsoft

Copy link
Copy Markdown
Contributor Author

@rickyloynd-microsoft, minor comments that could be addressed in a different PR.

  • learn_from_user_feedback can be a long running job-- makes many API calls. Some notion of logging/progress bar would be helpful
  • learn_from_user_feedback could return/yield diff in learning from that call

What do you think?

I like it. Probably in a new PR.

@qingyun-wu qingyun-wu added this pull request to the merge queue Oct 21, 2023
@sonichi sonichi removed this pull request from the merge queue due to a manual request Oct 21, 2023
@qingyun-wu

Copy link
Copy Markdown
Contributor

@rickyloynd-microsoft, minor comments that could be addressed in a different PR.

  • learn_from_user_feedback can be a long running job-- makes many API calls. Some notion of logging/progress bar would be helpful
  • learn_from_user_feedback could return/yield diff in learning from that call

What do you think?

I like it. Probably in a new PR.

Created a PR #329 @rickyloynd-microsoft @gagb

@sonichi

sonichi commented Oct 21, 2023

Copy link
Copy Markdown
Contributor

@qingyun-wu We need to run OpenAI test before merging this PR. Please confirm that you understand when this is required or let me know if you have questions.

@sonichi

sonichi commented Oct 21, 2023

Copy link
Copy Markdown
Contributor

@rickyloynd-microsoft, minor comments that could be addressed in a different PR.

  • learn_from_user_feedback can be a long running job-- makes many API calls. Some notion of logging/progress bar would be helpful
  • learn_from_user_feedback could return/yield diff in learning from that call

What do you think?

I like it. Probably in a new PR.

Created a PR #329 @rickyloynd-microsoft @gagb

You mean issue.

@qingyun-wu

Copy link
Copy Markdown
Contributor

@rickyloynd-microsoft, minor comments that could be addressed in a different PR.

  • learn_from_user_feedback can be a long running job-- makes many API calls. Some notion of logging/progress bar would be helpful
  • learn_from_user_feedback could return/yield diff in learning from that call

What do you think?

I like it. Probably in a new PR.

Created a PR #329 @rickyloynd-microsoft @gagb

You mean issue.

Yes created an issue #329 @rickyloynd-microsoft @gagb

@rickyloynd-microsoft

rickyloynd-microsoft commented Oct 21, 2023

Copy link
Copy Markdown
Contributor Author

@qingyun-wu We need to run OpenAI test before merging this PR. Please confirm that you understand when this is required or let me know if you have questions.

I've got the latest changes ready that @sonichi and @qingyun-wu requested. Can I push those now? Those changes are to test on just one version of python, and to change agent to teachable_agent in places.

@qingyun-wu

Copy link
Copy Markdown
Contributor

@qingyun-wu We need to run OpenAI test before merging this PR. Please confirm that you understand when this is required or let me know if you have questions.

You are right. We should run OpenAI test when there are new tests added. Is this understanding correct?

@sonichi

sonichi commented Oct 21, 2023

Copy link
Copy Markdown
Contributor

@qingyun-wu We need to run OpenAI test before merging this PR. Please confirm that you understand when this is required or let me know if you have questions.

You are right. We should run OpenAI test when there are new tests added. Is this understanding correct?

Incorrect. Not all tests require openai, and sometimes openai test needs to be run even when no new test is added.
Also, don't run it unless it's the blocker of merging.

Comment thread autogen/agentchat/contrib/teachable_agent.py Outdated
@rickyloynd-microsoft rickyloynd-microsoft temporarily deployed to openai October 21, 2023 01:42 — with GitHub Actions Inactive
@rickyloynd-microsoft rickyloynd-microsoft temporarily deployed to openai October 21, 2023 01:42 — with GitHub Actions Inactive
@rickyloynd-microsoft rickyloynd-microsoft temporarily deployed to openai October 21, 2023 01:42 — with GitHub Actions Inactive
@sonichi sonichi added this pull request to the merge queue Oct 21, 2023
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.

9 participants