enh: knowledge workspace redesign #2761

Open
opened 2025-11-11 15:13:52 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @tjbck on GitHub (Nov 22, 2024).

Originally assigned to: @tjbck on GitHub.

Originally created by @tjbck on GitHub (Nov 22, 2024). Originally assigned to: @tjbck on GitHub.
Author
Owner

@Simon-Stone commented on GitHub (Jul 11, 2025):

@tjbck Can you elaborate on what you mean by this?

Is it related to this:

Every time the /knowledge and /knowledge/listendpoints are called, they check the presence of all files associated with all knowledges. For any non-trivial number of Knowledges and files, this scales very poorly and already takes many seconds for our test setup of 100 Knowledges.

In KnowledgeResponse and KnowledgeUserResponse, the files attribute is already marked as Optional. It would be a huge improvement to only trigger the file indexing/checking when the files are actually needed. To only list the existing Knowledges, there should be an option like /knowledge/list?get_files=false or something similar so that the expensive file checks only occur when they are needed.

Also, the Knowledge tab in the Workspace triggers a request against /knowledge and then each Knowledge component calls /knowledge/list (which has the same implementation). Wouldn't it make sense to make knowledgeBases a prop of the Knowledge component that the Knowledge page can fill in to avoid that redundancy?

@Simon-Stone commented on GitHub (Jul 11, 2025): @tjbck Can you elaborate on what you mean by this? Is it related to this: Every time the `/knowledge` and `/knowledge/list`endpoints are called, they check the presence of all files associated with all knowledges. For any non-trivial number of Knowledges and files, this scales very poorly and already takes many seconds for our test setup of 100 Knowledges. In `KnowledgeResponse` and `KnowledgeUserResponse`, the `files` attribute is already marked as `Optional`. It would be a huge improvement to only trigger the file indexing/checking when the files are actually needed. To only list the existing Knowledges, there should be an option like `/knowledge/list?get_files=false` or something similar so that the expensive file checks only occur when they are needed. Also, the Knowledge tab in the Workspace triggers a request against `/knowledge` and then each `Knowledge` component calls `/knowledge/list` (which has the same implementation). Wouldn't it make sense to make `knowledgeBases` a prop of the `Knowledge` component that the Knowledge page can fill in to avoid that redundancy?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#2761