Qdrant recommendation and discovery API

Qdrant's recommend, discovery and context queries turn positive and negative example points into similar-item and steering features. This page covers what they do, how filters combine with them, and what to plan before building.

On this page

When a Qdrant recommendation and discovery API fits your product

A team that wants "more like this" suggestions, similar-item panels or steered browsing on a Qdrant collection should look at Qdrant's recommend, discovery and context queries. These query types take point IDs or vectors as positive and negative examples, so the product can say "show me items like these, but not like those" without the team computing the vectors itself. The open-source engine is licensed under Apache-2.0 and can be self-hosted in infrastructure you control, so these features are available without a Qdrant Cloud subscription.

The Qdrant documentation lists nine query types: nearest neighbor, recommendation, discovery, context, formula, MMR, order-by and sample. Plain nearest neighbor search answers "what is closest to this vector". Recommendation, discovery and context queries add example points to that question, and formula, MMR, order-by and sample cover other ranking and sampling needs. Your product team should map each feature to one query type before design starts, because the choice decides which inputs the application must collect from users and how it explains results.

Before committing, confirm three things in your own environment: the point IDs or vectors your application will send as examples, how payload filters such as category, availability or region combine with the example-based ranking in the query, and whether the results are stable enough for your reviewers. Test these with representative data and recent catalog changes, and check the exact request fields against the Qdrant documentation for the version you deploy.

Which query type fits which feature

This table compares plain nearest neighbor search, recommend, discovery and context queries by the inputs each needs, the product feature it suits and the main risk to plan for. Read each row as a choice: start from what your product has at query time (a query vector, liked and disliked items, or pairs of preferred and rejected items) and check the risk column before committing.

Query typeInputs requiredProduct feature it suitsMain risk to plan for
Nearest neighborOne query vector from an embedding of text, image or itemText search, semantic lookup, find items similar to a query stringResults depend entirely on the embedding model, so re-embedding changes every ranking
RecommendPositive example IDs or vectors, plus optional negative examplesSimilar items on a product page, more like this from a saved listSparse or stale example sets narrow results and can repeat the same items
DiscoveryA target plus context pairs that say which of two items is preferredExploration feeds and ranking that steers toward a goal without a single seedPairs must be built carefully, and weak pairs produce hard-to-explain ordering
ContextOnly positive and negative pairs with no target vectorSession-based browsing where users give implicit preference signalsFew pairs per session gives unstable results, so set a fallback for thin sessions
Cold-start itemsItem vector only, with no interaction historyNewly added products or documents with no clicks yetRecommend and discovery need example IDs already in the collection, so new items must fall back to nearest neighbor
Filtered resultsPayload conditions such as availability, region or language, combined with any query typeStock-aware, region-aware or permission-aware recommendationsFilters without payload indexes slow queries, so confirm index coverage for each filter field
Evaluation effortLabeled user outcomes such as clicks, saves or purchasesMeasuring whether recommendations beat plain similarity searchOffline tests miss feedback loops, so plan an online comparison before release

How payload filters combine with example-based queries

A category, brand, availability or price filter narrows the points that a recommend, discovery or context query can return. The positive and negative examples still steer the scoring, but only points that pass the filter can appear in the results. In a similar-products widget (illustrative), a shopper viewing a winter jacket might see alternatives only from in-stock items in the outerwear category.

  • Candidate restriction: The filter removes points before they are ranked, so an item that looks similar on vectors alone is excluded if it fails the condition.
  • Payload indexes: Fields such as category, brand or stock status used in filters should have a payload index of the matching type, so filtered queries stay predictable as the collection grows.
  • Frequent updates: Stock and price change often, so decide how those updates reach the payload and how quickly they must be written.
  • Thin result lists: A narrow filter can return fewer points than the requested limit, so the widget needs a defined fallback.

Confirm that every filtered field has an index in your schema and that the front end handles short lists without showing an empty state.

Setting up a similar-item endpoint on Qdrant

This sequence takes a team from an unchecked embedding choice to a tested recommend and discovery endpoint that returns similar items and respects business filters. Each step ends with a check so the team can see whether results are trustworthy before the endpoint reaches users.

  1. Confirm the embedding model and vector size

    The team that owns the catalog and the team that owns the embedding pipeline agree on one embedding model, its output dimension, and the distance metric the model was trained for. Write these down with the model version, because every item and every example vector must come from the same model. Mixing models or versions in one collection makes similarity scores meaningless. The step is done when someone can regenerate a sample vector for a known item and get the same result twice. Confirm the vector size against the model documentation, not from memory.

  2. Create the collection with the right distance metric

    The platform engineer creates a Qdrant collection with the vector size and distance metric confirmed in the previous step, using the Qdrant installation of your environment and the collection API. Choose the metric the embedding model documents, since a mismatch quietly distorts ranking. Decide whether you need a single unnamed vector or named vectors, because that choice is hard to change later without recreating the collection. The check is a collection info call that returns the expected size and distance, and a test insert of one point that comes back with the same vector.

  3. Load items with payloads

    The data engineer loads catalog items as points, each with a stable ID, its embedding, and a payload holding the fields you will filter on, such as category, availability, language, or region. Keep the payload small and consistent in type, because a field that sometimes holds a string and sometimes a number will confuse filters later. Load in batches and keep the ID mapping to your catalog key so results can be joined back to the product record. The check is a count comparison between the source catalog and the collection, plus a fetch of a few points to confirm their payloads match the source records.

  4. Create payload indexes for filter fields

    The platform engineer creates payload indexes on every field that the endpoint will use in a filter, with the field type matching the data, such as keyword for categories and integer or float for numeric values. Indexes speed up filtered searches and keep filtering practical as the collection grows. Index only the fields the endpoint actually filters on, since each index uses memory. The check is to run a filtered recommend call with a known category and confirm the response time and results are correct, and to review the collection info to confirm each index exists with the expected type.

  5. Define example selection logic in the application

    The application team writes the logic that chooses positive and negative examples before any call reaches Qdrant. Positive examples might be items the user viewed or bought recently, and negative examples might be items the user dismissed or items from a category they avoid. Set limits on how many examples each request sends and what happens when a user has no history, so the endpoint falls back to a simpler nearest-neighbor query. The check is a unit test suite with sample user profiles that shows which IDs go into each request, including the cold-start and empty-history cases.

  6. Test recommend and discovery calls with real examples

    The team runs recommend and discovery queries using real item IDs from the catalog, with the example logic from the previous step and the payload filters the product needs. Compare the top results with items that a domain expert already knows are similar, and check that negative examples actually push unwanted items down the list. Run the same examples with and without filters to confirm the filters remove only what they should. The step is done when a reviewer signs off on a set of known-good cases, and the results are saved as a regression set for future changes to the model, collection, or selection logic.

Trade-offs that shape recommendation quality

Recommend and discovery queries are only as good as the examples they receive and the filters applied around them. The decisions below connect example selection, filtering, embedding choices and evaluation, and each one is easier to settle before the feature reaches users than after.

Cold-start items without examples

A new product, article or listing has no interaction history, so it cannot be a positive example and may never surface in recommend queries. Decide whether new items fall back to content-based nearest neighbor search on their own embedding, or whether they receive a seeded example from editorial or catalog metadata. Check that the fallback is explicit in the application code so new items are not silently excluded.

Qdrant query types

Example selection from user history

Choosing which past interactions become positive and negative examples shapes every result. Recent, high-intent actions such as purchases may carry more meaning than passive views, and a long history can pull results toward old tastes. Decide how many examples to send, how to weight them by recency, and which events count as negatives, then test those rules against a sample of real sessions.

Negative examples that over-constrain results

Negative examples push results away from a vector region, which helps when a user has rejected a category. Too many negatives, or broad ones, can exclude most of the collection and leave a narrow, repetitive result set. Limit negatives to clear signals, watch how many candidates remain after the constraint, and confirm the behavior with the discovery and context query settings documented for your Qdrant version.

Latency from filters and large examples

Payload filters combined with recommend or discovery queries can slow responses when the filter matches a large share of points or when the example list is long. Each example adds work to the query, so the cost grows with the number of examples as well as the collection size. Measure p95 latency with production-like filters and example counts, and confirm that payload indexes exist for every field used in filters.

Drift when embeddings change

Recommendations depend on the geometry of the embedding space. If the embedding model changes, or a new version is rolled out, stored item vectors and newly embedded examples no longer share a space, and results can degrade without any error. Plan a re-embedding strategy with a parallel collection or named vectors, and confirm how the old and new vectors will be compared during the transition.

Evaluation without a labeled set

