File: backend/app/index_data.py:257-268
The Qdrant collection's dimension/model is only set once, at first-ever index.
There is no check that the current EMBEDDING_MODEL config still matches the model that created the existing collection.
Failure scenario: Change INVENIOAI_EMBEDDING_MODEL and upload a new PDF without clearing the collection.
If dimensions differ, the upsert crashes.
If dimensions coincidentally match but the model differs, old and new vectors silently live in incompatible embedding spaces in the same collection, degrading and poisoning retrieval quality with no error at all.
See docs/rag-audit-findings.md (item 1).
File:
backend/app/index_data.py:257-268The Qdrant collection's dimension/model is only set once, at first-ever index.
There is no check that the current
EMBEDDING_MODELconfig still matches the model that created the existing collection.Failure scenario: Change
INVENIOAI_EMBEDDING_MODELand upload a new PDF without clearing the collection.If dimensions differ, the upsert crashes.
If dimensions coincidentally match but the model differs, old and new vectors silently live in incompatible embedding spaces in the same collection, degrading and poisoning retrieval quality with no error at all.
See
docs/rag-audit-findings.md(item 1).