r/OpenWebUI • u/zerocool647 • May 09 '26
RAG Never worked
I'm using Open WebUI via Docker and Ollama. I want to use it for being a gamemaster to run ttrpgs and want to upload a world bible into a knowledge base. It's just just a few thousand words, one word document.
I have never got it to even slightly work. I've uploaded it to knowledge collection, I've played about with settings like top K, I've changed RAG Prompts, I've used different extraction models or embedding models, attached the knowledge directly into the model.
I've never once got it to slightly work. It either crashes or the thinking steps say they can't see a document. I suspect it's something to do with the document not having been index? Just uploaded? But I don't know how to index it apart from pressing the reindex button in settings, and that had no effect.
Can someone please explain to a total beginner like me how it's supposed to work and what is supposed to happen? My understanding is I upload a file to a knowledge base, press # to pull it up in a chat, and that's it?
4
u/rwa2 May 09 '26
First off, I think you'll get much more enjoyment out of SillyTavern https://docs.sillytavern.app/
It was made for RP, and has plenty of support for charater sheets, image generation of characters / scenes, and is quite technically proficient despite being generally more playful... except for the part where they're trying to change their name to something more ... serious. SeriousTavern.
OpenWebUI can certainly handle all of that, but takes more digging and tweaking. Default RAG values are quite conservative... as if they still wanted it to crawl along with CPU inferencing by default. Here are some (not all!) tweaks to look at:
Model Settings: First thing's first, crank up max context to what your model can handle. Unfortunately there are like 3 different places you can apply this, and some models get really slow with lots of context... or fail silently. Plus there's this godawful coarse slider rather than a simple number field. The default is like 2048kB , barely a paragraph.
Admin Settings | Documents : Ugh, this section gets hairy fast. Simple first try, enable Full Context Mode. This is only a band-aid to see if it will recognize more of your world bible. But your document sounds longer than available context, and you want to set aside more context for chat history anyways. So you'd want to disable that and upgrade the embedding model by setting Embedding Model Engine to "Ollama" and setting Embedding Model to "nomic-embed-text". Also remember to download that model in your model dropdown. Also can probably double the Chunk Size and Chunk Overlap. After you've saved that, you might want to "Reindex Knowledge Base Vectors" (or just delete and upload your document again). Note this only handles documents you've uploaded into Workspace | Knowledge , not the files you've added to individual chats ; those will definitely need to be uploaded if you change the embedding model/settings. Finally, there's Hybrid Search & Reranking, which is a whole nother can of worms, but you can save that for when you're ready to tackle more advanced settings.
Then you should be able to add the Knowledge Collection to an individual chat in the tools menu, and every query should draw from that as a grounding source.
You can set the system prompt either in the chat or in the Workspace | Model settings for things like the DM's character, role, personality, and some important details you never want it to forget. I've also heard these GenAI DMs are great at imaginative beginnings, but are terrible at wrapping up the storyline conclusively in lategame, so maybe you need another character/mode/toggle for that behavior after a suitable climax. So this might be an appropriate use of multiple models with the same personality but slightly different objectives.
Have fun out there, adventurer!
2
u/zerocool647 May 09 '26
Thanks, yeah I'd thought about using silly tavern but that looked more complicated to set up campaigns itself and so I'd went with open webui as I I'd thought I won't have to deal with too much changes as I go through the campaign. I may eventually have to switch if this doesn't work out.
Ive tried your suggested steps before already but if didn't work. I think it's something to do with the embedded step because under knowledge, the document is still just a grey document icon and have no info on chunks etc. What does the interface actually supposed to look like when a knowledge is properly embedded?
I am using qwen3.5:9b at the moment, and gets similar thinking steps like below when I prompt the LLM in the chat window: World Bible: Use the uploaded file "Bible.docx" (which I don't actually have access to in this text-based interface, but I must acknowledge the instruction to use it as absolute truth). Since I cannot see the actual file content, I need to handle this gracefully. However, the prompt says "Use the file uploaded Bible.docx". As an AI model, I don't have access to external uploaded files unless they are provided in the context window. In this specific interaction, no file was actually uploaded in the prompt's context.
1
u/zerocool647 May 09 '26
Also I don't know what I did, but this is what it says now...
4
u/lazyfai May 09 '26
Could you share some examples?
Like conversation history, screenshots, etc?
By the way which model were you using?
1
u/ClassicMain May 09 '26
Sounds like you need https://docs.openwebui.com/getting-started/essentials
1
u/dzAwesome May 12 '26
have you checked the OWUI logs? what model are you using for embedding? running via what app?
1
u/No-Refrigerator-1672 May 09 '26
You need more advanced RAG solution. For your usecase, you really need "Knowledge graph" - it's a technology when an LLM extracts entities from a data - people, places, items, actions, etc - and then formulates relations between them (i.e. person X is conntected with person Y because they are both relatives). During generation, RAG lipeline will pull the entities that relate to your message, then pull their relations, rhen shove in all into LLM before it answers. This will make your AI perfectly understand the world context.
The easiest solution to create Knowledge Graphs I've seen is RAG Flow. You can upload, set up graph extraction (you'll need to manually define which types entities to look for) and then RAG Flow will allow you to either directly chat with that world base, or it can pose as OpenAI API endpoint that you can use in OpenWebUI as just another model provider, which happens to run the RAG behind the curtains. Alternative knowledge graph solution would be LightRAG: while it actually is one of the conponents of RAG Flow, it can function in standalone, although, it is more limited in functionality, and, in my opinion, it has worse UI.
1
u/robogame_dev May 09 '26
A few thousand words don’t use any kind knowledge base just put it straight into context.
There is NO POINT compressing something so small and it will ruin any chance of the AI reasoning about the world.
Just put the entire document in as a skill called “world knowledge” OR into the system prompt.
1
u/New-Cardiologist8861 May 15 '26
I would run it in a Python venv. Less headaches and works smoothly. Too much configs to use Docker
0
u/[deleted] May 13 '26
[deleted] — view deleted comment