Case-based reasoning (CBR) is a problem-solving method in artificial intelligence that solves a new problem by retrieving similar past cases, reusing and adapting their solutions, and storing the outcome as fresh experience. Within Symbolic AI & reasoning, it stands apart from rule-based approaches because its knowledge lives in concrete, recorded episodes rather than in general rules written in advance.
The idea draws on cognitive research into dynamic memory from the late 1970s and 1980s, which observed that human experts often reason by recalling a similar earlier situation. CBR turns that observation into an engineering discipline with explicit case representations, similarity measures and adaptation knowledge.
How the case-based reasoning cycle works
Case-based reasoning works through a repeating cycle, usually described as the 4R model: retrieve, reuse, revise and retain. The cycle starts with a problem description and ends with an updated case base, so every solved problem can improve the next answer.
| Phase | What the system does | Typical technique |
|---|---|---|
| Retrieve | Finds the most similar stored cases | Weighted nearest neighbor, indexing trees |
| Reuse | Transfers or adapts the old solution | Substitution or transformation rules |
| Revise | Tests and repairs the proposed solution | Simulation, expert review, real-world feedback |
| Retain | Stores the confirmed solution as a new case | Case base update, index maintenance |
Each case normally contains three parts: a problem description (the features of the situation), a solution (what was done) and an outcome (whether it worked and why). Recording failures as well as successes matters, because a failed case warns the system against repeating a poor solution in a similar context.
The cycle makes CBR an example of lazy learning: the system does not build a general model in advance but postpones generalization until a query arrives. This contrasts with eager learning, in which rules or model weights are fixed before any new problem is seen.
Case representation and similarity measures
The quality of a CBR system depends mostly on how cases are represented and how similarity is computed. Cases may be flat attribute-value vectors, structured objects similar to a frame, graphs or free text, and the representation determines which similarity functions are possible.
A common approach is global-local similarity: each attribute receives a local similarity function returning a value between 0 and 1, and a weighted sum combines them into a global score. Weights encode which features matter most; setting them well usually requires domain expertise or tuning against known examples.
| Representation | Similarity method | Best suited for |
|---|---|---|
| Attribute-value vector | Weighted distance per attribute | Diagnosis, configuration, help desks |
| Structured object | Recursive comparison of parts | Design and engineering cases |
| Graph | Graph matching or edit distance | Plans, molecules, process models |
| Textual case | Information retrieval or embeddings | Legal records, support tickets |
Similarity in CBR is meant to approximate usefulness, not mere surface resemblance. Two cases that share many attributes may still need different solutions, so mature systems add adaptation-guided retrieval, which prefers cases whose solutions are easiest to adapt.
Retrieval speed also matters once a case base holds many thousands of entries. Systems therefore use indexing structures such as k-d trees, discrimination networks or case retrieval nets, which narrow the candidate set before the full similarity function runs. The trade-off is that aggressive indexing can miss useful cases whose relevant features were not indexed.
Case-based reasoning compared with neighboring approaches
Case-based reasoning occupies a middle ground between rule-based expert systems and statistical machine learning. It shares the explicit, inspectable knowledge of symbolic methods but acquires that knowledge mostly by recording experience, which eases the knowledge acquisition bottleneck.
| Approach | Source of knowledge | Explanation offered |
|---|---|---|
| Case-based reasoning | Stored concrete episodes | Points to the similar past case |
| Rule-based system | Hand-written production rules | Shows the chain of fired rules |
| k-nearest neighbors | Labeled data points | Lists nearest examples, rarely adapts |
| Analogical reasoning | Structural mappings across domains | Shows the mapped relations |
| Neural network | Learned numeric weights | Indirect, needs separate tools |
Unlike pure k-nearest neighbors classification, CBR includes explicit reuse and revision steps, so it can produce structured solutions such as plans or designs, not only labels. Compared with inductive reasoning that builds general rules, CBR reasons from one specific case to another.
Where case-based reasoning fits in practice
Case-based reasoning fits domains where experience is plentiful but general rules are weak, incomplete or hard to state. Typical examples include technical diagnosis, help-desk support, legal argumentation, medical decision support, product configuration and recipe or menu planning.
| Situation | Recommendation | Reason |
|---|---|---|
| Rich history of solved problems | Use CBR | Cases already exist and carry expertise |
| Stable, well-understood theory | Prefer rules or models | Rules generalize more cheaply |
| Explanations are required | Use CBR | Precedents are easy to inspect |
| Huge data, simple labels | Prefer statistical learning | Adaptation adds little value |
In recent systems, CBR ideas reappear in retrieval-augmented generation, where a language model receives similar stored examples before answering. The principle is the same, although classical CBR adds explicit adaptation knowledge and a deliberate retain step.
Limitations and common mistakes
The main weaknesses of case-based reasoning concern case base maintenance, adaptation effort and similarity design. A system that simply retains every case can slow down and degrade, a problem known as the utility problem.
- Case base growth without pruning increases retrieval time and adds redundant or conflicting cases.
- Poorly chosen weights make the system retrieve superficially similar but useless precedents.
- Weak adaptation knowledge forces simple copying of old solutions that may not fit.
- Biased case collections reproduce past errors or unfair decisions in new situations.
- Missing outcome data prevents the system from learning which solutions actually worked.
Good practice includes competence-based case deletion, periodic review of similarity weights, and storing failure cases with explanations. Adaptation remains the hardest phase to automate, so many deployed systems keep a human in the loop for revision.
Stripped to the essentials
Case-based reasoning means solving new problems by remembering old ones. A mechanic hears a strange noise. He recalls a car with the same noise last month. He checks the same part first. Often, that is the fix.
A computer does the same thing with a library of past cases. It finds the closest match, adjusts the old answer, and checks it. Then it saves the new case for next time. The more cases it keeps, the more it knows.
Where it is applied
A manufacturer of industrial printers runs a help-desk system based on case-based reasoning. Its case base holds about 12,000 resolved service tickets, each with the printer model, error codes, symptoms, the repair performed and the outcome.
When a technician enters a new fault, the system retrieves the five most similar cases using weighted attributes, with error code and model weighted highest. It then adapts the suggested repair, for example replacing a part number for a newer model. The technician confirms the fix on site, and the solved ticket is retained as a new case.
Over a year, this cycle lets first-time fix rates rise noticeably, and new staff resolve faults that once needed senior engineers. Each suggestion also shows the precedent case behind it, which builds trust with the service team.