Aequitas Health: Ethical AI Command Framework for Clinical Triage

1. Executive Summary

Aequitas Health is a high-performance, bias-aware clinical triage system developed for HackDKU 2026. It addresses the critical "Last Mile" challenge in healthcare AI: the transition from raw predictive power to transparent, ethical, and clinically actionable decision support. By integrating real-time demographic auditing with advanced clinical reasoning, Aequitas ensures that AI-driven healthcare is not only efficient but fundamentally equitable.


2. Inspiration: The Crisis of the "Black Box"

The inspiration for Aequitas Health stems from a growing concern in medical informatics: Algorithmic Bias.

Historically, clinical decision support systems have often inadvertently penalized marginalized groups due to biased training data or unexamined variables. For instance, heart failure symptoms in women are frequently under-diagnosed compared to men, and pulse oximetry readings can vary in accuracy across different skin tones.

We were inspired by the concept of Aequitas (the Roman personification of fairness and equity). Our goal was to build a system that doesn't just "predict" but "justifies" and "audits" itself in real-time. We wanted to move away from the "Black Box" model toward a "Glass Box" model where every recommendation is accompanied by an ethical transparency log.


3. The Problem: Structural Inequity in Automated Triage

The core problem we identified is the Lack of Ethical Accountability in automated triage.

Analytical Breakdown of the Problem:

  1. Data Skewness: Medical datasets often lack representative samples from diverse ethnicities and genders.
  2. Hidden Correlations: AI models may inadvertently use demographic markers as proxies for clinical risk, leading to systemic over-treatment or under-treatment.
  3. The Transparency Gap: Most triage systems provide a result (e.g., "Urgent") without explaining why that result was reached or how it accounted for potential bias.

Mathematically, we can represent the bias risk $B$ as a function of demographic variables $D$ and clinical symptoms $S$: $$B = \int_{D} |P(T|S, D) - P(T|S)| dD$$ Where $T$ is the triage outcome. Our objective is to minimize $B$ such that the outcome $T$ is conditionally independent of $D$ given $S$.


4. The Solution: The Aequitas Ethical Triage Engine

Aequitas Health provides a dual-layer intelligence architecture:

Layer 1: Clinical Reasoning

Utilizing the Gemini 3.1 Pro model, the system analyzes complex patient data (symptoms, history, vitals) to determine urgency levels based on established medical protocols (WHO/CDC guidelines).

Layer 2: The Ethical Audit

Simultaneously, the system runs a "Devil's Advocate" audit. It asks: "Would this recommendation change if the patient's ethnicity or gender were different?"

Key Features:

  • Fairness Score: A real-time metric calculating the objectivity of the decision.
  • Bias Mitigation Log: A list of specific demographic factors the AI considered and neutralized.
  • System Transparency Log: A live feed of the AI's internal "thought process" regarding ethical constraints.

5. How It Works: The Intelligence Pipeline

The system operates through a structured 4-stage pipeline:

  1. Intake: The user enters patient data via a polished, high-density interface.
  2. Contextual Synthesis: The AI core ingests the data and maps it against a vast knowledge base of clinical symptoms and ethical guidelines.
  3. Audit & Triage: The model generates a JSON-structured response containing both the clinical recommendation and the ethical audit metrics.
  4. Visualization: The frontend renders this data using a "Technical Dashboard" aesthetic, prioritizing scannability and trust.

6. Tech Stack: The Elite Framework

To achieve a "competition-winning" standard, we selected a cutting-edge, scalable stack:

  • Frontend: React 19 with TypeScript for type-safe, robust development.
  • Styling: Tailwind CSS 4.0 for high-performance, utility-first design.
  • UI Components: shadcn/ui for polished, accessible interface elements.
  • Intelligence: Gemini 3.1 Pro via the @google/genai SDK, leveraging its advanced reasoning and JSON schema enforcement.
  • Animations: Framer Motion for purposeful micro-interactions and staggered entrances.
  • Icons: Lucide React for a consistent, technical visual language.

7. How We Built It: A Strategic Sprint

The project was built using a CEO-AI Command Framework:

  1. Architecture First: We defined the types.ts and firebase-blueprint.json (for future persistence) before writing a single line of UI code.
  2. Component-Driven Development: We built modular components (TriageForm, EthicsAudit) to ensure separation of concerns.
  3. Prompt Engineering: We developed a sophisticated SYSTEM_INSTRUCTION for Gemini that enforces ethical auditing as a mandatory output field.
  4. Iterative Refinement: We used the lint_applet and compile_applet tools to ensure production-grade code quality at every step.

8. Challenges Faced

  • JSON Schema Enforcement: Ensuring the AI consistently returned valid JSON for complex nested objects required rigorous prompt tuning and schema definition.
  • Balancing Density and Clarity: In a technical dashboard, there is a risk of overwhelming the user. We used ScrollArea and Tabs to manage information density.
  • Ethical Quantization: Turning the abstract concept of "Fairness" into a numerical score ($0-100$) required defining a heuristic for the AI to follow based on clinical objectivity.

9. Lessons Learned

  • AI as a Strategic Partner: We learned that AI is most effective when given a clear "Role Architecture" (e.g., "You are an Ethical Auditor").
  • Transparency Builds Trust: Users are more likely to trust an AI's medical advice if the system explicitly acknowledges the biases it is trying to avoid.
  • The Power of Design: A "polished" interface isn't just about aesthetics; it's about communicating the professional and serious nature of the tool.

10. Future Scalability: The Road to Dominance

Aequitas Health is designed for rapid expansion:

  1. FHIR Integration: Connecting directly to Electronic Health Records (EHR) using the FHIR standard for seamless data ingestion.
  2. Multi-Agent Coordination: Implementing the Model Context Protocol (MCP) to allow Aequitas to coordinate with specialist agents (e.g., a Cardiology Agent or a Radiology Agent).
  3. Real-Time Clinical Monitoring: Expanding from one-time triage to continuous patient monitoring with real-time ethical alerts.
  4. Global Localization: Adapting the bias-mitigation logic for different cultural and regional healthcare contexts.

11. Strategic Closing

Aequitas Health represents a shift from "AI as a tool" to "AI as a responsible clinical partner." By prioritizing ethics at the architectural level, we have created a system that is not only technically superior but socially transformative.

Ariadne-Anne DEWATSON-LE'DETsambali
Strategic Lead & Executive Decision Authority
HackDKU 2026

Built With

Share this project:

Updates