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: boolW3.1: persistent embeddings off-switch. Default true (enabled).
#[serde(default = "default_true")] keeps pre-W3 project.toml
files loading unchanged.
daemon: boolv1.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: boolv1.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: Stringv1.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
impl Clone for EmbedderSection
Source§fn clone(&self) -> EmbedderSection
fn clone(&self) -> EmbedderSection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more