semantic_search
Embedding-based code search for intent queries like 'error handling' or 'auth flow'. Supports Voyage AI, OpenAI, and Ollama providers.
What it does
semantic_search answers questions that keyword search cannot. Queries like “how does authentication work?”, “where is rate limiting implemented?”, or “what’s the caching strategy?” have no single keyword — they describe intent.
This tool uses embeddings to find code that is semantically related to the query, even when the exact words don’t appear in the source.
Three embedding providers
| Env Variable | Provider | Model |
|---|---|---|
CODESIFT_VOYAGE_API_KEY | Voyage AI | voyage-code-3 |
CODESIFT_OPENAI_API_KEY | OpenAI | text-embedding-3-small |
CODESIFT_OLLAMA_URL | Ollama (local) | nomic-embed-text |
No native equivalent
There is no shell command that searches code by meaning. Grep finds strings. Semantic search finds concepts.
When to use it
- Conceptual questions: “how does X work?” or “where is Y implemented?”
- Exploring unfamiliar code: when you don’t know the function names yet
- Cross-cutting concerns: finding all code related to a concept spread across many files
For exact name lookups, use search_symbols. For text patterns, use search_text. For concept queries, use semantic_search.
Related tools
Benchmark note
This benchmark compares CodeSift against the closest practical native workflow an agent would use for the same task.
For some tools, that baseline is a direct shell equivalent such as rg or find.
For AST-aware, graph-aware, and LSP-backed tools, the baseline is a multi-step workflow rather than a strictly identical command.
Results should be read as agent-workflow comparisons: token cost, call count, and practical context efficiency.