Skip to content

Configuration ​

Every setting of duckdb-vectors is read in src/duckdb_vectors/config.py, and this page is the only place that lists them. The CLI, the Python library and the MCP server resolve them in the same way. The manifest is the file that holds them for one knowledge base.

Settings ​

Each setting resolves with the precedence flag or explicit argument > DUCKDB_VECTORS_* environment variable > manifest > default. Containers and CI inject variables to override a manifest baked into an image or committed with the pages. The same configuration works from code, from the environment or from a file. duckdb-vectors config shows the origin of each value.

SettingArgumentEnvironment variableManifest keyDefault
ManifestmanifestDUCKDB_VECTORS_MANIFESTnonenone (walk up from the current folder, for the CLI only)
Pages foldernoneDUCKDB_VECTORS_PAGESpages.
Work foldernoneDUCKDB_VECTORS_WORKwork.duckdb-vectors
Database pathdb_pathDUCKDB_VECTORS_DATABASEdatabasevectors.duckdb
Embeddings modelembeddings (backend too)DUCKDB_VECTORS_EMBEDDINGSembeddings.modellocal:minishlab/potion-multilingual-128M
Generation modelnoneDUCKDB_VECTORS_ANNOTATION_MODELannotation.modelnone
Lock wait (seconds)lock_timeoutDUCKDB_VECTORS_LOCK_TIMEOUTnone10
Tags to embed with each chunktag_fieldsDUCKDB_VECTORS_TAG_FIELDStags.fieldsnone (off)
Match tags in keyword searchtag_bm25DUCKDB_VECTORS_TAG_BM25tags.bm25false
Results returned per searchtop_kDUCKDB_VECTORS_TOP_Ktop_k20
Ranking SQL of the vector signalvector_sqlDUCKDB_VECTORS_VECTOR_SQLnonenone (built-in)
Ranking SQL of the text signaltext_sqlDUCKDB_VECTORS_TEXT_SQLnonenone (built-in)

Settings() without a manifest has no filesystem side effect. The library and the MCP server accept a manifest but never search for one implicitly.

Deprecated aliases ​

DUCKDB_VECTORS_DB_PATH is an alias of DUCKDB_VECTORS_DATABASE, and DUCKDB_VECTORS_BACKEND of DUCKDB_VECTORS_EMBEDDINGS. The flags --db and --backend are aliases of --database and --embeddings, and the prefixes fastembed: and hf: are aliases of local: and huggingface:. They stay one release.

top_k is the number of results a search returns. It is 20 for the SDK, the CLI and the MCP search tool, and any call can pass its own value. A client that pays prompt tokens for every returned chunk, such as an agent harness, may lower it per call. tag_fields and tag_bm25 control tagged retrieval: tag_fields is an ordered list of label: $.path pairs read from each document's frontmatter, and tag_bm25 also matches those tags in keyword search.

Several processes can share one database file, for example one MCP server per editor window. DuckDB lets one process hold the file at a time, so the store connects lazily, on first use, and when another process holds the file it retries for up to lock_timeout seconds before raising DatabaseLockedError. Each search holds the file only for the call, and re-indexing an unchanged folder holds it for a moment, so in practice sessions wait milliseconds rather than fail.

vector_sql and text_sql replace the built-in ranking SELECT of each signal; the ranking SQL reference explains them.

See also ​