pgvector

Vector Database integration · 12 node(s).

00Overview

Store and query embeddings in a PostgreSQL database with the pgvector extension

Every field below is exactly what you see in the Flomation editor. Fields marked ● live picker let you choose from a list pulled live from your account — no IDs to look up.

01Connecting pgvector

Add your credentials as a Flomation environment secret, then pick them in each node. The connection fields are:

FieldTypeDetails
PasswordsecretRequiredDatabase password
Database HoststringRequireddb.example.com or 192.168.1.20 — hostname or IP, no scheme
Portinteger5432
UsernamestringRequiredpostgres
Embedding API Keysecret
Embedding Base URLstringhttp://ollama.internal:11434 — Azure OpenAI: https://my-resource.openai.azure.com
AWS Access Key IDsecret
AWS Secret Access Keysecret
i
Pick an Environment on your flow (Flow Settings → Environment) so the secret resolves. Secret fields never show the value — they reference ${secrets.your_secret}.

02Document

Count Documents

vectordatabase/pgvector/document_count · Action

Count the documents in the store, with an optional metadata filter

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments
Metadata ColumnstringLeave blank to work it out from the table
Metadata Filterkey_value_arrayOnly count documents whose metadata matches every pair
Advanced Metadata Filter (JSON)object{"source": {"eq": "handbook"}, "page": {"gt": 3}}
CollectionstringOptional — a named sub-set of the table to work within
Collection Tablestringflomation_vector_collections — where collection names are recorded

Returns: count, result, tool_result, success, error

Delete Documents

vectordatabase/pgvector/document_delete · Action

Remove documents by ID or by a metadata filter

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments
ID ColumnstringLeave blank to work it out from the table
Content ColumnstringLeave blank to work it out from the table
Metadata ColumnstringLeave blank to work it out from the table
Embedding ColumnstringLeave blank to work it out from the table
Deletestringchoices: Documents with these IDs, Documents matching a metadata filter
Document IDsstringOne or more IDs, comma-separated — or a JSON array
Metadata Filterkey_value_arrayOnly documents whose metadata matches every pair are deleted
Advanced Metadata Filter (JSON)object{"source": {"eq": "handbook"}, "page": {"gt": 3}}
CollectionstringOptional — restrict the delete to one named collection
Collection Tablestringflomation_vector_collections — where collection names are recorded
I understand this permanently deletes databooleanRequiredDeleted documents cannot be recovered. Tick to allow, or bind a variable such as ${var.approved}

Returns: deleted, result, tool_result, success, error

Get Document

vectordatabase/pgvector/document_get · Action

Fetch a single document by its ID

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments
ID ColumnstringLeave empty to work it out — the primary key, or a column called "id"
Content ColumnstringLeave empty to work it out — text, content, document…
Metadata ColumnstringLeave empty to work it out — metadata, meta…
Embedding ColumnstringLeave empty to work it out — the table's vector column
Document IDstringRequiredThe ID of the document to fetch
Include the raw embeddingbooleanOff by default — an embedding is thousands of numbers and is rarely wanted downstream

Returns: id, content, metadata, embedding, found, result, tool_result, success, error

Insert Documents

vectordatabase/pgvector/document_insert · Action

Add documents to the vector store, embedding the text automatically

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments
ID ColumnstringLeave empty to work it out from the table
Content ColumnstringLeave empty to work it out from the table
Metadata ColumnstringLeave empty to work it out from the table
Embedding ColumnstringLeave empty to work it out from the table
Embedding SourcestringRequiredchoices: Embed the text for me, Use a vector from a previous step
Embedding VectorobjectPick the Embedding output of an Embed Text step
Embedding ProviderstringRequiredchoices: OpenAI, OpenAI-compatible (Azure, vLLM, LocalAI, TEI…), Azure OpenAI, Ollama (self-hosted), AWS Bedrock (Titan)
API Versionstring2024-10-21
AWS Regionstringus-east-1
Embedding Modelcomboboxtext-embedding-3-small — choices: OpenAI text-embedding-3-small (1536 dimensions), OpenAI text-embedding-3-large (3072 dimensions), OpenAI text-embedding-ada-002 (1536 dimensions), Bedrock Titan Text v2 (1024 dimensions), Bedrock Titan Text v1 (1536 dimensions), Ollama nomic-embed-text (768 dimensions), Ollama mxbai-embed-large (1024 dimensions)
DimensionsintegerLeave empty for the model's default — must match the table
ContenttextThe document text to store and make searchable
Metadata (JSON)object{"source": "handbook.pdf", "page": 3}
IDstringLeave empty to let the database generate one
Documents (JSON array)objectBulk insert: [{"content": "…", "metadata": {…}, "id": "…", "embedding": […]}] — overrides the single Content field above
Chunk Size (characters)integer0 = store the document whole. Set e.g. 1000 to split long text into overlapping chunks
Chunk Overlap (characters)integerCharacters of overlap between chunks — only used when Chunk Size is set
Create the table if it doesn't existbooleanOff by default: a typo in the table name would otherwise build a second, empty table
CollectionstringOptional — tag these documents as part of a named collection within the table
Collection Tablestringflomation_vector_collections — where collection names are recorded

