LLM-Based Recommendation Systems: Improving Recall and Explainability in Practice
This article explains how large language models can improve recommendation systems through semantic recall and natural-language explanations rather than replacing the ranking stage. It covers a three-tower architecture that combines a conventional two-tower model with a tag tower, a two-stage LLM pipeline for generating user interests and controlled item tags, engineering practices for offline and near-line computation, caching, fallback, and cost control, plus offline and online evaluation, attribution, and common risks.
1. Why Recommendation Systems Need LLMs
The gains from recommendation systems have traditionally come from two sources: incremental information, meaning new signals beyond user behavior and collaborative filtering, and model capacity, meaning stronger fitting and generalization over existing information. Most industrial recommendation systems are not limited by model capacity but by the structure of the information itself. Traditional recall relies heavily on item IDs, user IDs, and co-occurrence statistics. These collaborative signals have limited expressive power and are fragile for long-tail items, cold-start users, and cross-domain interest transfer.
The core value of large language models is turning unstructured text semantics into structured signals that the recommendation pipeline can consume. Product titles, categories, detailed descriptions, reviews, and the intent implied in user behavior sequences can all be abstracted into semantic representations at the natural language level. This information complements traditional ID-based collaborative signals rather than replacing them, which makes it a natural source of incremental information on the recall side.
It is worth emphasizing that LLMs usually do not handle final ranking scores in the recommendation pipeline. The reason is straightforward: online inference latency budgets are typically in the range of milliseconds to tens of milliseconds, while a single full forward pass of an LLM costs far more than that. The practical engineering pattern is to perform semantic computation offline or near-line, and do only lightweight vector retrieval and shallow network scoring online.
2. Overall Architecture: Recall Enhancement and Explainability
A deployable solution usually contains two relatively independent output lines.
The first is recall enhancement. The goal is to add a semantic recall channel alongside existing channels without breaking them, running in parallel and merging results. In engineering terms, this appears as weighted or unified ranking across multiple recall channels. Core online metrics such as click-through rate and average browsing depth improve noticeably, and the diversity of recall results also improves significantly.
The second is explainability. LLMs can turn “why this item was recommended” into a natural-language reason, shown to users or the operations side. The value of this line is not fully reflected in short-term metrics, but in user trust, content operations efficiency, and lower manual intervention costs during cold start.
Both lines share the same semantic infrastructure: item content understanding, user interest abstraction, and tag system construction. Architecturally, you should build the semantic foundation first, then support recall and explanation above it.
3. Three-Tower Structure on the Recall Side
3.1 The Role of the Two-Tower Baseline
The user tower and item tower form the classic two-tower structure. The item tower takes item-side features (category, attributes, statistical features, content vectors) as input, and the user tower takes user-side features (profile, aggregated behavior sequence representations). Both output vectors of the same dimension, and their inner product is the relevance score. The core advantage of the two-tower model is that item vectors can be computed offline in full and written into a vector index, while online serving only runs the user tower forward pass and nearest-neighbor retrieval, meeting latency requirements.
This channel learns collaborative relevance in the sense of behavior co-occurrence: items liked by similar users are close to each other.
3.2 Adding a Third Tower: The Tag Tower
The new tag tower shares the item-side input with the item tower, but the input source is a set of semantic tags. Its output is the mean-pooled representation of the tag vectors, which is then scored against the item vector.
A schematic representation:
# Item tower: content attributes -> item vectoritem_vec = item_tower(item_feature) # [B, d]# User tower: behavior sequence -> user vectoruser_vec = user_tower(user_seq) # [B, d]# Tag tower: set of semantic tags -> pooled vectortag_emb = tag_embedding(tag_ids) # [N, d]tag_vec = tag_emb.mean(dim=0) # [d]# Fusion scoringscore = alpha * (user_vec * item_vec).sum(-1) \+ beta * (tag_vec * item_vec).sum(-1)
The fusion weights alpha and beta should not be fixed manually. It is better to make them learnable parameters or configurable per traffic scenario, which makes per-scenario tuning easier.
The two scoring paths have a clear division of learning objectives: the user-item path fits behavioral collaborative relevance, while the tag-item path fits the semantic relevance between user intent and item content. The latter is exactly the source of improved diversity and incremental information.
3.3 Where Tags Come From: A Two-Stage LLM Pipeline
Tag generation is split into two modules with single responsibilities, making them easy to evaluate and iterate on separately.
The first stage is the user interest mining module. It takes user profile information and behavior history (as a text sequence) as input and outputs a set of user interests in the form of a list of natural-language phrases. Key prompt design points include: clarifying the role and task boundaries, requiring a structured list output, constraining the granularity of each interest, and prohibiting fabricated preferences that do not appear in the behavior.
The second stage is the product tag prediction module. It takes the interest set from the previous stage and the candidate item content as input and outputs a set of semantic tags matching the item. The key constraint at this stage is a controlled tag space: maintain a unified tag system (category vocabulary plus normalized synonyms) to avoid uncontrolled generation by the LLM, which leads to tag explosion and misalignment with the item side.
Once the two stages are connected, the tag tower input becomes “the set of item tags the user may be interested in”, closing the semantic loop.
4. Engineering Implementation
Where semantic computation happens. User interests are near-line computation and can be refreshed at minute or hour granularity as behavior changes; item tags are offline computation triggered by item content updates. Both results are written to feature storage, and online serving only reads and concatenates them.
Caching and fallback. LLM outputs must be cached, with multi-level fallback: if the model times out, fall back to the previous version of interests; if features are missing, set that path’s score to zero and keep only the two-tower results. Any new recall channel must have lossless fallback capability.
Cost control. Control call volume through batch inference, result reuse, and tiered invocation by user activity (real-time for highly active users, offline for low-activity users).
Unified tag system. Tag normalization is the dividing line for whether the whole solution can scale. Tags without normalization quickly degrade into high-cardinality sparse features, diluting the semantic increment.
5. Evaluation and Attribution
For offline evaluation, focus on three types of metrics: recall and hit rate, result diversity (category entropy, coverage), and the incremental contribution of the new channel to the overall recall set. Looking at a single ranking metric alone can easily hide diversity gains.
For online evaluation, use layered experiments: first verify the gain from enabling the recall channel alone, then verify the impact of fusion weights, and finally add explainable copy. For attribution, distinguish “gains from new information” from “gains from model capacity”. The former can be isolated with a controlled experiment that fixes model size and switches only the input information source.
6. Common Risks and Mitigations
- Semantic drift: LLMs may misunderstand new categories, so tag quality needs periodic spot checks.
- Tag homogenization: interest mining outputs converge, eliminating diversity gains, so deduplication and coverage constraints are needed in prompts and post-processing.
- Latency amplification: introducing any LLM call online breaks the latency budget, so offline computation must be maintained.
- Explanations inconsistent with actual ranking: the explanation module should generate reasons based on the features that actually participate in scoring, avoiding generic copy unrelated to the pipeline.
7. Summary
The right entry point for LLMs in recommendation systems is recall and explanation, not directly replacing ranking. By keeping collaborative capability with the two-tower model, carrying semantic increment with the tag tower, and generating controlled tags with a two-stage LLM pipeline, you can achieve stable gains under a controllable latency budget. Success in deployment depends more on tag system governance, complete fallback paths, and rigorous evaluation and attribution than on model size itself.
