Skip to main content

Troubleshoot Document Retrieval (RAG)

If a model cannot find an answer in your documents, check that the files finished processing, the conversation can access them, and the model has the tools and context it needs to retrieve their contents. This guide covers upload failures, retrieval settings, and model-specific context limits.

This page covers the most common RAG problems and their solutions.


RAG performance depends heavily on your model setup. The defaults are conservative to work everywhere, but you will get much better results by tuning them to your specific deployment. All of these are configured in Settings > Documents (admin section).

Agentic retrieval: enable kb_exec

If your models use native function calling, set ENABLE_KB_EXEC=True for a noticeably better knowledge-base experience. It gives the model a filesystem-style interface (ls, tree, grep, cat, read-by-line) over your knowledge that capable models chain more reliably than the individual search tools. It has no effect in Legacy Mode. See Filesystem-style access.

Local models with constrained context (≤ 8K tokens)​

Typical for Ollama models on consumer hardware (Qwen 3.5 4B, Gemma 4 12B, Muse Glimmer 30B, etc.) where context windows are limited.

SettingValueWhy
Text SplittertokenConsistent chunk sizes aligned to actual token counts
Markdown Header Text SplitterOnPreserves document structure
Chunk Size1000Smaller chunks so each retrieval result fits comfortably
Chunk Overlap100Standard overlap
Top K3 to 5Fewer chunks to avoid blowing out your limited context budget
Always Use Full TextOffCannot afford to send full documents
Context budget math

With a chunk size of 1000 tokens and Top K of 5, RAG will inject roughly 5,000 tokens of retrieved content. With hybrid search on, Top K Reranker sets how many chunks reach the model, so use it for this math. Add your system prompt and conversation history. If your model has an 8K context window, that leaves about 2 to 3K tokens for the conversation itself. Adjust Top K downward if follow-up questions get cut off.

Cloud models with large context (32K+ tokens)​

Typical for OpenAI (GPT-5.6), Anthropic (Claude), Google (Gemini), DeepSeek, and other API providers where context windows are 32K to 1M+ tokens.

SettingValueWhy
Text SplittertokenConsistent chunk sizes
Markdown Header Text SplitterOnPreserves document structure
Chunk Size2000Larger chunks preserve more surrounding context per hit
Chunk Overlap200More overlap prevents sentence splits
Top K15 to 25Cast a wide net, you have the context budget for it
Always Use Full TextConsider for small docsIf a document is under ~20K tokens, full text can outperform retrieval. Full Text Threshold (in characters or tokens) sets which files are included in full without it
When to use full text

If you are working with a single small-to-medium document (under ~50 pages) and a large-context model, full text often gives better results than chunked retrieval because the model sees everything with no retrieval gaps. Turn on an attachment's Full text switch to do this for one file, or turn on Always Use Full Text in Settings > Documents (admin section) for all of them.

Mixed environment (local + cloud)​

If you use both local and cloud models, configure for the lowest common denominator and override per-model or per-chat:

SettingValueWhy
Text SplittertokenWorks for both
Markdown Header Text SplitterOnWorks for both
Chunk Size1500Compromise, not too large for local, not too small for cloud
Chunk Overlap200Safe default
Top K10Moderate, a good middle ground for mixed model usage

Embedding Model Recommendations​

The embedding model determines retrieval quality. The right choice depends on your deployment:

ScenarioRecommendedWhy
Single user, getting startedall-MiniLM-L6-v2 (default)Runs locally, no setup needed
Multi-user, Ollama availablenomic-embed-text via OllamaOffloads to Ollama, frees Open WebUI RAM
Production, API budget availabletext-embedding-3-small via OpenAIBest retrieval quality per dollar
Air-gapped / self-hostednomic-embed-text or mxbai-embed-large via OllamaNo external API calls needed

After changing your embedding model, reindex all existing documents in Settings > Documents (admin section) for the new embeddings to take effect.


Common RAG Issues and How to Fix Them​

1. The Model "Can't See" Your Content​

