Qdrant Hybrid Search Prefetches
QdrantOfficialPublished by Qdrant
- Skill
- Tool integration
- Data and AI
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides guidance on constructing prefetch queries for hybrid retrieval in Qdrant. It covers implementing lexical retrieval alongside semantic search, choosing between full-text indexing and sparse vector models, and managing multi-representation search where items are embedded or indexed in multiple ways. It includes instructions for configuring BM25, handling multi-tenant scoring, and optimizing search across different data fields.
What it does
- Explains how to combine dense and lexical retrieval methods in a single Query API request.
- Provides criteria for selecting between BM25 full-text indexing and sparse vector models.
- Details configuration steps for text processing, including tokenization, stemming, and stopword management.
- Offers strategies for multi-representation search using named vectors and prefetch limits.
- Outlines migration paths from sparse vector BM25 to full-text indexing.
- Addresses per-tenant scoring statistics and grouping considerations for multi-representation retrieval.
When to use it
- When semantic vector search fails to capture exact keyword or term matches.
- When you need to search across multiple representations of the same item, such as titles, abstracts, and chunks.
- When migrating existing sparse vector BM25 implementations to Qdrant 1.20+ full-text indexing.
- When configuring search for multi-tenant collections to ensure accurate scoring statistics.
- When you need to implement hybrid search using different vector types or fields in one request.
Advantages
- Enables precise lexical matching alongside semantic search capabilities.
- Reduces inference costs by utilizing server-side BM25 on full-text indices.
- Supports flexible retrieval configurations for diverse data structures like nested arrays.
- Provides clear guidance on optimizing search recall when grouping chunk-level results.
- Allows for granular control over text processing settings per language.
Usage examples
- “How do I combine dense and sparse search in one Qdrant request?”
- The agent explains how to use multiple named vector prefetches to run parallel searches on different representations, or how to combine a dense vector search with a BM25 full-text query.
- “Should I use BM25 on a full-text index or sparse vectors?”
- The agent compares the two, recommending BM25 on a full-text index for Qdrant 1.20+ when text is in the payload, while noting sparse vectors are suitable for older versions or specific compatibility needs.
- “How do I migrate BM25 sparse vectors to a text index?”
- The agent provides steps to create a text index with scoring enabled, mirror existing text processing settings, and switch queries from sparse vectors to text queries.
- “How do I handle multiple fields for retrieval?”
- The agent advises on using named vector prefetches for each representation that carries independent signal, and suggests using BM25 for keyword-driven fields like titles or tags.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/qdrant/qdrant-hybrid-search-prefetches/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip qdrant-hybrid-search-prefetches.zip -d .agents/skills
Documentation by Qdrant
Different Searches in One Query API Request
Each prefetch runs exactly one search per one query.
Understand if user wants to run several parallel searches on:
The same vector representations but different queries or filters.
Different vector representations but the same raw query.
If first, help user to design logic of constructing query or/and filters on application side and then check Combining Searches. Don't forget to create indices on filterable payload fields, immediately after collection creation, prior to building HNSW, so filterable HNSW could be constructed.
If second, use named vectors, which allow to store multiple vector types per point in one collection. On Qdrant 1.18 or newer, named vectors can be added to or removed from an existing collection without recreating it Update vector schema; on 1.17 or older, they can be configured only at collection creation. To choose vectors, check following recommendations.
Missed Keyword Matches
Use when: pure vector search misses exact term or keyword matches and you need lexical retrieval alongside semantic search.
Most likely you need a lexical retriever alongside the dense one. Payload filtering doesn't provide any ranking score, so rank text with BM25 or a sparse vector.
Choose a Lexical Retriever for Text
BM25 on a full-text index (Qdrant 1.20 or newer, recommended default). Create a
textpayload index withscoringenabled on the field and query it with atextquery,usingset to the field name. Works on text already stored in the payload, so there are no embeddings to generate or store, existing data is indexed without re-upload, and the average document length is computed from your data. Text processing (tokenizer, stemming, stopwords, ASCII folding) comes from the index settings and defaults to no stemming and no stopwords, so configure the language.kandbare set per query. Scoring also enables phrase matching and costs extra memory and disk for document lengths and token positions. BM25 on a full-text index BM25 scoring indexBM25 sparse vector model, built into Qdrant core (computed server-side by the
qdrant/bm25inference model or client-side with FastEmbed). Use it on Qdrant 1.19 or older, when the text isn't stored in the payload, or when you need the sparse vector itself, for example for Edge compatibility. Good baseline, works out-of-domain, usually for long texts. Can be used for non-English content with per-language configuration. More in Sparse Vector BM25BM42 learned sparse, based on BM25, but better for small chunks of text & with meaning understanding. Works only on English. Requires fine-tuning for domain-specific retrieval. Requires FastEmbed (Python/REST only, not available in all SDKs). Not maintained.
miniCOIL learned sparse, BM25 with additional understanding of words meaning in context. Works only on English. Requires fine-tuning for domain-specific retrieval. Requires FastEmbed. Usage shown in FastEmbed miniCOIL documentation.
SPLADE++ learned sparse with term expansion. Heavier inference and resources usage but better performance due to term expansion. Requires fine-tuning for domain-specific retrieval. Provided in Qdrant Cloud Inference and FastEmbed versions work only on English. To use with FastEmbed, check FastEmbed SPLADE documentation.
External learned sparse embeddings, for example BAAI/bge-m3.
What to remember when using any lexical retriever:
tokenization and stemming affect exact matches, especially on custom codes, terms, etc.
On Qdrant 1.18 and older, IDF statistics are computed over the whole shard, which distorts scoring in multi-tenant collections where tenants have different vocabularies. On 1.19 or newer, scope them to one tenant with the
idfsearch parameter, and index the tenant field. On 1.20 or newer this also applies to BM25textqueries on a full-text index. See Per-tenant scoring statistics.BM25 might be not good for small chunks of text, as BM25 algorithm was initially created for search on long documents; consider adjusting document statistics (TF & IDF, k, b).
Statistics are per shard, and deleted or updated points can skew them slightly until the optimizer rebuilds segments, so scores can shift without a data change Corpus statistics.
What to remember when using BM25 on a full-text index:
Set stemmer and stopwords for the data's language on the index. Without them, BM25 matches only exact lowercased tokens. For language-neutral content (names, codes) use the
multilingualtokenizer and leave stemming and stopwords off Text processing.A
textquery returns points that contain at least one query term, and repeated query terms count once. Add a full-text filter to require or exclude terms.If the text field is inside an array of objects (reviews, passages), create the index with
nestedso each element is scored as its own document and the point gets its best element's score Score elements separately.Changing
scoringon an existing index rebuilds it from the stored payload without re-upload, but can take a while on large collections BM25 scoring.
What to remember when using the BM25 sparse vector model and miniCOIL (based on BM25):
Calibrate
avg_lenper field: Qdrant doesn't compute it for sparse vectors, and the default (256) assumes document-length text, so short fields (titles, tags) need a much smaller value or BM25 overweights term frequency. This is one reason to prefer a full-text index on 1.20 or newer Sparse vector BM25.Qdrant BM25 vectors are configured per language, so consider customizing stop words, stemming & tokenization when users documents mix several languages or carefully configure vectors per point when they are monolingual. To disable text processing entirely for language-neutral content: on Qdrant 1.19 or newer, use
stemmer: {"type": "none"}plus an emptystopwordsset explicitly (by default, BM25 applies English stemming and stopword removal); on 1.18 or older, uselanguage: none(deprecated as of 1.19).
Migrate from Sparse Vector BM25 to a Full-Text Index
Use when: the user already runs sparse vector BM25 on Qdrant 1.20 or newer and the text is stored in the payload.
Create a
textindex withscoringenabled on the payload field, mirror the sparse model's text processing (the sparse model defaults to English stemming and stopwords, a full-text index doesn't, so set theenglishstemmer and stopwords explicitly, and match tokenizer and ASCII folding), then switch queries from the sparse vector totextqueries. Dropavg_len. Scores will differ, so re-evaluate Migrate from sparse vector BM25.
More on Sparse Vectors for Text Search
Need to Combine Multiple Representations of the Same Item
Use when: the same item is embedded in multiple ways (e.g. different models, languages, modalities, or different fields like title/abstract/chunk) and you want to search across different representations in one request (don't have to be all of them, can be even one).
Use multiple named vector prefetches, each prefetch covers one representation.
A representation only earns its own prefetch if it carries signal independent of the others — e.g. title vocabulary the body never repeats, or an abstract treated as a single semantic unit vs. individual chunks. Don't add a prefetch per field reflexively; verify each candidate contributes content the other vectors don't.
When a representation's signal is mostly lexical — keyword-driven titles, codes, tags, or other short fields — prefer BM25 over an additional dense embedding. On Qdrant 1.20 or newer, create a BM25 full-text index (with scoring enabled) per payload field and run one text query prefetch per field, with no extra named vector. On older versions, use a sparse named vector with BM25. Server-side BM25 in Qdrant avoids the inference cost of another dense model and stores far less per point. Skip this when the field carries paraphrase or conceptual signal that exact-term matching would miss.
End-to-end worked example fusing title, abstract, chunk, and sparse-title named vectors with RRF and document-level grouping in one Query API call: Multi-Representation Search tutorial
If you have groups and subgroups of representations (document -> chunk, image -> patch), you could use searching in groups. To not store identical payloads several times, check Lookup in Groups. Index the grouping payload field (e.g.
document_id) as a keyword payload index before grouping.When grouping chunk-level points back to documents, each prefetch only contributes the candidates it returned — so size per-prefetch
limitwell above the final documentlimit(rule of thumb:prefetch_limit ≥ final_limit × expected_chunks_per_document), otherwise a few documents with many chunks saturate the candidate pool and relevant documents drop silently. Validate grouped recall on a labeled sample.Keep per-document vectors (title, abstract) denormalized on every chunk-level point for single-call queries, unless the duplication dominates storage; then move them to a sidecar collection joined via Lookup in Groups.
You can also search directly on multivectors, a matrix of dense vectors, in a prefetch.
However, it comes with several considerations, as multivectors were designed to support late interaction models using max similarity metric, so it's impossible to retrieve the list of individual max similarity scores for each query vector.
Moreover, multivectors are rarely a good pick for prefetch:
max similarity metric is not symmetric, so using HNSW index with it could be problematic
multivector representations are very heavy, as search process on them.
There are ways to make multivector retrieval cheaper (MUVERA, pooling), you can see more in "Evaluating Tradeoffs of Multi-stage Multi-vector Search"
What NOT to Do
Choose any search method (for example, BM25) without evaluation of its quality & resources used.
Use any search method (for example, BM25) without paying attention to the specifics of their configuration and applicability to the use case.
On Qdrant 1.20 or newer, default to sparse vector BM25 with a guessed
avg_lenwhen the text is already in the payload; a full-text index withscoringenabled computes it from the data.Run BM25 on a full-text index without configuring stemmer and stopwords for non-English data, or without
scoringenabled (a plain full-text index only filters).
Files
- ATTRIBUTION.mdAdded by AutoGineer909 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md13.1 KiB
LICENSE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2026 Qdrant Solutions GmbH
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Qdrant
- Publisher
- Qdrant (Official)
- Source
- qdrant/skills · skills/qdrant-search-quality/search-strategies/hybrid-search/search-types · commit 9f55f6a
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Qdrant.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download qdrant-hybrid-search-prefetches.zip