Glossary/Retrieval & Search

What is Hybrid Search?

A retrieval strategy that combines semantic (vector) search with keyword (full-text) search and merges the results, capturing both meaning and exact matches.

Vector search finds passages that mean the same thing as the query; keyword search finds passages that contain the same strings. Each fails where the other excels: vectors miss exact error codes and product names, keywords miss paraphrases and synonyms.

Hybrid search runs both and merges the ranked lists — commonly with reciprocal rank fusion (RRF), which rewards documents that rank well in either list without needing to calibrate incomparable scores against each other.

For technical documentation, hybrid retrieval is close to mandatory: users search both ways, often in the same query ("ERR_4012 after rotating keys").

In BeforeQuery

How BeforeQuery uses this

Every BeforeQuery retrieval — chat grounding, the Search API, the widget's search mode, MCP's search_docs — runs pgvector cosine similarity and PostgreSQL full-text ranking in parallel, then fuses them with RRF. Source-group filters and document visibility are applied at query time.

From definition to deployment

Connect a knowledge source and see cited AI answers on your own content in minutes — free, no credit card required.

Get Started Free