Skip to content
Back to work
02LLM / RETRIEVAL / PERSONALIZATION

LLM-Powered Recommendation System

A personalized activity and event recommendation system combining user preferences, semantic representations, retrieval, and language models.

User Profile
Preference Encoder
Candidate Retrieval
LLM Enrichment
Ranking
Results
01

The problem

Activity and event recommendation is cold-start heavy and context-rich: catalogs churn, user intent is expressed in natural language, and pure collaborative signals are sparse. The system needs to reason over semantics and preferences, not just co-occurrence.

02

My role

AI engineer. I designed and built the end-to-end recommendation pipeline, from preference encoding through retrieval, LLM enrichment, and ranking.

03

System architecture

  1. 01User Profile — structured preferences plus interaction history.
  2. 02Preference Encoder — turns profile and context into a query representation.
  3. 03Candidate Retrieval — semantic vector search over the activity/event catalog.
  4. 04LLM Enrichment — language model reasons over candidates, explanations, and fit against stated intent.
  5. 05Ranking — final ordering combining relevance, diversity, and preference signals.
  6. 06Results — personalized, explainable recommendations.
04

Technical decisions

  • Retrieve-then-rank over end-to-end LLM scoring

    Scoring the whole catalog with an LLM is too slow and expensive. Cheap semantic retrieval narrows to a candidate set; the LLM only reasons over a shortlist.

  • Embeddings for recall, LLM for precision

    Vector search maximizes recall over a churning catalog; the LLM adds precision and natural-language justification where it changes the decision.

  • Explainability as a first-class output

    For discretionary activities, a short 'why this' rationale materially improves trust and click-through, so the enrichment step emits explanations, not just scores.

05

Evaluation

Offline evaluation on held-out interactions using retrieval recall@k and ranking quality (NDCG-style), plus qualitative review of LLM rationales for faithfulness. Latency and cost per request are tracked because they gate what LLM stages are affordable in production.

Metrics — to be added
  • TODO: recall@k for the retrieval stage
  • TODO: ranking NDCG@k vs. non-LLM baseline
  • TODO: p95 latency and cost per recommendation request
06

Failure cases & lessons

  • LLM enrichment can hallucinate attributes not present in catalog metadata; constraining it to provided fields and validating outputs mitigates this.
  • Semantic retrieval can over-cluster popular categories, hurting diversity; explicit diversification in ranking counteracts it.
  • End-to-end latency is dominated by the LLM stage, forcing careful shortlist sizing and caching.
07

Technologies

  • LLMs
  • Embeddings
  • Vector Search
  • Ranking
  • Python
All projectsDownload CV Get in touch