WhoBuilt

Scaling Enterprise-Grade RAG: Lessons from Legal Frontier

Jul 29, 2025· 17 min· 6.7K views·Watch on YouTube

Speakers

Chang She, CEO and co-founder of LanceDB, and Calvin Qi, who leads a team at Harvey AI, discuss retrieval challenges and infrastructure for large-scale legal RAG, drawing on their work together.

Harvey’s legal data and retrieval challenges

Calvin describes Harvey’s legal assistant and three data scales: uploads of roughly 1 to 50 documents, larger project vaults, and country-level corpora of laws and case law. Retrieval must handle long, dense documents, specialized legal language, complex queries, and sensitive client data.

Complex queries and evaluation

Calvin uses a question about covered bonds under an EU directive and the CRR as an example of a query combining date constraints, legal identifiers, domain jargon, and multiple regulations. He says Harvey invests heavily in evaluation, from costly expert reviews and labeled criteria to faster metrics such as retrieval precision, recall, and checks for the right folder or section.

Corpus scale and infrastructure needs

Harvey works with large legal corpora that can contain tens of millions of often lengthy documents, organized with help from domain experts and automation. Calvin highlights the need for reliable, low-latency retrieval and efficient ingestion and experimentation, alongside customer-specific segregation, retention controls, telemetry, and flexible search and filtering.

LanceDB’s lakehouse approach

Chang presents LanceDB as an AI-native multimodal lakehouse built on object storage, intended to support retrieval as well as analytics, training, and preprocessing. Its API supports combinations of vector columns, full-text search, and reranking; Chang also cites GPU indexing and a record of indexing roughly three to four billion vectors in under two or three hours.

Lessons for building domain-specific RAG

Calvin recommends studying the data and query patterns with domain experts, then building for flexibility and fast iteration. He argues that strong evaluation makes iteration more informative, while new infrastructure needs to handle multimodal data, heavier embedding workloads, diverse workloads, and growing data volumes.

Takeaways

  • Map explicit and implicit query patterns with domain experts before choosing retrieval methods.
  • Use evaluation at several levels: expert review for fidelity and automated metrics for faster iteration.
  • Plan for both low-latency queries and the offline costs of ingestion, reingestion, and experiments.
  • Treat privacy, customer segregation, and retention rules as infrastructure requirements.
  • Choose data infrastructure that can support retrieval alongside analytics, training, and preprocessing.

Mentioned in this talk

Search inside this talk

What was claimed 8

Related talks