Voyage Code 2
Voyage Code 2 is Voyage AI's second-generation embedding model purpose-built for semantic code search and code understanding. It was trained on large-scale code corpora to capture structural and semantic relationships in source code — function signatures, variable scoping patterns, algorithmic patterns — that general-purpose text embeddings underperform on. Code 2 improved on its predecessor in retrieval quality for cross-language code search and documentation-to-code matching tasks.
Voyage positions this model for developer tooling: IDE integrations, code review assistants, repository-scale search, and RAG pipelines where the knowledge base consists of code rather than prose. While Voyage has since released Code 3, Code 2 remains a proven and stable embedding choice for teams with existing integrations built around it.
Key Features
Code-specialized embedding trained on large-scale source code corpora
Improved semantic retrieval for code-to-code and doc-to-code search
Cross-language code similarity understanding
Suitable for repository-scale semantic search pipelines
Optimized for RAG systems over code documentation and codebases
Stable, production-proven API with consistent embedding dimensions
Ideal Use Cases
Semantic code search across large monorepos or multi-repo environments
Building IDE plugins that surface relevant code snippets from context
Powering documentation-to-implementation retrieval in dev tools
Code similarity detection for deduplication and clone detection
RAG pipelines where the retrieved context is source code
Example Prompts for Voyage Code 2
Technical Specifications
| Provider | Voyage |
| Category | Embedding |
| Modality | Text -> Vector |
Frequently Asked Questions
Try Voyage Code 2 now
Start using Voyage Code 2 instantly — 100 free credits, no credit card required. Access 750+ AI models through one platform.