🌿 Inspiration
For millennia, traditional healers and indigenous communities worldwide have developed rich empirical systems of botanical medicine. Today, thousands of potential therapeutic discoveries remain hidden inside historical ethnobotanical treatises, folkloric surveys, and scattered academic papers.
Researchers in pharmacology and natural products face four critical hurdles:
- Unstructured Knowledge: Crucial claims are locked in dense, narrative text formats.
- Taxonomic Ambiguity: Species are cited under vernacular names or outdated botanical synonyms.
- Evidence Conflation: Traditional folkloric accounts are often mixed with modern clinical trials without distinction.
- Lack of Provenance: Citations are frequently disconnected from the original publications or cultural origins.
We built EthnoKG to solve this: an end-to-end, reproducible computational pipeline that transforms raw ethnobotanical literature into an interactive, scientifically validated Knowledge Graph with full citation provenance.
🚀 What It Does
EthnoKG provides an integrated research platform for ethnopharmacologists, chemists, and biomedical curators:
- 12-Stage Literature Mining Engine: Automatically extracts botanical entities, vernacular synonyms, plant anatomical parts, preparation forms, bioactive phytochemicals, and therapeutic applications from literature.
- Interactive Knowledge Graph: Dynamic Cytoscape.js visualization allowing researchers to explore multi-hop networks linking
Plants→Bioactive Compounds→Medical Conditions→Publications. - 6-Tier Scientific Evidence Classification: Categorizes every extracted relationship across distinct evidence levels:
- Traditional Use Report
- Ethnobotanical Field Observation
- In-Vitro Experimental Bioassay
- In-Vivo Preclinical Model
- Clinical Human Trial
- In-Silico Prediction
- Human-in-the-Loop Verification Workspace: A dedicated curation interface where scientific reviewers can inspect highlighted source sentences, approve, edit, or reject claims, maintaining an immutable audit log.
- Grounded Research Assistant: A citation-backed query interface that answers complex ethnobotanical questions without hallucinations or ungrounded medical advice.
⚙️ How We Built It
We engineered EthnoKG with a clean, decoupled architecture:
- Backend & NLP Pipeline: Built with FastAPI and Python 3.14. The extraction service implements a 12-stage pipeline utilizing botanical taxonomy harmonizers (mapped to Kew MPNS / World Flora Online standards), biomedical NER, and pattern-based relation extraction.
- Calibrated Confidence Scoring: Relations are scored based on lexical specificity ($S_{lex}$), syntactic distance ($P_{syn}$), and taxonomic validity ($V_{bot}$): $$C_r = w_1 \cdot S_{lex} + w_2 \cdot P_{syn} + w_3 \cdot V_{bot}$$
- Graph Modeling & Persistence: Backed by SQLAlchemy 2.0 and SQLite for relational consistency, coupled with in-memory NetworkX for topological graph traversal, bipartite projections, and sub-graph serialization.
- Frontend Application: Developed with React 19, TypeScript, Vite, and Tailwind CSS. Graph visualizations are powered by Cytoscape.js with interactive physics layouts, while research metrics are visualized using Recharts.
- Quality & Rigor: Backed by automated Pytest suites and a gold-standard benchmark evaluation dataset measuring entity and relation extraction F1 scores.
🚧 Challenges We Ran Into
- Taxonomic Disambiguation: Resolving colloquial names and historical botanical synonyms to modern accepted binomials required building dedicated taxonomic resolution dictionaries.
- Preventing Misleading Medical Claims: Traditional knowledge must be treated with deep cultural respect without falsely presenting historical usage as FDA-approved clinical efficacy. We resolved this through our strict 6-tier evidence separation and ethical disclaimers adhering to the Nagoya Protocol.
- Graph Rendering Performance: Rendering dense multi-entity biological graphs smoothly required tuning Cytoscape layout algorithms and responsive sub-graph filtering.
🏆 Accomplishments That We're Proud Of
- Zero external LLM dependency required for core operation: the system includes an authoritative offline botanical/biomedical extraction engine capable of running completely standalone.
- Full bibliographic provenance: every node and edge links directly to its source DOI and exact text excerpt.
- Production-grade code quality with comprehensive unit and integration test coverage.
📚 What We Learned
- The depth and chemical richness of ethnopharmacological heritage across diverse geographic regions.
- Effective graph data modeling techniques for biological multi-relational data.
- The vital necessity of human verification workflows when applying NLP to scientific domains.
🔮 What's Next for EthnoKG
- Direct integration with NCBI PubMed Central and GBIF APIs for automated continuous harvesting.
- Target prediction models predicting molecular docking affinities between extracted phytochemicals and human protein targets.
- Enhanced conservation status alerts cross-referenced with the IUCN Red List of Threatened Species.
Built With
- cytoscape.js
- fastapi
- knowledge-graph
- natural-language-processing
- networkx
- pydantic
- pytest
- python
- rag
- react
- recharts
- sqlalchemy
- sqlite
- tailwindcss
- typescript
- vite