Teams rarely have judged relevance labels for similar-item results, so quality is often judged by feel. Build a small offline set from clicks, add-to-cart events or expert ratings, and compare variants on click-through, dwell time or conversion from a controlled rollout. Record which example rules, filters and embedding versions were live during each test so that results can be reproduced later.

How an application request reaches the example-based query

The flow starts with a user action, such as viewing a product, which the application service turns into positive and negative example point IDs. The service sends those IDs to the Qdrant collection with payload filters, such as availability or tenant, applied in the same query. Qdrant returns scored candidates, and the application then applies business rules like exclusions or diversity before showing results. The trust boundary sits at the Qdrant API key or JWT check, so the service must hold a credential scoped to the collection it reads.

Request path from user action through the Qdrant API boundary to ranked results.

Access control and data exposure for recommendation endpoints

Recommendation and discovery queries expose both the Qdrant API and the behavioral data inside the example IDs. The cards below cover the controls to put in place before the endpoint serves users, and the data handling questions to settle with your privacy and compliance teams.

Assume the endpoint is open by default

Self-deployed Qdrant listens on all network interfaces and has no authentication configured out of the box. A recommendation endpoint reachable from a network segment it does not need is an open read path to every vector and payload in the collection. Before any similar-item feature goes live, confirm the bind address, the port exposure on the host or load balancer, and that no default configuration reaches production unchanged. Test from outside the intended network to verify the result.

Qdrant security docs

Separate admin and read-only keys

Qdrant supports admin and read-only API keys. The service that answers recommendation requests needs only read access, so it should hold a read-only key. Keep the admin key out of application configuration, store it in a secrets manager, and limit who can use it for collection changes. Confirm which key each service uses in its deployment manifest and rotate keys through a documented procedure.

Scope JWT permissions per collection

JWT-based access control lets you grant read or write permissions per collection. A recommendation service that serves one catalog should not be able to read a collection holding support tickets or customer profiles. Map each application or tenant to the collections it may query, and test that a token for one collection is refused on another. Ask your Qdrant contact to confirm how the token claims for your version are structured.

Terminate TLS for REST and gRPC

Recommendation requests carry positive and negative example IDs and filter values, which can reveal what a user looked at or avoided. Enable TLS for both REST and gRPC so this traffic is encrypted between the application, any gateway and the Qdrant nodes. Decide where certificates terminate, who renews them, and whether internal node-to-node traffic also uses TLS. Verify with a test client that plain connections are refused.

Restrict network paths to the service

Place Qdrant on a private subnet and allow inbound connections only from the recommendation service, the gateway and the cluster nodes that need them. Keep the cluster ports used for internal communication off public routes. Where a gateway fronts the endpoint, enforce authentication and rate limits there as well. Document each allowed source so a later change to a security group or firewall rule is reviewed against the list.

Log authenticated operations

Qdrant's JSON audit logging records authenticated API operations, which lets you trace which key or token queried which collection. Route these logs to your central log platform with retention that matches your policy, and alert on unexpected admin operations or reads from unknown keys. Check that the logs record the operations you need for investigation without copying query payloads you are not allowed to store.

Treat example IDs as personal data

A positive or negative example ID often points to a product a person viewed, bought or rejected, and a history of those IDs can reveal behavior. Where the collection links to identifiable users, the example IDs may be personal data under your privacy rules. Decide with your privacy team whether the application may store query histories, how long they are kept, and how they are removed on request. Avoid writing user identifiers into payloads or logs used for recommendations.

Questions teams ask before building recommendations on Qdrant

What drives the effort to build a recommendation feature on Qdrant?

Effort is driven mainly by how many signals the feature combines and how clean the item data is. A recommend query built on a few well-chosen positive examples is a small piece of work, while a feature that blends vector similarity with business rules, multiple embeddings and per-user filtering takes more design and testing. The main cost drivers are the number of collections and named vectors, the payload fields used in filters, the quality of item metadata, and how many upstream systems must send updates. Ask any partner to break the estimate into data preparation, query design, filter and index design, and testing, so you can see which part moves the total.

Can our own team build recommendations on Qdrant without outside help?

A team with solid backend skills and some experience with vector search can build a first version alone, because the recommend, discovery and context query types are documented in the Qdrant API and the open-source engine is free to run. Teams usually need outside help in three places: choosing an embedding strategy, designing payload indexes for filtered results, and setting up a production deployment with authentication, backups and monitoring. If your team has not run a vector database in production before, a short design review and a hardening pass often cost less than learning those lessons on live traffic. Decide which of these three areas you can staff internally before you decide on the whole build.

