paper-qa icon indicating copy to clipboard operation
paper-qa copied to clipboard

Bug: changing embedding model doesn't invalidate `Text`s

Open jamesbraza opened this issue 1 year ago • 0 comments

As of v5.2, let's say we:

  1. Create a Docs object, and use it to gather evidence, which populates embeddings in Texts
  2. Change the embedding model
  3. What can happen next? Our Texts will have embeddings with an old model
    • Best case: new embedding model is compatible with old one --> life is good
    • General case: new embedding model has a different shape --> crash with shape error
    • Worse case: new embedding model is incompatible but uses the same shape, so prior embeddings will just be nonsense --> poor performance

We should couple the Text.embeddings to the embedding_model somehow to eliminate this risk

jamesbraza avatar Oct 18 '24 19:10 jamesbraza