EDB Knowledge Base v1.4.0 (LTS)

The EDB Knowledge Base component runs a semantic similarity search against an existing AIDB knowledge base in a Hybrid Manager (HM) cluster, with optional structured filtering on the knowledge base's source-table columns.

Choosing the right component

Use the EDB Knowledge Base component when:

  • You're building a RAG flow that retrieves relevant passages by similarity before passing them to a generation step.
  • You want an agent tool that looks up information in a knowledge base on demand. The component is tool-mode compatible.
  • You want hybrid search: semantic ranking combined with a structured filter on the knowledge base's source-table columns.

Use a different component if:

  • You need to manage pgvector index structure (create, drop, rebuild HNSW or IVFFlat indexes) on an existing vector column. Use EDB Vector Index.
  • You need direct SQL access to a database, not similarity search. Use EDB Database.
  • The knowledge base doesn't exist yet. Create one through Pipeline Designer or by calling aidb.create_table_knowledge_base() against the cluster.

Prerequisites

  • The Project Viewer role on the project that owns the cluster:

    • Project > Users > Assign Project Roles > Project Viewer.
  • An HM cluster with at least one AIDB knowledge base. Create one through Pipeline Designer or directly via aidb.create_table_knowledge_base(). The knowledge base's source can be a table (filtering supported) or a volume (semantic-only).

  • An HM machine-user access key and the database user/password saved in Langflow as Global Variables.

Inputs

Connection

FieldTypeRequiredDefaultNotes
Connection ModeDropdownYesHybrid ManagerHybrid Manager or Direct Connection. Switches the connection fields that follow.
Hybrid Manager URLTextNoAdvanced. Override the default HM URL.
HM Machine User KeySecretYesHM_API_KEYDefaults to the global variable named HM_API_KEY.
Hybrid Manager ProjectDropdownYesPopulated from your HM projects.
Hybrid Manager DatabaseDropdownYesThe cluster containing the knowledge base.
Database GroupDropdownNoCluster group, for example primary or reader.
Database Connection TypeDropdownYesFor example, read or read/write.
User for the databaseTextYesHM_DB_USERPostgres role. Defaults to the HM_DB_USER global variable.
Password for the databaseSecretYesHM_DB_PASSWORDDefaults to the HM_DB_PASSWORD global variable.
Default database name overrideTextNoAdvanced. Override the cluster default when listing databases.
Database NameDropdownYesThe database holding the AIDB knowledge bases.

In Direct Connection mode the HM cluster fields are replaced with Database Host and Database Port. The user, password, and name fields remain.

Knowledge base and query

FieldTypeRequiredDefaultNotes
Knowledge BaseDropdownYesPopulated from aidb.knowledge_bases in the selected database. Use the refresh button if you've just created one.
Limit resultsIntegerYes10Maximum rows to return.
Query ValueMultiline textYesThe natural-language query to search for. Tool-mode compatible: agents call the component with this as the tool argument.

Search mode

FieldTypeRequiredDefaultNotes
Search ModeDropdownYesVector OnlyVector Only runs pure semantic search via aidb.retrieve_*. Vector + Filter adds a WHERE clause against the knowledge base's source table. Only Vector Only is offered when the KB's source is a volume. See Hybrid search.

Filter (Vector + Filter only)

These fields appear only when Search Mode is Vector + Filter and the knowledge base has a table source.

FieldTypeRequiredDefaultNotes
Filter ColumnDropdownYesPopulated from the source table's columns.
OperatorDropdownYes=See Filter operators.
Filter ValueTextYesValue to compare against. For IN, supply a comma-separated list. Ignored for IS NULL / IS NOT NULL.

Output options

FieldTypeRequiredDefaultNotes
Include TextBooleanNofalseApplies in Vector Only mode: when on, the result includes the source-text column for each hit (uses aidb.retrieve_text); when off, only keys and distances are returned (aidb.retrieve_key). Has no effect under Vector + Filter, where the source-text column is always returned.
Include ColumnsBooleanNotrueAdvanced. Include source-table column metadata in the output. Tool-mode compatible.
Add ErrorBooleanNofalseAdvanced. Surface query errors in the result instead of raising. Tool-mode compatible.

Outputs

OutputTypeCarries
Result TableDataFrameOne row per match, with key, optional value (text), and distance. Distance is computed using the knowledge base's configured metric (Cosine, L2, or Inner Product).

Vector + Filter combines semantic similarity with a structured WHERE clause against the knowledge base's source table. Use it when you want the top-K semantic matches within a subset of your data. For example, "the closest match in documents tagged kind = 'policy'".

How it works:

  • The component JOINs the KB's vector table with its source table on the source key column.
  • The filter is applied in the WHERE clause before the order-by-distance.
  • For HNSW-indexed vectors the component sets hnsw.iterative_scan = relaxed_order so the filtered search still returns useful results when the index would otherwise prune too aggressively.

Hybrid search is only available when the knowledge base's source is a table. If the source is a volume, the Search Mode dropdown is restricted to Vector Only and the filter fields stay hidden.

Filter operators

OperatorBehavior
=, !=, >, <, >=, <=Standard SQL comparison. Numeric values are passed unquoted. Non-numeric values are quoted.
LIKESQL LIKE pattern match. Use % wildcards in Filter Value.
INComma-separated values in Filter Value, for example policy, contract, memo.
IS NULL, IS NOT NULLFilter Value is ignored.