Upsert huge documents in a vector store

Adding documents to a Vector Database is easily done with n8n. But what happens if that data becomes outdated and needs to be replaced?

Vector databases have become an integral part of the AI world. It is often used for historical data. But what if you want to use a knowledge database or something similar (that changes regularly) in a RAG setup?

A simple hack for n8n allows upserting documents in a vector store. It also works dynamically for embeddings split into multiple chunks.

7 Likes

super cool Mario @octionic! Love those tricks to think about before hand to make sure our systems are future proof!

2 Likes

Link to the workflow template.

Very useful example and well explained! Thanks, @octionic.

3 Likes

Is it only works for Notion? Where ‘id’ come from in the metadata column?

The id comes from the first Notion node in the flow. You can replace it with whatever you like. It should only provide a unique identifier, like the id in this example.

1 Like