How long does a first version of a Qdrant recommendation feature usually take?

The duration depends on the data and the integration scope more than on the Qdrant query itself. A first version that reads items from one collection, uses one embedding, and returns results to one application is a much smaller project than one that ingests from several catalogs, handles multiple languages, and must respect per-tenant access rules. The factors that extend the timeline are the number of data sources, how many item attributes need filtering, how much behavior data must be cleaned before it can label examples, and the number of environments that must be provisioned. No duration is fixed by the product, so ask for a timeline built from a written scope with named milestones and an agreed test plan.

What does the work need from our team: embeddings, behavior data and a test set?

Three inputs decide whether the feature works, and your team needs to provide or approve each one. The first is an embedding strategy: the model that turns items into vectors, the dimension, and the plan for re-embedding when the model changes. The second is behavior data, such as views, clicks and purchases, which you use to pick positive and negative examples for the recommend and discovery queries. The third is a labeled test set of item pairs or user sessions that a reviewer agrees are good or bad recommendations, which lets you compare query settings without relying on opinion. Confirm who owns each input, how often it is refreshed, and whether privacy rules limit which behavior signals you can store.

Does the open-source Qdrant engine have a license cost?

The Qdrant engine is licensed under Apache-2.0, and the open-source engine is free to self-host, so there is no license fee for running recommend, discovery or context queries on your own servers. The costs you do pay are infrastructure for memory and storage, the engineering time to build and operate the feature, and any paid service you choose on top. Be aware that the license covers the software, not your operating burden: upgrades, snapshots, authentication and monitoring remain your responsibility unless you contract them out. Review the license text with your legal team before distribution, because license obligations differ when you embed or redistribute the software.

When does a managed or Private Cloud option change the picture?

A managed or Private Cloud option changes the picture when you want the vendor to run the cluster, or when your security team needs stronger isolation than a shared service provides. Qdrant Cloud offers a free single-node tier and usage-priced Standard and Premium tiers, while Qdrant Hybrid Cloud and Qdrant Private Cloud are priced through Qdrant sales. The Premium tier adds SSO, private VPC links and a 99.9% uptime SLA, which matter for regulated workloads. Compare the vendor's uptime commitments, data location, and shift in operating duties with the cost of running your own cluster, and ask Qdrant to confirm which features are included in each plan before you decide.

Which checks should we run before a discovery query goes live?

Before release, confirm that positive and negative examples are drawn from data your team trusts, that filters on payload fields return the results you expect, and that the feature behaves when an example point is missing or deleted. Test the combination of recommend or context queries with payload filters on realistic collection sizes, because filtered searches can behave differently from unfiltered ones. Check that the query settings your team tuned on the test set hold up on fresh behavior data after a few weeks. Finally, verify that access to the collection follows your access model, since the recommend endpoints read the same stored vectors as the rest of the API.

How DeployOpen scopes and delivers this feature

DeployOpen starts with a written fixed scope that names every query type the application needs, such as recommend, discovery and context queries, and which of them will run in production. The same document lists the payload filters each query must respect, the pipeline that writes embeddings and payloads into the collection, the roles and per-collection permissions that control who can read or write it, and the tests that prove the results are correct. Deliverables and timelines are agreed in writing before work begins, so the scope can be checked against your product requirements by your team and ours.

Delivery happens inside your own infrastructure, whether that is your cloud accounts, data centers or an air-gapped network. DeployOpen configures the collection, the positive and negative example handling in your service layer, and the access controls, then documents what was built so your engineers can run it. A quote follows from the written scope. DeployOpen does not publish a price list, so the reader should ask for the quote to break out the query design, filter and index work, pipeline build, access control setup and testing as separate lines. Ask which of those items are one-time and which recur.

After launch, many teams want continued help. DeployOpen offers optional retainers for upgrades and continuous testing, which can cover Qdrant version changes and regression checks on recommendation quality and filter behavior. Confirm before signing what a retainer includes, how upgrade windows are agreed, and who runs the retest after a change to query logic or payload schema. Qdrant's own release history, including the Qdrant GitHub releases page, is the natural place to track the versions your retainer would need to cover.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.