mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-21 17:13:00 -05:00
[GH-ISSUE #24431] issue: Qdrant – deleted memory points not removed from vector DB, causing stale data in RAG #107294
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 @jomauso on GitHub (May 7, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/24431
Check Existing Issues
Installation Method
Docker
Open WebUI Version
0.9.2
Ollama Version (if applicable)
No response
Operating System
Ubuntu 24.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
When deleting a memory via the UI, model tool call or API:
Actual Behavior
This means deleted memories remain accessible to the assistant and can appear in responses even though users explicitly deleted them. Only "Delete All Memories" works correctly because it drops the entire Qdrant collection.
Steps to Reproduce
Logs & Screenshots
I can provide on request:
Note: This requires direct database access to demonstrate, which is why I'm including the technical analysis below.
Additional Information
Technical Analysis: (I'm not a developer but analyzed this with AI assistance by reviewing the Open WebUI source code)
The bug appears to be in: backend/open_webui/retrieval/vector/dbs/qdrant.py, method delete() (lines 157-175)
Current implementation deletes points via a payload filter on metadata.id instead of using direct point ID deletion. If the metadata field is missing, not indexed, or Qdrant's index is stale, the delete operation silently affects 0 points while the API returns success.
Proposed Fix: Use Qdrant's PointIdsList for direct ID-based deletion:
if ids:
return self.client.delete(
collection_name=f'{self.collection_prefix}_{collection_name}',
points_selector=models.PointIdsList(points=ids), # Direct ID deletion
)
Environment:
This has data integrity implications as deleted personal/company information remains accessible via RAG.
@owui-terminator[bot] commented on GitHub (May 7, 2026):
🔍 Related Issues Found
I found some existing issues that might be related. Please check if any of these are duplicates or contain helpful solutions:
🟣 #20558 issue: RAG Knowledge file when modify/update, older data is available
This is closely related because it reports stale RAG data remaining after a knowledge source is modified, which is the same class of bug: old vector-store entries are not removed/overwritten and continue to appear in retrieval results.
by n4gY1 ·
bug🟢 #24142 issue: Knowledge collection (selected via #) disappears after page reload / chat switch
This is related to the broader knowledge/RAG attachment lifecycle in chats. While it is about attachment persistence rather than deletion, it concerns the same retrieval/knowledge subsystem and may share state-management or indexing issues.
by taka817123 ·
bug💡 If your issue is a duplicate, please close it and add any additional details to the existing issue instead.
This comment was generated automatically. React with 👍 if helpful, 👎 if not.
@Classic298 commented on GitHub (May 7, 2026):
Fiftieth duplicate or so - and non-deletion from the Vector DB is currently intended behaviour due to data retention
solution: https://github.com/Classic298/prune-open-webui