lesspoo.com

hybrid search without turning it into a science fair

keep keyword and vector search, merge them simply, and skip the fusion roadmap until the boring combination actually fails.

hybrid search is usually sold as a research program. you get a slide with three retrieval paths, a fusion formula with greek letters, and a roadmap that includes "tune alpha." by the time the meeting ends, nobody has shipped anything that helps a support agent find the refund policy that actually matches what the customer typed.

that is the science fair version. the useful version is smaller and less impressive in a demo. you keep keyword search because people type product names, error codes, and exact phrases. you keep vector search because people ask the same question with different words. you combine the two so neither has to pretend it covers the whole job. then you stop decorating the stack until the combination is wrong for a reason you can name.

i have watched teams spend a month debating reciprocal rank fusion versus weighted score blending while their index still treated draft and published docs as peers. the fusion debate felt rigorous. the index was the actual problem. hybrid search does not fix bad candidates. it only changes how you order the candidates you already have.

what you are actually buying

keyword search is good at literals. if the query contains ERR_PAYMENT_TIMEOUT or a sku or a feature flag name, sparse retrieval finds the doc that contains those tokens. dense retrieval often does not, or it finds a neighboring concept that sounds related and is wrong. embeddings are polite about near-misses. they will happily rank a paragraph about payment retries next to a paragraph about payment timeouts because both live in the same semantic neighborhood.

vector search is good at paraphrase. "how long until i get my money back" and "refund timeline for credit cards" should land near the same policy even when the wording barely overlaps. keyword search alone treats those as different planets unless you hand-maintain synonyms forever.

hybrid search is the admission that both failure modes show up in the same product. users do not politely segregate their questions into "exact match day" and "fuzzy day." they paste an error string into one message and ask a vague policy question in the next. a single retrieval mode asks you to pick which class of user you are willing to disappoint.

the boring implementation is enough for most teams: run bm25 (or whatever your search engine already does well), run a vector query against the same corpus, take the top results from each, and merge them with a simple reciprocal rank fusion or a weighted mix you can explain in one sentence. if you cannot explain the merge without a whiteboard, you have already started the science fair.

the ceremony that does not help yet

people reach for complexity because hybrid search sounds like a systems problem, and systems people like knobs.

you do not need a learned ranker on day one. a cross-encoder reranker is useful later, when you have a stable candidate set and a way to tell whether reranking helped. before that, it is another moving part that can hide the fact that your chunk boundaries are garbage.

you do not need a custom fusion model trained on click logs you do not have. early products invent preference data out of thin air, then tune against it, then wonder why production feels different. if you have real judgments, use them. if you do not, keep the merge rule dumb and inspect failures by hand.

you do not need five indexes with different embedding models "for coverage." that is how latency and cost grow while relevance stays muddy. one decent embedding space plus keyword search covers more ground than three vector indexes that disagree politely.

you also do not need to rename the project. hybrid retrieval, multi-path retrieval, lexical-semantic fusion. call it search. the users already do.

the science fair impulse is understandable. papers reward novel fusion. vendors reward architecture diagrams. your users reward answers that cite the right paragraph. those incentives are not aligned, and pretending they are is how a two-week retrieval fix becomes a quarter.

a sequence that stays honest

start with the corpus you actually trust. if drafts, outdated versions, and marketing pages sit in the same index as live docs, hybrid search will retrieve the wrong thing with more confidence. filter before you fuse. metadata is still the cheapest relevance lever you have, even when you are not writing a post about metadata.

make sure both sides search the same unit of text. if keyword search hits whole documents and vector search hits paragraphs, your merge is comparing fruit. pick a chunking scheme, apply it to both paths, and accept that some documents will split awkwardly. awkward and consistent beats elegant and mismatched.

run both queries, merge the top ten or twenty from each, and look at the top five after fusion. do this on a short list of real questions from support tickets or internal slack, not on synthetic queries invented to flatter the demo. write down what each path contributed. if keyword search never changes the ranking, your literals are not showing up in queries, or your analyzer is stripping them. if vector search never changes the ranking, your paraphrases are rare, or your embeddings are blunt.

tune one weight only if the failure pattern is clear. if exact identifiers keep losing to soft semantic neighbors, give keyword more rank. if people ask in natural language and keep missing the right policy, give vectors more rank. changing both at once is how you convince yourself the system is improving while you lose the ability to explain why.

add a reranker only after the candidate pool is mostly sane. reranking a bad pool produces a prettier bad pool. it also makes every subsequent debug session start with "maybe the reranker." that sentence has burned more afternoons than i care to admit.

measure with a small set of graded questions you can re-run after each change. ten carefully labeled queries beat a dashboard nobody trusts. hybrid search is easy to make look busy. it is harder to make look better on the questions that already fail.

what "good enough" looks like

good hybrid search is quiet. an engineer types an error code and lands on the runbook. a customer asks about returns in plain language and lands on the current policy, not last year's blog post that used similar words. a product manager searches for a feature name that appears once in a table and still finds it, because the keyword path refused to be embarrassed by rarity.

bad hybrid search looks busy. it returns a diversified set of near-misses from both paths, fused into a list that feels thorough and still misses the one doc with the answer. diversification is not a virtue when the user wanted a specific page.

the other failure mode is overconfidence in the blend. teams ship hybrid, see a mild lift on a mixed eval, then stop inspecting individual misses. the blend becomes a personality: "we do hybrid now." personalities are hard to debug. pipelines with named steps are easier.

if you need a heuristic for when to stop: stop when additional ceremony stops changing the top result on your labeled misses. if reciprocal rank fusion and a weighted score mix produce the same three docs for the questions you care about, pick the simpler merge and move on. the remaining errors are probably corpus, chunking, or metadata. those problems do not care how elegant your fusion formula is.

hybrid search without the science fair is mostly restraint. keep both retrieval modes because users ask both kinds of questions. merge them with a rule you can defend. refuse the urge to add a third path until the first two are boringly reliable. the impressive diagram can wait. the person asking where the refund timeline lives cannot.