Model | Dimensions | Max Tokens | Cost | MTEB Avg Score | Similarity Metric |
---|---|---|---|---|---|
voyage-large-2-instruct | 1024 | 16000 | $0.12 / 1M tokens | 68.28 | cosine, dot product, L2 |
voyage-2 | 1024 | 4000 | $0.1 / 1M tokens | cosine, dot product, L2 | |
voyage-code-2 | 1536 | 16000 | $0.12 / 1M tokens | cosine, dot product, L2 | |
voyage-law-2 | 1024 | 16000 | $0.12 / 1M tokens | cosine, dot product, L2 |
voyage-large-2-instruct
requires inputType
parameter,
which is not supported by OpenAI’s SDK. Fortunately, LangChain has a nice community-contributed JS library for Voyage,
which supports the inputType
parameter. So we are going to use the LangChain community library in the example below.