Case-based reasoning

On this page 7

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.

PhaseWhat the system doesTypical technique
RetrieveFinds the most similar stored casesWeighted nearest neighbor, indexing trees
ReuseTransfers or adapts the old solutionSubstitution or transformation rules
ReviseTests and repairs the proposed solutionSimulation, expert review, real-world feedback
RetainStores the confirmed solution as a new caseCase base update, index maintenance
The four phases of the CBR cycle

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.

RepresentationSimilarity methodBest suited for
Attribute-value vectorWeighted distance per attributeDiagnosis, configuration, help desks
Structured objectRecursive comparison of partsDesign and engineering cases
GraphGraph matching or edit distancePlans, molecules, process models
Textual caseInformation retrieval or embeddingsLegal records, support tickets
Common case representations and their similarity methods

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.

ApproachSource of knowledgeExplanation offered
Case-based reasoningStored concrete episodesPoints to the similar past case
Rule-based systemHand-written production rulesShows the chain of fired rules
k-nearest neighborsLabeled data pointsLists nearest examples, rarely adapts
Analogical reasoningStructural mappings across domainsShows the mapped relations
Neural networkLearned numeric weightsIndirect, needs separate tools
How CBR differs from related reasoning approaches

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.

SituationRecommendationReason
Rich history of solved problemsUse CBRCases already exist and carry expertise
Stable, well-understood theoryPrefer rules or modelsRules generalize more cheaply
Explanations are requiredUse CBRPrecedents are easy to inspect
Huge data, simple labelsPrefer statistical learningAdaptation adds little value
When to choose case-based reasoning

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.