liveBook · Manning

User profile

As explained in AI-Powered Search

A user profile is a representation of an individual user's attributes, preferences, or characteristics.

A user profile represents what is known about one user: past interactions, stated preferences, and inferred interests. In search, it adds context to an explicit query so that two people entering the same words can receive results better suited to their needs. The profile can also drive recommendations when no query is entered. section 9.1.2 section 1.2.3

A profile can contain different kinds of evidence:

  • Interactions, such as items viewed, clicked, or purchased. section 9.1.2
  • Specific or inferred preferences, such as favorite restaurants, brand affinities, clothing sizes, or desired job titles and salary ranges. section 9.1.2
  • Latent interests represented as a vector derived from embeddings of documents the user has interacted with. section 9.0 section 9.4.1

For a job query, employment history, experience level, salary range, and location may change which results are most relevant. For a product query, brand affinities or complementary purchases may matter. These signals supplement the query; they do not replace it in personalized search. section 9.0 section 1.2.3

One implementation path starts with product names or descriptions, generates an embedding for each product, and combines those content representations with user interactions to build an evolving profile. The profile can then inform boosts to search results. Content-based features also help where interaction-only methods face a cold-start problem; the specific profile-update and boosting calculations are not specified here. section 9.4.1 section 9.4 section 9.6

Listing 9.12 Generating product embeddings
from sentence_transformers import SentenceTransformer  #1
transformer = SentenceTransformer("all-mpnet-base-v2")  #1
...  #2

def get_embeddings(texts, model, cache_name, ignore_cache=False):
  ...  #2
    embeddings = model.encode(texts)  #3
  ... #2
  return embeddings

product_embeddings = get_embeddings(product_names,
 transformer, cache_name="all_product_embeddings")

The Python listing shows the product-embedding stage: a SentenceTransformer encodes product names before those embeddings are used with interactions to form a profile. section 9.4.1

A profile need not be hidden from its owner. In user-guided recommendations, people can inspect and adjust preferences that otherwise might be inferred from their behavior. Whether profiles guide recommendations or search ranking, apply feedback carefully: preserve privacy and avoid personalization so aggressive that it frustrates users. section 9.1.2 section 9.6

How AI-Powered Search covers it

How deep it goes
Defines editable profile inputs and outlines an embedding-based construction path, but does not specify profile-update or ranking formulas.
Examples
Uses job-search attributes, product preferences, and a Python product-embedding listing to make profile inputs concrete.
What it assumes
Introduces latent features in plain terms while assuming familiarity with queries, documents, and user interactions.
What you can do after
Evaluate/understand how interaction history and content embeddings can shape search results while weighing privacy and over-personalization.
How it connects
Connects user interactions, collaborative filtering, content-based embeddings, latent features, personalized search, and recommendations.

Also explained in

Compare how 2 books explain user profile →

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.