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

