Skip to main content

Crate post_cortex_embeddings

Crate post_cortex_embeddings 

Source
Expand description

Embedding engines + HNSW vector database for post-cortex.

This crate is self-contained: anyone needing a Candle-backed BERT embedder or an HNSW index for nearest-neighbour search can depend on it without pulling the post-cortex daemon, storage, or orchestrator. Implements EmbeddingBackend (BERT via Candle, static-hash fallback) and ships VectorDB (HNSW with optional product quantization).

Shared types — [post_cortex_embeddings::VectorMetadata] and friends — live in post-cortex-core so the storage trait API can reference them without depending on the ML stack.

Re-exports§

pub use error::Error;
pub use error::Result;
pub use embeddings::EmbeddingBackend;
pub use embeddings::EmbeddingConfig;
pub use embeddings::EmbeddingModelType;
pub use embeddings::LocalEmbeddingEngine;
pub use vector_db::ProductQuantizationCodebook;
pub use vector_db::SearchMatch;
pub use vector_db::SearchMode;
pub use vector_db::SearchQualityPreset;
pub use vector_db::StoredVector;
pub use vector_db::VectorDB;
pub use vector_db::VectorDbConfig;
pub use vector_db::VectorDbStats;
pub use vector_db::VectorDbStatsSnapshot;
pub use vector_db::VectorMetadata;

Modules§

embeddings
Local Embeddings Engine for semantic understanding.
error
Typed error hierarchy for post-cortex-embeddings.
vector_db
HNSW vector database — types + impl.