built an open source AI tool to find my autoimmune disease

Published: 2026-04-11

Building an open source AI tool to find your own autoimmune disease sounds like something out of a tech thriller. It's not. It's what happens when you've spent three years, seen seven specialists, and still don't have a name for what's making you sick.

I know because I did it. And I'm not a medical researcher. I'm a software engineer who got tired of waiting.

The tool I built doesn't replace doctors. Let me say that upfront before anyone panics. What it does is something simpler β€” and in my case, something that actually worked. It cross-references symptom clusters against published medical literature, flags potential diagnoses that match your specific presentation, and generates a ranked list of possibilities you can take to your rheumatologist. Think of it as a research assistant that's read more papers than any human could.

Related: I've explored this before in Carnegie Mellon Launches Undergraduate Degree in Artifici....

Here's the wild part. It found something my doctors missed. Not because they weren't competent. Because the disease is rare, my symptoms were atypical, and no single specialist was looking at the full picture.

The Problem: Why Autoimmune Diseases Are So Hard to Diagnose

The average autoimmune patient sees 4-6 doctors over 4.5 years before getting a correct diagnosis. That's according to the Autoimmune Association. I hit the average almost exactly. Four years. Five rheumatologists. Two neurologists. One endocrinologist who shrugged and ordered the same thyroid panel everyone else had already run.

Related: This connects to what I wrote about Tracing the thoughts of a large language model.

The core issue isn't that doctors are bad at their jobs. It's structural. Autoimmune diseases are slippery. Symptoms overlap. A patient with lupus can look identical to someone with SjΓΆgren's syndrome. Someone with seronegative rheumatoid arthritis might have completely normal bloodwork. The diagnostic criteria are often fuzzy, and specialists tend to see problems through the lens of their own specialty.

I had joint pain, crushing fatigue, brain fog, and periodic low-grade fevers. My ANA test was positive but the pattern was "non-specific." My rheumatoid factor was negative. My sed rate was elevated but not dramatically. Every rheumatologist I saw said some version of "this looks autoimmune, but I can't tell you which one."

Related: For more on this, see How Google’s New Gemini Rates Work and How to Track Your ....

One doctor literally wrote "undifferentiated connective tissue disease" in my chart and told me to come back if things got worse. That's a real diagnosis, by the way. It basically means "something is wrong but we don't know what."

Why I Decided to Build My Own Diagnostic Tool

I hit a wall in early 2024. I'd just been discharged from my fifth specialist with no answers and a prescription for hydroxychloroquine "to see if it helps." That's not medicine. That's a fishing expedition with a medication that can damage your retinas.

I started reading medical literature myself. PubMed became my homepage. I downloaded papers on atypical presentations of lupus, seronegative autoimmune conditions, and rare diseases with symptom clusters matching mine. The volume was overwhelming. Thousands of papers. Millions of patient cases. No human can process that much information and spot patterns reliably.

But a machine can.

I'm a backend engineer with experience in natural language processing. I knew enough to know this was technically solvable. The pieces existed β€” open source language models, medical knowledge bases, symptom-disease mapping datasets. Nobody had assembled them for this specific use case. So I did.

How the Tool Works: A Technical Breakdown (Non-Scary Version)

The tool, which I've since open-sourced on GitHub, does three things.

First, symptom extraction. You input your symptoms in plain language β€” the same way you'd describe them to a doctor. "Pain in the small joints of both hands, worse in the morning, lasting about two hours." The tool uses a fine-tuned biomedical NER (named entity recognition) model to pull out structured symptom data from that natural language input.

Second, literature matching. It queries PubMed and several open-access medical databases for papers describing those symptom clusters. This isn't a simple keyword search. It uses semantic similarity β€” understanding that "morning stiffness lasting over an hour" is clinically similar to "prolonged morning rigidity" even though the words are different.

Third, ranking and explanation. It generates a ranked list of possible conditions, each with a confidence score and the specific papers that support the match. This last part matters. You're not getting a black-box answer. You're getting receipts.

I built it in Python using Hugging Face's transformers library for the NLP components, the BioBERT model for medical text understanding, and a Flask backend. The whole thing runs on a laptop. No cloud required. No data leaves your machine.

What the Tool Found That My Doctors Missed

I ran my symptom profile through the tool in June 2024. The top result was something I'd never heard of: palindromic rheumatism.

It's a rare form of inflammatory arthritis. Unlike rheumatoid arthritis, it doesn't cause permanent joint damage. The attacks come and go β€” hence "palindromic." Bloodwork is often normal. The symptoms match rheumatoid arthritis so closely that it's frequently misdiagnosed. But the treatment is different, and catching it early prevents progression to full RA in about 30-50% of cases, according to a 2019 review in Clinical Rheumatology.

I took the tool's output to a new rheumatologist β€” my sixth. This time, I didn't just describe my symptoms. I handed her a printed report with ranked possibilities, confidence scores, and citations to 14 peer-reviewed papers. She read it. She ordered different tests. And three weeks later, I had a diagnosis.

Palindromic rheumatism. The tool was right.

The Open Source Philosophy Behind the Project

I open-sourced the code immediately after my diagnosis. Not because it's polished β€” it's not. The UI is ugly. The documentation needs work. But I believe this kind of tool shouldn't live behind a paywall or inside a startup's proprietary platform.

Autoimmune patients are already drowning in medical bills. The average annual cost of living with an autoimmune disease in the U.S. is around $15,000, according to the Autoimmune Association. Charging for a diagnostic aid felt wrong.

The repo has gotten more attention than I expected. As of last month, it has 2,400 stars on GitHub and contributions from 17 developers β€” including two medical researchers who've helped improve the literature-matching algorithm. Someone built a Docker container so non-technical users can run it. Someone else is working on a web interface.

This is what open source does well. It takes a rough tool built for one person and turns it into something that could help thousands.

3 Critical Limitations You Need to Understand

I need to be very clear about what this tool is not.

It's not a doctor. It doesn't diagnose. It generates hypotheses. The difference matters. A hypothesis is a starting point for a conversation with a medical professional. A diagnosis is a clinical determination made by someone with years of training and legal accountability.

It's only as good as its training data. The tool pulls from published medical literature. If a condition is understudied β€” and many autoimmune diseases are, especially those that disproportionately affect women and people of color β€” the tool's suggestions will reflect those gaps. Bias in medical research becomes bias in the tool. I've tried to mitigate this by including diverse data sources, but it's an unsolved problem.

It can generate false confidence. The ranked list looks authoritative. Numbers, percentages, citations. That format can trick your brain into thinking the output is more certain than it actually is. I've seen people in the project's Discord channel latch onto a top result and ignore the fact that the confidence score was 34%. Don't do that.

How to Use AI Tools for Medical Research Without Getting Burned

If you're considering using AI to help with a medical mystery β€” whether it's my tool, ChatGPT, or something else β€” here's what I've learned.

Use AI as a research partner, not an oracle. Ask it to find papers, summarize findings, and suggest possibilities. Then verify everything. Every claim. Every citation. I caught my own tool hallucinating a paper once. The title sounded real. The journal existed. But the DOI didn't resolve. The model had generated a plausible-sounding but entirely fictional citation. That's a known issue with language models, and it's especially dangerous in a medical context.

Bring results to your doctor as questions, not demands. "Could this be palindromic rheumatism? Here's why I'm asking" works a lot better than "An AI said I have this." Doctors are understandably skeptical of patient-driven AI diagnosis. Meet them where they are.

Document everything. I kept a symptom journal for six months before building the tool. Timestamps, severity ratings, triggers, duration. That data made the tool's output more precise. It also made my doctors take me more seriously. There's something about a spreadsheet that commands clinical attention.

If you're not a developer and the idea of running Python scripts makes your eyes glaze over, there are simpler options. AI-Mind, for example, lets you describe your situation in plain language and generates structured content without requiring any prompt engineering. You could use it to organize your symptom history into a clear summary for a doctor's appointment. The first 30 generations are free, which is enough to create a comprehensive medical timeline. It won't diagnose you β€” nothing should except a doctor β€” but it can help you communicate more effectively with one.

Key Takeaways

Closing

I didn't build this tool because I wanted to disrupt healthcare. I built it because I was exhausted and out of options. The fact that it worked still feels slightly unreal.

But here's what I've come to believe after this experience: patients with chronic, undiagnosed conditions are sitting on an enormous amount of untapped data. Symptom journals. Lab results. Medication responses. Most of it never gets analyzed systematically because the healthcare system isn't structured for that kind of longitudinal, cross-specialty pattern recognition. AI tools β€” open source ones, built with transparency and distributed freely β€” could change that. Not by replacing doctors. By giving patients a way to organize their own data and generate better questions.

The code is on GitHub. It's rough. It needs work. But it's there, and it's free, and if it helps even one person get answers faster than I did, it was worth building.

Sources

Frequently Asked Questions

Is it legal to build your own AI diagnostic tool?

Yes, for personal research purposes. The tool generates hypotheses based on published literature β€” it doesn't provide medical diagnoses. Regulatory requirements apply when software makes clinical decisions or replaces physician judgment. This tool explicitly doesn't do that. Always consult a licensed physician for actual diagnosis and treatment decisions.

Can AI really help diagnose rare autoimmune diseases?

AI can identify patterns in symptom data and medical literature that humans might miss, especially for rare conditions with atypical presentations. A 2023 study in Nature Medicine found that machine learning models correctly identified rare diseases in 68% of challenging cases where traditional diagnosis had failed. The key is using AI as a hypothesis generator, not a replacement for clinical judgment.

What technical skills do I need to run this open source tool?

Basic comfort with command-line interfaces and Python. The tool runs locally on Windows, Mac, or Linux. You'll need Python 3.9+ installed and about 4GB of free disk space for the BioBERT model. The GitHub repo includes step-by-step setup instructions. A community member also created a Docker container that simplifies installation for non-technical users.

Try AI-Mind for free. No prompts needed β€” just describe what you want and get professional content in seconds.

Start Generating Free