This is the most common problem, and it's typically caused by issues during content ingestion. The model doesn't hallucinate because it's wrong; it hallucinates because it was never given the right content in the first place.

Solution: Check your content extraction settings.

  • Navigate to: Settings > Documents (admin section).
  • Make sure you're using a robust content extraction engine such as:
    • Apache Tika
    • Docling
    • Custom extractors (depending on your document types)
tip

Try uploading a document and preview the extracted content. If it's blank or missing key sections, you need to adjust your extractor settings or use a different engine.


2. Only a Small Part of the Document is Being Used​

Open WebUI is designed to work with models that have limited context windows by default. For instance, Ollama picks a model's default context length from available VRAM, and on GPUs with less than 24 GiB that is 4096 tokens (see Ollama's context length documentation), well below what most models support. Open WebUI does not measure the model's context or trim retrieved content to fit it. It injects the Top K retrieved chunks (default 10), so only those parts of the document reach the model, and a small context window can cut off even those.

Solutions:

  • Go to Settings > Documents (admin section)
  • Either:
    • Enable "Bypass Embedding and Retrieval": sends full content directly without applying retrieval filters.
    • Toggle on "Always Use Full Text": injects more comprehensive content into the model prompt.
warning

Be mindful of context limits: if your model can't handle more tokens, content will still be truncated.


3. Token Limit is Too Short​

Even if retrieval works, your model might still not process all the content it receives, because it simply can't.

By default, Ollama-hosted models on GPUs with less than 24 GiB of VRAM run with a 4096-token context window (Ollama picks the default from available VRAM: 4096 below 24 GiB, 32768 from 24 to 48 GiB, and 262144 at 48 GiB and above). That means only a fraction of your retrieved data will actually be used.

Why Web Search Especially Needs Larger Context Windows: Web pages are particularly challenging for small context windows because they contain far more content than typical documents. A single web page often includes:

  • Main content (the actual information you want)
  • Navigation menus, headers, and footers
  • Sidebar content and advertisements
  • Comments sections and related links
  • Metadata and embedded scripts

Even after content extraction and cleaning, web pages easily consume 4,000-8,000+ tokens of context. With a 4096-token limit, you're often getting only half the content, missing the most relevant information that appears later in the page. Even 4096 tokens is frequently insufficient for comprehensive web content analysis.

Solutions:

  • For Ollama Models: Extend the model's context length:

    • Navigate to: Settings > Models (admin section), then click the pencil (Edit) on the model you want to change
    • Go to Advanced Params
    • Modify the context length (e.g., increase to 8192+ or ideally beyond 16000 tokens if supported by your model)
  • For OpenAI and Other Integrated Models: These models typically have their own context limits that cannot be modified through Open WebUI settings. Ensure you're using a model with sufficient context length.

Ollama's 4096-token default on smaller GPUs is a significant limiter for web search. For better RAG results with web content, use at least 8192 tokens, with 16384+ being ideal for complex web pages.

Alternative: Use an external LLM with larger context capacity (e.g., GPT-5.6, Claude, Gemini with 8k+ context). Comparing results with a large-context model is a good way to isolate whether token limits are the bottleneck.

tip

For web search and complex document analysis, stick with models that support 8192+ token contexts in production use cases.


4. Embedding Model is Low-Quality or Mismatched​

Bad embeddings = bad retrieval. If the vector representation of your content is poor, the retriever won't pull the right content, no matter how powerful your LLM is.

Solution:

  • Change to a high-quality embedding model (e.g., all-MiniLM-L6-v2, Instructor X, or OpenAI embeddings)
  • Go to: Settings > Documents (admin section)
  • After changing the model, reindex all existing documents so the new embeddings take effect. Embedding quality directly affects what content is retrieved.

5. 400: 'NoneType' object has no attribute 'encode'​

This error indicates a misconfigured or missing embedding model. When Open WebUI tries to create embeddings but doesn't have a valid model loaded, it can't process the text, and the result is this cryptic error.

