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

Added Multi-agent RAG system recipe 🧑‍🍳️ #238

Merged
merged 9 commits into from
Nov 27, 2024

Conversation

sergiopaniego
Copy link
Contributor

What does this PR do?

Fixes #237

Who can review?

@merveenoyan and @stevhliu

cc @aymeric-roucher

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

review-notebook-app bot commented Nov 22, 2024

View / edit / reply to this conversation on ReviewNB

aymeric-roucher commented on 2024-11-22T15:53:07Z
----------------------------------------------------------------

Great recipe, thanks a lot @sergiopaniego for contributing this 🤗


Copy link

review-notebook-app bot commented Nov 22, 2024

View / edit / reply to this conversation on ReviewNB

aymeric-roucher commented on 2024-11-22T15:53:08Z
----------------------------------------------------------------

Great graph! 👏


Copy link

review-notebook-app bot commented Nov 22, 2024

View / edit / reply to this conversation on ReviewNB

aymeric-roucher commented on 2024-11-22T15:53:09Z
----------------------------------------------------------------

Could you use !pip install transformers[agents]? Or maybe you need the latest releases?


sergiopaniego commented on 2024-11-26T17:58:23Z
----------------------------------------------------------------

I'm using the latest changes to incorporate recent updates that haven't yet been included in an official release. For example: huggingface/transformers#34683 && huggingface/transformers#34687 :)

Copy link

review-notebook-app bot commented Nov 22, 2024

View / edit / reply to this conversation on ReviewNB

aymeric-roucher commented on 2024-11-22T15:53:09Z
----------------------------------------------------------------

Good LLM choice!


Copy link

review-notebook-app bot commented Nov 22, 2024

View / edit / reply to this conversation on ReviewNB

aymeric-roucher commented on 2024-11-22T15:53:10Z
----------------------------------------------------------------

You can add a mention like "ReactJsonAgent is generally good for web search, since JSON action formulation needs only simple args and is well-suited to sequential chains of single actions, as opposed to Code action formulation being better suited for numerous or parallel tool calls."


Copy link

review-notebook-app bot commented Nov 22, 2024

View / edit / reply to this conversation on ReviewNB

aymeric-roucher commented on 2024-11-22T15:53:11Z
----------------------------------------------------------------

Here rather than using gradio_tools,you could directly load the space using the new from_space option (read more in the doc):

prompt_generator_tool = Tool.from_space("microsoft/Promptist", **other_args)


sergiopaniego commented on 2024-11-26T18:01:47Z
----------------------------------------------------------------

Thanks for the suggestion!

I tried using the Space you shared but it generates some errors because it uses an old Gradio version. I duplicated the Space, updated the Gradio version and it works. The error is generated in transformers/agents/tools.py in if not parameter["parameter_has_default"]: . If you feel this is something that should be addressed, maybe we can take a deeper look at it in transformers :)

@aymeric-roucher aymeric-roucher self-requested a review November 22, 2024 15:53
@aymeric-roucher
Copy link
Collaborator

aymeric-roucher commented Nov 22, 2024

Great work @sergiopaniego, thanks a lot. Left a few suggestions!

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@aymeric-roucher aymeric-roucher removed their request for review November 22, 2024 16:40
Copy link

review-notebook-app bot commented Nov 26, 2024

View / edit / reply to this conversation on ReviewNB

stevhliu commented on 2024-11-26T16:21:46Z
----------------------------------------------------------------

"There is a Manager Agent that orchestrates the system..."


Copy link

review-notebook-app bot commented Nov 26, 2024

View / edit / reply to this conversation on ReviewNB

stevhliu commented on 2024-11-26T16:21:47Z
----------------------------------------------------------------

"...the orchestrator agent..."


Copy link

review-notebook-app bot commented Nov 26, 2024

View / edit / reply to this conversation on ReviewNB

stevhliu commented on 2024-11-26T16:21:47Z
----------------------------------------------------------------

"...to tell the central agent that it can manage it."


@stevhliu
Copy link
Member

Very nice and comprehensive recipe showcasing the different tasks!

Copy link
Contributor Author

I'm using the latest changes to incorporate recent updates that haven't yet been included in an official release. For example: huggingface/transformers#34683 && huggingface/transformers#34687 :)


View entire conversation on ReviewNB

Copy link
Contributor Author

Thanks for the suggestion!

I tried using the Space you shared but it generates some errors because it uses an old Gradio version. I duplicated the Space, updated the Gradio version and it works. The error is generated in transformers/agents/tools.py in if not parameter["parameter_has_default"]: . If you feel this is something that should be addressed, maybe we can take a deeper look at it in transformers :)


View entire conversation on ReviewNB

@sergiopaniego
Copy link
Contributor Author

Thanks for the feedback @aymeric-roucher @stevhliu!
I've updated the recipe accordingly 🤗

@stevhliu
Copy link
Member

Do you mind getting the latest changes from main to fix the doc-builder issue?

@sergiopaniego
Copy link
Contributor Author

Thanks for the reminder @stevhliu 😄 done!

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again @sergiopaniego! ❤️

@stevhliu stevhliu merged commit fff0b47 into huggingface:main Nov 27, 2024
1 check passed
@sergiopaniego sergiopaniego deleted the multiagent-rag-system branch November 27, 2024 16:42
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.

New Multi-agent RAG System recipe 🧑‍🍳️
4 participants