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.
| Component | Content | Function |
|---|---|---|
| Item catalog | Products with structured attributes | Provides the candidate set |
| User requirement model | Answers to questions, preferences, budgets | Describes what the user needs |
| Knowledge base | Compatibility, filter and mapping rules | Links needs to product properties |
| Reasoning engine | Constraint solver or similarity function | Finds matching or near-matching items |
| Explanation module | Rule traces and satisfied conditions | Justifies each recommendation |
| Repair component | Relaxation and diagnosis algorithms | Handles requirements no item meets |
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.
| Aspect | Constraint-based | Case-based |
|---|---|---|
| Matching logic | Exact satisfaction of rules | Similarity to a query or reference item |
| Empty result handling | Needs relaxation or repair | Rarely empty, returns nearest items |
| Typical interaction | Questionnaire and filter dialogue | Critiquing of shown examples |
| Knowledge needed | Explicit rules and constraints | Similarity measures and attribute weights |
| Best suited to | Configurable products with strict compatibility | Catalogs with many comparable alternatives |
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.
| Approach | Main input | Main strength | Main weakness |
|---|---|---|---|
| Knowledge-based | Stated requirements and rules | Works without history, fully explainable | Costly knowledge engineering |
| Collaborative filtering | Ratings or implicit feedback | Finds non-obvious tastes | Cold start and sparsity |
| Content-based filtering | Item features and user history | Personal and transparent | Narrow, repetitive suggestions |
| Hybrid recommender system | Several of the above | Combines strengths | More complex to build and tune |
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.