> For the complete documentation index, see [llms.txt](https://docs.nosto.com/techdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nosto.com/techdocs/implementing-nosto/implement-search/features/hybrid-vector-search.md).

# Hybrid Vector Search

Merchants with Hybrid Vector Search enabled gain the ability to search products based on conceptual similarity in addition to precise retrieval based on textual relevance.

Depending on merchant preferences, Hybrid Vector Search can take over from keyword search when:

* The search query has a poor click-through rate.
* The search query has a poor conversion rate.
* The search query has no results.
* Hybrid Vector Search was requested specifically for a particular search query.

In principle, Hybrid Vector Search works out of the box and doesn't require changes to the integration. The suggestions below are optional.

## Recognizing the type of search logic being used

To understand results, it's valuable to know which type of logic generated them. The search API exposes this information in the [`SearchProducts` object](https://search.nosto.com/v1/graphql?ref=SearchProducts) of the search response.

[`searchType`](https://search.nosto.com/v1/graphql?ref=SearchProductSearchType) contains the type of search logic being used:

* `keyword` indicates pure keyword search.
* `vector` indicates pure vector search.
* `hybrid` indicates hybrid vector search (blended keyword + vector search).

This information can optionally be used in the search result page to convey whether these results are precise (keyword search) or conceptually related (Hybrid Vector Search). Hybrid Vector Search results can be more general than keyword search results — communicating this to the user helps with setting expectations.

The response also provides [`searchTypeReason`](https://search.nosto.com/v1/graphql?ref=SearchProductSearchTypeReason) which indicates why a particular `searchType` was used. Most notably, this will list the hybrid vector search trigger that was applied e.g., 0 keyword search results, low CTR.

### Tracking requirements

To enable Hybrid Vector Search analytics, include `searchType` and `searchTypeReason` in impression and click tracking events sent to Nosto.

The `searchType` and `searchTypeReason` values queried from the search API can be included in tracking events verbatim within the tracking metadata properties `searchType` and `searchTypeReason`, on the same level as `query`. Here is an example for a well-formed tracking metadata that includes both:

```json
{
  "hasResults": true,
  "autoComplete": false,
  "autoCorrect": false,
  "keyword": false,
  "organic": true,
  "refined": false,
  "refinedQuery": null,
  "sorted": false,
  "query": "t-shirt",
  "resultId": "d65b040c-56ae-4c6d-a038-fe908e140855",
  "searchType": "vector", // or "keyword" or "hybrid"
  "searchTypeReason": "no_results" // pass through whatever the search API returns
}
```

When using NostoJS' automatic tracking (using the `track` parameter), `searchType` and `searchTypeReason` tracking is included automatically, and no adjustments to the integration are required.

API integrations and integrations managing tracking metadata manually need to take care of passing through both `searchType` and `searchTypeReason` explicitly.

## Limitations

When Hybrid Vector Search engages, features of Nosto search work as normal with one major caveat: Only the **1000 most relevant results** are accessible via pagination and covered by facets and sorting. Depending on the strictness of the relevance threshold defined in the Hybrid Vector Search settings, fewer results could be available.

This cutoff is based purely on Hybrid Vector Search relevance and does not take pinning or promote/demote rules into account.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nosto.com/techdocs/implementing-nosto/implement-search/features/hybrid-vector-search.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
