Upstash Vector Store
Overview
The Upstash Vector Store node allows you to store and retrieve vector embeddings using Upstash, a serverless data platform. This feature enables efficient similarity searches and management of high-dimensional numerical vectors.
Key Benefits
- Serverless vector database for easy scalability
- Fast similarity searches for improved query performance
- Seamless integration with AnswerAI workflows
How to Use
Prerequisites
-
Sign up or sign in to the Upstash Console
-
Navigate to the Vector page and click Create Index
-
Configure and create the index:
- Index Name: Choose a name for your index (e.g., "answerai-upstash-demo")
- Dimensions: Set the size of the vectors to be inserted (e.g., 1536)
- Embedding Model: (Optional) Select a model from Upstash Embeddings
Setup in AnswerAI
-
Obtain your index credentials from the Upstash Console
-
In AnswerAI, create a new Upstash Vector credential:
- Enter the Upstash Vector REST URL (UPSTASH_VECTOR_REST_URL)
- Enter the Upstash Vector REST Token (UPSTASH_VECTOR_REST_TOKEN)
-
Add a new Upstash Vector node to your canvas
-
Connect additional nodes to the Upstash Vector node:
- Connect a Document Loader node to provide input documents
- Connect an Embeddings node to generate vector embeddings
-
Configure the Upstash Vector node:
- Select the Upstash Vector credential you created earlier
- (Optional) Set a metadata filter to refine your searches
- (Optional) Adjust the Top K value to specify the number of results to retrieve
-
Run your workflow to start the upsert process and store your vectors
-
Verify data storage in the Upstash dashboard
Tips and Best Practices
- Choose an appropriate dimension size for your vectors based on your embedding model and use case
- Use metadata filters to organize and retrieve specific subsets of your data
- Regularly monitor your Upstash usage to optimize performance and costs
- Consider using the optional Embedding Model feature in Upstash for simplified vector generation
Troubleshooting
- Connection issues: Ensure your Upstash Vector REST URL and Token are correctly entered in the AnswerAI credential
- Indexing errors: Verify that your document format and embedding dimensions match the Upstash index configuration
- Slow performance: Check your network connection and consider optimizing your vector dimensions or index size
If problems persist, consult the Upstash documentation or contact AnswerAI support for assistance.