youtu-graphrag icon indicating copy to clipboard operation
youtu-graphrag copied to clipboard

# refactor: Check for embedding model consistency

Open pointerhacker opened this issue 3 months ago • 0 comments

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.

pointerhacker avatar Sep 19 '25 12:09 pointerhacker