Before retrieving pages, Google adds recent clicks to the query and decides the SERP format
QRewrite adds to the query the clicks from the last 24 hours, recorded with a delay of about ten minutes by Instant NavBoost, the fast version of NavBoost, Google’s system that records clicks per query. On breaking news, Google can therefore change the SERP almost in real time.
On a local query, Google decides at this stage whether to trigger the local pack, and it spots chains: it sets part of the SERP format before ranking even starts. On a brand query, QRewrite adds the site the query targets.
With query expansion, Google also retrieves pages that don’t use the query’s exact words: “fees” for “price”, “nyc” for “new york”.
The systems involved
- Query preparationQRewritethe Google Search component that rewrites, expands (query expansion) and annotates the query before retrieval (short for query rewrite)
- Salient termsQBSTQuery Based Salient Terms: the terms a page relevant to the query should contain
- EmbeddingsRankEmbedGoogle’s model that retrieves pages through embeddings, even without the query’s words
- ClicksNavBoostGoogle’s system that records clicks per query; its instant version handles clicks from the last 24 hours
- IntentsIntent BrainGoogle’s system that estimates a query’s broad intents from clicks
- AI in the SERPmagiGoogle’s AI behind AI Overviews and AI Mode
QRewrite’s 98 outputs: Google prepares the query with clicks, embeddings and a quick preliminary search
Before retrieval, QRewrite can produce 98 kinds of outputs for the query. Google therefore retrieves pages with an expanded query: synonyms learned from users’ reformulations, salient terms (QBST), dates, location. Clicks count from this stage on, through Instant NavBoost. QRewrite also computes the query’s embedding, which Google matches against page embeddings computed at indexing. Finally, Google runs FastSearch, a fast search it does not show in the SERP and uses to interpret the query.
QRewrite passes its outputs on to:
salient terms, recent history of results
InterpretationKScorerscores the query’s interpretationsexpanded query, embedding, retrieval plan
first results from FastSearch
Classic SERPRetrieval and rankingRankEmbed (embedding retrieval), twiddlers (ranking adjustments)local pack or not, shopping intent, video type
VerticalsLocal pack, Shopping, YouTubegrounding, user memory, agents
AI Overviews and AI ModemagiGoogle’s AI
Synonyms, salient terms and rewriting
11Google expands the query with synonyms learned from users’ reformulations and with a rewritten form, but it scores each page on the exact words: the variant serves retrieval, the exact word serves scoring. It can also insert the results of an alternative query into the SERP.
QueryBasedSalientTermsOutputsalient terms (QBST): the words a relevant page shows prominently, learned from about 13 months of user dataLocationBasedSalientTermsOutputsalient terms specific to the query’s locationPogoSynonymssynonyms added to the query’s words, learned from pogo-stickingRewrittenQueryrewritten form of the queryMumkinRewriterResultquery rewrite by Mumkin, a Google modelDateAnnotationsOutputthe query’s dates and times: today, tomorrow, this weekend, tonightGrmAnnotationsOutputnumbers and formats spotted by GRM grammarsSaftAnnotationsOutputSAFT linguistic analysis of the query: tokens, entities, syntaxSaftI18nOutputSAFT linguistic analysis, non-EnglishParseRawQueryDataparsing of the raw queryAlternativeResultresults of an alternative query, which Google can insert into the SERP
Recent clicks, intents and search journeys
7Google uses clicks as early as query preparation, before ranking. It takes clicks from the last 24 hours into account through Instant NavBoost, the version of NavBoost that handles them. Intent Brain, the Google system that measures a query’s broad intents from clicks, steers the SERP’s formats.
KomodoInstantNavboostDataInstant NavBoost: clicks from the last 24 hours, including when a spike of fresh clicks startsKomodoRefinedQueryInstantNavboostDataInstant NavBoost for refined queriesIntentBrainServletOutputIntent Brain’s intents: probability of 19 broad intents (images, video, local, shopping, news…), measured from clicksPredictedInteractionSignalsServletOutputuser interactions predicted by a modelFreshFeatureHistoryrecent history of the scores of the query’s results, which KScorer reuses to interpret itInstantNavclusterQueriesreformulations grouped with the query from clicks and sessions (navcluster), in real time; Google uses them to rewrite the query and suggest related searchesUserJourneyClusterthe search-journey cluster the query belongs to
Entities, brands and navigational queries
6On a brand query, Google identifies the target site while it prepares the query, before ranking. On every query, it also spots entities, person names and the meaning of each n-gram, then turns the query into an intent and its arguments.
QueryBasedSalientEntitiesOutputthe query’s salient entities, QBST’s counterpart for entitiesNimbleAnnotatorServletOutputNimble: query n-grams annotated with a type, a meaning and a confidenceQuarkMrfGenerationOutputquery meaning written in MRF, the intent-plus-arguments formEarlyNavResolutionOutputearly identification of the site a navigational query targetsNavsmearSiteAnnotationsite targeted by a navigational query, detected by a model (Navsmear)NameDetectionOutputperson names spotted in the query (first name, last name); they also help find a contact
Embeddings and semantic retrieval
8At search time, Google computes only the query half of its embedding models: for RankEmbed, the semantic retrieval model revealed at the antitrust trial, for passages and for scoring computed in two halves, query and page. Google computes the page half at indexing. Google retrieves a page when its embedding is close to the query’s.
RankEmbedOutputthe query’s embedding for RankEmbed, compared with page embeddings computed at indexingRankEmbedScamOutputdocuments nearest to the query, found by RankEmbed in ScaM, Google’s nearest-neighbor search indexRankEmbedScamSummaryOutputsummary of RankEmbed’s nearest-neighbor searchPassageEmbedOutputthe query’s embedding used to retrieve passages as well as pagesAnnoEmbedServletOutputAnnoEmbed, an embedding-based scoring modelFactoredScoringServletOutputquery half of a factorized scoring: Google computes the query half at search time and the page half in advanceFactoredScoringServletUnprocessedOutputthe same factorized scoring, before processingHnlRetrievalOutput
Local and places
11Google decides whether to show the local pack before scoring pages and measures, for each query, how much location matters. It also retrieves places through embeddings (Localembed) and recognizes chains in the query.
LocalwebPretriggerDecisiondecision whether to trigger local results (local pack), made while the query is preparedQueryBasedLocalDataOutputlocal data drawn from the queryLocationImportanceLevelOutputhow much location matters for the query; Google also logs it as a ranking signalEarlyLocationRankingOutputearly ranking of placesLocalembedRetrievalOutputplaces retrieved by embeddings (Localembed)LocalembedRetrievalV2OutputLocalembed, version 2LocalRankEmbedOutputRankEmbed for localFastLocalOutputlocal results from a fast searchLocalTriggerStatOutputlocal triggering statisticsLocationInterventionSignalssignals Google uses to decide whether to change the location used for the searchChainAnnotationsOutputmulti-location chains recognized in the query
Shopping and ads
8Google estimates the query’s shopping intent and runs up to twenty Shopping models on it, before any product search. It also matches the query against the products on sale in Shopping and retrieves local ads through embeddings.
ShoppingIntentOutputthe query’s shopping intent; AI Mode computes its own versionLocalShoppingIntentOutputlocal shopping intentShoppingQuerySignalsOutputshopping signals of the queryShoppingQueryModelsOutputscores from the query’s Shopping models, up to 20 modelsBuyableQueryProjectionthe query projected onto Shopping’s buyable offersLocalembedLocalAdsRetrievalOutputlocal ads retrieved by embeddingsShoppingLoggingOutputShopping data meant for logsAdsDebugInfodebug information for ads
AI answers and agents
4Google starts selecting an AI answer’s sources while it prepares the query. QRewrite prepares the query for magi, Google’s AI behind AI Overviews and AI Mode: grounding, agents that book a restaurant or an appointment, conversational search, and Aquarium, the web answers system, which runs retrieval for magi and gives it freshness signals.
AnnotationsForGroundingannotations for grounding AI answersAquariumServletOutputAquarium: retrieval and freshness for magi, the AI behind AI Overviews and AI ModeAgentAnnotationOutputannotations for AI Mode’s agents (bookings, appointments, tickets)SearchChatAnnotationconversational search
FastSearch, retrieval plan and Nemo
9While the query is being prepared, Google runs FastSearch, a fast search it does not show in the SERP, based on RankEmbed, its embedding retrieval model. DeepRank already scores those first results. QRewrite also prepares the retrieval plan, which Google passes on to the twiddlers.
RetrievalPlannerProtothe query’s retrieval plan, which Google passes on to the twiddlersFastResultsOutputfirst results from FastSearch, which QRewrite receives while the query is preparedFastResultsDeeprankedOutputfast results already scored by DeepRankEarlyLatencyPredictorOutputearly prediction of the search’s response timeNemoServletOutputNemo, a Google model run on the query alone; magi, the AI behind AI Overviews and AI Mode, also fetches its outputRaNemoServletOutputNemo augmented with the first resultsHybridNemoServletOutputhybrid Nemo: the query plus an encoding of the fast resultsNemoV3ServletOutputNemo, version 3QueryDeepContextRepresentationOutputrepresentation of the query in its context
Video, YouTube and image search
6For video, Toledo, the Google system that sorts YouTube results into categories, estimates the expected video type before ranking. With WatchEmbed, YouTube’s embeddings built from watch history, Google adds the query’s video sub-intents. On a query with an image, Google analyzes the image and the text together, with Lens.
ToledoServletOutputToledo: the type of video expected (entertainment, learning, information) and its language (dubbed video, audio track)WatchEmbedOutputWatchEmbed, YouTube’s embeddings built from watch history: the query’s video sub-intents, personalized ones includedKomodoYoutubeInstantNavboostDataInstant NavBoost on the YouTube side: recent viewsMultimodalQueryOutputmultimodal query, with an image (Lens)ImageTextOutputthe query’s image and text analyzed togetherConditionalP2TModelsOutputoutputs of P2T models Google runs only under certain conditions
Language and translation
7Google detects the query’s language and the language of the expected results, then can translate the query and compute its salient terms in the other language. In a patent, Google sets the conditions: a non-local query, a language detected with enough confidence. On a topic with little content in the user’s language, a page in that language competes with translated English pages.
QueryLanguagelanguage of the queryQueryLangServletOutputlanguage detected by a model (QueryLang)QueryLangServletLanguageIntentOutputlanguage the user wants results inTranslationstranslations of the queryTranslateQbstOutputsalient terms of the translated queryAlternateLanguageQbstOutputsalient terms in another languageLanguageAgnosticOutputlanguage-independent representation
SafeSearch and sensitive queries
6Google classifies the query before retrieval: SafeSearch level, scores per category, privacy sensitivity. Scuti Shield, the Google system that checks the query’s safety, also detects prompt injection and checks political neutrality, two concerns specific to AI answers.
SafeSearchQueryAnnotationSafeSearch level of the query; Google also logs it as a ranking signal, and AI Mode keeps its own versionScutiShieldEvaluateQueryOutputScuti Shield: safety checks on the query (SafeSearch, prompt injection, political neutrality)SensitiveAnnotationsensitive queryPrivacySensitivityServletOutputprivacy sensitivity of the querySafeSearchServoOutputSafeSearch scores per category, from a text classifierExpanderSensitiveAnnotationquery sensitivity, model from Google Research’s Expander team
Memory and personal data
8On “call Sarah” or “my Saturday flight”, Google searches the user’s data: contacts, personal graph, photos, past queries and things the user asked Google to remember.
MemoryRetrievalAnnotationrecall of something the user saved to memoryMemoryStorageAnnotationrequest to save to the user’s memoryMemoryStorageClassifierOutputclassifier of memory storage requestsPersonalKGDatadata from the user’s personal graphPersonalContactAnnotationsthe user’s contacts spotted in the queryStarlightStatusstatus of Starlight, search across personal data: contacts, photos, past queriesVascoTGClusterOutputVasco, the system behind task and memory cards: the query’s cluster in its graphVascoTGNodeOutputVasco: the query’s node in that graph
Assistant, apps and Actions on Google
7Google uses QRewrite beyond the SERP. Seven outputs serve Google Assistant: the handover to Search (Axon), the vertical and the app the query targets, the Actions on Google inventory.
AssistantSearchHandoverOutputhandover between the Assistant and SearchAxonCacheOutputcache of Axon, the Assistant-to-Search handoverAssistantAppIntentClassifierOutputAssistant query aimed at an appAssistantVerticalClassifierOutputAssistant vertical the query targets, with a confidence the Assistant’s ranker reusesAssistantCortexOutputAogInlineInventoryAnnotatorOutputinventory of third-party actions (Actions on Google)AppAnnotationOutputapps spotted in the query
The 2024 leak mostly documented the part of QRewrite that handles personal data: contacts, calendar aliases, the accounts each piece of data comes from. The 98 outputs above come directly from Google’s 2026 code.
QRewrite also prepares the query for AI Overviews and AI Mode
Google uses the same prepared query for the classic SERP and for AI answers. QRewrite adds the outputs that magi, Google’s AI behind AI Overviews and AI Mode, needs: which sources to look for when grounding, which user data to retrieve, how to plan retrieval.
Google also uses FastSearch, the fast search whose first results QRewrite receives, to ground Gemini, according to the 2025 remedies decision in the antitrust trial. A page whose embedding is close to the query’s therefore counts twice: for interpreting the query and among Gemini’s sources.
In Google’s code, among QRewrite’s outputs
AnnotationsForGroundingthe query’s annotations for grounding AI answersRetrievalPlannerProtothe retrieval planner: QRewrite prepares the query’s retrieval plan, and Google passes that plan on to the twiddlersAquariumServletOutputAquarium: retrieval and freshness for magiMemoryRetrievalAnnotationthe user data to retrieve for this queryMemoryStorageAnnotationa request to save something to the user’s memoryAgentAnnotationOutputthe annotations for agentsSearchChatAnnotationthe annotations for conversational searchPassageEmbedOutputpassage embeddings, to retrieve a passage and not only a page
Two other infographics in the series cover this step in detail: what Google’s AI reads before it answers and the twiddlers, which receive this retrieval plan.
On your queries
What RESONEO extracts live: query expansion
Google computes QRewrite’s 98 outputs on its servers, and no outside tool can reach them: we describe them from its code. Query expansion, the simplest part of query preparation, is the exception: RESONEO found a way to extract it.
Analyzing the synonyms Google picks for a query shows how it interprets that query.
Google expands the query, then scores every page word by word
Take the query “exotic car rental”. Google adds “rentals”, “rent” and “hire”, “auto” and “vehicle”, and, for the n-gram “exotic car”, even “lamborghini”, “porsche” and “corvette”. It therefore also retrieves pages that only say “rentals” or “hire”.
In scoring, Google counts the word as typed, in the page’s title, URL and text. “Foreign Oxygen: Home” has none of the three words in its title or its URL and still scores 5.56, 6.63 and 6.26: Google scores it on its text.
This score is lexical, and it also depends on the word’s weight in the query. Google then ranks pages with clicks, links and embeddings: the first result scores 0.76 for “exotic”, while the fifth scores above 8.7 on all three words.
Live
Test your query
Inflections, synonyms, context words: Google expands most words, rarely brands
Query expansion depends on the whole query: Google adds “lamborghini” and “porsche” to the n-gram “exotic car” in “exotic car rental”, “bridal” to “wedding dress” in “wedding dress shop”. Some variants stand for several words at once.
Take the query wedding dress shop
“bridal”, “bridal gown” and “weddingdress” stand in for “wedding dress”, “dressshop” for “dress shop”; “weddingdressshop” and the business category “bridalshop” cover all three words. Alone, “wedding” only gets “bride”, “dress” gets “dresses”, “gown” and “gowns”.
Inflections
helmet → helmetscheap → cheaper, cheapestrepair → repairing, repairsPlurals, comparatives, verb forms: Google adds them to most words.
Synonyms
price → costs, fee, fees, ratesdealer → dealership, lot, seller, traderkids → boys, child, children, toddlerA common word gets up to ten or so synonyms.
Misspellings and abbreviations
restaurant → resturant, restuarantsbrooklyn → bklynvermont → vtGoogle also accepts the common typo and the short form of a place name.
Unaccented forms
pokémon → pokemonjalapeño → jalapeno, jalapenoscrème brûlée → creme bruleeGoogle adds the unaccented form of the word and of its inflections. In scoring, it counts it as the exact word.
N-gram variants
exotic car → lamborghini, porschenew york → nyc, nyhair salon → hairdresser, hairsalonGoogle adds some variants to several words at once: an abbreviation, a synonym of the n-gram or its form merged into one word.
Context words
truck → pickupwedding → brideDepending on the rest of the query, Google adds a related word: “pickup” with “used truck dealer”, “bride” with “wedding dress shop”.
Google rarely adds variants to brands
On our test queries, venmo gets nothing. Costco, zillow, etsy, dyson and peloton only get the form merged with the next word (costcomembership, dysonvacuum).
Three brands get another spelling: nike → nikes, chewy → chewy’s, robinhood → robin hood.
Google ignores stop words
Google drops “of”, “the”, “to”, “in”, “for” and “and” and gives them a score of 0, including “and” in “bed and breakfast”.
It keeps “near me”: it adds “nearby”, “nearest” and “close” to “near”, and scores both words.
In Google’s code, the three spelling corrections users see
DID_YOU_MEANGoogle suggests: it shows results for the typed query and offers the corrected form.INCLUDING_RESULTS_FORGoogle blends: it adds results for the corrected form to those of the typed query.FULL_PAGE_REPLACEMENTGoogle replaces: it serves the whole SERP for the corrected form, with a link that runs the typed query again. A brand whose name looks like a misspelled common word risks this replacement.
Google, How Search worksThis involves steps as seemingly simple as recognizing and correcting spelling mistakes, and extends to our sophisticated synonym system that allows us to find relevant documents even if they don’t contain the exact words you used.How Search works: ranking results
As early as 2010, Google engineer Steven Baker wrote that this synonym system had taken over five years of work and affected 70% of searches, across more than 100 languages (Official Google Blog, January 19, 2010).
On a local query, Google adds business categories and geographic areas
Take the query asian restaurant sf
In ochre, categories from Google’s business directory (“yp”, for yellow pages). Google adds them to the n-gram “asian restaurant”; “asianrestaurant” shows up twice, as the merged form of the n-gram and as a category. To “sf”, Google adds nine geographic areas.
On “asian restaurant sf”, Google adds three categories from its business directory: two for Asian restaurants, one for Japanese restaurants. It can therefore retrieve the listing of a business categorized as “Japanese restaurant” in Google Business Profile, even without the word “asian”.
Put “best” in front and the categories disappear: on “best asian restaurant in sf”, Google adds none. It keeps the nine areas, and adds “science fiction” to “sf”.
For the place, Google adds geographic areas roughly 40 km wide: nine for San Francisco, eight for New York, six for Chicago. A page or a business tied to one of these areas can match the place without the city’s name.
On “hardware store chicago”, Google adds six categories, one of them a chain, True Value; on “plumber austin”, “plumbingcontractors” and “plumbingrepairservice”.
In Google’s code, among QRewrite’s outputs
LocalwebPretriggerDecisionGoogle decides at this stage whether to trigger local resultsLocationImportanceLevelOutputthe weight of the place in the queryLocationBasedSalientTermsOutputthe terms expected given the placeChainAnnotationsOutputthe multi-location chains recognized in the query
What QRewrite changes for SEO
Google retrieves pages with synonyms but scores them on the exact words
Google learns synonyms from pogo-sticking: the user clicks a result, comes back to the SERP and rephrases the query with another word. In one patent, Google takes that word as a candidate synonym; in another, it keeps or drops each synonym based on clicks and skips. A page that only uses the synonym can therefore be retrieved, but Google scores it on the typed word.
According to the 2024 judgment in the antitrust trial, salient terms (QBST) are the words a relevant page contains prominently; Google already uses them at retrieval.
In Google’s code
PogoSynonymsQueryBasedSalientTermsOutputGoogle ties a generic query to the site users search for right after
With Navsmear, a Google model, QRewrite tags a brand query with the site it targets. In a patent, Google assigns that site to the generic query typed just before: it thus ties a much-searched brand to the generic queries of its sector. To “robinhood”, Google also adds “robin hood” and retrieves pages that contain those words (test your brand).
In Google’s code
NavsmearSiteAnnotationGoogle interprets today’s query with the pages that ranked the day before
KScorer, the Google Search component that scores a query’s interpretations, computes a first score using the recent history of two features of the ranking pages: their score in Orbit, the Google system that sorts pages by intent, and their topicality rank. On an ambiguous query, the interpretation that dominates the top 10 therefore holds from one day to the next, and a page about another interpretation has less chance of getting in (the tool shows which one dominates).
In Google’s code
FreshFeatureHistoryGoogle picks the SERP format before ranking pages
Before ranking, Google computes the query’s broad intents from clicks and decides whether to trigger the local pack. On a query where it shows a local pack or a video block, those spots go to business listings and videos, however good a page’s text.
For video, Toledo, the Google system that sorts YouTube results into categories, also spots dubbed videos: an English video dubbed into Spanish can rise on a Spanish query.
In Google’s code
IntentBrainServletOutputLocalwebPretriggerDecisionToledoServletOutputOn a local query, Google adds business categories and measures how much proximity weighs
Google uses the categories it adds to the query (section 05) to retrieve Google Business Profile listings: a listing’s secondary categories count from retrieval on, and the tool lists the ones Google adds to your queries. In a patent, Google computes the weight of location from the median distance of clicked results: when users click nearby results, proximity weighs more in ranking.
In Google’s code
LocationImportanceLevelOutputGemini draws its sources from an embedding-based ranking, separate from the SERP
RankEmbed, the embedding retrieval model the antitrust trial made public, is a dual encoder (notes from an interview with Pandu Nayak, Google’s VP of Search): Google computes each page’s embedding at indexing and the query’s at each search, then retrieves the pages whose embedding is close. Google relies on RankEmbed where clicks are missing, especially on long tail queries.
To ground Gemini, Google runs FastSearch, a fast search derived mainly from RankEmbed. According to the 2025 remedies decision in the same trial, FastSearch returns an abbreviated ranking that Google does not use for the SERP: a page can be a Gemini source without topping the SERP, and vice versa.
In Google’s code
RankEmbedOutputFastResultsOutputAI Mode computes its own shopping intent
Google computes a query’s shopping intent and SafeSearch level twice: once while preparing the query for the classic SERP, once on the AI Mode servers. For the same query, Google can therefore show products in the SERP and not in AI Mode, or the reverse: a retailer visible in the SERP’s product blocks can be missing from AI Mode.
In Google’s code
ShoppingIntentOutputSafeSearchQueryAnnotationGoogle can change a news SERP within about ten minutes
Komodo, Google’s freshness system, keeps each query’s clicks from the last 24 hours, with a delay of about ten minutes, including clicks on refined queries, the follow-up searches users run next. With Instant NavBoost, Google adds them to the query. Google gives an example in a document from the antitrust trial: on the day of the Nice attack, it removes the image block for “nice pictures”. A page published early collects those first clicks: target the refined query too (year, event name).
In Google’s code
KomodoInstantNavboostDataKomodoRefinedQueryInstantNavboostDataGoogle turns “this weekend” or “tomorrow” into dates
Google also turns “tonight” into a time of day. For an event, a ticketing page or a restaurant, it then matches the query’s date with the page’s: a page that spells out its dates and times, and marks them up (Event structured data, opening hours), matches “concert this weekend”.
In Google’s code
DateAnnotationsOutput
Before retrieval, QRewrite adds variants, categories, chains, dates and intents to the query. Google retrieves the pages that match this rewritten query, scores them on the user’s exact words, then ranks them with clicks, links and embeddings.