Knowledge-based recommender system

Also known as: constraint-based recommender

On this page 7

A knowledge-based recommender system is a recommendation engine that selects items by reasoning over explicit user requirements and encoded domain knowledge, rather than by mining past ratings or clicks. In the field of recommender systems, it is the standard approach for complex, rarely purchased items such as cars, mortgages, laptops, holiday packages or insurance policies, where few users have a usable interaction history.

The approach has two main forms: the constraint-based recommender, which filters items with rules and constraints, and the case-based recommender, which ranks items by similarity to a described need. Both treat recommendation as a problem-solving dialogue with the user, and both can explain exactly why each item was suggested.

How a knowledge-based recommender system works

A knowledge-based recommender works by eliciting requirements, translating them into conditions on item properties and returning items that satisfy or approximate those conditions. The system relies on a knowledge base that describes the catalog, the relationships between customer needs and product features, and the rules a domain expert would apply.

Typical components work together in a fixed sequence, as the table below shows.

ComponentContentFunction
Item catalogProducts with structured attributesProvides the candidate set
User requirement modelAnswers to questions, preferences, budgetsDescribes what the user needs
Knowledge baseCompatibility, filter and mapping rulesLinks needs to product properties
Reasoning engineConstraint solver or similarity functionFinds matching or near-matching items
Explanation moduleRule traces and satisfied conditionsJustifies each recommendation
Repair componentRelaxation and diagnosis algorithmsHandles requirements no item meets
Core components and their functions

Requirements are usually collected through guided question sequences, forms or a conversational interface. Some answers map directly to attributes, such as a maximum price, while others require mapping rules, for example translating “frequent travel” into a laptop weight below 1.5 kilograms and long battery life.

Constraint-based and case-based variants

The two variants differ in how they define a good match. A constraint-based system formulates the task as a constraint satisfaction problem: variables represent user requirements and product properties, and constraints express which combinations are allowed. Only items that satisfy every hard constraint are returned, often ranked by a utility function.

A case-based system treats each item as a case and computes a weighted similarity between the case and the user query. Items need not match perfectly; the best approximations are shown first. Case-based systems often support critiquing, in which the user reacts to a shown item with feedback such as “cheaper” or “more storage” and the system retrieves the next candidate.

AspectConstraint-basedCase-based
Matching logicExact satisfaction of rulesSimilarity to a query or reference item
Empty result handlingNeeds relaxation or repairRarely empty, returns nearest items
Typical interactionQuestionnaire and filter dialogueCritiquing of shown examples
Knowledge neededExplicit rules and constraintsSimilarity measures and attribute weights
Best suited toConfigurable products with strict compatibilityCatalogs with many comparable alternatives
Constraint-based versus case-based recommendation

How it compares with other recommendation approaches

Knowledge-based recommendation fills the gap left by data-driven methods. Collaborative filtering needs many ratings per user and item, and content-based filtering needs a profile built from a user’s past choices. A knowledge-based system needs neither interaction history nor a user profile, which makes it naturally resistant to the cold start problem and to data sparsity.

ApproachMain inputMain strengthMain weakness
Knowledge-basedStated requirements and rulesWorks without history, fully explainableCostly knowledge engineering
Collaborative filteringRatings or implicit feedbackFinds non-obvious tastesCold start and sparsity
Content-based filteringItem features and user historyPersonal and transparentNarrow, repetitive suggestions
Hybrid recommender systemSeveral of the aboveCombines strengthsMore complex to build and tune
Comparison with data-driven approaches

In practice, knowledge-based components are frequently combined with learned models in a hybrid recommender system. Rules guarantee feasibility, for example that a printer cartridge fits the printer, while a learned ranker orders the feasible items by predicted relevance. Modern conversational recommender systems and LLM-based recommendation also reuse the idea of eliciting requirements in dialogue.

Handling conflicts and explaining results

A frequent problem is the empty result set, which occurs when no item satisfies all stated requirements. Constraint-based systems address it with consistency-based diagnosis: they compute minimal sets of requirements whose removal makes the query satisfiable and let the user choose which one to relax. Algorithms such as QuickXPlain and FastDiag are commonly used to find these minimal conflict sets efficiently.

Explanation is a built-in strength. Because every recommendation follows from traceable rules or similarity scores, the system can state which requirements an item meets and which it misses. This transparency supports user trust and is valuable in regulated advice settings such as financial services.

Limitations and design trade-offs

The main cost is the knowledge acquisition bottleneck. Domain experts and knowledge engineers must encode rules, mappings and similarity weights, and must update them whenever the catalog or regulations change. Systems built this way can become brittle and expensive to maintain at large catalog sizes.

  • Static personalization: the system does not learn tastes over time unless combined with learning components.
  • User effort: long questionnaires cause abandonment, so question order and defaults matter.
  • Preference uncertainty: users often do not know their requirements in advance, which favors critiquing.
  • Rule errors: an incorrect constraint silently removes suitable items from every result.

Teams reduce these risks by testing the knowledge base like software, with regression cases that check expected recommendations for typical user profiles. Another common practice is to learn attribute weights or utility functions from logged choices while keeping hard compatibility rules under expert control. This division keeps the system explainable and still lets it adapt to observed behavior as usage data accumulates.

A non-technical view

Think of a good salesperson in a bicycle shop. They ask how far you ride, where you ride and what you can spend. Then they show you bikes that fit those answers. A knowledge-based recommender does the same thing in software.

It does not need to know what other customers bought. It only needs your answers and expert knowledge about the products. That is why it works well for things people buy rarely, such as a car, a laptop or a loan.

A concrete example

A regional bank offers about 40 mortgage products on its website, and most visitors arrive with no prior relationship with the bank. Collaborative filtering is useless here, so the bank builds a constraint-based recommender. A short dialogue asks for property price, deposit, income, preferred fixed-rate period and whether early repayment matters.

Rules encode lending policy, such as a maximum loan-to-value ratio of 80 percent for certain products. When an applicant with a 10 percent deposit also demands no early repayment fees, the system finds no matching product and shows two repair options: accept a fee or raise the deposit. Each recommended mortgage lists the conditions it satisfies. The bank reports fewer abandoned applications and gives its advisers a documented explanation for every suggestion.