Skip to content

Voyage Law 2

Voyage Law 2 is Voyage AI's legal-specialized embedding model trained on one trillion legal tokens. It outperforms OpenAI text-embedding-3-large by 6% across eight legal datasets and achieves 84.44 NDCG@10 on long-context legal retrieval versus 68.40 for OpenAI.

index.ts
import { embed } from 'ai';
const result = await embed({
model: 'voyage/voyage-law-2',
value: 'Sunny day at the beach',
})