Harvey partners with Voyage to build custom legal embeddings
Jul 22, 2024

Summary
This post details the development of a custom embedding model, `voyage-law-2-harvey`, by fine-tuning Voyage AI's `voyage-law-2` model on over 20 billion tokens of US case law. The fine-tuning process involved both raw case law text and a dataset of exemplar questions with expert annotations. The custom model reduces irrelevant material returned by nearly 25% compared to leading off-the-shelf models, with 1/3 of the embedding dimensionality, leading to storage and latency benefits. This enhances the retrieval system's ability to identify relevant cases and passages.