mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #21164] issue: Models do not use associated knowledge collections as they did in versions prior to v0.7.0 #58073
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Baronco on GitHub (Feb 4, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21164
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.7.2
Ollama Version (if applicable)
No response
Operating System
Windows
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
We have several assistants responsible for helping and sending emails with documents to manage matters related to human resources, such as vacation requests, allowances, etc. Each model has its corresponding knowledge document; most of them are in Markdown.
The basic setup is function calling Native, temperature 0.5, and the respective OpenAPI tools to send attachments by email.
Up to the last version v0.6.4, when users asked questions the assistant was able to automatically use the attached knowledge to respond. In version v0.6.4, the model was able to automatically attach knowledge to answer questions about human resources processes:
This is how I associate the knowledge collection or knowledge files with my models.
Actual Behavior
The current behavior in the latest version of OWUI is that the model does not use the knowledge collection; it attempts to call the new OWUI tools but those are also unable to find the knowledge.
I don’t understand whether this is a bug or if we are definitely using the new OWUI tools incorrectly. This behavior causes it either to hallucinate in its responses or to say that it does not have the knowledge to answer.
Steps to Reproduce
Install the Docker image:
docker run -d -p 3000:8080 --gpus=all -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollamaCreate a new model and add its corresponding system prompt.
Configure in advanced parameters: function calling native and temperature 0.5.
Select the tools + the new built-in tools from version 0.7.2.
Create the knowledge collection and select it in the model settings or upload the file.
Create a new chat and start asking the model how process X works as described in that knowledge.
Logs & Screenshots
Precisely, no error appears in the chat, so there are no obvious errors in the logs.
Additional Information
No response
@owui-terminator[bot] commented on GitHub (Feb 4, 2026):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#20824 issue: Response from model does not appear until page refresh
by NTShop • Jan 20, 2026 •
bug#20676 issue: Cloud models fail to use native tools
by 0x7CFE • Jan 15, 2026 •
bug#20361 Issue: Large-scale model setting-related functionality fails.
by shentong0722 • Jan 04, 2026 •
bug#19610 issue: Models not appearing for non-admin users
by westbrook-ai • Nov 30, 2025 •
bug#19615 issue: [TEST] Models Not Available to Users
by westbrook-ai • Nov 30, 2025 •
bugShow 5 more related issues
#19711 issue: Editing function for models broken
by skleffmann • Dec 03, 2025 •
bug#19899 issue: openrouter Models not showing up in the model selection list.
by AZComputerSolutions • Dec 12, 2025 •
bug#19188 issue: Model drop-down fails to show models from remote hosts (ollama, llama.cpp)
by d-shehu • Nov 14, 2025 •
bug#19549 issue: usage model setting becomes unticked when model is changed
by YetheSamartaka • Nov 27, 2025 •
bug,confirmed issue#19103 issue: no response from the model when ask in "channels"
by silenceroom • Nov 11, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@Classic298 commented on GitHub (Feb 4, 2026):
with function calling native you need the model to first find the knowledge base you attached and then to query it. e.g. add it to the system prompt of the model
or dont use native function calling here
docs will be updated to reflect this
@Baronco commented on GitHub (Feb 4, 2026):
do you mean including an explicit instruction with the name of the knowledge base or the collection ID?"
@Classic298 commented on GitHub (Feb 4, 2026):
i mean telling the model to list knowledge bases first it has access to using the list_knowledge_bases and then it knows which knowledge base to query (the only one it has access to - the one you added) and can query it.
@Baronco commented on GitHub (Feb 4, 2026):
I am adding the following to the end of my system prompt:
I understand that the collection ID can be obtained manually from the workspace URL:
http://localhost:3000/workspace/knowledge/0f818570-0d05-4fcb-bc63-a12cc6c8a378
My model keeps trying to perform searches using the
query_knowledge_filestool without getting any results:@Classic298 commented on GitHub (Feb 4, 2026):
reference here https://docs.openwebui.com/features/plugin/tools/#built-in-system-tools-nativeagentic-mode
@Baronco commented on GitHub (Feb 4, 2026):
I just disabled that "full context" option, but I'm still not getting any results:
Honestly, I don't understand what I'm doing wrong. Please translate that :(
@Classic298 commented on GitHub (Feb 4, 2026):
No you disabled file context. Enable it again
You should disable full context.
Open model
Go to where you added the knowledge
Click on the knowledge
Ensure the toggle is turned off
@Classic298 commented on GitHub (Feb 4, 2026):
Also let the model handle the tool calls. Don't tell it the id exactly. It should handle it.
@Baronco commented on GitHub (Feb 5, 2026):
would you be able to share your exact configuration with a model so that it can answer questions based on the assigned knowledge base? 🙇♂️
I'm no longer sure if this is a bug, because this did not occur before version 0.7.0.
@Classic298 commented on GitHub (Feb 5, 2026):
Interesting. OH WAIT
Did you attach only a single file?
That might be it
Try putting that .md file into a knowledge base first
and then attach the knowledge base
do that
@Baronco commented on GitHub (Feb 5, 2026):
As you said, I was attaching a single document. I tried what you suggested and now it works; I am attaching the steps:
I create a new knowledge collection and add the respective markdown document:

In the model settings, I add the knowledge collection:

The enabled capabilities I have are:

I keep my original configurations of the Documents module with Bypass Embedding and Retrieval enabled:

I test again by asking about a topic contained in that knowledge, and this time the assistant does use the query_knowledge_files tool and gets a response. Just to clarify, in the system prompt, I removed any instruction that told it which knowledge bases are available and their IDs. It worked!

But if I try to upload the .md file with the knowledge in the settings instead of selecting the created collection, again the query_knowledge_files tool malfunctions as it does not get results. For me, this is clearly a bug 🚨. Do you know if this behavior is associated with any currently reported bug?_

Finally, the documentation of the sbuilint tools does not mention how query_knowledge_files works: which embedding model does it use? What is the chunk size? Is the chunk size measured in tokens or characters? Can this behavior be modified in the Documents module by disabling Bypass Embedding and Retrieval?
@Classic298 commented on GitHub (Feb 5, 2026):
@Baronco dont worry docs will be updated here to make the descriptions better - in fact - docs already updated on dev branch, changes will go live soon on the docs page once next version releases.
RE this - great observation. @jimbo-p do you want to look into this? you pr is already tackling that exact code area i believe
@jimbo-p commented on GitHub (Feb 5, 2026):
@Classic298 sure, this is a good find and should fit right in with my stuff. Will try and get on this tonight!
@Classic298 commented on GitHub (Feb 5, 2026):
thanks much appreciated. new version is imminent
@jimbo-p commented on GitHub (Feb 6, 2026):
@Classic298
Assume the below discussion assumes native tools is on and 'Use Entire Document' toggle is not enabled. Previous discussions / PR fix the 'User Entire Document' issue and it's completely ignored from knowledge search when enabled.
So one weird scenario about this one. Right now, the behavior is:
That all makes sense. But now when a file enters the scene, a new condition is introduced:
No KBs attached, a file is attached
a) Only search the attached file(s)?
b) Search KBs you have access to (public / you created) + add the file to the search.
(Other conditions involving files I think are obvious. Namely: No KB, No file - (1) above. At least one KB, at least one or no files, (2) above)
So in the scenario
What makes the most sense to me is attaching a file to a custom model simply adds the file to the knowledge search... whatever that search may be. So if the knowledge search was going to look at your public KBs + KBs you created (because you hadn't attached a KB to the model), add a file and that will also be searched in addition to the KB collections.
What will NOT happen is if you attach a file and no KBs are attached, knowledge search will be scoped to only that file.
I'm going to build this out now. Let me know if you disagree.
@jimbo-p commented on GitHub (Feb 6, 2026):
fix added to #21144
@Classic298 commented on GitHub (Feb 6, 2026):
Well then only search the attached file.
It should behave the same way as the other scenario we had.
KB attached -> only has access to that one
File attached -> only has access to that
Dont think of it ** this specifically**
Think of it more generally
If i attach ANYTHING to a model - then the implied behaviour in all cases should be "only access what is attached"
@jimbo-p commented on GitHub (Feb 6, 2026):
10-4. Done! PR now includes this behavior.
@jimbo-p commented on GitHub (Feb 6, 2026):
Just to make sure we are aligned on the technicalities:
If i attach ANYTHING (excluding Notes (always full context) or KBs / Files set to Full Context) to a model - then the implied behaviour in all cases should be "only access what is attached"
@Classic298 commented on GitHub (Feb 6, 2026):
hm
i dont think we should have exclusions there?
If i attach a document, no matter if a note or file or knowledge base and no matter if full context or not, the access control should limit the model to only what is attached to the model - no matter if full context or not
and if nothing is attached - then the same access controls of the user that queries the model are applied.
This is how i see it.
Tim MIGHT see it differently, but i think we should aim for consistency.
@jimbo-p commented on GitHub (Feb 6, 2026):
When it's full context, it's not included in the knowledge search anyways though. Full context injects the entire text of the collection into the message and knowledge search is completely unaware of being there. It would be redundant to search over something which already has all of its context in the message.
Like if you attach a single file to a model, turn on full context, and then ask to search knowledge for it, it will be impossible for knowledge to find it because it's not an item knowledge search can see.
@Classic298 commented on GitHub (Feb 6, 2026):
hmmmmmmmmmmmmmmmmmmmmmmmmmmm
@Classic298 commented on GitHub (Feb 6, 2026):
how does the model query individual files that are not full context with your PR?
@jimbo-p commented on GitHub (Feb 6, 2026):
query_knowledge_files is used. If you attach knowledge to a model, native tools available related to knowledge is scoped down to "query_knowledge_files" (original behavior). Function gets model_knowledge to know what files / KBs are available to search.
model_knowledge includes that individual file.
@Classic298 commented on GitHub (Feb 6, 2026):
ok and in full context the model cannot query it anyways.... so full context should be exempt is your logic...
hmmm
here we need a tie breaker.
Tim will have to decide.
I think, even if full context is enabled, then the model should be limited to that and only that knowledge
@jimbo-p commented on GitHub (Feb 6, 2026):
I'm good either way. I do use/administer this in a corporate setting with about 3k users and can say I think a lot of people don't get this deep. If they are attaching files and marking them full context, they are also almost certainly attaching files/KBs they think are pertinent for the native knowledge search tools to use... that's intuitive to do.
Relying on a KB to be public or for you to have ownership and that giving your model permission to search it (AND knowing you shouldn't attach anything else if you desire this behavior) is not a common or expected thing. That is how it is currently and I'm fine with it, just saying I find it rare that's what people actually expect to happen.
I think the current PR does enhance / fix things regardless - full context is fixed (not working with native tools at all in main branch) and attaching a file in non-full-context mode is also working now. Maybe worth another PR / next version update to really think this behavior through including which native tools get called in what scenarios when it comes to knowledge.
@Baronco commented on GitHub (Mar 3, 2026):
Hi everyone, in the current version, knowledge files added to a model that has tool invocation set to "native" still do not work. The functionality does not behave like it did before v0.7.0; I am still forced to copy all knowledge directly into the system prompt because the model is no longer able to inject them as it used to. I’m also considering converting each knowledge item into a skill as a workaround.
Additionally, the KB tool is not very useful either :( I see some alternatives, but I believe there is still an issue with the knowledge collections. I’m using Open WebUI ‧ v0.8.7.
@Classic298 commented on GitHub (Mar 3, 2026):
@Baronco install .8 its fixed there
@Baronco commented on GitHub (Mar 17, 2026):
Testing from version 0.8.10:
1.1 It works ok with the default settings:
2.2 Two tools are enabled for use with native invocation:
2.3 Prompts for searching knowledge and using tools:
2.4 It is not even able to query the knowledge using the built-in tool query knowledge file:
3.disabling the built in tools:
3.1 In these cases, the assistant only attempts to respond using tools:
3.2 I disabled the tools to ensure that it does not have internet access and avoid using knowledge:
3.3 In this case, the user does not use the tool and responds using their knowledge; they are unable to use the attached knowledge file:
@Classic298 commented on GitHub (Mar 17, 2026):
Can't reproduce. Getting back zero results from the tool usually means you don't have access rights or there is nothing queryable in that knowledge base.
Don't turn off built in tools. That literally removes the model's ability to query anything anymore.
Besides what model are you using?
@Baronco commented on GitHub (Mar 20, 2026):
Bro I'm going to go crazy, this isn't working, I'm reading the documentation again and I can't get it to query the KB. I have a markdown document OWUI_DOCUMENTATION.md with very short documentation (around 1000 tokens).
Bypass Embedding and Retrievalenabled, using Document Intelligence prebuilt-layout as the extraction engine.query_knowledge_filestool 3 times with no response:Could these other issues be related to this?
#22262 #22181 #21299
I'm using Open Web UI v0.8.10 from an Azure Web App with the following image: open-webui/open-webui:main
I don't know what else to try but no matter what I attempt, it doesn't work 😭😭😭
OWUI_DOCUMENTATION.md
@Classic298 commented on GitHub (Mar 20, 2026):
disable this
Does this.. have support for function calling?
Dont set it.
Temperature AND tool calling is not supported by many models.
@Baronco commented on GitHub (Mar 20, 2026):
Yes, the Ms. Foundry model router is capable of using tools; I use tools from the MCPO or MCPs HTTP without any problems. For now, I'm going to give up on using Open Web UI knowledge collections because I can't get them to work as the documentation describes.
@eo-ai-team commented on GitHub (May 1, 2026):
Same issue when using OpenAI and native function calling. Seems it doesn't pick up the attached file or collection (via the # command). Only when it explicitly searches for list-knowledge & query-knowledge- will the model be able to find the contents of my knowledge files. Very frustrating.
Only fix is to always manually toggle to "entire document" when attaching a file or collection to a chat message