Faiss Vector Store
Overview
The Faiss Vector Store node in AnswerAI allows you to store and retrieve high-dimensional vectors efficiently using the Faiss library developed by Meta. This node is particularly useful for similarity search operations on large datasets of embedded documents.
Key Benefits
- Fast and efficient similarity search on large datasets
- Seamless integration with other AnswerAI components
- Supports both document storage and retrieval operations
How to Use
-
Add the Faiss Vector Store node to your AnswerAI canvas.
-
Connect the required input nodes:
- Document: (Optional) Connect a Document node if you want to add new documents to the vector store.
- Embeddings: Connect an Embeddings node to provide the embedding model for vectorizing the documents.
- Base Path: Specify the file path where the Faiss index will be saved or loaded from.
-
Configure the node:
- Top K: (Optional) Set the number of top results to fetch during similarity search. Default is 4.
-
Connect the output to other nodes in your workflow:
- Faiss Retriever: Use this output for document retrieval operations.
- Faiss Vector Store: Use this output for direct access to the vector store.
Tips and Best Practices
- Ensure that the Base Path is set to a directory where you have write permissions.
- When using the Faiss Vector Store for the first time, provide Document input to create and populate the index.
- For subsequent uses, you can load an existing index by providing only the Base Path and Embeddings inputs.
- Adjust the Top K value based on your specific use case and the size of your document collection.
Troubleshooting
- If you encounter an error related to the Faiss index, ensure that the Base Path is correct and that the directory exists.
- If the similarity search returns fewer results than expected, check if the Top K value is set appropriately and if your index contains enough documents.
- In case of "illegal invocation" errors, make sure you're using the latest version of AnswerAI, as this issue has been addressed in recent updates.