[GH-ISSUE #9608] Vector Dimension Mismatch Error with mxbai-embed-large:335m in Qdrant Integration #15579

Closed
opened 2026-04-19 21:45:00 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @MatzeJoerling on GitHub (Feb 7, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/9608

Bug Report

Dear Developers,

First and foremost, I want to commend you on the exceptional software you've developed; it has been instrumental in ensuring my application's GDPR compliance, especially when interfacing with an AI-driven web chat.

I have configured the latest version of Open-WebUI to utilize the Qdrant vector database, employing nomic-embed-text as the Retrieval-Augmented Generation (RAG) embedding model. Given my requirements for German language support and multilingual capabilities, and having the necessary GPU resources, I opted to switch to mxbai-embed-large:335m.

After clearing my Qdrant database and uploading a new PDF to the RAG system, I observed that a new entry was created in the Qdrant documents. However, this entry possesses an embedding length of 1024, in contrast to the 768 dimensions associated with nomic-embed-text.

Installation Method

Portainer Stack with docker running on Nvidia Ubuntu Linux 22.04.
docker compose file with ollama, pipelines, postgres, redis, tika, qdrant and open-webui.

Environment

  • Open WebUI Version: [0.5.10]
  • Ollama: [0.5.7-0-ga420a45-dirty]
  • Qdrant: [1.13.2]
  • Docker: [ubuntu 22.04.5, Docker version 27.1.2, build d01f264]

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • [o] I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

Expected Behavior:

RAG / VectorDB delivers to correct data

Data is in VectorDB:
open-webui_file-7ac30036-60e8-4cac-90aa-a612536405c8 Status: green Points: 892 Segments: 8 Shards:_ 1 Vectors Configuration (Name, Size, Distance) default, 1024, Cosine

Actual Behavior:

Data is saved in VectorDB
WARNI [python_multipart.multipart] Skipping data after last boundary INFO [open_webui.routers.files] file.content_type: application/pdf INFO [open_webui.routers.retrieval] save_docs_to_vector_db: document EU_AI_Act.pdf file-7ac30036-60e8-4cac-90aa-a612536405c8 INFO [open_webui.routers.retrieval] adding to collection file-7ac30036-60e8-4cac-90aa-a612536405c8 collection open-webui_file-7ac30036-60e8-4cac-90aa-a612536405c8 successfully created!
Retrieval should be OK, but delivers a "Unexpected Response: 400 (Bad Request)"

Description

When querying the RAG i got:

ERROR [open_webui.retrieval.utils] Error when querying the collection: Unexpected Response: 400 (Bad Request)
Raw response content:
b'{"status":{"error":"Wrong input: Vector dimension error: expected dim: 768, got 1024"},"time":0.001576967}'
Traceback (most recent call last):
  File "/app/backend/open_webui/retrieval/utils.py", line 195, in query_collection
    result = query_doc(
             ^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/utils.py", line 84, in query_doc
    raise e
  File "/app/backend/open_webui/retrieval/utils.py", line 72, in query_doc
    result = VECTOR_DB_CLIENT.search(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backend/open_webui/retrieval/vector/dbs/qdrant.py", line 87, in search
    query_response = self.client.query_points(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_client.py", line 559, in query_points
    return self._client.query_points(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py", line 702, in query_points
    query_result = self.http.points_api.query_points(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api/points_api.py", line 1650, in query_points
    return self._build_for_query_points(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api/points_api.py", line 512, in _build_for_query_points
    return self.api_client.request(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 79, in request
    return self.send(request, type_)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 102, in send
    raise UnexpectedResponse.for_response(response)
qdrant_client.http.exceptions.UnexpectedResponse: Unexpected Response: 400 (Bad Request)
Raw response content:
b'{"status":{"error":"Wrong input: Vector dimension error: expected dim: 768, got 1024"},"time":0.001576967}'
Unexpected Response: 400 (Bad Request)
Raw response content:
b'{"status":{"error":"Wrong input: Vector dimension error: expected dim: 768, got 1024"},"time":0.001576967}'
INFO:     1.1.1.1:0 - "POST /api/v1/tasks/auto/completions HTTP/1.1" 200 OK

Bug Summary:
Size in VectorDB not determined correctly, saved with 1024 and queried with 768.

Reproduction Details

Steps to Reproduce:
No idea:
If it is a bug install the stack with qdrant and mxbai-embed-large:335m on ollama and add a Document to RAG.
else i am to ... to configure the size for dimension length when retrieving RAG data, tell me where i can config that size.

I appreciate your assistance in resolving this matter.

Warm regards,

Martin

Originally created by @MatzeJoerling on GitHub (Feb 7, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/9608 # Bug Report Dear Developers, First and foremost, I want to commend you on the exceptional software you've developed; it has been instrumental in ensuring my application's GDPR compliance, especially when interfacing with an AI-driven web chat. I have configured the latest version of Open-WebUI to utilize the Qdrant vector database, employing nomic-embed-text as the Retrieval-Augmented Generation (RAG) embedding model. Given my requirements for German language support and multilingual capabilities, and having the necessary GPU resources, I opted to switch to mxbai-embed-large:335m. After clearing my Qdrant database and uploading a new PDF to the RAG system, I observed that a new entry was created in the Qdrant documents. However, this entry possesses an embedding length of 1024, in contrast to the 768 dimensions associated with nomic-embed-text. ## Installation Method Portainer Stack with docker running on Nvidia Ubuntu Linux 22.04. docker compose file with ollama, pipelines, postgres, redis, tika, qdrant and open-webui. ## Environment - **Open WebUI Version:** [0.5.10] - **Ollama:** [0.5.7-0-ga420a45-dirty] - **Qdrant:** [1.13.2] - **Docker:** [ubuntu 22.04.5, Docker version 27.1.2, build d01f264] **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [o] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## Expected Behavior: RAG / VectorDB delivers to correct data Data is in VectorDB: ` open-webui_file-7ac30036-60e8-4cac-90aa-a612536405c8 Status: green Points: 892 Segments: 8 Shards:_ 1 Vectors Configuration (Name, Size, Distance) default, 1024, Cosine ` ## Actual Behavior: Data is saved in VectorDB ` WARNI [python_multipart.multipart] Skipping data after last boundary INFO [open_webui.routers.files] file.content_type: application/pdf INFO [open_webui.routers.retrieval] save_docs_to_vector_db: document EU_AI_Act.pdf file-7ac30036-60e8-4cac-90aa-a612536405c8 INFO [open_webui.routers.retrieval] adding to collection file-7ac30036-60e8-4cac-90aa-a612536405c8 collection open-webui_file-7ac30036-60e8-4cac-90aa-a612536405c8 successfully created! ` Retrieval should be OK, but delivers a "Unexpected Response: 400 (Bad Request)" ## Description When querying the RAG i got: ``` ERROR [open_webui.retrieval.utils] Error when querying the collection: Unexpected Response: 400 (Bad Request) Raw response content: b'{"status":{"error":"Wrong input: Vector dimension error: expected dim: 768, got 1024"},"time":0.001576967}' Traceback (most recent call last): File "/app/backend/open_webui/retrieval/utils.py", line 195, in query_collection result = query_doc( ^^^^^^^^^^ File "/app/backend/open_webui/retrieval/utils.py", line 84, in query_doc raise e File "/app/backend/open_webui/retrieval/utils.py", line 72, in query_doc result = VECTOR_DB_CLIENT.search( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/backend/open_webui/retrieval/vector/dbs/qdrant.py", line 87, in search query_response = self.client.query_points( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_client.py", line 559, in query_points return self._client.query_points( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/qdrant_client/qdrant_remote.py", line 702, in query_points query_result = self.http.points_api.query_points( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api/points_api.py", line 1650, in query_points return self._build_for_query_points( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api/points_api.py", line 512, in _build_for_query_points return self.api_client.request( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 79, in request return self.send(request, type_) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/qdrant_client/http/api_client.py", line 102, in send raise UnexpectedResponse.for_response(response) qdrant_client.http.exceptions.UnexpectedResponse: Unexpected Response: 400 (Bad Request) Raw response content: b'{"status":{"error":"Wrong input: Vector dimension error: expected dim: 768, got 1024"},"time":0.001576967}' Unexpected Response: 400 (Bad Request) Raw response content: b'{"status":{"error":"Wrong input: Vector dimension error: expected dim: 768, got 1024"},"time":0.001576967}' INFO: 1.1.1.1:0 - "POST /api/v1/tasks/auto/completions HTTP/1.1" 200 OK ``` **Bug Summary:** Size in VectorDB not determined correctly, saved with 1024 and queried with 768. ## Reproduction Details **Steps to Reproduce:** No idea: If it is a bug install the stack with qdrant and mxbai-embed-large:335m on ollama and add a Document to RAG. else i am to ... to configure the size for dimension length when retrieving RAG data, tell me where i can config that size. I appreciate your assistance in resolving this matter. Warm regards, Martin
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#15579