Skip to content
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

[Feature Request]: agent RAG #1387

Closed
Tracked by #1657
shanmu-raoyunfei opened this issue Jan 24, 2024 · 8 comments
Closed
Tracked by #1657

[Feature Request]: agent RAG #1387

shanmu-raoyunfei opened this issue Jan 24, 2024 · 8 comments
Labels
enhancement New feature or request rag retrieve-augmented generative agents

Comments

@shanmu-raoyunfei
Copy link

Is your feature request related to a problem? Please describe.

The agent needs to acquire an external knowledge base to answer the user's questions

Describe the solution you'd like

Support RAG

Additional context

No response

@shanmu-raoyunfei shanmu-raoyunfei added the enhancement New feature or request label Jan 24, 2024
@ekzhu
Copy link
Collaborator

ekzhu commented Jan 24, 2024

We have a contrib agent that has RAG capability: https://microsoft.github.io/autogen/docs/reference/agentchat/contrib/retrieve_assistant_agent

Welcome new contributions!

@shanmu-raoyunfei
Copy link
Author

It would be nice to be able to select different types of agents in the agent, such as RetrieveAssistantAgent, CompressibleAgent, MathUserProxyAgent, etc

@AlbertRapp
Copy link

@ekzhu I'm a bit confused as to what's the point of the retrieveAssistantAgent? Can you clarify the purpose of that agent? To me, It seems like only a RetrieveUserProxyAgent can actually retrieve something, i.e. a retrieveAssistantAgent cannot deal with a retrieve_config argument.

It would be great to have a retrieveAssistantAgent able to retrieve context. I'm thinking of having a group chat of multiple assistants that can retrieve different documents without having to rely on functions that can call a RetrieveUserProxyAgent (because apparently there can only be one user_proxy in a group chat).

Or am I missing something? I've been looking through the docs and examples quite a bit but I couldn't find anything that would allow me to do that.

@sonichi sonichi added the rag retrieve-augmented generative agents label Feb 5, 2024
@sonichi
Copy link
Contributor

sonichi commented Feb 5, 2024

@thinkall would you like to share your thoughts?

@thinkall
Copy link
Collaborator

thinkall commented Feb 6, 2024

Hi @shanmu-raoyunfei , @AlbertRapp , thanks for the feedbacks.

In the current design, RetrieveUserProxyAgent is responsible for retrieving data, instead of RetrieveAssistantAgent. This is because the database, docs should be accessed only by a "User" or their proxy ("UserProxy"). "AssistantAgent" only assists in communicating with LLMs. The reason for having a "RetrieveAssistantAgent" instead of simply using the default "AssistantAgent" is that the latter cannot handle certain post-processing tasks.

We support multiple user proxy agents in group chat, here you can find examples: blog, notebook.

We are also refactoring the RAG agents to improve the usability. Please stay tuned.

@sonichi
Copy link
Contributor

sonichi commented Feb 11, 2024

@thinkall could you create a roadmap issue for the RAG plans?

@hughlv
Copy link
Collaborator

hughlv commented Jul 28, 2024

@thinkall Is there a working example on how to use an existing external knowledge base? All the examples and docs are about vectorizing two exisitng docs and then querying on them. Can I config the retrieveuseragent to connect to a read-only pgvector db?

Vectorizing is usually not as simple as passing in a few documents, we need to review the result of the vectorization and do adjustment as needed, such as edit or delete certain chunks. This can be done in a seperate system, does not need to be the scope of AutoGen.

@thinkall
Copy link
Collaborator

@thinkall Is there a working example on how to use an existing external knowledge base? All the examples and docs are about vectorizing two exisitng docs and then querying on them. Can I config the retrieveuseragent to connect to a read-only pgvector db?

Vectorizing is usually not as simple as passing in a few documents, we need to review the result of the vectorization and do adjustment as needed, such as edit or delete certain chunks. This can be done in a seperate system, does not need to be the scope of AutoGen.

Hi @hughlv , sure, you can! If you pass in a pgvector client w/ the docs you needed, then it will be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rag retrieve-augmented generative agents
Projects
None yet
Development

No branches or pull requests

7 participants