Record Managers
LangChain Record Manager Nodes
Last updated
LangChain Record Manager Nodes
Last updated
Record Managers keep track of your indexed documents, preventing duplicated vector embeddings in Vector Store.
When document chunks are upserting, each chunk will be hashed using SHA-1 algorithm. These hashes will get stored in Record Manager. If there is an existing hash, the embedding and upserting process will be skipped.
In some cases, you might want to delete existing documents that are derived from the same sources as the new documents being indexed. For that, there are 3 cleanup modes for Record Manager:
When you are upserting multiple documents, and you want to prevent deletion of the existing documents that are not part of the current upserting process, use Incremental Cleanup mode.
Let's have a Record Manager with Incremental
Cleanup and source
as SourceId Key
And have the following 2 documents:
Text | Metadata |
---|---|
Cat |
|
Dog |
|
After an upsert, we will see 2 documents that are upserted:
Now, if we delete the Dog document, and update Cat to Cats, we will now see the following:
The original Cat document is deleted
A new document with Cats is added
Dog document is left untouched
The remaining vector embeddings in Vector Store are Cats and Dog
Current available Record Manager nodes are:
SQLite
MySQL
PostgresQL