-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Feat: Support passing knowledge base id as variable in retrieval component #7088
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
Conversation
@KevinHuSh |
@notsyncing @KevinHuSh Hi, I really appreciate your team's hard work. But this feature hasn't been merged after two weeks of validation. Could you share the timeline? Thanks a lot. |
@notsyncing
![]()
![]()
![]()
![]()
![]() |
@notsyncing Could we consider using KB names directly instead? |
In our use case, we are passing KB ids from another program, so we don't need KB names. But I think it's better to add a |
Also, the |
You're right. The KB name uniqueness isn't enforced by index=True here—it's maintained by code like dataset.py#L139 |
Okay. Even you have enforced this, I still advice using
|
### What problem does this PR solve? This is a follow-up of #7088 , adding a knowledge base type input to the `Begin` component, and a knowledge base selector to the agent flow debug input panel:  then you can select one or more knowledge bases when testing the agent:  Note: the lines changed in `agent/component/retrieval.py` after line 94 are modified by `ruff format` from the `pre-commit` hooks, no functional change. ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):
What problem does this PR solve?
Fix #6600
Hello, I have the same business requirement as #6600. My use case is:
We have many departments (> 20 now and increasing), and each department has its own knowledge base. Because the agent workflow is the same, so I want to change the knowledge base on the fly, instead of creating agents for every department.
It now looks like this:
Knowledge bases can be selected from the dropdown, and passed through the variables in the table. All selected knowledge bases are used for retrieval.
Type of change