Skip to content

Conversation

@pointerhacker
Copy link
Contributor

refactor: Check for embedding model consistency

This pull request introduces a check to ensure that the embedding model used during inference is consistent with the model used when creating the index.

Changes:

  • In enhanced_kt_retriever.py, the _load_node_embedding_cache method now checks for an embedding_model_info.json file and compares the model name.
  • In faiss_filter.py, the dimension transformation logic has been removed, and the build_indices method now checks for embedding_model_info.json and its consistency.
  • A new method _save_embedding_model_info has been added to save the embedding model name.

These changes prevent the use of inconsistent embeddings, which could lead to unexpected behavior.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant