Skip to main content

EmbedderSection

Struct EmbedderSection 

Source
pub struct EmbedderSection {
    pub model: String,
    pub enabled: bool,
    pub daemon: bool,
    pub warm_on_start: bool,
    pub reranker: String,
}
Expand description

v0.8: embedding-model selection. model is one of the curated built-in ids exposed by kimetsu brain model list (bge-small-en-v1.5, bge-m3, jina-v2-base-code). Switching changes the vector dimension, so a kimetsu brain reindex is required for cosine retrieval to use the new model.

W3.1: enabled is a persistent off-switch for the embedding engine. When false, the embedder resolves to NoopEmbedder (FTS-only; no vectors written or queried). Precedence: KIMETSU_BRAIN_EMBEDDER env override > this field > default (true). A disable env value (noop/off/0/…) always wins; a real model-id env value means “enabled” regardless of this field.

Fields§

§model: String§enabled: bool

W3.1: persistent embeddings off-switch. Default true (enabled). #[serde(default = "default_true")] keeps pre-W3 project.toml files loading unchanged.

§daemon: bool

v1.0.0: use the warm embedder daemon for the UserPromptSubmit hook. false ⇒ the hook never spawns/contacts a daemon and stays on floored-FTS even on embeddings builds. Config equivalent of KIMETSU_EMBED_DAEMON=0. #[serde(default = "default_true")] keeps older configs loading with the daemon on.

§warm_on_start: bool

v1.0.0: pre-warm the daemon at harness startup (via kimetsu brain warm, wired to SessionStart). false ⇒ no startup spawn; the daemon (if daemon=true) warms lazily on the first prompt instead.

§reranker: String

v1.0.0: cross-encoder reranker the warm daemon applies as the final ranking stage. "off" (default), a curated fastembed reranker id (jina-reranker-v1-turbo-en, bge-reranker-base, bge-reranker-v2-m3, jina-reranker-v2-base-multilingual), a benchmarked alias (jina-reranker-v1-tiny-en, ms-marco-tinybert-l-2-v2, ms-marco-minilm-l-4-v2), or any HuggingFace org/repo with an ONNX export.

Default ms-marco-tinybert-l-2-v2, chosen with kimetsu brain bench on the 100-case real-memory dataset: paired with the jina-v2-base-code embedder it lands within noise of the best quality (MRR 0.938 vs 0.953 top) at ~43ms per rerank — far inside the hook’s 300ms budget. On slower machines a miss degrades gracefully to floored-FTS for that turn. "off" disables reranking. Validate changes on your own corpus with kimetsu brain bench / kimetsu brain eval.

Trait Implementations§

Source§

impl Clone for EmbedderSection

Source§

fn clone(&self) -> EmbedderSection

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EmbedderSection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EmbedderSection

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for EmbedderSection

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for EmbedderSection

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V