voyage-code-2
Last updated
Was this helpful?
Last updated
Was this helpful?
This embedding model is designed for semantic retrieval of code and related text from both natural language and code-based queries. In a comprehensive evaluation across 11 code retrieval tasks—sourced from popular datasets like HumanEval and MBPP—it achieved a significant 14.52% improvement in recall over competitors, including OpenAI and Cohere. Additionally, it demonstrated consistent gains, averaging 3.03%, across various general-purpose text datasets.
If you don’t have an API key for the AI/ML API yet, feel free to use our .
Input text to embed, encoded as a string or array of tokens.
The type of input data for the model.
document
Possible values: The format in which to return the embeddings.
No content