Skip to main content

Module embeddings

Module embeddings 

Source
Expand description

Semantic search via local embeddings (AllMiniLM-L6-v2, 384 dims).

Model is downloaded from HuggingFace on first use (~23 MB, cached in $XDG_CACHE_HOME/huggingface/hub). All subsequent starts load from cache.

Vector index is persisted per-branch at: ~/.local/share/gitcortex/{repo_id}/embeddings_{branch}.bin

Background indexer (index_missing) embeds nodes that don’t yet have a vector. Call it once after gcx serve opens the store. Search stays text-only while the indexer runs; it automatically uses semantic hits once at least one vector is loaded.

Structs§

Embedder
SemanticIndex

Functions§

node_text
Build the text string that gets embedded for a node. Format: "{kind} {qualified_name} {signature} {doc_comment}"