# A Proof-of-Concept for Explainable Disease Diagnosis Using LLMs and Answer Set Programming

Source: https://www.youtube.com/watch?v=6pFCfFE78v8
Recap page: https://rapidrecap.app/video/6pFCfFE78v8
Generated: 2026-01-11T14:34:36.784+00:00

---
## Quick Overview

McCoy's hybrid architecture, combining Large Language Models (LLMs) with Answer Set Programming (ASP) via a component called a Grounder, successfully creates a robust and explainable system for medical diagnosis by ensuring the LLM's reasoning path is strictly constrained by verifiable logical rules, thus avoiding hallucinations and maintaining clinical rigor.

**Key Points:**
- McCoy proposes a hybrid architecture using LLMs and Answer Set Programming (ASP) to overcome the single largest barrier to AI use in high-stakes fields like medicine: trust.
- The system utilizes a 'Grounder' component to transform unstructured medical literature and patient data (symptoms, test results, history) into a formal, structured, and verifiable set of logical rules for the ASP solver.
- The LLM's core role is translation—converting natural language inputs into the logic engine's required format—rather than direct diagnosis.
- The ASP solver, constrained by these explicit rules, generates a diagnosis that is guaranteed to be consistent with the provided facts and logic, ensuring auditability and minimizing hallucination risk.
- Preliminary testing on a small set of diseases (like chickenpox) showed the system could correctly derive diagnoses based on symptoms, validating the approach against a known knowledge base.
- The key advantage over pure LLMs is that this framework forces the system to adhere to explicit logic, preventing it from generating plausible but potentially harmful incorrect diagnoses based on insufficient data.

![Screenshot at 00:17: The speaker points to the necessity of a proof-of-concept for explainable disease diagnosis, setting the stage for the discussion on integrating LLMs with symbolic reasoning to build trust in high-stakes AI applications.](https://ss.rapidrecap.app/screens/6pFCfFE78v8/00-00-17.jpg)

**Context:** The video discusses a novel approach to creating trustworthy Artificial Intelligence systems for critical applications, specifically medical diagnosis, where the opacity and tendency of Large Language Models (LLMs) to 'hallucinate' create a massive barrier to adoption. The speaker introduces a proof-of-concept developed by someone named McCoy that integrates LLMs with symbolic AI, specifically Answer Set Programming (ASP), to enforce logical rigor and explainability on the AI's output.

## Detailed Analysis

The speaker details McCoy's hybrid architecture designed to solve the trust issue inherent in using opaque LLMs for critical tasks like medical diagnosis. The core problem is that current LLMs, while powerful, operate as 'black boxes' and can generate inaccurate or nonsensical outputs (hallucinations) when reasoning, which is unacceptable in clinical settings. McCoy's solution involves a four-step process that separates the LLM's translation role from the logic engine's deductive role. Step 1 involves gathering raw, unstructured source data, like medical literature or patient symptoms. Step 2 uses the LLM to process this raw data and generate a structured set of rules for an ASP solver. This process is guided by a 'Grounder' component and relies on the LLM's translation skills, not its tendency to guess. Step 3 is where the ASP system generates the diagnosis based strictly on these explicit, verifiable rules. The speaker emphasizes that the ASP system is designed to maximize safety and precision by adhering only to stated rules and facts, unlike pure LLMs that might guess based on inferred correlations. Step 4 is the output: a logically consistent and auditable diagnosis. The speaker contrasts this with pure LLMs, which often fail because they try to perform both knowledge acquisition and reasoning simultaneously. The speaker confirms that the preliminary proof-of-concept successfully handled a simple case (diagnosing chickenpox based on fever, chest pain, and fatigue) by generating a robust, justifiable diagnosis based on the explicit rules provided by the framework.

### The Core Conflict

- Explainable AI in High-Stakes Fields: Addressing the massive trust barrier for AI in medicine
- The danger of opaque LLMs producing hallucinations
- The need for verifiable, auditable reasoning paths.

### McCoy's Hybrid Architecture

- A four-step process integrating LLMs and ASP
- LLMs act as translators, converting unstructured data to logic rules
- ASP solver enforces strict logic and generates the final diagnosis.

### Step 1 & 2

- Data Ingestion and Translation: Gather raw medical literature and patient data (symptoms, tests)
- LLM translates data into a formal rule set for the ASP solver, avoiding pure LLM reasoning.

### Step 3 & 4

- Solution Generation and Output: ASP solver uses a 'Choice Rule' to find solutions adhering to constraints
- Output is a human-readable explanation (logic trace) ensuring safety and auditability.

### Proof of Concept Validation

- Tested on a small set of diseases (like chickenpox)
- System correctly linked symptoms (fever, fatigue) to a diagnosis using the rules, proving the concept works for small scales.

### Key Advantage

- Robustness and Safety: System prioritizes known facts and explicit rules over statistical inference, preventing dangerous guesses based on incomplete patient data.

![Screenshot at 00:00: Introductory screen showing the podcast setup and a call to 'Become a Member Today!' against a waveform background.](https://ss.rapidrecap.app/screens/6pFCfFE78v8/00-00-00.jpg)
![Screenshot at 00:17: Speaker discussing the need for explainable AI in high-stakes fields like medicine, highlighting the trust barrier.](https://ss.rapidrecap.app/screens/6pFCfFE78v8/00-00-17.jpg)
![Screenshot at 02:56: Speaker explicitly stating that the core role of the LLM in this framework is translation, not diagnosis.](https://ss.rapidrecap.app/screens/6pFCfFE78v8/00-02-56.jpg)
![Screenshot at 05:04: Speaker defining the problem space by contrasting the system's rule-based approach with traditional coding methods.](https://ss.rapidrecap.app/screens/6pFCfFE78v8/00-05-04.jpg)
![Screenshot at 06:36: Visual representation of the four steps involved in the hybrid reasoning process, outlining the flow from data to logic rule.](https://ss.rapidrecap.app/screens/6pFCfFE78v8/00-06-36.jpg)
