A database that stores numerical representations (embeddings) of legal text, enabling AI to find semantically similar cases, clauses, and documents based on meaning rather than keyword matches.
Last reviewed: 2026/05/25
A neural network trained on massive text corpora that can generate, summarize, classify, and analyze text — including legal documents — enabling law firms to automate research, drafting, and contract review tasks.
CapabilityLegal AI refers to software systems that apply machine learning and natural language processing to automate or assist with legal tasks such as contract review, research, drafting, and compliance monitoring.
Tech / ModelAn AI architecture where a model retrieves relevant legal documents from a database before generating a response, grounding output in actual source material and dramatically reducing hallucination compared to ungrounded LLMs.
Tech / ModelSearch technology that understands the meaning and intent behind a legal query, returning conceptually relevant results regardless of exact keyword match — enabling lawyers to find relevant cases and clauses using natural language descriptions.
The most expensive legal AI in the market — Am Law 100 firms only.
Thomson Reuters' GPT-backed legal research and drafting with Westlaw integration (relaunched as CoCounsel Legal, 2025).
AI contract intelligence platform that automatically extracts, tracks, and analyzes contract data at scale.
Move from this definition to role-based legal AI shortlists and the selection criteria that matter for each type of legal team.
Am Law 200 and global firm workflows: accuracy at scale, security compliance, and matter-level auditability.
Last reviewed: 2026/05/25. Definitions are written by the LawyerAI Editorial team. Commercial relationships are disclosed and do not determine editorial scores or conclusions. See our Sponsorship & Affiliate Disclosure.
A database that stores numerical representations (embeddings) of legal text, enabling AI to find semantically similar cases, clauses, and documents based on meaning rather than keyword matches.
Vector databases are the infrastructure that makes semantic search possible in legal AI. They are the reason a lawyer can type a description of a legal fact pattern into a modern legal research tool and receive relevant cases — even cases that use entirely different vocabulary than the search query. Understanding what vector databases do (even without understanding how they work technically) helps lawyers use modern legal AI tools more effectively and evaluate vendor claims about their search capabilities.
Traditional legal research relied on keyword search and Boolean operators: find cases containing "indemnification" AND "gross negligence" but NOT "excluded losses." This approach is powerful but brittle — it misses relevant cases that discuss the same legal concept using different language, and it requires lawyers to anticipate every relevant search term. A case decided in 1987 using the phrase "duty to defend" may be highly relevant to a current indemnification dispute but would not appear in a keyword search for "indemnification obligations."
Vector databases enable a different approach. A search for "buyer's obligation to indemnify seller for pre-closing liabilities" can return relevant cases and contract clauses regardless of the exact terminology used — because the search is matching on meaning, not on words. This represents a qualitative improvement in legal research and contract review that is only possible because of the vector database infrastructure underlying these tools.
From text to vectors — the embedding process:
Every document, clause, or case in a vector database starts as text. Before it can be stored, this text is passed through an embedding model — a neural network trained to convert text into a numerical vector: an ordered list of hundreds or thousands of floating-point numbers. This vector encodes the semantic content of the text in a format that allows mathematical comparison.
The key property of a good embedding model is that semantically similar texts produce numerically similar vectors. The phrase "force majeure event excusing performance" and the phrase "act of God preventing contract fulfillment" — despite sharing no common words — will have vectors that are mathematically close to each other in the high-dimensional vector space. "Limitation of liability cap" and "purchase price" will have vectors that are far apart.
Indexing legal documents:
When a legal AI vendor builds a vector database, they: 1. Process a corpus of legal documents (case law, contracts, statutes, secondary sources) 2. Split documents into chunks — usually paragraphs or sections — that are sized to fit the embedding model's input limit 3. Pass each chunk through the embedding model to generate its vector 4. Store the vector alongside the original text and metadata (jurisdiction, court, date, document type) in the vector database
Retrieval at query time:
When a user submits a search query, the system: 1. Converts the query text into a vector using the same embedding model 2. Searches the vector database for the stored vectors that are most mathematically similar (typically using cosine similarity or inner product as the distance metric) 3. Returns the original text chunks associated with those similar vectors, ranked by similarity
This retrieved content then becomes the input for a RAG pipeline — injected into an LLM's context to generate a grounded response.
Vector databases in legal AI products:
Harvey AI uses vector database infrastructure to enable semantic search across law firm documents, allowing lawyers to find relevant precedent agreements and internal memos based on concept rather than keyword. The system can surface a relevant NDA from three years ago even if the search query uses different terminology than the original document. CoCounsel uses vector database technology over the Westlaw corpus to power its semantic retrieval of case law and legal authority. Evisort uses vector databases to enable semantic search across a company's entire contract portfolio — allowing legal operations teams to search for concepts like "change of control provisions" and retrieve all relevant contracts regardless of how those provisions are titled.
Hybrid search — combining vector and keyword approaches:
Most production legal AI systems use hybrid search: combining vector similarity (for semantic matching) with keyword search (for exact term matching) and metadata filtering (for jurisdiction, date, court level). This is because vector search excels at conceptual queries but can underperform keyword search for exact lookups — finding a specific case by its citation number, for example, is more reliable with keyword search than vector search.
The embedding model quality determines search quality: Not all embedding models are equal. An embedding model trained specifically on legal text will produce vectors that better capture legal semantic relationships than a general-purpose embedding model. Ask vendors whether they use a general-purpose embedding model (like OpenAI's text-embedding-ada or similar) or a legal-domain-specific embedding model, and how they validate semantic search quality for legal tasks.
Database coverage and freshness: A vector database is only as comprehensive and current as the documents it indexes. A legal AI tool's semantic search is bounded by what is in its vector database. If the vendor's database does not include a particular court's opinions, or has not been updated in six months, recent decisions or niche jurisdictions will be missing from semantic search results.
Private document vector search: When legal AI vendors offer the ability to search a firm's internal documents (precedents, memos, client files), those documents are processed into vectors and stored in the vector database. This creates a question: where is this vector database hosted? Who has access? Are the firm's document vectors isolated from other customers' data? These are critical security and confidentiality questions for any tool that ingests client documents into a vector database.
Chunk size and retrieval granularity: How a vendor chunks documents before embedding affects retrieval granularity. Very small chunks (sentence-level) allow precise clause retrieval but may lose context. Very large chunks (full documents) preserve context but may dilute the semantic signal of specific provisions. Well-designed legal AI systems use adaptive chunking strategies that respect document structure (section boundaries, paragraph breaks) rather than splitting at arbitrary character counts.
Understanding the limitations of semantic similarity: Vector databases excel at finding conceptually similar content. They are less reliable for exact legal lookups that require precise citation matching, specific statutory text, or exact defined-term tracing. Lawyers should use semantic search for exploratory research and keyword/citation search for exact lookups.
Semantic search can surface irrelevant results: High vector similarity does not guarantee legal relevance. A case about baseball contracts may appear in a search for sports licensing agreements simply because the embedding model associates "contracts" across domains. Legal AI systems mitigate this with metadata filtering and hybrid search, but irrelevant results remain a practical reality.
Opaque ranking: The mathematical similarity scores that rank vector search results are not inherently interpretable as legal relevance judgments. A result ranked first because of high vector similarity may be less legally relevant than a result ranked fifth. Lawyers should not treat vector search rankings as a proxy for legal importance.
Embedding model bias: Embedding models encode the biases present in their training data. Legal embedding models trained primarily on US common law may produce lower-quality embeddings for civil law concepts, non-English legal text, or niche legal domains underrepresented in the training data.
Computational cost and latency: Processing large legal document corpora through embedding models, maintaining vector databases, and running similarity searches at query time is computationally expensive. This cost is borne by vendors but affects pricing models and may introduce latency for very large or complex queries.