Cause:

  • Your embedding model isn't set up properly.
  • It might not have downloaded completely.
  • Or if you're using an external embedding model, it may not be accessible.

Solution:

  • Go to: Settings > Documents > Embedding Model (admin section)
  • Save the embedding model again, even if it's already selected. This forces a recheck/download.
  • If you're using a remote/external embedding tool, make sure it's running and accessible to Open WebUI.
tip

After fixing the configuration, try re-embedding a document and verify no error is shown in the logs.


6. Upload Limits and Restrictions​

Open WebUI implements various limits to ensure system stability and prevent abuse. It is important to understand how these limits apply to different upload methods:

  • Chat Uploads: Subject to global file size and count limits.
    • Max File Size: Controlled by RAG_FILE_MAX_SIZE (default: Unlimited). Configurable in Settings > Documents > Files > Max Upload Size (admin section).
    • Office and EPUB documents are additionally checked against what they contain, because those formats are archives. One that unpacks to far more than its own size is refused with a message about the archive being too large after decompression, even though the file itself is small. A genuine document rarely trips this; one that does is either corrupt or built to exhaust memory on whatever opens it.
    • Max File Count: Controlled by RAG_FILE_MAX_COUNT (default: Unlimited). Configurable in Settings > Documents > Files > Max Upload Count (admin section).
    • Allowed File Extensions: Controlled by RAG_ALLOWED_FILE_EXTENSIONS (default: All). Configurable in Settings > Documents > Files > Allowed File Extensions (admin section).
  • Folder Uploads: Subject to the FOLDER_MAX_FILE_COUNT environment variable (no limit by default; only the browser enforces it). This limit applies to the number of files directly associated with a folder.
  • Knowledge Base Uploads:
    • File Limit: Subject to RAG_FILE_MAX_SIZE and the knowledge base file limits.
    • Vector indexing: By default, Open WebUI indexes files when they are added to a knowledge base. Bypass Embedding and Retrieval in Settings > Documents (admin section) skips vector indexing for both chat uploads and files added to knowledge bases. Open WebUI still extracts text from document uploads and stores it.
    • Full-text attachments: To use full text for a single attachment and keep indexing enabled, click the attachment in the chat and turn on Full text. For a file-backed knowledge base, full-text mode can include the extracted text of every file in the collection. Check the combined text against the model's context budget.
info

By separating these limits, administrators can better manage resource usage across different features. For example, you might want to allow larger uploads in a curated Knowledge Base while restricting the number of files in ad-hoc Folder uploads.


7. Fragmented or Tiny Chunks​

When using the Markdown Header Text Splitter, documents can sometimes be split into very small fragments (e.g., just a table of contents entry or a short sub-header). These tiny chunks often lack enough semantic context for the embedding model to represent them accurately, leading to poor RAG results and unnecessary overhead.

Solution:

  • Go to Settings > Documents (admin section).
  • Increase the Chunk Min Size Target.
  • Setting this to about 50-60% of your Chunk Size (for example 1000 with a Chunk Size of 2000) merges small fragments with neighboring chunks, resulting in better semantic coherence and fewer total chunks.

8. Slow Follow-up Responses (KV Cache Invalidation)​

If your initial response is fast but follow-up questions become increasingly slow, you are likely experiencing KV Cache invalidation.

The Problem: By default, Open WebUI injects RAG context into the user message. As the chat progresses, new messages shift the position of this context, forcing models (like Ollama, llama.cpp, or vLLM) and cloud providers (like OpenAI or Vertex AI) to re-process the entire context for every turn.

Solution:

  • Set the environment variable RAG_SYSTEM_CONTEXT=True.
  • This injects the RAG context into the system message, which stays at a fixed position at the start of the conversation.
  • This allows providers to effectively use KV prefix caching or Prompt Caching, resulting in nearly instant follow-up responses even with large documents.

ProblemFix
Model can't "see" contentCheck document extractor settings
Only part of content usedEnable Always Use Full Text or Bypass Embedding
Limited by a small context lengthIncrease model context length or use large-context LLM
Inaccurate retrievalSwitch to a better embedding model, then reindex
Upload limits bypassUse Folder uploads (with FOLDER_MAX_FILE_COUNT); Knowledge Base limits are separate
Fragmented/Tiny ChunksIncrease Chunk Min Size Target to merge small sections
Slow follow-up responsesEnable RAG_SYSTEM_CONTEXT=True to fix KV cache invalidation
API returns "empty content"Wait for file processing to complete before adding to knowledge base
CUDA OOM during embeddingReduce batch size, isolate GPU, or restart container
Large uploads slow to embedRaise Embedding Batch Size, use an external embedding engine, or bypass embedding
Hybrid search changes nothingSet GLOBAL_LOG_LEVEL=DEBUG and check the reranker model and endpoint
PDF images not extractedUse Tika/Docling, enable OCR, or update pypdf
Worker dies during upload (instant)Switch away from default ChromaDB (SQLite) in multi-replica or multi-worker setups
Worker dies during upload (timeout)Update Open WebUI, or increase --timeout-worker-healthcheck
Model ignores attached KBEnable Builtin Tools, add system prompt hints, or attach a small document in the chat with its Full text switch on
Single attached file returns nothingRe-index to rebuild the per-file indexes
Docling citations show the wrong pageRe-index, or re-upload the file

9. API File Upload: "The content provided is empty" Error​

When uploading files via the API and immediately adding them to a knowledge base, you may encounter:

400: The content provided is empty. Please ensure that there is text or data present before proceeding.

The Problem: This is a race condition. The file has content, but the extraction has not finished yet. By default, file uploads are processed asynchronously: the upload endpoint returns immediately with a file ID while content extraction and embedding computation happen in the background. If you try to add the file to a knowledge base before processing completes, the system sees empty content.

Solution: Wait for Processing to Complete

Before adding a file to a knowledge base, poll the status endpoint until processing is done:

import requests
import time

def wait_for_processing(token, file_id, timeout=300):
    url = f'http://localhost:3000/api/v1/files/{file_id}/process/status'
    headers = {'Authorization': f'Bearer {token}'}
    
    start_time = time.time()
    while time.time() - start_time < timeout:
        response = requests.get(url, headers=headers)
        status = response.json().get('status')
        
        if status == 'completed':
            return True
        elif status == 'failed':
            raise Exception(f"Processing failed: {response.json().get('error')}")
        
        time.sleep(2)  # Poll every 2 seconds
    
    raise TimeoutError("File processing timed out")

Status Values:

StatusMeaning
pendingWaiting to be processed
processingContent extraction and embedding are running
completedProcessing finished, including any knowledge base link
failedProcessing failed (check error field)
tip

For complete API workflow examples including proper status checking, see the API Endpoints documentation.


10. CUDA Out of Memory During Embedding​

When processing large files or many files in sequence, you may encounter CUDA OOM errors like:

CUDA out of memory. Tried to allocate X MiB. GPU has a total capacity of Y GiB of which Z MiB is free.

Common Causes:

  • Embedding model competing with chat model for GPU memory
  • PyTorch memory fragmentation from repeated small allocations
  • Large documents creating memory spikes during embedding

Solutions:

  1. Isolate Embedding to a Different GPU (if available): Set CUDA_VISIBLE_DEVICES to pin embedding to a specific GPU separate from your chat model.

  2. Reduce Embedding Batch Size: If you raised RAG_EMBEDDING_BATCH_SIZE (the default is 1; 32 is the default of RAG_RERANKING_BATCH_SIZE), lower it again to reduce peak memory usage.

  3. Enable Expandable Segments: Set the environment variable to reduce fragmentation:

    PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
  4. Restart Between Large Ingestion Jobs: If memory fragmentation builds up, restart the Open WebUI container to clear CUDA contexts.

  5. Use Smaller Embedding Models: Consider using lighter embedding models for bulk ingestion, then switch to higher-quality models for production queries.

  6. Separate Ingestion from Chat: Don't run the chat model during large ingestion jobs. Load the chat model after embeddings finish.


10b. 429 Rate Limit Errors During Embedding​

When using a remote/external embedding provider (OpenAI, Azure OpenAI, etc.) with ENABLE_ASYNC_EMBEDDING enabled, you may see HTTP 429 "Too Many Requests" errors in the logs during bulk document ingestion:

aiohttp.client_exceptions.ClientResponseError: 429, message='Too Many Requests', url='https://api.openai.com/v1/embeddings'

The Problem: With async embedding enabled, Open WebUI sends embedding requests concurrently. If you're ingesting many documents or large documents at once, this can easily exceed your provider's API rate limits, especially on free-tier or lower-tier plans.

Solutions:

  1. Limit Concurrent Embedding Requests: Set RAG_EMBEDDING_CONCURRENT_REQUESTS to cap the number of simultaneous embedding API calls. For example, set it to 5 or 10 depending on your provider's rate limits:

    # docker-compose.yaml
    environment:
      RAG_EMBEDDING_CONCURRENT_REQUESTS: 5

    Or configure it in the Settings > Documents > Embedding Concurrent Requests (admin section) field, shown for the Ollama, OpenAI and Azure OpenAI embedding engines. The default of 0 means unlimited concurrency.

  2. Reduce Batch Size: Lower RAG_EMBEDDING_BATCH_SIZE to send fewer texts per API call.

  3. Disable Async Embedding: If rate limits remain an issue, set ENABLE_ASYNC_EMBEDDING to False to process embeddings sequentially (slower but avoids rate limit pressure).

11. PDF OCR Not Extracting Text from Images​

If PDFs containing images with text are returning empty content:

The Problem: The default "pypdf" content extractor may struggle with certain PDF formats, especially those containing primarily image-based content.

The default extractor reads only the text layer of each page. PDF Extract Images (OCR) is off by default, so scanned pages produce no text. If every page is empty, the upload fails with The content provided is empty. Please ensure that there is text or data present before proceeding. If at least one page has text, the upload succeeds and the scanned pages are missing from search results without any error.

With PDF Extract Images (OCR) on, an image the default extractor cannot decode is skipped, and the server log shows Skipping unreadable PDF image followed by the image name and the error. The rest of the file is still processed. For scanned PDFs that hit this, switch to a content extraction engine with its own OCR.

Solutions:

  1. Use a Different Content Extraction Engine:

    • Navigate to Settings > Documents (admin section)
    • Try Apache Tika or Docling for better OCR support
  2. Enable PDF Image Extraction:

    • In Settings > Documents (admin section), ensure PDF Extract Images (OCR) is enabled
    • OCR uses one processor thread per upload. On an idle many-core server, raise intra_op_num_threads in RAPIDOCR_PARAMS to OCR a single upload faster.
  3. Update pypdf (if using the default engine): Recent pypdf releases (6.0.0+) have improved handling of various PDF formats. Each Open WebUI release pins its pypdf version, so updating pypdf means updating Open WebUI

  4. Check for Corrupted PDFs: Verify the PDF opens correctly in a standard PDF viewer before uploading


12. Worker Dies During Document Upload​

When uploading documents in a deployment with several replicas or workers, you may see:

INFO:     Waiting for child process [12]
INFO: Child process [12] died

The cause is the default ChromaDB vector database with UVICORN_WORKERS > 1 or several replicas. Embedded ChromaDB keeps its data in local SQLite files that only one process may write. When several processes write at once, they crash. You will typically see this pattern within the same second:

save_docs_to_vector_db:1573 - adding to collection file-id
INFO: Waiting for child process [pid]
INFO: Child process [pid] died

Solution: set UVICORN_WORKERS=1 and scale with replicas. With more than one replica, switch away from the embedded ChromaDB:

See the Scaling & HA guide for full details.


13. Knowledge Base Attached to Model Not Working​

You attached a knowledge base to a model in Settings > Models > Edit (admin section) (or Workspace > Models for your own model), but when you chat with the model it doesn't seem to know about the knowledge base content at all.

The Problem: Open WebUI has two distinct RAG modes, and they handle model-attached knowledge bases very differently:

ModeHow Knowledge Works
Legacy (non-native)Open WebUI automatically performs RAG: it queries the attached knowledge base, retrieves relevant chunks, and injects them into the conversation context. This happens behind the scenes without the model doing anything.
Native Function CallingKnowledge is not auto-injected. Instead, the model receives tools (like query_knowledge_bases) and must actively decide to call them. This is agentic RAG: the model autonomously searches when it determines it needs information.

Because Native Function Calling is the default, the model needs both the ability and the instruction to use the knowledge tools. Keep Native mode enabled while checking the retrieval setup below.

Knowledge Retrieval Behavior Matrix​

Knowledge Attached to ModelNo Knowledge Attached
Legacy ModeOpen WebUI auto-injects RAG results from the attached knowledge onlyNo automatic RAG; user must manually add a knowledge base to the chat via #
Native Function CallingModel receives tools limited to the attached knowledge (must actively call them)Model receives tools with access to all accessible KBs (if Builtin Tools enabled); must actively call them

Key takeaway: in Native Mode, the model must use its knowledge tools regardless. Attaching knowledge only restricts what is searchable; scoped access lists everything that counts as attached.

Preventing Knowledge Base Access in Native Mode

If you want to prevent a model from accessing any knowledge base in native mode, you don't need to disable Builtin Tools entirely. Instead, disable only the Knowledge Base category in Settings > Models > Edit > Builtin Tools (admin section) (or Workspace > Models for your own model). This removes all knowledge-related tools while keeping other builtin tools (web search, memory, notes, etc.) active. See Granular Builtin Tool Categories for the full list of categories.

Builtin Tools categories in the Model Editor

Solutions (check in order):

  1. Check Global Model Settings first:
    • Go to Settings > Models (admin section) and open Model Defaults
    • Expand Model Parameters and check if Function Calling is set to native
    • Models without an explicit per-model value inherit this setting. Keep the effective value set to native and check that the selected model supports tool calling
    • Also check the Features section of the model editor: Preload files controls file processing, while Builtin Tools and its Knowledge Base category control native knowledge-tool access
Check the effective model settings

Per-model settings in Settings > Models > Edit > Advanced Params (admin section) (or Workspace > Models for your own model) override the global default when explicitly set. A model without its own function_calling value inherits the global setting. Check both places when the model's behavior differs from what you expect.

  1. Ensure Built-in Tools are enabled for the model:

    • Go to Settings > Models > Edit (admin section) (or Workspace > Models for your own model) for your model
    • Under Builtin Tools, make sure the Knowledge Base category is enabled (it is by default)
    • If this is disabled, the model has no way to query attached knowledge bases
  2. Add a system prompt hint:

    • Some models need explicit guidance to use their tools. Add something like:

      "When users ask about attached documents, use the available knowledge tools to search those documents before answering, and cite the relevant passage."

  3. Check processing and access:

    • Confirm the uploaded file finished processing and the current user can access the knowledge base
    • Try a model with reliable native tool calling, then ask about a specific fact you can verify in the document
  4. For a small document, try the Full text switch:

    • Attach the knowledge base in the chat, click it and turn on Full text, with the model's Preload files capability on. On a model-attached knowledge base the toggle only takes effect with Legacy function calling
    • This sends the full extracted content instead of retrieving selected passages. Ensure the document fits the model's context window
Why Agentic RAG?

Open WebUI uses agentic RAG, where the model decides when and how to search knowledge bases and can retry with different queries. This requires a model that can use tools effectively. If the selected model cannot retrieve a known fact reliably, use a model with stronger tool calling or test a small document with the Full text switch on.

For the full explanation of how knowledge scoping and retrieval modes work, see the Knowledge documentation and Preload files vs Builtin Tools.


A webpage or YouTube attachment came back as an error toast. The message names the step that failed: a link that could not be read names the link, a refused YouTube transcript gives the reason, and a message about the knowledge base means the content was read and only saving it failed.

[ERROR: Could not read content from <url>] means nothing was attached. The usual causes are a site that blocks the request or serves its content only after JavaScript runs, which WEB_LOADER_ENGINE=playwright handles; a proxy Open WebUI is not being told to use, see WEB_SEARCH_TRUST_ENV; or an address refused on purpose. Cloud metadata endpoints and anything matched by WEB_FETCH_FILTER_LIST are never requested, and the log shows Blocked by filter list:. Private, loopback, link-local and other addresses that are not globally routable are refused by default, and the log shows Blocked non-global address: followed by the address.

To attach pages from your own network, such as an intranet wiki or a service on the same host, set ENABLE_LOCAL_WEB_FETCH=True (the older name ENABLE_RAG_LOCAL_WEB_FETCH still works) and restart. Every user who can chat can then make the server request internal addresses, so turn it on only when you trust all of them. The filter list and its metadata endpoints stay blocked either way.

A YouTube attachment is the video's transcript, so a video without a usable one cannot be attached at all. Where the message says YouTube blocked the request from your server's address, common for cloud provider ranges, route it through YOUTUBE_LOADER_PROXY_URL. Where a transcript exists but not in the languages asked for, add yours to YOUTUBE_LOADER_LANGUAGE. The message then reads No transcript found for the YouTube video <id> in these languages: <list>. Set the list in Youtube Language under Settings > Web Search (admin section) as language codes separated by commas, such as de,fr. Leave out spaces in the environment variable, since only the admin field trims them. Open WebUI tries them in order and adds en at the end when it is missing, so de,fr tries German, French, then English. For each language it takes a manually created transcript over an automatically generated one. Captions switched off by the uploader, age restriction and unavailable videos cannot be worked around.

15. Attaching a Single File Returns No Sources​

Attaching one file with # retrieves nothing, while attaching the knowledge base that contains the same file works normally.

The Problem: a file belonging to a knowledge base is indexed twice, once with the knowledge base and once on its own. Attaching it by itself searches only its own index, which can go missing after a vector database migration, a partial reset or a deletion made directly in the vector database.

Solutions:

  1. Re-index at Settings > Documents > Reindex Knowledge and Memory Vectors (admin section). This rebuilds each knowledge base, the per-file index of every file inside it and every user's memories. It extracts and re-embeds everything, so allow for the time and, on a paid embedding model, the cost.
  2. Re-upload the file if it is not in any knowledge base, since re-indexing only covers knowledge bases.

16. Text in an Attached Image Is Not Read​

An image attached in a chat is sent to the model as an image. It never goes through the content extraction engine, so no OCR runs on it, whichever engine is set in Settings > Documents (admin section). Only a vision model can read it.

  • If every selected model has the Vision capability turned off, Open WebUI refuses the image with Selected model(s) do not support image inputs.
  • A model with no capabilities set counts as vision capable, so the image is sent. A model server that cannot take images then returns its own error, for example Multimodal data provided, but model does not support multimodal requests. That text comes from the model server, not from Open WebUI.

Solutions:

  1. Use a vision model for chats with images, and turn off Vision in Settings > Models > Edit (admin section) for models that cannot take images, so users get the Open WebUI message instead of a model server error.
  2. Extract the text with OCR by uploading the image to a knowledge base. This needs Content Extraction Engine in Settings > Documents (admin section) set to an engine other than Default, and Supported Media MIME Types listing the image type, for example image/*. The External engine also accepts images while that field has never been set. Otherwise the upload shows the warning File type image/png is not supported for processing, with the image's own type.

17. Large Uploads Take a Long Time to Embed​

A large CSV or XLSX file, or many PDFs uploaded at once, stays in processing for a long time on the Default (SentenceTransformers) embedding engine. Every chunk must be embedded before the file is searchable.

The Problem: Embedding Batch Size in Settings > Documents (admin section), set by RAG_EMBEDDING_BATCH_SIZE, defaults to 1. The local engine passes it to the model as its batch size, so it embeds one chunk at a time.

Solutions:

  1. Raise Embedding Batch Size, for example to 32. Larger batches use more memory. If you then see CUDA out of memory errors, lower it again (see section 10).
  2. Use an external embedding engine: set Embedding Model Engine to Ollama, OpenAI or Azure OpenAI (RAG_EMBEDDING_ENGINE). The same batch size then sets how many chunks go into one request, so raise it only if the provider accepts several inputs per request. With Ollama, each upload and each search also sends text to the embedding model through /api/embed. If the same Ollama runs the chat model and the two do not fit in memory together, replies start after a long pause while Ollama loads the models again. Choose an embedding model small enough to stay loaded beside the chat model and check with ollama ps that both are listed, or point RAG_OLLAMA_BASE_URL at a separate Ollama for embeddings (see Task model parameters).
  3. Skip embedding: turn on Bypass Embedding and Retrieval (BYPASS_EMBEDDING_AND_RETRIEVAL). Uploads are stored as extracted text without embeddings, and the full text goes to the model, so each document must fit in its context window.

18. Hybrid Search or the Reranker Has No Visible Effect​

With Hybrid Search on, answers look the same as plain vector search, and no error appears in the chat.

The Problem: hybrid search falls back to vector search on its own.

  • If the hybrid search query raises an error, Open WebUI runs vector search instead and logs Hybrid search failed, falling back to vector search: only at the DEBUG level.
  • A knowledge base whose hybrid query fails is dropped from the results while the others are still searched. The log shows query_collection_with_hybrid_search: <n> collection(s) had failing queries: followed by the collection names at the ERROR level.
  • If the external reranker request fails or its response has no results, the log shows Error in external reranking: or No results found in external reranking response, then No valid scores found, check your reranking function. Returning original documents. The documents are passed on without reranking.
  • If the local reranking model cannot be loaded when you save the settings, the log shows Error loading reranking model: and Open WebUI turns Hybrid Search off again.

Solutions:

  1. Read the debug log: set GLOBAL_LOG_LEVEL=DEBUG, restart, ask a question about a document, and search the log for the lines above.
  2. Check the reranking model: with Reranking Engine set to Default (SentenceTransformers), Reranking Model must be a Hugging Face model ID such as BAAI/bge-reranker-v2-m3, or a local path to one. Open WebUI loads it as a SentenceTransformers CrossEncoder, so an Ollama model tag does not work there.
  3. Check the external reranker: with Reranking Engine set to External, API Base URL must be the full rerank endpoint. Open WebUI posts JSON with model, query, documents and top_n, and reads results[].index and results[].relevance_score from the response. A chat completions or embeddings endpoint does not answer in that shape.
  4. Turn Hybrid Search off to isolate the problem. If retrieval improves or changes, the fault is in the hybrid or reranker setup, not in the embeddings.

19. The Same Question Retrieves Different Sources Each Time​

Asking the same question about the same files returns different sources or a different answer from one run to the next.

The Problem: with Retrieval Query Generation on (the default), the task model reads the conversation and writes the search queries, and those queries can change between runs. The chat shows them as chips under Querying while the response is generated.

  • If the task model's reply has no JSON object, the whole reply is used as one query.
  • If query generation fails, or Retrieval Query Generation is off, Open WebUI searches with your last message exactly as written.

Solutions:

  1. Compare the queries: open the status history of each response and check the chips under Querying.
  2. Turn off Retrieval Query Generation in Settings > Interface (admin section), under Generation, or set ENABLE_RETRIEVAL_QUERY_GENERATION=False. Retrieval then uses only your last message as is, so the same message searches the same way each time and a follow-up such as "what about the second one?" is searched with those words alone.
  3. Change the task model under Task Model in the Tasks section of the same page, if you keep query generation on. The queries come from that model, not from the chat model.

By optimizing these areas (extraction, embedding, retrieval, and model context) you can dramatically improve how accurately your LLM works with your documents.

This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.