Returns: ids, id, count, chunks, result, tool_result, success, error

List Documents

vectordatabase/pgvector/document_list · Action

Browse the documents in the store, with an optional metadata filter

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments
ID ColumnstringLeave blank to detect it automatically
Content ColumnstringLeave blank to detect it automatically
Metadata ColumnstringLeave blank to detect it automatically
Embedding ColumnstringLeave blank to detect it automatically
Metadata Filterkey_value_arrayOnly show documents whose metadata matches every pair, e.g. source = handbook
Advanced Metadata Filter (JSON)object{"page": {"gt": 3}, "tag": {"in": ["policy","hr"]}}
LimitintegerDocuments to show (default 50, max 1000)
OffsetintegerSkip this many documents first (default 0)
Sort BystringLeave empty to sort by ID
Sort Directionstringchoices: Ascending, Descending
Include EmbeddingsbooleanReturn the raw vectors too — thousands of numbers per document
Fetch every matching documentbooleanPage through the whole table instead of one page
CollectionstringOptional — a named sub-set of the table to list within
Collection Tablestringflomation_vector_collections — where collection names are recorded

Returns: results, count, total, result, tool_result, success, error

vectordatabase/pgvector/document_search · Action

Find the documents most similar in meaning to a query

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments
ID ColumnstringLeave empty to work it out from the table
Content ColumnstringLeave empty to work it out from the table
Metadata ColumnstringLeave empty to work it out from the table
Embedding ColumnstringLeave empty to work it out from the table
Embedding SourcestringRequiredchoices: Embed the text for me, Use a vector from a previous step
Embedding VectorobjectPick the Embedding output of an Embed Text step
Embedding ProviderstringRequiredchoices: OpenAI, OpenAI-compatible (Azure, vLLM, LocalAI, TEI…), Azure OpenAI, Ollama (self-hosted), AWS Bedrock (Titan)
API Versionstring2024-10-21
AWS Regionstringus-east-1
Embedding Modelcomboboxtext-embedding-3-small — choices: OpenAI text-embedding-3-small (1536 dimensions), OpenAI text-embedding-3-large (3072 dimensions), OpenAI text-embedding-ada-002 (1536 dimensions), Bedrock Titan Text v2 (1024 dimensions), Bedrock Titan Text v1 (1536 dimensions), Ollama nomic-embed-text (768 dimensions), Ollama mxbai-embed-large (1024 dimensions)
DimensionsintegerLeave empty for the model's default — must match the table
Search QuerytextWhat are you looking for? e.g. "how do I reset a password"
Number of Resultsinteger4
Distance Metricstringcosine — choices: Cosine — best for text embeddings, Inner Product, Euclidean (L2)
Minimum Scorestring0.0–1.0. Leave empty for no minimum. 0.7 is a good starting point for cosine
Metadata Filterkey_value_arrayOnly search documents whose metadata matches
Advanced Metadata Filter (JSON)object{"page": {"gt": 3}, "tag": {"in": ["a","b"]}}
Include MetadatabooleanReturn each document's metadata alongside its text
Include EmbeddingsbooleanReturn the raw embeddings too — usually not needed and very large
HNSW ef_searchintegerLeave empty for the server default. Higher = better recall, slower
CollectionstringOptional — a named sub-set of the table to search within
Collection Tablestringflomation_vector_collections — where collection names are recorded

Returns: results, count, top_result, context, tool_result, success, error

Update Document

vectordatabase/pgvector/document_update · Action

