liveBook · Manning

Personalization

As explained in AI-Powered Search

Personalization is the adaptation of search results or behavior to an individual user's characteristics, context, or history.

Personalization adapts search results to what is known about a user without ignoring what the user asks for. A search for “nursing jobs” might favor nearby positions; a later search for “jobs in Seattle” can favor nursing roles there. The explicit query still sets the task, while the user’s history supplies additional context. section 9.0 section 9.1.1

Search and recommendations form a spectrum. Keyword search uses the explicit query alone; personalized search adds an implicit user profile. Recommendations rely more directly on that profile, sometimes allowing the user to adjust it. Combining query matching with learned preferences is useful when the most relevant result differs between users. section 1.2.3 section 9.1

One implementation learns recommendations from user–item interactions, then uses their scores as query-time ranking boosts. For a user who has interacted with iPads and a MacBook, a search for “tablet” can move likely relevant tablets upward. In this boost-only approach, a product must still match “tablet” to appear; personalization changes ordering, not which products qualify. section 9.3.3

Listing 9.9 Serving recommendations using a signals boosting query
def get_query_time_boosts(user, boosts_collection):
  request = {"query": "*",
             "return_fields": ["product", "boost"],
             "filters": [("user", user)] if user else [],
             "limit": 10,
             "order_by": [("boost", "desc")]}

  response = boosts_collection.search(**request)
  signals_boosts = response["docs"]
  return " ".join(f'"{b["product"]}"^{b["boost"] * 100}'
                  for b in signals_boosts)

def search_for_products(query, signals_boosts):
  request = product_search_request(query if query else "*")  #1
  if signals_boosts:
    request["query_boosts"] = ("upc", signals_boosts)
  return products_collection.search(**request)

user = "u478462"
boosts = get_query_time_boosts(user, recs_collection)
response = search_for_products("", boosts)  #2

print(f"Boost Query:\n{boosts}")
display_product_search("", response["docs"])

The query-time boost listing retrieves recommendations for a user and passes product-specific boosts into product search. section 9.3.3

A content-based route represents products as embeddings generated from their text. Embeddings of products a user has interacted with can form an evolving profile. After ordinary search finds candidates, a personalization vector combining the query and relevant past interactions can rerank those candidates by embedding similarity. Query and item clusters can restrict which past interactions contribute, while configurable weights control the query–history balance. section 9.4.1 section 9.4.3

Keep preferences within the query’s context

Suppose a user has interacted with a water bottle and an electric range, then searches for “microwave.” Without a guardrail, both interactions can affect the personalization vector. Filtering past items to clusters related to “microwave” retains the range and excludes the bottle before reranking. section 9.4.3

Apply personalization with restraint:

  • Fall back to non-personalized results when a new user has no interactions; content-based matching can also help with cold start. section 9.5
  • Keep learned preferences within related query categories rather than carrying every past interest into every search. section 9.5
  • Avoid boosts that overpower the query, and use feedback while preserving user privacy. section 9.5 section 9.6

How AI-Powered Search covers it

How deep it goes
Works through recommendation boosts and embedding-based reranking with cluster guardrails; defers LLM training mechanics.
Examples
Compares boosted and unboosted tablet results and filters a microwave profile using past product interactions.
What it assumes
Builds on keyword search and user–item interactions while introducing latent features and deferring LLM training mechanics.
What you can do after
Build it from scratch by adding recommendation boosts or cluster-guarded embedding reranking to search results.
How it connects
Connects keyword search, collaborative filtering, user signals, embeddings, clustering, and recommendation systems.

Also explained in

Compare how 7 books explain personalization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Search. The section links point to the parts of the book it draws on.