paper-qa
paper-qa copied to clipboard
Bug: changing embedding model doesn't invalidate `Text`s
As of v5.2, let's say we:
- Create a
Docsobject, and use it to gather evidence, which populatesembeddingsinTexts - Change the embedding model
- 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