Stay organized with collections
Save and categorize content based on your preferences.
This page describes how retrieval and ranking work together to deliver relevant
search results in Vertex AI Search apps.
Overview
In short, retrieval is finding relevant documents, while ranking is
ordering those retrieved documents. Ranking all the available documents
can be computationally expensive. Therefore, retrieval and ranking work
sequentially.
First, the search model understands the query and rewrites it.
Then, depending on the data sources available and the number of indexed
documents in your data store, the model
retrieves documents in the order of thousands. A relevance score is assigned to
the retrieved documents.
The ranking model then orders the retrieved documents
and serves the top 400 ranked results. The following image shows how
these two processes fit into the search workflow.
Figure 1. Retrieval and ranking in search workflow
Retrieval methods
Retrieval is the process of selecting a subset of documents from your data store
that are relevant to a user's query. Vertex AI Search model
manages retrieval for your search apps based on different signals, such as the
following, and assigns relevance scores:
Topicality: Includes keyword matching, knowledge graphs, and web signals.
Embeddings: Includes embeddings to find conceptually similar content.
Cross-attention: Allows a model to consider the relationship between a
query and a document to assign a relevance score to the document.
Freshness: Involves ascertaining the age of the documents in the data
store.
User events: Includes conversion signals used for personalization.
Ranking takes the documents that are selected during the retrieval phase,
assigns them a new relevance score according to the following conditions, and
reorders them:
Boost: Promotes and demotes certain results according to custom attributes or
freshness. This impacts the first 1,000 retrieved documents and ranks the top 400.
For more information, see Boost search results.
Custom ranking: Controls, tunes, and overrides the default ranking logic
with a formula-based ranking algorithm to suit your specific requirements.
The relevance score that custom ranking assigns takes a precedence when
serving the results.
For more information, see
Customize search results ranking.
Search tuning: Impacts how the model perceives the semantic relevance of
your documents and changes the embedding relevance scores. For more
information, see
Improve search results with search tuning.
Event-based reranking: Updates the results at the time of serving using
user-events-based personalization model.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[],[],null,["# About retrieval and ranking\n\nThis page describes how retrieval and ranking work together to deliver relevant\nsearch results in Vertex AI Search apps.\n\nOverview\n--------\n\nIn short, retrieval is finding relevant documents, while ranking is\nordering those retrieved documents. Ranking all the available documents\ncan be computationally expensive. Therefore, retrieval and ranking work\nsequentially.\n\nFirst, the search model understands the query and rewrites it.\nThen, depending on the data sources available and the number of indexed\ndocuments in your data store, the model\nretrieves documents in the order of thousands. A relevance score is assigned to\nthe retrieved documents.\n\nThe ranking model then orders the retrieved documents\nand serves the top 400 ranked results. The following image shows how\nthese two processes fit into the search workflow.\n**Figure 1.** Retrieval and ranking in search workflow\n\n### Retrieval methods\n\nRetrieval is the process of selecting a subset of documents from your data store\nthat are relevant to a user's query. Vertex AI Search model\nmanages retrieval for your search apps based on different signals, such as the\nfollowing, and assigns relevance scores:\n\n- **Topicality**: Includes keyword matching, knowledge graphs, and web signals.\n\n- **Embeddings**: Includes embeddings to find conceptually similar content.\n\n- **Cross-attention**: Allows a model to consider the relationship between a\n query and a document to assign a relevance score to the document.\n\n- **Freshness**: Involves ascertaining the age of the documents in the data\n store.\n\n- **User events**: Includes conversion signals used for personalization.\n\nAdditionally, in a search request, you can supply\n[relevance filters](/generative-ai-app-builder/docs/filter-by-relevance) and\nmetadata filters for [website data](/generative-ai-app-builder/docs/filter-website-search)\nand [structured or unstructured data](/generative-ai-app-builder/docs/filter-search-metadata) to\nnarrow down the list of relevant documents.\n\n### Ranking methods\n\nRanking takes the documents that are selected during the retrieval phase,\nassigns them a new relevance score according to the following conditions, and\nreorders them:\n\n- **Boost** : Promotes and demotes certain results according to custom attributes or freshness. This impacts the first 1,000 retrieved documents and ranks the top 400. For more information, see [Boost search results](/generative-ai-app-builder/docs/boost-search-results).\n- **Custom ranking** : Controls, tunes, and overrides the default ranking logic with a formula-based ranking algorithm to suit your specific requirements. The relevance score that custom ranking assigns takes a precedence when serving the results. For more information, see [Customize search results ranking](/generative-ai-app-builder/docs/custom-ranking).\n- **Search tuning** : Impacts how the model perceives the semantic relevance of your documents and changes the embedding relevance scores. For more information, see [Improve search results with search tuning](/generative-ai-app-builder/docs/search-tuning).\n- **Event-based reranking**: Updates the results at the time of serving using user-events-based personalization model."]]