Building a ‘smart’ medical chatbot: a conversational recommender for diagnosis using fuzzy rules

FCA
Fuzzy-FCA
Recommender systems
Conversational AI
E-health

We designed a conversational AI for medical diagnosis that doesn’t just match keywords. It uses fuzzy logic and formal concept analysis to have an intelligent dialogue, understand uncertain symptoms, and guide a user to a diagnosis.

Author

Pablo Cordero, Manuel Enciso, Domingo López-Rodríguez, Ángel Mora

Published

1 September 2020

When you feel sick, you don’t just state a list of facts. You say things like, “I have a slight fever” or “my headache is moderate.” The real world is full of this “fuzzy,” imprecise information. So why don’t computers understand it?

In our 2020 paper published in Expert Systems with Applications (Q1), we tackled this problem. We built a system designed not just to give answers, but to have an intelligent conversation about medical diagnosis.


💡 Our solution: a chatbot that thinks with fuzzy logic

We designed a conversational recommender system that uses Fuzzy Formal Concept Analysis (FCA) as its knowledge base.

Instead of just storing data, our system stores knowledge in the form of fuzzy rules (graded implications). These are logical rules that can handle uncertainty, for example:

  • if fever is 'high' AND cough is 'persistent' THEN flu_likelihood is 'high'
  • if headache is 'moderate' AND fatigue is 'low' THEN flu_likelihood is 'low'

The system’s “brain” is an automated reasoning engine built on fuzzy simplification logic. This allows it to understand your fuzzy inputs (like “slight fever”) and logically combine all the rules to make an intelligent suggestion.

🛠️ How it works: the dialogue flow

The system doesn’t just give you an answer. It guides you through a conversation, just like a doctor.

  1. You start with a symptom (e.g., “I have a headache”).
  2. The system uses its fuzzy rules to make an initial recommendation (e.g., “It might be a migraine. Do you also have sensitivity to light?”).
  3. You critique this (“Yes, a little bit,” or “No, not at all”).
  4. The system takes this new information, re-runs its logic engine, and refines its recommendation.

This loop continues, narrowing down the possibilities in a natural, human-like dialogue.

🔬 Why does this matter?

This work is a step towards more intelligent and useful telemedicine. By building a system that can understand the nuance and uncertainty of human language, we can create tools that are genuinely helpful.

Instead of a “Dr. Google” that just scares you with a list of possibilities, this approach leads to a “virtual medical assistant” that can have a sensible conversation, ask the right follow-up questions, and provide more reliable guidance.


📖 The full paper

For the complete architecture of the system, the details on the fuzzy simplification logic engine, and the formal proofs, you can read the full journal article.

A conversational recommender system for diagnosis using fuzzy rules. Authors: Pablo Cordero, Manuel Enciso, Domingo López-Rodríguez, Ángel Mora. Journal: Expert Systems with Applications (vol. 154, 113449)

[DOI Link] | [Article Website]