When Accuracy is
Non-Negotiable
Hybrid search with metadata filtering for jurisdiction, case type, and document category. Build retrieval for patent corpora, M&A due diligence, and more.
# Hybrid legal document search
results = client.query_points(
collection_name="legal_docs",
prefetch=[
Prefetch(query=dense_emb, using="dense",
limit=100),
Prefetch(query=sparse_emb, using="sparse",
limit=100),
],
query=FusionQuery(fusion=Fusion.RRF),
query_filter=Filter(must=[
FieldCondition("jurisdiction",
match=MatchValue("california")),
FieldCondition("case_type",
match=MatchValue("patent")),
FieldCondition("filing_date",
range=Range(gte="2020-01-01")),
FieldCondition("settlement_amount",
range=Range(gte=50000)),
]),
limit=20,
)
Step 1
Embed - Parse + Embed Resume / JD
Step 2
Search - Semantic Search + Strict Filter
Step 3
Rank - Rank + Rerank (Optional)
Step 4
Result - Evidence-based Match
“We scaled to a billion vectors with sub-second latency. Workflows that took hours now take minutes.”
Herbie Turner
CTO / Co-founder
1B+
Vectors in Production
250B+
Tokens Processed
“We ingest thousands of legal docs, and need precise retrieval and accurate citations. Qdrant makes this possible.”
Lesly Arun Franco
CTO
90%
Faster Due Diligence
40%
Fewer Legal Hours
Why Teams Choose Qdrant
General-Purpose Databases Weren't Built for Legal AI
Keyword search, rigid filters, and bolt-on vector capabilities break under the demands of modern legal platforms. Teams running semantic search, document analysis, and AI agents hit the same walls.
Legacy Search Can't Handle Legal Metadata
Legal documents can carry 2,000+ metadata fields: jurisdictions, case types, filing dates, settlement amounts. Other search engines require brute-force vector search with embedding constraints. Post-filter architectures degrade recall as filters multiply.
Qdrant's filterable HNSW applies filters during graph traversal.
Compliance Blocks Most Cloud Providers
Attorney-client privilege and data residency requirements mean managed cloud solutions are often non-starters. 100% of LegalTech sales conversations surface security and compliance.
Qdrant deploys on-prem, in private VPCs, or hybrid cloud — with SOC2, GDPR, and HIPAA-ready compliance built in.
Evaluating Migration?
Our solutions engineers do technical deep-dives with HR tech teams weekly.
What you can build with Qdrant
From patent analysis to M&A due diligence, legal teams combine Qdrant's retrieval primitives to deliver citation-grade accuracy keyword search never could.
Jurisdiction-Scoped Document Search
"Find California patent cases from 2020 with settlements over $50k" returns ranked results filtered by jurisdiction, date, case type, and amount. Hybrid search grounds results in real documents.
Patent Prior Art / Claim Charting
Search 200M+ patents by technology class, grant date, and patent family. Scalar quantization at billion-scale. Recommend API for claim-chart matching against prior art.
M&A Due Diligence
Automated signature validation, contract comparison, and risk flagging across thousands of deal documents. Multitenant isolation per deal room with real-time ingestion during active deals.
How It Works Under the Hood
Architecture patterns with API examples for
legal document search, patent analysis, and multi-tenancy.
Hybrid Search
Legal queries are part structured (jurisdiction, date, case type) and part unstructured (“negligence in product liability” or “prior art for CRISPR gene editing”). This pattern fuses semantic and keyword retrieval with metadata filters in a single query.
Dense Vectors
Semantic understanding of legal language and concepts
Sparse Vectors (BM25/SPLADE)
For exact legal terms (e.g. statute numbers, case citations)
# Hybrid legal document search
results = client.query_points(
collection_name="legal_docs",
prefetch=[
Prefetch(query=dense_emb, using="dense",
limit=100),
Prefetch(query=sparse_emb, using="sparse",
limit=100),
],
query=FusionQuery(fusion=Fusion.RRF),
query_filter=Filter(must=[
FieldCondition(key="jurisdiction",
match=MatchValue("california")),
FieldCondition("case_type",
match=MatchValue("patent")),
]),
limit=20,
)
RAG-Powered Legal Research
Ground AI assistants in real case law and statutes. This is the pattern Lawme uses for automated legal document drafting — vectorize document chunks, retrieve relevant context per question, and generate cited answers.
Custom shard keys by jurisdiction
US, AU, UK case law isolated
Scalar, binary, asymmetric quantization (8-bit)
Up to 32x compression with reranking
Real-time payload updates
Mark documents as reviewed without reindexing
# RAG: retrieve legal context for AI assistant
review_chunks = client.query_points(
collection_name="case_law",
prefetch=[
Prefetch(query=question_emb, using="dense",
limit=50),
Prefetch(query=question_sparse, using="sparse",
limit=50),
],
query=FusionQuery(fusion=Fusion.RRF),
query_filter=Filter(must=[
FieldCondition("jurisdiction",
match=MatchValue("australia")),
]),
limit=10,
)
# Feed to LLM with grounded context
context = "\n".join([r.payload["text"]
for r in review_chunks.points])
answer = llm.generate(
f"Based on case law: {context}\n"
f"Question: {user_question}"
)
Large Patent Corpus Search
Search hundreds of millions of patents across jurisdictions with scalar, binary or asymmetric quantization.
Scalar, binary, asymmetric quantization (8-bit)
Keeps hot vectors in RAM, full-precision on disk
Recommend API for claim charting
Find prior art similar to specific patent claims
Pay-for-what-you-use pricing
10× more data for the same cost
# Prior art search at billion scale
results = client.query_points(
collection_name="patents",
query=claim_embedding,
query_filter=Filter(must=[
FieldCondition("grant_date",
range=Range(lte="2015-06-01")),
FieldCondition("technology_class",
match=MatchAny(["H04L", "G06F"])),
]),
params=SearchParams(
quantization=QuantizationSearchParams(
rescore=True,
oversampling=2.0
)
),
limit=50,
)
# Claim-chart matching via Recommend API
similar = client.query_points(
collection_name="patents",
query=RecommendQuery(
recommend=RecommendInput(
positive=[claim_vector_id],
negative=[known_irrelevant_id],
)
),
limit=25,
)
Powering Search For
“To scale, you need vector search with low latency, high accuracy, and reasonable costs. Qdrant makes that possible.”
Jordan Parker
Co-founder Lawme
10x
faster query throughput
75%
reduction in retrieval costs
“Filterable HNSW was the deal-maker. We don't have to think about the vector layer anymore.”
Justin Mack
CTO / Co-founder, Garden AI
10×
Lower cost per stored GB
<100ms
p95 query latency at 200M+ patents
