Skip to main content

Module embed

Module embed 

Source
Expand description

Search configuration, results, and file I/O helpers.

The transformer streaming pipeline (embed_all, embed_all_batch, embed_all_streaming, embed_distributed) was removed when the transformer engines came out. Embedding is now dispatched exclusively through VectorEncoder::embed_root.

Surviving items:

§4.0 API change

Scope is replaced by two orthogonal axes:

  • Corpus controls which chunks are searched (previously coupled to rerank policy in Scope).
  • RerankPolicy controls whether the cross-encoder reranker fires (previously implicit).

A backward-compatibility type alias Scope = Corpus is provided so that callers outside the MCP layer (examples, CLI) continue to compile; prefer Corpus in new code.

Structs§

SearchConfig
Runtime configuration for the search pipeline.
SearchResult
A search result pairing a code chunk with its similarity score.

Enums§

Corpus
Corpus axis for a search invocation: which chunks participate.
RerankPolicy
Reranker firing policy for a search invocation.

Constants§

DEFAULT_BATCH_SIZE
Default batch size for embedding inference.
PROSE_EXTENSIONS
Canonical prose file extensions for Scope::Docs. Kept in sync with crate::encoder::ripvec::ranking::is_prose_path.

Functions§

apply_structural_boost
Normalize similarity scores to [0,1] and apply a PageRank structural boost.

Type Aliases§

Scope
Backward-compatibility alias: Scope is now Corpus.