r/OpenWebUI • • 9d ago

Question/Help Custom Workspace Model ignores attached Knowledge Collection unless manually tagged with # (v0.13.3)

Hi everyone, I'm running a local setup on Windows and could use some help getting automatic RAG to work on a custom model.

My Setup (Installed components):
Bullet OS: Windows (native Python/pip install, no Docker)
Bullet Open WebUI: v0.13.3
Bullet LLM Backend: Ollama running llama3.1:latest
Bullet Embedding Model: Ollama running bge-m3:latest (ChromaDB indexed at 1024 dimensions)

What I did:

  1. Installed Open WebUI locally via pip and pulled llama3.1:latest and bge-m3:latest in Ollama.

  2. Created a Knowledge Collection and uploaded my .pdf and .txt manuals (all files show as processed).

  3. Created a custom Workspace Model using llama3.1:latest as the base model and attached my Knowledge Collection to it.

The Problem:
Bullet With # (Manual): When I type # in the chat and select the file or collection, retrieval works and shows the source citations (1 Source, 2 Sources) with the exact info from the manual.
Bullet Without # (Automatic): When I chat directly with the custom model, debug logs show knowledge_search runs, but it immediately returns 'sources': [] and the model says it has no access to the document.

What am I missing in v0.13.3 to make a custom Workspace Model automatically retrieve context from its linked Knowledge Collection without needing #?

7 Upvotes

20 comments sorted by

3

u/caucasian-shallot 7d ago

I had the same problem with the llama models and for me I had luck with using qwen2.5:7b-instruct-q4_K_M as my model. I did create a custom model in my workspace with the KB attached and that works, but have not tried it just attaching the KB to the model directly in settings but I presume that will work too. FYI I am on a super low end minipc so the responses are super slow, but it works hehe. Good luck!

2

u/Arc32bits 6d ago

Hello, friend! Cool that your model works relatively well. In some moments, mine delivers an expected answer, but I need to raise some situations focussed on the search for answers with several documents in the KB database.
Could you share the main settings of your model?

2

u/caucasian-shallot 6d ago

These are the flags I pass to my openwebui for the RAG part of things. All of my content is converted into markdown from PDF so I have that as the only allowed file extension so adjust as needed hehe. But these seem to work pretty solid for me and the model is able to retrieve data from the knowledge base.

- RAG_TOP_K=15

- RAG_ALLOWED_FILE_EXTENSIONS=md

- RAG_EMBEDDING_BATCH_SIZE=32

- OMP_NUM_THREADS=4

- ENABLE_KB_EXEC=True

- CHUNK_SIZE=2000

- CHUNK_OVERLAP=200

- ENABLE_MARKDOWN_HEADER_TEXT_SPLITTER=True

- CHUNK_MIN_SIZE_TARGET=1000

Edit: To add, the only adjustment I made to the model directly was raising its num_ctx to 8192 but thats also limiting it to my hardware. Since you have actual VRAM you can likely go higher but you'll need to play with it hehe.

2

u/Arc32bits 6d ago

Good. Thanks for the tips, I'll test it and get back to you with the result. 🥳

1

u/caucasian-shallot 6d ago edited 6d ago

Happy to help and I hope it gets it working better. Main thing is to try and turn all the knobs haha, that's at least what I did. Also you can pass the environment variable ENV=dev which exposes the swagger docs at /docs to see all the API calls you can do and such. Was a big help for me in sorting stuff out. Either way, good luck!

2

u/ClassicMain 8d ago

llama3.1

There is your issue

The model needs to use it's knowledge tools otherwise it can't know it has knowledge attached

1

u/Arc32bits 8d ago

What recommendation would you give?
Thk for helping

2

u/ClassicMain 8d ago

What GPU do you have?

Qwen 3.8 27b is insanely good.

1

u/Arc32bits 8d ago

I currently use rtx5060, my intention is to learn at home to take the idea to the company I work for. I'll test what you indicated.

1

u/Arc32bits 8d ago

My friend! I went through the entire process again after installing wqn2.5:7b. It is now triggering the search engine—using the provided `conhecimento_id`—but the search still fails to locate the document needed to provide the correct answer.

However, when I select the file using the `#`, it returns the expected result.

Any suggestions?

2

u/MongooseWonderful198 8d ago

Your new screenshot helps: the model is calling search_knowledge_files with a question about the document's contents. In v0.13.3 that tool searches filenames, so “codigo do motor exaustor” can return [] for teste.txt. The content-search function is query_knowledge_files. That's a concrete mismatch to check after the model change.

For the automatic retrieval you originally wanted, try Function Calling → Legacy for that same workspace model, then a fresh chat with the same question and no #. The tagged middleware adds attached knowledge to the file-retrieval path in Legacy mode. If it already shows Legacy, the model config ClassicMain requested is the next useful detail. I haven't reproduced your installation.

1

u/Arc32bits 8d ago

Thanks for the tip. I’ve installed the "qwen3:8b" model, and it is successfully reading the information from a sample file; I’m currently in the validation phase.

Do you have any tips for improving the interaction with this 8B model?

2

u/MongooseWonderful198 8d ago

Use OpenWebUI's source citations to check that both report names and menu paths in your screenshot are actually in the retrieved passage.

I'd keep qwen3:8b and the current settings fixed for a small set of questions from your manuals. Keep the expected answer/source beside each question, and include one whose answer isn't in the files.

One prompt worth trying: “Use only the supplied manual excerpts. Give the menu path and cite the passage. If the path isn't stated there, say you couldn't find it.” Rerun the same questions after that change. If the needed passage wasn't retrieved, investigate retrieval before tuning the model.

1

u/Arc32bits 8d ago

Thanks for the tips

1

u/ClassicMain 8d ago

Can you show the model config

1

u/Arc32bits 8d ago

With the support of Gemini, it is possible to obtain an answer by gathering information from a file in the database; however, the response sometimes fails.

1

u/ClassicMain 8d ago

Qwen 2.5 7b isn't much better 😭

Please try any new models

1

u/Arc32bits 8d ago

Haha, I’ll look for another one.

1

u/Arc32bits 8d ago

8b, 14b? 👀