## 🌿 TraceHerb — evidence-grounded ethnopharmacology knowledge graph

EthnoHack 2026 · Track 1 — Traditional Knowledge

### 💡 Inspiration Thousands of years of traditional medicine are documented in scientific literature — but as unstructured free text, scattered across thousands of papers. The structured databases we do have are small, hand-curated, and slow to update. And when people try to mine this knowledge automatically, two things go wrong: they over-generate noisy links, and they throw away the source — so you can't verify any claim. For a field where a wrong "this plant treats X" can be dangerous, that's unacceptable. We wanted a system that scales and keeps every claim honest and auditable.

### 🔭 What it does TraceHerb turns 1,000 open-access papers into a knowledge graph of plant → traditional use → condition, where:

  • every edge is typed (treats / manages / prevents) with a confidence score,
  • every edge traces back to the exact sentence and DOI it came from,
  • and a link is only asserted when the source text actually expresses a use — not a mere co-mention.

You can search a plant (e.g. Zingiber officinale — ginger) and see its evidence-cited conditions, or start from a condition (e.g. diabetes) and see the plants associated with it. Both directions, same evidence standard.

### 🛠️ How we built it A four-layer, fully reproducible pipeline (pure Python standard library — no heavy ML install):

  1. Corpus — fetch open-access ethnobotany/ethnopharmacology papers from the Europe PMC REST API (no key).
  2. Entity recognition (NLP) — Europe PMC's biomedical text-mining tags Organisms, Diseases, Chemicals per paper, with section context.
  3. Name resolution — every messy plant name is resolved to an accepted species via GBIF (fuzzy + taxonomic matching), collapsing synonyms.
  4. Relation extraction (AI) — for each sentence where a plant and condition co-occur, a pluggable LLM classifies whether it's a therapeutic-use claim and extracts the relation. It runs offline with a rule-based mock by default (so the demo needs no API key) and plugs into Anthropic/OpenAI with one env var.

The anti-hallucination guarantee: the model's answer must quote a verbatim span of the source sentence, or the edge is rejected. Nothing reaches the graph that doesn't trace to a recorded data point.

Confidence is a simple, defensible statistic over distinct supporting papers:

$$\text{conf} = 1 - \frac{1}{n_\text{papers} + 1}$$

The result is served in a self-contained dashboard (opens in any browser) and the whole thing runs with one command.

### 📊 Results (1,000-paper corpus)

  • 7,113 candidate links → 3,040 AI use-verified edges
  • 516 plant species · 227 conditions · 2,554 treats / 462 manages / 24 prevents
  • We validated honestly with a fixed seed and report two tiers:

| Tier | Edges | Precision proxy | Recall vs 15 gold pairs | |---|---|---|---| | Recall (≥2 papers) | 7,113 | 0.43 | 0.93 (14/15 textbook associations) | | Precision (LLM use-verified) | 3,040 | 1.00 | 0.67 |

Top associations match the literature: ginger→digestive/diabetes, garlic→hypertension, neem→skin/diabetes, turmeric→inflammation.

### 🧗 Challenges we faced

  • Noise vs. provenance. Naive article-level co-occurrence produced ~60k edges, most spurious. We moved to section-level co-occurrence + a use-cue requirement, which cut the noise and let every edge cite a real sentence.
  • Messy plant names. Vernacular names, synonyms, and author citations made the same species appear many ways — solved with GBIF taxonomic resolution.
  • Honesty about uncertainty. We resisted presenting co-occurrences as facts. Instead we built the precision/recall tiers and state limitations explicitly in the UI and README.
  • Reproducibility with no paid services. Everything uses free public APIs and the Python standard library; cached data lets a reviewer rebuild the graph offline.

### 🧠 What we learned

  • An LLM is most trustworthy when it's constrained to label evidence that already exists — grounding turns a generative model into an auditable one.
  • In scientific tooling, measuring and disclosing your own error matters as much as the headline number.

### 🚀 What's next

  • Scale from 1,000 to the full corpus.
  • Add a compound → target layer (LOTUS / NPASS) to connect traditional use to modern pharmacology.

### ⚠️ Responsible research Associations are literature co-occurrences with a use-cue — not validated clinical facts. The interface says so. No personal or patient data is used, and every claim cites its source so traditional knowledge is attributed, not appropriated.

Repo: https://github.com/Chitaranjanpradhan/traceherb-ethnohack

Built With

  • anthropic
  • bioinformatics
  • cheminformatics
  • data-pipeline
  • ethnopharmacology
  • europe-pmc
  • evidence-based
  • gbif
  • html
  • javascript
  • json
  • knowledge-graph
  • llm
  • named-entity-recognition
  • natural-language-processing
  • open-data
  • openai
  • python
  • relation-extraction
  • reproducible-research
  • rest-api
  • scientific-literature
  • taxonomy
  • text-mining
Share this project:

Updates

Submission history