ZIVAK

A doctor that never guesses

Visit Repo
ZIVAK banner

About

## Challenges we ran into

## Challenges We Ran Into

Building ZIVAK involved a few challenges that significantly changed how we designed the final system.

### 1. Escaping the Initial Differential

Initially, ZIVAK generated a disease shortlist only once from the user's **first symptom**. Every later answer could change the probabilities, but it could only reorder diseases already present in that original list.

This created a major problem: patients rarely provide their complete clinical picture in their first message. A vague complaint such as *“I've been feeling tired”* might produce one differential, while a symptom revealed three questions later could point toward an entirely different group of diseases.

We redesigned this into a **dynamic differential**. New clinically relevant symptoms discovered during the conversation can trigger another knowledge-graph retrieval. New diseases can enter the differential, while previous evidence is preserved and used when recalculating their probabilities.

This prevented the entire diagnostic session from being permanently anchored to the user's first message.

### 2. Reducing LLM Token Usage with Expected Information Gain

Our original question-selection pipeline sent a large number of possible diagnostic questions and their associated information to the LLM and asked it to decide what to ask next.

It worked, but it was extremely inefficient. During testing, a single diagnostic run could rapidly consume **hundreds of thousands of input tokens** as the context repeatedly grew.

We moved most of the selection process outside the LLM using **Expected Information Gain (EIG)**.

Instead of asking the LLM to reason over every available question, ZIVAK mathematically estimates which questions are most useful for reducing uncertainty in the current differential. Only the **top candidates (typically five)** are passed to the LLM for final selection and patient-friendly phrasing.

This substantially reduced context usage while also making question selection more deterministic and explainable.

### 3. Fixing Gaps Between Qdrant and Neo4j

One of our hardest problems turned out to be a **data problem rather than a model problem**.

Qdrant could successfully map a patient's symptom to a valid medical/phenotype identifier, but for some of those identifiers, Neo4j contained **no corresponding disease associations**. The retrieval step worked, but the knowledge graph returned zero useful candidates.

We traced this back to limitations in our original ontology datasets, which had strong coverage of certain disease categories but significant gaps elsewhere.

To solve this, we expanded the underlying medical data sources and **rebuilt the ingestion pipeline**, normalizing and merging the additional disease–phenotype information before rebuilding both Neo4j and Qdrant.

This was an important lesson from the project: improving an AI system does not always mean changing the model. In our case, some of the biggest improvements came from fixing the **knowledge and retrieval infrastructure underneath it**.

## The problem it solves

## The Problem It Solves

**ZIVAK is an adaptive AI-powered diagnostic reasoning system designed to turn a patient's natural conversation into a continuously evolving, evidence-backed differential diagnosis.**

Most symptom checkers work from a fixed questionnaire or generate a list of possible conditions from the user's first complaint. This creates a major limitation: **patients rarely describe everything important in their first message.** They may begin with *“I've been feeling tired”* and only later reveal a rash, breathing difficulty, pain, or another symptom that completely changes what conditions should be considered.

ZIVAK is built around the idea that a diagnosis should **evolve as the conversation evolves**.

A user can describe what they are experiencing in everyday language. Specialized AI agents extract the relevant clinical findings and map them to standardized medical concepts. **Semantic search and a medical knowledge graph** are then used to retrieve diseases associated with those findings.

Unlike a static differential, ZIVAK can **dynamically expand its candidate disease pool** when important new symptoms appear. Newly discovered diseases are merged with existing candidates, while previously collected evidence is preserved rather than restarting the diagnostic process.

From there, ZIVAK combines several reasoning layers:

  • **Bayesian updates and likelihood ratios** continuously adjust disease probabilities as evidence accumulates.
  • **Expected Information Gain (EIG)** ranks possible follow-up questions by how much they could reduce uncertainty, allowing only the most useful candidates to reach the AI agent instead of sending dozens of possibilities and consuming unnecessary tokens.
  • A **confidence judge** determines whether sufficient evidence has been collected or whether the diagnostic loop should continue.
  • Specialized AI agents handle **symptom extraction, evidence interpretation, and patient-friendly question generation**, while mathematical reasoning and probability updates remain deterministic.
  • The underlying knowledge pipeline combines standardized **disease and phenotype information from multiple medical ontology sources**, improving coverage across both common and rare conditions.

This also makes ZIVAK more **traceable** than simply asking an LLM *“What disease does this patient have?”* Developers can inspect how symptoms were interpreted, which diseases were retrieved, why a particular question was selected, and how each piece of evidence changed the differential.

ZIVAK is **not intended to replace doctors or provide autonomous medical diagnoses**. It is a diagnostic decision-support system exploring how **agentic AI, medical ontologies, semantic retrieval, knowledge graphs, Bayesian reasoning, and information theory** can work together to make preliminary symptom assessment more adaptive, explainable, and evidence-driven.

Team

From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.