Interface HnswSidecarConfig

Configuration for the memory-specific HNSW sidecar wrapper.

interface HnswSidecarConfig {
    sqlitePath: string;
    brainId?: string;
    dimensions: number;
    autoThreshold?: number;
    m?: number;
    efConstruction?: number;
    efSearch?: number;
}

Properties

sqlitePath: string

Path to brain.sqlite — the HNSW files are written in the same directory.

brainId?: string

The brain whose vectors the index holds. A database can hold several brains and a directory several databases, so with a brain id the index is <database file name>.<digest>.hnsw, the digest a SHA-256 of the database file name and the brain id: no two brains or databases share an index file. Without one the index is brain.hnsw, one per directory.

dimensions: number

Embedding dimensions.

autoThreshold?: number

Auto-build threshold. Below this count, brute-force is used.

Default

1000
m?: number

HNSW M parameter (connections per node).

Default

16
efConstruction?: number

HNSW efConstruction (build quality).

Default

200
efSearch?: number

HNSW efSearch (query quality).

Default

50