Pass 3 of 3 · Deep dive of PHAROSPass 1 · OverviewPass 2 · How it works
Code Observatory / Index
Embeddings
Pluggable backends. Vectors from different models are never compared.
Source audited
PHAROS at 975a38dMIT license
How it works
A chunk is embedded from its signature, docstring, calls and first body lines. The recorded runs here use granite-embedding-english-r2 as an int8 ONNX model on the CPU.
The hash backend exists for offline tests. It is lexical, not semantic, and these recordings do not use it.
Source evidence
- Pick the embedder
backend/app/codeintel/embeddings.py:475–516Backends are configuration. None means keyword only. - Embed the question
backend/app/codeintel/embeddings.py:341–364ONNX inference on the CPU, with the model's pooling and L2 normalisation. - What gets embedded
backend/app/codeintel/text.py:117–149A chunk is embedded from its signature, docstring, calls and first body lines, not from raw source.
