Modifying an embedder should not always recompute all the vectors #4615
Labels
experimental feature
Related to an experimental feature
performance
Related to the performance in term of search/indexation speed or RAM/CPU/Disk consumption
settings diff-indexing
Issues related to settings diff-indexing
Related product team resources: PRD (internal only)
Summary
This issue is a subset of the work implementing the settings diff-indexing enhancement.
When adding or changing an embedder, the whole vector store is erased to be recomputed totally during indexing.
It should be possible to avoid that erase and only compute/delete the modified data to save computing time.
Current implementation
When modifying the settings, the first step is to compute the changes in the embedding settings, in the current implementation, we erase the database if any changes imply any modification in the vector store.
Then later in the indexing process, the embeddings pipeline is ran if any changes has been made in the embeddings settings, this relies on the
InnerSettingsDiff
structure that should be enhanced to be able to compute more precisely the changes in the embedders.In this extraction pipeline, only the new settings are used, because the database is currently erased so no need to compute the old settings in order to remove a part of the data, but this pipeline should be reworked to support both settings versions.
TODO
SettingsDiff
structure and run extractions based on it #4480)apiKey
(for OpenAI models) should not trigger a reindexing operation of the modified embedder.documentTemplate
, a reindexing is necessary, but would be more minimal if comparing the rendered versions of both the old and the new template, and only regenerating embeddings for documents where the rendered version actually changed.distributionShift
: should not trigger a reindexing operation.distance
: needs reindexingRelated Benchmarks:
settings-add-embeddings.json
movies-subset-hf-embeddings.json
The text was updated successfully, but these errors were encountered: