Hybrid Search
Retriqs uses Hybrid Search to improve retrieval quality.
In practice, this means Retriqs combines:
- vector search
- BM25 keyword search
- graph-based retrieval
The goal is simple: retrieve better context before the final answer is generated.
Last updated: April 4, 2026
Prerequisites
- A working installation of the Retriqs app
Why Hybrid Search matters
No single retrieval method is perfect on its own.
Vector search is strong when the meaning of a query matters, even if the exact words do not match.
BM25 is strong when exact words, names, identifiers, or important terms appear directly in the source text.
Graph-based retrieval is strong when entities and relationships matter, especially when the answer depends on connections across multiple pieces of information.
Hybrid Search brings these strengths together.
The result is better candidate retrieval, especially for questions that depend on both semantic meaning and exact term matching.
What each retrieval method contributes
Vector search
Vector search helps find content based on semantic similarity.
This is useful when:
- the wording in the question differs from the wording in the source
- the user asks something conceptually similar, not textually identical
- the best source is related in meaning, not just in keywords
BM25
BM25 helps score documents and chunks based on keyword relevance.
This is useful when:
- exact terminology matters
- a function name, library name, city name, or identifier appears directly in the source
- the user uses terms that should strongly influence ranking
- an exact phrase or specific word should not be missed
Graph-based retrieval
Graph-based retrieval helps when the answer depends on entities, relationships, and connected information.
This is useful when a question involves:
- linked facts
- multiple documents
- relationships between people, places, systems, or concepts
- information that is better represented as a graph than as isolated chunks
Why combining them works better
Hybrid Search improves retrieval because different questions fail in different ways.
For example:
- pure vector search can miss exact keywords that matter a lot
- pure keyword search can miss semantically relevant content with different wording
- chunk-only retrieval can miss relationship-aware signals that appear in the graph
By combining vector search, BM25, and graph-aware retrieval, Retriqs has more ways to surface the right context.
This is especially important when users ask questions that depend on both meaning and structure.
Example types of questions that benefit
Hybrid Search is particularly helpful for questions like:
- “How many times did this happen across the indexed sources?”
- “In what different cities did this person work?”
- “Which components are connected to this system?”
- “What does this library do in relation to that framework?”
- “Where is this concept explained, even if the wording is different?”
These questions often depend on:
- entity recognition
- relationship tracing
- multiple supporting sources
- exact names or terms
- semantically similar explanations
How Retriqs uses Hybrid Search
In Retriqs, Hybrid Search means retrieval is not relying on only one signal.
Instead, the system can use:
- semantic similarity from vectors
- keyword relevance from BM25
- graph-aware context from the knowledge graph
This improves the chances that the retrieved chunks and graph context are actually useful to the final answering model.
What BM25 improves specifically
BM25 is valuable because it helps correct some of the weaknesses of semantic retrieval alone.
It can help when:
- an exact keyword should strongly influence ranking
- a highly relevant document contains the right terms but is not the closest semantic match
- the query includes names, libraries, APIs, versions, or other literal strings
- direct term overlap should raise retrieval confidence
In those cases, BM25 can push the right documents higher in the candidate set.
What this means for answer quality
Retriqs does not treat retrieval as just “find similar text.”
The retrieval layer is meant to produce context that is:
- more relevant
- more precise
- better ranked
- more connected across sources
That improves the quality of what the answering model sees.
And when the context improves, the final answer usually improves as well.
Important note
Hybrid Search improves retrieval, but it does not guarantee perfect answers.
The final result still depends on factors such as:
- the quality of the indexed source material
- how well the graph was built
- how complete the storage is
- the model used for extraction and indexing
- the model used for final answer generation
That is why Hybrid Search should be understood as a retrieval improvement layer, not a magic fix.
When Hybrid Search is most useful
Hybrid Search is especially valuable when the indexed data contains:
- technical documentation
- product or engineering knowledge
- structured references
- code and configuration
- repeated entity names across many files
- related facts distributed across multiple sources
These are the kinds of collections where exact matches, semantic meaning, and graph relationships all matter at the same time.
Notes
A few practical notes:
- Hybrid Search combines vector retrieval and BM25 with graph-based retrieval signals
- it is useful when semantic meaning and exact term matching both matter
- it can improve ranking of documents that would be underrated by one retrieval method alone
- the final answer still depends on the quality of the storage and the answering model
Help shape Retriqs
Retriqs is still evolving, and feedback from early users helps us decide what to improve next.
If you want to share ideas, report issues, suggest graph packs, or help test new features, join our Discord: