Graph vs vector search for code?
Both: vectors catch 'code that does similar things', graphs answer 'who calls/depends on this' exactly. Structure first, similarity second.
Glossary · Repomap (Code Graph Retrieval)
Who calls this — answered in tokens, not files.
Direct answer
A repomap parses repositories into symbol graphs (tree-sitter + PageRank-style ranking) so agent questions — callers, dependencies, blast radius, covering tests — return short identifier lists instead of whole files. Retrieval by relationship beats retrieval by similarity for code: 'the definition plus three call sites' instead of '50 files mentioning the string.' Measured wins include multi-minute refactors collapsing to a few tool calls at double reward.
In Anvaya
Questions
Both: vectors catch 'code that does similar things', graphs answer 'who calls/depends on this' exactly. Structure first, similarity second.
Forty matches pasted in full cost tens of thousands of tokens and thin attention; a caller list costs hundreds and is exact.
Branch-awareness and freshness — an index trailing your edits curates wrong tokens with full confidence.
One binary. 11+9 Rust crates. 545 tests. Hand-written HNSW index. Three transport modes. Four providers, Ollama, Anthropic, OpenAI, Siemens. Zero API keys required to start. Mind remembers everything after the first session.