Skip to main content

Module inference

Module inference 

Source
Expand description

Engine inference rankers (SCC-071): EmbeddingScorer fusing stored entity embeddings via cosine similarity, EngineReranker calling a separate /rerank model, the remote-model policy, and the rankers constructor task-pack plumbing uses when inference.enabled is set.

Single implementation: transports resolve scorer + reranker through ONE engine constructor — no transport reimplements embedding auth policy or fallback semantics.

Structs§

EmbeddingScorer
Fuses stored entity embeddings with the embedded goal. Vectors are preloaded once per pack generation.
EngineReranker
Second-stage reranker calling the configured /rerank model on the top candidates. Any failure is a no-op (graceful degradation).

Functions§

rankers
Build the scorer/reranker when inference is enabled; any provider failure degrades to (None, None) so the lexical ranker is always the fallback.
remote_inference_allowed
Remote-model policy (P0, docs/SECURITY.md): repository-derived content may leave the machine only when inference.enabled AND security.allow_remote_models are both true. Loopback providers need only inference.enabled. Fails closed.