Hybrid Search Explained: Vector + Lexical for Terminology
Why pure vector search fails for technical terminology and how Taqnilex combines LaBSE embeddings with BM25 lexical matching to achieve P@5 of 98.2%.
When you type a term into a search box and expect the exact Arabic equivalent used in WIPO patent filings, you are asking for precision. Not "something close." Not "semantically related." The exact term, from the exact source, ranked first. This is what Taqnilex's hybrid search engine is built to deliver -- and it is why we rejected pure vector search after seeing the numbers.
The problem with pure vector search for terminology
Vector search works by encoding text into high-dimensional embeddings and measuring cosine similarity between query and document vectors. It excels at semantic search -- "show me documents about intellectual property litigation" returns relevant results even when those exact words do not appear. But terminology search is a different problem.
In terminology search, the user queries a specific technical term -- say, "reasonable royalty" -- and expects the canonical Arabic equivalent, such as "إتاوة معقولة" as used in WIPO Pearl. Pure vector search on LaBSE embeddings returned a precision-at-5 (P@5) of only 40% during our Gate 2B evaluation in March 2026. That means 6 out of 10 queries did not surface the correct term in the top 5 results. For a tool used in patent examination or regulatory submissions, that is not a rounding error -- it is a failure mode.
Why does vector search underperform here? Three reasons:
- Embedding space density. Technical terminology is sparse. "Oxidation inhibitor" and "corrosion inhibitor" are semantically close in embedding space but refer to different chemical processes. Cosine similarity alone cannot distinguish them reliably.
- Cross-lingual fuzziness. LaBSE embeddings map English and Arabic into a shared space, but fine-grained distinctions between near-synonyms blur when projected across languages.
- Exact-match requirements. A patent examiner searching for "الانتهاك" needs the WIPO-attested equivalent of "infringement," not a semantically adjacent term like "breach" or "violation." Vector search retrieves all three; only lexical matching knows which one carries the source authority.
How hybrid search works
Taqnilex's hybrid search combines two ranking signals into a single scored result set:
final_score = alpha * vector_score + (1 - alpha) * lexical_score
Vector score (alpha = 0.5). LaBSE embeddings capture cross-lingual semantic similarity. The LaBSE model was trained on 109 languages including Arabic and English, producing 768-dimensional embeddings. When a user queries "prior art," the vector component ensures that documents containing "état de la technique" (the French WIPO term) and "حالة التقنية السابقة" (the Arabic equivalent) all contribute to the ranking -- even if the query terms do not appear verbatim.
Lexical score (1 - alpha = 0.5). BM25-style term matching anchors the ranking in exact and near-exact keyword matches. This catches the precise terminology that vector search misses: diacritic-normalized Arabic forms, canonicalized English spellings, and cross-source term alignment. We normalize every query through the same pipeline used for indexing -- Unicode normalization (NFC/NFKC), diacritic stripping for Arabic, and punctuation removal -- before computing the lexical score.
Why alpha = 0.5? During Gate 2C evaluation, we swept alpha from 0.0 (pure lexical) to 1.0 (pure vector). Pure lexical achieved strong precision but poor recall on paraphrased queries. Pure vector achieved reasonable recall but catastrophic precision. Alpha = 0.5 gave the Pareto-optimal trade-off: P@5 = 98.2%, R@10 = 99.4%, median latency 128 ms.
The ranking pipeline, end to end
Here is the schematic of a single query through the hybrid search pipeline:
User query: "reasonable royalty"
│
▼
┌──────────────────────────────┐
│ 1. Normalize & canonicalize │
│ - Unicode NFC/NFKC │
│ - Arabic diacritic strip │
│ - Punctuation removal │
└──────────┬───────────────────┘
│
▼
┌──────────────────────────────┐
│ 2. Parallel scoring │
│ ┌─────────┐ ┌──────────┐ │
│ │ Vector │ │ Lexical │ │
│ │ LaBSE │ │ BM25 │ │
│ │ embed→cos│ │ tf-idf │ │
│ └────┬─────┘ └────┬─────┘ │
│ │ │ │
│ ▼ ▼ │
│ vector_score lexical_score│
└──────────┬───────────────────┘
│
▼
┌──────────────────────────────┐
│ 3. Fusion: alpha=0.5 │
│ final = 0.5*v + 0.5*l │
└──────────┬───────────────────┘
│
▼
┌──────────────────────────────┐
│ 4. Authority re-rank │
│ ★ Harmonized boosted │
│ Source weight applied │
└──────────┬───────────────────┘
│
▼
┌──────────────────────────────┐
│ 5. Response (top-k) │
│ TermPair[] + sentence ctx │
│ P50 latency: 128 ms │
└──────────────────────────────┘
After fusion, we apply a source-authority re-rank that gives a modest boost to terms carrying the ★ Harmonized badge (Arabterm/ALECSO cross-source validation). This ensures that when two terms score similarly, the one with stronger provenance surfaces first.
Why precision matters for regulated domains
Hybrid search is not an academic exercise. It is a hard requirement for the use cases Taqnilex serves.
Patent examination. A patent examiner at a Gulf Cooperation Council patent office searches for the Arabic equivalent of a claim term. If the system returns a near-synonym from a non-WIPO source in position 1, the examiner may cite the wrong term in an office action. That creates downstream legal risk -- oppositions, invalidity challenges, and re-examination proceedings all turn on terminology precision.
Regulatory submissions. A pharmaceutical company preparing an Arabic-language Informed Consent Form (ICF) for Saudi Arabia's SFDA must use the exact Arabic terms that the regulator recognizes. Returning a semantically similar but non-standard term is not a "close enough" result -- it is a compliance failure that can delay drug approval by months.
Legal translation. A law firm translating a cross-border contract needs to know whether "indemnify" in this specific jurisdictional context maps to "يعوّض" or "يضمن." The distinction matters. Hybrid search surfaces both candidates with their source authorities, so the translator can make an informed choice.
Tuning alpha for your use case
While our production alpha is fixed at 0.5, the API exposes the alpha parameter for advanced users who want to bias toward recall (higher alpha, more vector weight) or precision (lower alpha, more lexical weight):
{
"query": "reasonable royalty",
"source_lang": "en",
"target_lang": "ar",
"alpha": 0.5,
"domains": ["patent"],
"sources": ["wipo", "arabterm"]
}
For most users, the default is optimal. But if you are building a recall-oriented workflow -- for example, surveying all possible Arabic renderings of a term across jurisdictions -- try alpha = 0.7. If you need maximum precision for a compliance-critical task, alpha = 0.3 will anchor results more firmly in exact lexical matches.
Continuous evaluation
We re-run the hybrid search evaluation suite on every index update. The benchmark queries cover 500 term pairs across six domains (patent, legal, medical, energy, construction, IT), with ground-truth labels verified by domain experts. Any regression in P@5 or R@10 blocks deployment. The evaluation harness is part of the CI pipeline and runs against both staging and production Weaviate instances.
Explore hybrid search: try a query or read the API documentation. For technical questions about search architecture, contact our engineering team.