Look for meaning.
Turn text into a list of numbers called a vector. Texts with similar meanings can land near each other, even when they use different words.
Good search connects what you type with what you mean. See how meaning, words, and a second look work together to find more useful results.
Imagine asking a librarian for help. They look for related ideas, check the important terms, then read the promising passages more closely.
Turn text into a list of numbers called a vector. Texts with similar meanings can land near each other, even when they use different words.
Use a small set of weighted vocabulary signals. Names, specialist terms, and other specific words provide clues that meaning alone can miss.
A second model reads the question alongside each shortlisted passage. It can move a direct answer above a result that is only broadly related.
Follow a question through six steps. Press play for the animated tour, or choose any step and read at your own pace.
You ask about changing a flight. The middleware receives the request, checks access and inputs, and coordinates the search.
Middleware · request orchestration“Can I change my flight without paying a fee?”
Searching an already indexed collection of travel passages.
Smart Embedder creates a dense vector for meaning and a learned sparse vector for vocabulary signals. They must match the models used to index the collection.
Smart Embedder · embedding modelsA compact numerical representation
[0.12, −0.38, 0.71, …]A few weighted vocabulary entries
Token labels and weights are illustrative.
Both representations describe the same question.
Qdrant searches the stored dense and sparse vectors in two branches. Each returns its own ranked list of likely matches, called candidates.
Qdrant · two prefetch branchesFour entries shown per branch. Lists can overlap.
Reciprocal Rank Fusion (RRF) gives credit for a passage’s position in each list. Higher positions contribute more. The same passage appears only once in the fused list.
Qdrant · server-side fusionUp to 50 fused candidates return to the middleware.
The middleware sends the top 20 candidates’ text to Smart Embedder. Its reranker scores each question–passage pair, then the middleware reorders that window.
Smart Embedder · cross-encoder rerankerIllustrative model scores. They are not confidence in an answer.
The middleware returns up to five results in this example, with their source text and scores. Your application can display the passages or use them as context for an answer.
Middleware → your application“You can change a standard ticket without a change fee. If the new flight costs more, you still pay the fare difference.”
A fictional policy, used only to explain search.
Use a tiny collection to make every decision visible. Change the shortlist, switch the reranker on or off, and select a result to see why it is there.
Try this: set the window to 2. The policy is outside that window, so the reranker cannot promote it.
“You can change a standard ticket without a change fee. If the new flight costs more, you still pay the fare difference.”
This passage answers the question directly and adds an important condition.
Dense #3 + sparse #3 → 1/4 + 1/4 = 0.500 RRF
The closer look matters: the policy starts at fused rank #3 and moves to #1.
This is a teaching simulation, not a live search or benchmark. Passage text, retrieval rankings and reranker scores are hand-authored. RRF scores and the shortlist are calculated in your browser. The examples use equal weights, k = 2, and a stable passage-ID tie-break. Reranker scores are not probabilities that the passage is correct.
Each list contributes credit based on where it places a passage. Add those contributions; a missing passage contributes zero. In Qdrant’s equal-weight RRF, ranks start at zero.
For the policy at visible position #3 in both lists, the internal ranks are 2 and 2. With k = 2: 1 / (2 + 2) + 1 / (2 + 2) = 0.500. A passage found by only one branch has only one term. The lab keeps the best N fused candidates, reranks only the selected head, and appends the unchanged tail before showing three results.
RRF is the default in this stack. DBSF is another supported fusion method; it normalizes score distributions before combining them. The lab demonstrates RRF only. Read Qdrant’s fusion reference ↗
The animation follows this repository’s architecture. Three separate services cooperate through explicit HTTP requests.
Your application’s entry point. Checks the request, calls the models and Qdrant, reorders the results, then returns them.
middleware-qdrant-managerTurns text into vectors and scores query–passage pairs. Models run locally on CPU or GPU; this service does not store your collection.
server-embedder-rerankerStores vectors and passage payloads. Runs the two retrieval branches and fuses their rankings before returning candidates.
Your Qdrant instance, external or bundledApplication → Middleware → Smart Embedder (encode) → Middleware → Qdrant (retrieve + fuse) → Middleware → Smart Embedder (rerank) → Middleware → Application
Before the search startsDocuments must already be split into passages, embedded and stored. Querying does not re-embed the whole collection. The optional MCP server gives agent clients another way to call the middleware.
Two model profiles, the same flowbasic uses BGE-M3 embeddings and a BGE reranker. advanced uses Qwen dense embeddings, MILCO sparse embeddings and a Qwen reranker. The dense+sparse flow here does not use ColBERT. Why ColBERT stays out ↗.
There is no setting that wins for every collection. Evaluate with real questions and passages you know should be found.
Retrieving more candidates may catch useful passages a smaller pool misses. It also adds work. A reranker cannot recover anything that never reached its shortlist.
A larger window gives the model more passages to compare with the question. It usually costs more time and compute. A window of one cannot change the order.
A well-ranked passage can still be outdated, incomplete, or wrong. Preserve source information, check the evidence, and measure quality on your own use case.
A piece of a document that can be retrieved on its own. It should contain enough context to be useful. Splitting a policy in the wrong place can separate an answer from its conditions.
A numerical representation of text produced by a model. Dense embeddings use a fixed-length list of numbers; sparse embeddings retain weighted entries from a much larger vocabulary space.
A passage retrieved as a possible match. It may be discarded when lists are fused, fall outside the rerank window, or rank below the final results you requested.
A model that scores the query and passage together. Unlike comparing separately stored vectors, it can examine how the two texts interact. This closer reading is why it is used on a shortlist.
No. Fusion combines the evidence from retrieval rankings. Reranking uses a model to score query–passage pairs. In this stack, Qdrant performs fusion and Smart Embedder performs the cross-encoder reranking.
This is the retrieval part that a RAG application can use. A separate language-model step can generate an answer from the returned passages. This search pipeline itself returns ranked evidence, not a generated answer.
The technical explanation was checked against the repository and the linked primary documentation. All travel, support and API passages in the lab are fictional teaching examples.