Inspiration

A friend of a friend was recently diagnosed with Acute Intermittent Porphyria after an entire month of being diagnosed and treated for the wrong condition. This had caused a strain on her funds, time and emotional wellbeing.

What it does

Quwa helps doctors accelerate the diagnosis of rare diseases by analyzing comprehensive clinical reports, including symptoms and lab results, against a large curated dataset of rare diseases.

How we built it

Backend

The backend was built using Axum, leveraging its speed and safety guarantees. We decided to use Rust so that our endpoints would be fast since this project requires significant processing and fast concurrency.

Knowledge base and RAG pipeline

At the core of Quwa is a retrieval-augmented generation (RAG) pipeline. We indexed a curated rare disease dataset (Orphanet-derived) using rig-core crate into a MongoDB vector store, allowing semantic search over disease descriptions, symptoms, and clinical markers. When a query comes in:

  1. Symptoms, lab values, and extracted report text are embedded.
  2. Relevant rare disease documents are retrieved via vector similarity.
  3. The retrieved context is injected into the model prompt to ground responses in verified medical data. This approach reduces hallucinations and keeps the model focused on plausible rare disease candidates. ###Reports & symptom processing Uploaded lab reports are parsed and normalized before embedding, while user-provided symptoms are structured to preserve severity, duration, and combinations that are commonly misdiagnosed. This allows Quwa to reason over patterns rather than single symptoms. ###Reasoning & transparency Instead of returning a black-box answer, Quwa is designed to show its reasoning process at a high level outlining why certain diseases are considered, what symptoms or lab findings support them, and where uncertainty remains. This makes the system more useful for clinicians and avoids presenting diagnoses as definitive. ###Frontend The frontend is a simple React application focused on clarity and speed. Users can enter symptoms, upload reports, and receive ranked disease suggestions with explanations. The UI intentionally stays minimal to keep the focus on medical insight rather than visual complexity. ## Challenges we ran into
  4. Hitting the Gemini rate on requests per minute which we resolved by pre-embedding our dataset into a vector store .
  5. Slightly longer debugging time as the project is written in Rust. AI was used to help reduce development time.
  6. Laptop crashed during the final phase of development which slowed progress. ## Accomplishments that we're proud of Quwa can assist in differentially diagnosing rare diseases when sufficient patient context such as symptoms and lab analyses is provided. It shows its chain of thoughts which can be reviewed by doctors preventing wrong diagnosis and help save lives, time and money. ## What we learned From this project, we've learnt:
  7. How to build RAG systems and integrating them with Gemini APIs.
  8. Building fast and safe APIs using Rust.
  9. Vector embedding for more efficient dataset handling. ## What's next for Quwa Plans are underway for Quwa to be ran alongside diagnosis and cure processes in hospitals. From which Iterations and readjustments would make it a useful system that would save lifes.

Built With

Share this project:

Updates