Change a document's text or metadata, re-embedding it automatically

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments
ID ColumnstringLeave empty to work it out automatically
Content ColumnstringLeave empty to work it out automatically
Metadata ColumnstringLeave empty to work it out automatically
Embedding ColumnstringLeave empty to work it out automatically
Embedding SourcestringRequiredchoices: Embed the text for me, Use a vector from a previous step
Embedding VectorobjectPick the Embedding output of an Embed Text step
Embedding ProviderstringRequiredchoices: OpenAI, OpenAI-compatible (Azure, vLLM, LocalAI, TEI…), Azure OpenAI, Ollama (self-hosted), AWS Bedrock (Titan)
API Versionstring2024-10-21
AWS Regionstringus-east-1
Embedding Modelcomboboxtext-embedding-3-small — choices: OpenAI text-embedding-3-small (1536 dimensions), OpenAI text-embedding-3-large (3072 dimensions), OpenAI text-embedding-ada-002 (1536 dimensions), Bedrock Titan Text v2 (1024 dimensions), Bedrock Titan Text v1 (1536 dimensions), Ollama nomic-embed-text (768 dimensions), Ollama mxbai-embed-large (1024 dimensions)
DimensionsintegerLeave empty for the model's default — must match the table
Document IDstringRequired
New ContenttextLeave empty to keep the current text
Metadata (JSON)object{"reviewed": true}
Merge into the existing metadata rather than replacing itboolean
Re-generate the embedding from the new textboolean

Returns: id, updated, result, tool_result, success, error

Upsert Documents

vectordatabase/pgvector/document_upsert · Action

Insert documents, or overwrite them if they already exist

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments
ID ColumnstringLeave empty to work it out from the table
Content ColumnstringLeave empty to work it out from the table
Metadata ColumnstringLeave empty to work it out from the table
Embedding ColumnstringLeave empty to work it out from the table
Embedding SourcestringRequiredchoices: Embed the text for me, Use a vector from a previous step
Embedding VectorobjectPick the Embedding output of an Embed Text step
Embedding ProviderstringRequiredchoices: OpenAI, OpenAI-compatible (Azure, vLLM, LocalAI, TEI…), Azure OpenAI, Ollama (self-hosted), AWS Bedrock (Titan)
API Versionstring2024-10-21
AWS Regionstringus-east-1
Embedding Modelcomboboxtext-embedding-3-small — choices: OpenAI text-embedding-3-small (1536 dimensions), OpenAI text-embedding-3-large (3072 dimensions), OpenAI text-embedding-ada-002 (1536 dimensions), Bedrock Titan Text v2 (1024 dimensions), Bedrock Titan Text v1 (1536 dimensions), Ollama nomic-embed-text (768 dimensions), Ollama mxbai-embed-large (1024 dimensions)
DimensionsintegerLeave empty for the model's default — must match the table
ContenttextThe document text to store
Metadata (JSON)object{"source": "handbook", "page": 3}
IDstringThe document's ID — the same ID next time overwrites this document
Documents (JSON list)object[{"id": "doc-1", "content": "…", "metadata": {"source": "handbook"}}] — upsert many at once, instead of Content above
Chunk SizeintegerSplit long text into pieces of this many characters — leave empty to store it whole
Chunk OverlapintegerCharacters each piece repeats from the one before, e.g. 200
Match Existing Documents Bystringchoices: ID, A metadata field
Metadata Fieldstringexternal_id — needs a unique index on (metadata->>'external_id')
CollectionstringOptional — tag these documents as part of a named collection within the table
Collection Tablestringflomation_vector_collections — where collection names are recorded

Returns: ids, count, result, tool_result, success, error

03Hybrid

vectordatabase/pgvector/hybrid_search · Action

