Vector Store Reader
Efficiently retrieve search results from your vector store.
What is the Vector Store Reader?

The Vector Store Reader is designed to fetch a specified number of search results from a vector store using a provided prompt. This node is particularly useful for applications that require semantic search capabilities, such as information retrieval systems, recommendation engines, and AI-driven content matching.
How to use it?
Follow these steps to set up and use the Vector Store Reader, for being able to use that workflow you need to make sure that there is data in your Vector Store e.g. by having a second graph which writes the data to the Vector Store:
-
Add the Vector Store Reader:
- Drag and drop the Vector Store Reader from the 'Knowledge' category onto your workflow canvas.
-
Configure the Number of Search Results:
- In the 'Number of Search Results' input field, enter the number of results you want to retrieve. The default value is 5.
-
Configure the Search Type:
- In the 'Search Type' selection field, select 'text' or 'image.
-
Connect to a Vector Store:
- Ensure you have a Vector Store, with all the required inputs set up in your workflow.
- Connect the 'Vector Store' output anchor of your Vector Store to the 'Vector Store' input anchor of the Vector Store Reader.
-
Provide a Prompt or an Image:
- Use a node that outputs a string (e.g., a Text Input) to generate a prompt if you selected 'text' as input type.
- Connect the output anchor (e.g., 'Text') of the prompt-generating node to the 'Prompt' input anchor of the Vector Store Reader.
- Use a node that outputs a image file (e.g. API Action) and connect it with the 'Image' input anchor of the Vector Store Reader.
-
Retrieve and Use the Results:
- The Vector Store Reader will output the search results as a string or a JSON.
- Connect the 'Output' anchor of the Vector Store Reader to any downstream node that can process results (e.g., Output, LLM).
Example of usage
Let’s create a simple workflow to demonstrate how to use the Vector Store Reader:
Example Task: Retrieving Relevant Articles
Objective: Retrieve relevant articles from a vector store based on a user-defined query.
Step-by-Step Setup:
-
- Add a Text Input to your canvas.
- Configure it with a prompt like "What is the meaning of live?"
-
- Add a Opensearch Client and configure it.
-
Embedder:
- Add an Embedder (e.g. OpenAI Embedder) and configure it.
-
- Add a Vector Store and configure it to connect it with your Embedder and Opensearch Client.
-
Vector Store Reader:
- Add the Vector Store Reader.
- Set 'Number of Search Results' to 3 for demonstration purposes.
- Connect the 'Vector Store' output of the Vector Store to the 'Vector Store' input of the Vector Store Reader.
- Connect the 'Text' output of the Text Input to the 'Prompt' input of the Vector Store Reader.
-
- Add an Output to display the search results.
- Connect the 'Text' output of the Vector Store Reader to the 'Output' input of the Output.

The Complete Workflow:
- User provides a search query via the Text Input.
- The query is passed to the Vector Store Reader.
- The Vector Store Reader retrieves the top 3 relevant articles from the vector store.
- The results are displayed through the Output.
Additional Information
- Permissions: Ensure that the vector store and any related nodes have appropriate permissions to read and write data.
- Prompt Tips: Crafting a precise and clear prompt can significantly enhance the quality of search results. For example, instead of "articles," use "recent articles on AI advancements."
By following these steps, you can effectively utilize the Vector Store Reader to retrieve and display relevant search results from your vector store, enhancing your application's search capabilities and user experience.