In n8n, vector stores can be used to store data, embedded into vectors. You can use it for retrieving similar documents / computing similarity of documents.
You can use the following options:
- Simple Vector store (n8n official, but only for development)
- Qdrant
- Pinecone
- Supabase vectors
- pgVector (Postgresql)
All vector stores have two requirements, which must be connected
- Embedding input
- Document input
For more on the theoretic side, see Embeddings & vectorization and Vector databases
When to use vector stores
Vector stores are an overkill sometimes. Some guidelines:
- Vector stores depend on embeddings - be aware of costs
- Useful for growing corpus of data or the same corpus of data
- Useful when performing multiple operations, such as semantic search etc.
Etc.
The source of the simple vector store node in n8n: https://github.com/n8n-io/n8n/blob/master/packages/%40n8n/nodes-langchain/nodes/vector_store/VectorStoreInMemory/VectorStoreInMemory.node.ts