46 points · by lleong1618 · 1y ago · 47 comments
I was reading medical papers and textbooks, but kept getting lost jumping between topics. I thought: what if I could just Cmd+Click through this like code? What if "ALDH2 gene" was actually clickable, and took me to the variant, the phenotype, the population frequencies?
So I started modeling human biology in Rust with my Ralph agent (Claude in a loop, ty ghuntley). Turns out the type system is perfect for this. Every biological entity is strongly-typed with relationships enforced at compile time.
After 1 day of agent coding: - 277 Rust files, ~95k lines of code - 1,561 tests passing - 13 complete organ systems - Genetics with ancestry-specific variants - Clinical pathology models
Try it:
git clone https://github.com/lantos1618/open_human_ontology cd open_human_ontology cargo run --example ide_navigation_demo
Then open `examples/ide_navigation_demo.rs` and Cmd+Click through:
Understanding Asian flush:
AsianGeneticVariantsCatalog::get_metabolic_variants()
// Click through to:
// → ALDH2 gene on chromosome 12q24.12
// → rs671 variant (Glu504Lys)
// → 40% frequency in Japanese population
// → Alcohol flush reaction
// → 10x esophageal cancer risk with alcohol
// → Acetaldehyde metabolism pathway
Understanding migraines: Migraine { subtype: WithAura, triggers: [Stress, LackOfSleep, HormonalChanges], genetic_variants: ["rs2075968", "rs1835740"], ... }
// Click through to:
// → 17 migraine trigger types
// → 12 aura symptom types
// → Genetic risk factors
// → Why clusters happen (HormonalChanges → Menstruation)
Now I can actually navigate the connections instead of flipping through PDFs. Heart → CoronaryArtery → Plaque. VisualCortex → 200M neurons → NeuralConnection pathways. It's like Wikipedia but type-checked and with jump-to-definition.
This isn't production medical software - it's a learning tool. But it's way more useful than textbooks for understanding how biological systems connect.
The agent keeps expanding it. Sometimes it OOMs but that's part of the fun.
Tech: Rust, nalgebra, serde, rayon, proptest
I am not a dr or medical professional this is for my education you can commit to it if you want to or review and open some PR's if you find wrong information or want to add references.
[0]: https://jku-vds-lab.at/tools/
[1]: https://jku-vds-lab.at/publications/2009_bioinformatics_cale...
it seems sound to get structure but on real values and source grounding is needed to be validated.
just a poc
Some(Ancestry::Ashkenazi) => Self {
ancestry,
lactose_restricted: false,
alcohol_restriction_level: AlcoholRestrictionLevel::Moderate,
vitamin_d_supplementation_iu: 800.0,
recommended_foods: vec![
"Fish".to_string(),
"Whole grains".to_string(),
"Vegetables".to_string(),
"Olive oil".to_string(),
"Nuts".to_string(),
],
foods_to_limit: vec![
"High-fat dairy".to_string(),
"Processed meats".to_string(),
],
Now this seems to mix a couple of things in the same module: I would suggest to
separate out dietary views from a model of the human body and its genetic heritage.Scientific views may change over time based on new results, and even body properties like blood pressure or BMI are not constant per person but bound to vary; so perhaps a Body should be modeled as a view or snapshot of a set of time series?
I would like to encourage you to take a scientist's view: if you had not just one (your own) but two models, how would you evaluate which is "better" - in other words the evaluation question. You could set a particular task and perhaps finding out something works better with your model than with a full-text index of the textbook you used and a simple Lucene search interface?
Are you planning to connect your model to any kind of visualization? Should be useful.
https://www.youtube.com/watch?v=Rt3XyeFHvt4 (poorly transcribed here: https://www.janestreet.com/tech-talks/algorithm-for-precisio...)
If I recall correctly, he used miniKanren along with formalized, structured data extracted from medical research. Unfortunately, his son has since passed away.
There's nothing that is not actionable, you can always do science.
I did spot checks on random files with research agents and it seems to be ok for a claude code loop.
I'm not a Dr'
Please! is anyone a DR
should absolutely have a research agent or eyes on for hallucinations and errors
The latter feels a bit less hacker. Akin to saying "I got someone on fiver to mod this game look how cool it is". Sure, ideas are something, but as AI gets better this is less hacker and more just "Tool worked".
I came to HN for "cool software" and "software as a craft/art", but they are being muddled here with a blanket ShowHN type demo.
This is 100% a hack and fun learning tool. It is an experiment to see if modeling biological processes with rust (leveraging specifically its strong type system)
and to see what agents can do. In fact the agent is listening to this thread and taking feed back and changing the repo.
But how will you see if modelling biological processes with rust actually benefits from a strong type system? What have you learned from this? Vs what have you read from the promises of the chatbot?
I don't mean to be dismissive but I think the real goal is "make something cool with an AI agent" and that's fine. But be honest
After the "this meeting could have been an email", we get the "code could have been html"
https://github.com/davidson16807/relativity.scad/wiki/Human-...
I'd try generating markdown to be rendered in logseq by teaching the AI how to link and whatnot in my AGENT.md (or whatever people call their project-local instruction/context file).
From outside, I'd not trust hallucinated stuff, but it'd be neat to start a project where knowledgeable humans did oversee all the proposed changes.
Obsidian/etc really isn't it either, though; clearly OP wants to be able to do calculations with this stuff. They want both the knowledge graph AND an executable code environment. (I imagine Emacs can do both.)
But think more broadly. Imagine just
```
import <established knowledge>.anatomy
import <established knowledge>.high_energy_physics
import <established knowledge>.microeconomics
...
```
into a notebook-like environment, with good intellisense and completions. But not quite as a programming language—somewhere between that and a wiki.
- did fire lead to cooking lead to big brains lead to tools lead to agriculture?
- or was it ice ages ending that lead to agriculture?
- or did oxygen levels change leading to more efficient brains?
- or were we Born to Run?
- or did women's hips change shapes to allow bigger brains?
- or perhaps 2001: A Space Odyssey occurred as written
- or Ancient Aliens...
Repeat for every other highly-debated period of history.
Somehow having all of these in the same modular system feels like it would metabolize them in a way that reading a bunch of separate theories can't really do. Same for OP's anatomy.
Emojis are not the core problem. Mindlessly letting claude do the work and then farm karma on HN is.
honest take - decent at getting a quick understanding of what the ALDH2 process is like but struggles with harder modelling, the experiment gave better insights into ai then medical. (slop is countable with exa mcp (ground truthing, research, anti hallucinations).