Combine meaning-based and keyword search, so exact terms and product codes are not missed

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments
ID ColumnstringLeave empty to work it out from the table
Content ColumnstringLeave empty to work it out from the table
Metadata ColumnstringLeave empty to work it out from the table
Embedding ColumnstringLeave empty to work it out from the table
Embedding SourcestringRequiredchoices: Embed the text for me, Use a vector from a previous step
Embedding VectorobjectPick the Embedding output of an Embed Text step
Embedding ProviderstringRequiredchoices: OpenAI, OpenAI-compatible (Azure, vLLM, LocalAI, TEI…), Azure OpenAI, Ollama (self-hosted), AWS Bedrock (Titan)
API Versionstring2024-10-21
AWS Regionstringus-east-1
Embedding Modelcomboboxtext-embedding-3-small — choices: OpenAI text-embedding-3-small (1536 dimensions), OpenAI text-embedding-3-large (3072 dimensions), OpenAI text-embedding-ada-002 (1536 dimensions), Bedrock Titan Text v2 (1024 dimensions), Bedrock Titan Text v1 (1536 dimensions), Ollama nomic-embed-text (768 dimensions), Ollama mxbai-embed-large (1024 dimensions)
DimensionsintegerLeave empty for the model's default — must match the table
Search QuerytextWhat are you looking for? e.g. my parcel never arrived
Keyword QuerytextLeave empty to use the Search Query above
Number of Resultsinteger10
Distance Metricstringcosine — choices: Cosine — best for text embeddings, Inner Product, Euclidean (L2)
Text Search Languagestringenglish
Fusion Constant (k)integerReciprocal Rank Fusion constant — 60 is the standard
Candidates Per SearchintegerHow many candidates each search contributes before they're fused
Indexed Text ColumnstringLeave empty to search the content column directly. Set this to a generated tsvector column for a much faster keyword search
Metadata Filterkey_value_arrayOnly search documents whose metadata matches, e.g. source = handbook
Advanced Metadata Filter (JSON)text{"page": {"gt": 3}, "tag": {"in": ["a","b"]}}
Include Metadataboolean
Include EmbeddingsbooleanReturn the stored vector with each result — large, and rarely needed

Returns: results, count, top_result, context, tool_result, success, error

04Index

Create Search Index

vectordatabase/pgvector/index_create · Action

Add an approximate-nearest-neighbour index so similarity search stays fast as the table grows

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments
Embedding ColumnstringLeave blank to work it out from the table — set it if the table holds nothing but embeddings
Index Typestringchoices: HNSW — best recall, slower to build, IVFFlat — faster to build, needs data present
Distance MetricstringMust match the metric your searches use, or they can't use the index — choices: Cosine — best for text embeddings, Inner Product, Euclidean (L2)
HNSW: Links per Row (m)integer16 — higher means better recall, a bigger index and a slower build
HNSW: Build Effort (ef_construction)integer64 — higher means a slower build and better recall (at least twice m)
IVFFlat: Listsinteger100 — roughly rows ÷ 1000 for tables up to a million rows
Build without locking the tablebooleanInserts and updates keep working while the index builds, but the build takes longer
Update Table StatisticsbooleanRun ANALYZE afterwards so Postgres starts using the new index (recommended)

Returns: index_name, created, result, tool_result, success, error

05Table

Create Vector Table

vectordatabase/pgvector/table_create · Action

Create a table that stores documents and their embeddings, with the index that makes search fast

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequiredmy_documents
Embedding DimensionsintegerRequired1536 for OpenAI text-embedding-3-small, 1024 for Bedrock Titan v2
ID Columnstringid
Content Columnstringtext
Metadata Columnstringmetadata
Embedding Columnstringembedding
Create the pgvector extension if it's missingbooleanOn by default — needs a database user that can install extensions
Create a search indexbooleanOn by default — without it every search reads the whole table
Index Typestringnsw — choices: HNSW — fastest searches, slower to build, IVFFlat — quicker to build, needs data to be loaded first
Distance Metricstringcosine — choices: Cosine — best for text embeddings, Inner Product, Euclidean (L2)
Also index the text for keyword searchbooleanLets Hybrid Search match on exact words as well as meaning

Returns: table, created, dimensions, index_name, result, tool_result, success, error

Inspect Vector Table

vectordatabase/pgvector/table_info · Action

See a table's columns, embedding dimensions, indexes and row count

FieldTypeDetails
DatabasestringRequiredvectordb
SSL Modestringisable — choices: Disable — no encryption, Allow, Prefer — encrypt if the server offers it, Require — encrypt, but don't verify the certificate, Verify CA — encrypt and check the certificate authority, Verify Full — encrypt and check the hostname too
Schemastringpublic
TablestringRequireddocuments

Returns: columns, vector_column, content_column, metadata_column, id_column, dimensions, row_count, indexes, extension_installed, table_size, has_vector_index, result, tool_result, success, error

06Notes & Limitations

Behaviours and constraints worth knowing before you build with these nodes.