Vector Store
Description
The Vector-Store component allows interaction with a vector store. The Add and Search operations are available if at least one LLM integration with embedding models (Google AI Gemini, MistralAI, OpenAI, or an OpenAI-compatible server with embedding models listed) is configured in the Integrations view (Designer side menu); Truncate is always available. It allows users to add, search and truncate the vector store based on the Operation parameter:
- The
Addoperation uses the selected LLM embedding model to convert provided text document ("content") to the embedding vector and stores the text and the vector in the vector store. - The
Searchoperation searches for text documents which are close to the provided text. - The
Truncateoperation removes all previously added embedding vectors and associated texts.
Parameters and configuration
| Name | Description |
|---|---|
| Vector store | The vector store instance to use; configure Qdrant or Weaviate integration to use this component. See also Additional considerations section for additional information. |
| Operation | Operation to perform. |
| LLM integration | Add and Search operations only - LLM integration to use |
| Collection | Some vector stores allow dividing its space into separate collections. This parameter is available only if selected vector store supports collections. |
| Embedding model name | Add and Search operations only - the embedding model to use when adding or searching embeddings. The list shows the embedding models selected in the LLM integration. Add model IDs in the integration and save it. In explicit mode a model expression must resolve during compilation to a selected ID; event variables such as #input are unavailable. Older integrations keep their previous model-list and validation behavior until their model selection is edited. Search must use the same model as the Add that stored the documents, because vectors from different models do not match. |
| Content | Add and Search operations only - text document to use as the basis of the Add or Search. |
| Max results | Search operation only - upper boundary of number of text documents to return. A value below 1 fails the event. |
| Metadata | Add operation - metadata to be put in the vector store together with vector and text document. Provided metadata will be available in results returned from the vector store after performing the Search operation. Metadata must be in a form of string to string map. |
| Output variable name | Variable name under which node result will be available in a subsequent nodes. |
Returned value
The return value will be stored in the user defined variable (see above) and depends on the operation performed
| Operation | Returned value |
|---|---|
Add | id of the stored embedding |
Search | List of records, each containing: - "content" - the text document which was stored as an embedding vector - "metadata" - the metadata associated with the stored document - "score" - the similarity score indicating how close the result is to the query |
Truncate | For this operation the value is not deterministic. |
Additional considerations
Add/Truncateoperations are also performed when testing scenarios on the selected vector store.- For testing purposes the “in-memory” vector store is provided. The "in-memory" vector store is not durable or accessible outside the Nussknacker Cloud and therefore should not be used for scenarios running in production. Each running process, such as a Flink task manager, keeps its own copy: other processes do not see its documents, and
Truncateempties it for every node of the scenario in that process. - The vector length used by the vector store collection must be of the same length as the vector length produced by embedding model (e.g., 1024 for mistral-embed model).
- Nussknacker does not create collections in a vector store. If needed it must be created before using it from a scenario.
Metrics
The calls the Add and Search operations make to the embedding model are reported in the scenario's metrics,
tagged with nodeId, component, operation (add or search), integration, provider and model:
| Metric | What it counts |
|---|---|
embedding.tokens | Input tokens, where the provider reports them. |
embedding.calls | Calls to the embedding model, failed ones included. |
embedding.errors | Failed calls, by error (the exception class). |
embedding.latency | Time of a single call, failed ones included. |
Embedding model options come from the selected AI integration. New integrations offer only their saved embedding models, also when the provider catalog is unavailable. In explicit mode a model expression must resolve during compilation to a selected ID; event variables are unavailable. Add or remove IDs in the integration; removing a model does not rewrite existing nodes or running deployments. Older integrations keep their previous model lists and validation until their model selections are edited; legacy Bedrock entries keep the two Nova choices without contacting AWS.