Skip to content

Embedding model mismatch is never checked #1

Description

@flxhrdyn

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions