Configure Vector DB Writer and Reader Nodes in a Workflow
Vector DB Writer and Vector DB Reader nodes enable workflows to store and retrieve business knowledge using vector embeddings and semantic search. You can use these nodes to build Retrieval-Augmented Generation (RAG) workflows that capture, manage, and reuse enterprise knowledge across business processes. The Vector DB Writer node stores content in a vector index, and the Vector DB Reader node retrieves the most relevant content based on semantic similarity and optional metadata filters.
Operational Limits and Defaults
To ensure efficient vector operations, keep node entries within specified sizing and retrieval limits.
| Parameter | Recommendation |
|---|---|
| Document size per entry | 50 KB |
| Number of retrievals | 15 by default, consisting of 10 semantic retrievals and five text retrievals |
| Maximum results per read | Up to five |
Here are some sizing tips:
- Keep the number of retrievals to a minimal amount of relevant items.
- Don't store more than 500 objects per workflow and use strong metadata filters to improve precision.
- Apply a semantic match score threshold before using results. If the scores are low or have no value, implement a fallback path to a deterministic look-up or a human-in-the-loop intervention.
- Avoid noisy, raw, or sensitive data.
- Keep entries fresh with Upsert or Overwrite for updates and Delete for stale records.
Configure a Vector DB Writer Node
Vector DB writer node stores high-value knowledge as embeddings for future semantic retrieval. These nodes are also referred to as vector store nodes. You can use expressions to specify values for supported fields. For more information, see Expressions.
To configure a Vector DB Writer node:
- Go to AI Agent Studio.
- From the Workflows tab, edit a workflow and add a Vector DB Writer node to it.
- Enter a name. The code is automatically populated based on the name.
- Enter a description for the Vector DB Writer node.
- Select an error handler node to define failure handling.
- In the Operation Type list, select the operation to
perform on the vector index:
- Delete to remove an existing vector entry.
- Insert to create a new vector entry.
- Overwrite to replace an existing vector entry.
- Upsert to update an existing entry or create one if it doesn't already exist.
- In the Index Name field, specify the vector index where the content will be stored.
- In the Bulk Mode field, select Yes to enable uploading many documents in a single operation and improve ingestion performance, or select No to disable it.
- In the Content field, specify the text that must be converted into vector embeddings.
- In the Content Type field, specify the type of content being stored, such as text or JSON.
- In the Document ID field, specify a unique identifier for the document.
- In the Parent Object ID field, specify the identifier of the parent object that owns the document.
- In the Grandparent Object ID field, specify the identifier of the grandparent object in the record hierarchy.
- In the Properties field, enter a unique metadata property name, select its data type, enter the property value or use an expression for a dynamic value, and then select Apply. You can use these properties later to filter vector search results.
- Publish the workflow.
When the workflow runs, the Vector DB Writer node converts the specified content into vector embeddings and stores them in the selected vector index. Depending on the selected operation type, the node inserts, updates, overwrites, or deletes vector entries in the index. The stored content can later be retrieved by Vector DB Reader node.
Best Practices for Configuring Vector DB Writer Nodes
A vector store works best when you write clear, meaningful, metadata-rich knowledge while avoiding noise, duplication, and topic drift.
| Best Practice | Description |
|---|---|
| Store only public, reusable knowledge | Exclude sensitive, permission-controlled, or private information, for example, personally identifiable information (PII), credentials, confidential documents, or any information requiring permission checks. |
| Focus on durable, high-value content | Store information that will have long-term value for future workflows, such as case resolutions, structured summaries, or validated insights. Avoid writing noisy, one-off, or ephemeral content, like raw chat logs or temporary instructions. |
| Clean and normalize before writing | Always standardize content, summarize documents, deduplicate overlaps, remove irrelevant details, and attach key metadata. |
| Keep data up to date |
Vector DB writer must reflect the latest truth. Stale entries decrease accuracy and lead to incorrect answers.
|
| Follow smart update practices |
Update vectors in a controlled and intentional manner. Don't create more entries for each update, or store conflicting or outdated data.
|
| Always include rich metadata | Tag with business object IDs, product numbers, version information, and other searchable attributes. Use a consistent metadata schema across agents and indexes. |
| Prevent data pollution | Check for existing knowledge to avoid duplicates and inconsistent tags. Regularly remove low-value content. |
| Exclude business object data | Duplicating this data in vector memory creates noise, redundancy, and version drift. |
Configure a Vector DB Reader Node
Vector DB Reader nodes retrieve the most relevant knowledge using semantic similarity and metadata filters. You can use expressions to specify values for supported fields. For more information, see Expressions.
To configure a Vector DB Reader node:
- Go to AI Agent Studio.
- From the Workflows tab, edit a workflow and add a Vector DB Reader node to it.
- Enter a name. The code is automatically populated based on the name.
- Enter a description for the Vector DB Reader node.
- Select an error handler node to define failure handling.
- In the Index Name field, specify the vector index to search.
- In the Query field, specify the natural language query that describes the information to retrieve.
- In the Document ID field, specify the identifier of a document if you want to retrieve a specific vector entry.
- In the Parent Object ID field, specify the identifier of the parent object that owns the document.
- In the Grandparent Object ID field, optionally specify the identifier of the grandparent object in the record hierarchy.
- In the Data Fields field, specify the metadata fields that should be returned with the search results.
- In the Filter Criteria field, define metadata filters to narrow the search results before semantic ranking is performed.
- In the Maximum Results field, specify the maximum number of matching results to return.
- Review the predefined output schema for the selected artifact.
- Publish the workflow.
When the workflow runs, the Vector Read node performs a semantic search on the specified vector index. If filter criteria are specified, only vector entries that satisfy the filters are considered during retrieval. The node returns the highest-ranked results, which can be passed to downstream workflow nodes for further processing.
Best Practices for Configuring Vector Read Nodes
A vector read node works best when you write clear, specific queries that use metadata filters to ensure semantically correct responses, while preventing topic drift and hallucinations.
| Best Practice | Description |
|---|---|
|
Write clear, intent-driven queries |
Ensure queries are specific and aligned with the exact workflow or agent task. For example, use precise prompts like "What resolved similar issues?" instead of vague ones like "Help me with this." |
|
Use metadata filters for precision |
Apply filters (for example, entity type, business object ID, and product number) to target only relevant content. |
|
Validate retrieved results before using them |
Check metadata and context before trusting or using results in workflows. This validation prevents incorrect answers, silent workflow failures, and LLM hallucinations grounded in bad evidence. |
|
Set an appropriate |
Set the |
|
Add graceful fallback logic |
Implement backup steps, such as business objects or API lookups, to handle cases where queries return no results. |
|
Avoid broad or irrelevant retrieval |
Scope queries to just what’s needed. Skip irrelevant or noisy indexes to boost performance and accuracy of retrieved results. |