Key takeaway
- A recommendation system predicts what a user will want next. See content-based and collaborative filtering, TensorFlow steps, and how AI agents fit in.
A recommendation system is a machine learning system that predicts which items a user is likely to want and ranks the best ones to show. Retailers, banks and content platforms use it because people now face far more choices online than they can sensibly browse.
This page is for product, data and engineering teams planning recommendations for products, banking offers or content. It covers the problem, the main approaches, a transaction-based solution, the TensorFlow build steps, where AI agents fit and what to check before you start.
What is a recommendation system?
In a physical shop, choice is limited by shelf space. Online, everything is available, so the difficulty moves from finding items to choosing among them. A recommendation system answers that by building a personalised flow of suggestions for each user, using the behaviour of that user and of all other users of the service.
The traditional approaches are content-based filtering and collaborative filtering. More recent ones include multi-armed bandit algorithms that aim to maximise click-through, and deep neural networks that treat candidate generation and ranking as separate problems.
What problems does a recommendation system have to solve?
- Finding which products sell the most in an area and drive the most profit.
- Finding which products are often bought together.
- Keeping supply in balance with demand so that popular items are available.
How does a recommendation system work?
Google's recommendation systems course describes a common three-stage architecture. Candidate generation starts from a huge corpus and produces a much smaller subset. Scoring then ranks those candidates with a second model. Re-ranking applies extra constraints, which the course says can help ensure diversity, freshness and fairness.
A transaction-based solution follows the same shape. An automated recommendation agent takes customer information and product information as input and returns recommendations, for the customer and for the business. From transaction history it can work out which products sell most, which earn the most profit, the best time frame for a product, and which products sell in pairs or groups. Similarity algorithms find related products, and association rules suggest items sold together. Grouping frequently sold items by profit shows which ones to place together in a store.
Which approach should you choose?
Google's guides on content-based filtering and collaborative filtering list the trade-offs below.
| Question | Content-based filtering | Collaborative filtering |
|---|---|---|
| Data needed | Needs no data about other users, only the user and item features | Needs a feedback matrix of user and item interactions |
| Domain knowledge | Requires a lot, because the features are hand-engineered | Not needed, because embeddings are learned automatically |
| Discovery | Limited ability to expand a user's existing interests | Can help users discover new interests |
| Main weakness | Quality is capped by the features | Cold start: items absent from training cannot be scored |
| Sources | developers.google.com (content-based) | developers.google.com (collaborative) |
Many production systems combine approaches, for example using collaborative filtering as one of several candidate generators.
How do you build a recommendation system with TensorFlow?
The TensorFlow Recommenders library is described by its authors as "a library for building recommender system models" that helps with the full workflow: data preparation, model formulation, training, evaluation and deployment. TensorFlow expresses a machine learning process as a graph that shows data flowing through the system, and TensorBoard can visualise it. A simple model follows four steps:
- Transform the input data into feature tensors that are easy to embed.
- Transform the user and item feature tensors into user and item representations.
- Transform a pair of representations into a prediction.
- Transform the predictions and the true values into a loss value.
Where do AI agents fit in recommendation systems?
An agent can use the recommendation model as one tool among several. It can fetch ranked offers for a customer, check them against eligibility and policy rules, explain the suggestion in plain language and log the outcome as feedback for retraining. In banking, for instance, that means an offer is only shown if the customer qualifies for it.
ElixirClaw is XenonStack's AI agents computing platform, the place to look for running agents like these.
What should you check before building one?
- Define the decision: which item, to whom, at which moment, and what counts as success.
- Audit the data: transaction history, product attributes and consent for using customer data.
- Plan for cold start, both for new users and for new items.
- Keep a feedback loop so that clicks, purchases and rejections reach retraining.
- Add rules for fairness, eligibility and regulatory limits before any offer is shown.
To map one decision your agents make, and the data and policy it depends on, book a Context Workshop. See what happens in the workshop.
Frequently asked questions
What is the difference between content-based and collaborative filtering?
Content-based filtering recommends items similar to those a user already likes, using item features. Collaborative filtering learns from the interactions of many users and can surface items outside a user's existing interests.
What is the cold-start problem?
It is the difficulty of recommending items or serving users that have no interaction history, because a collaborative model has nothing to learn from for them.
How do association rules help recommendations?
They find items that are often bought together in transaction history, so the system can suggest an item that usually accompanies one already chosen.
Can TensorFlow be used for recommendations?
Yes. TensorFlow Recommenders is a library for building recommender models and supports the workflow from data preparation to deployment.
How do AI agents use a recommendation system?
An agent calls the model for ranked suggestions, applies eligibility and policy checks, explains the result and records feedback for improvement.
Ready to put AI agents to work? See an ElixirClaw demo: the agentic OS to build, orchestrate and govern AI agents across your enterprise systems.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE